index.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. <template>
  2. <view class="page" :style="{'height':(h)+'px'}">
  3. <c-nav-bar title="我的" bgColor="transparent" :titleStyle="titleStyle" :showIcon="false"></c-nav-bar>
  4. <view class="bg" :style="{'padding-top':(mt+30)+'px'}">
  5. <view class="account">
  6. <image :src="avatar"></image>
  7. <text>{{name}}</text>
  8. <u-icon name="arrow-right" color="#ffffff" size="28"></u-icon>
  9. </view>
  10. </view>
  11. <view class="orders box">
  12. <view class="o_top">
  13. <text>订单管理</text>
  14. <view @click="toTurn('/pagesMy/orderList/orderList')">
  15. <text>全部</text>
  16. <u-icon name="arrow-right" color="#999999" size="28"></u-icon>
  17. </view>
  18. </view>
  19. <view class="o_menus">
  20. <view v-for="(item,index) in menus" :key="index" @click="specifiedOrder(index)">
  21. <image :src="item.img"></image>
  22. <text>{{item.title}}</text>
  23. </view>
  24. </view>
  25. </view>
  26. <view class="menu box" @click="toTurn('/pagesMy/stayInfo/stayInfo')">
  27. <text>酒店民宿信息</text>
  28. <u-icon name="arrow-right" color="#999999" size="28"></u-icon>
  29. </view>
  30. <navigator url="/pages/my/roomType">
  31. <view class="menu box">
  32. <text>房型管理</text>
  33. <u-icon name="arrow-right" color="#999999" size="28"></u-icon>
  34. </view>
  35. </navigator>
  36. <view class="menu box" @tap="toTurn('/pagesMy/code/index')">
  37. <text>预订二维码</text>
  38. <u-icon name="arrow-right" color="#999999" size="28"></u-icon>
  39. </view>
  40. <Tabbar :tabbarIndex="3"></Tabbar>
  41. </view>
  42. </template>
  43. <script>
  44. export default {
  45. data() {
  46. return {
  47. titleStyle: {
  48. fontSize: '34rpx',
  49. fontWeight: "bold",
  50. color: '#FFFFFF'
  51. },
  52. avatar: 'https://i.ringzle.com/file/20240107/d61321708599457bbcca1c089154e635.png',
  53. name: '未知',
  54. menus: [{
  55. img: 'https://i.ringzle.com/file/20240107/83bca90dfb3f4b1fba36115dc7269219.png',
  56. title: '待确认',
  57. path: ''
  58. },
  59. {
  60. img: 'https://i.ringzle.com/file/20240107/7e7825255bbc4d06ae5d75e7bb23db71.png',
  61. title: '未支付',
  62. path: ''
  63. },
  64. {
  65. img: 'https://i.ringzle.com/file/20240107/c368a627821244929ab6477acb46fb15.png',
  66. title: '已预订',
  67. path: ''
  68. },
  69. {
  70. img: 'https://i.ringzle.com/file/20240107/656b5cc9e9514a08a3f2abd86d86b4ca.png',
  71. title: '已取消',
  72. path: ''
  73. }
  74. ]
  75. }
  76. },
  77. mounted() {
  78. if(uni.getStorageSync('userInfo')){
  79. this.name = JSON.parse(uni.getStorageSync('userInfo')).realName;
  80. this.avatar = JSON.parse(uni.getStorageSync('userInfo')).headUrl;
  81. }
  82. },
  83. methods: {
  84. specifiedOrder(index) {
  85. uni.navigateTo({
  86. url: '/pagesMy/orderList/orderList?Type='+index
  87. })
  88. },
  89. toTurn(url){
  90. uni.navigateTo({ url })
  91. }
  92. }
  93. }
  94. </script>
  95. <style scoped lang="less">
  96. .page {
  97. background: #F3F4F4;
  98. padding-bottom: 40rpx;
  99. box-sizing: border-box;
  100. overflow-y: auto;
  101. .bg {
  102. width: 100%;
  103. height: 412rpx;
  104. padding: 0 60rpx;
  105. background: url(https://i.ringzle.com/file/20240107/fc66824bcef14a3b9e19f8b966a128c7.png) no-repeat;
  106. background-size: 100% 100%;
  107. box-sizing: border-box;
  108. position: relative;
  109. z-index: 1;
  110. .account {
  111. display: flex;
  112. align-items: center;
  113. image {
  114. width: 96rpx;
  115. height: 96rpx;
  116. }
  117. text {
  118. font-size: 40rpx;
  119. font-family: PingFang SC, PingFang SC;
  120. font-weight: 800;
  121. color: #FFFFFF;
  122. margin: 0 20rpx;
  123. }
  124. }
  125. }
  126. .box {
  127. width: calc(100% - 60rpx);
  128. margin: 0 30rpx;
  129. padding: 30rpx;
  130. box-sizing: border-box;
  131. background: #FFFFFF;
  132. border-radius: 10rpx 10rpx 10rpx 10rpx;
  133. }
  134. .orders {
  135. margin-top: -25rpx;
  136. position: relative;
  137. z-index: 2;
  138. .o_top {
  139. display: flex;
  140. align-items: center;
  141. justify-content: space-between;
  142. &>text {
  143. font-size: 32rpx;
  144. font-family: PingFang SC, PingFang SC;
  145. font-weight: 800;
  146. color: #333333;
  147. }
  148. &>view {
  149. display: flex;
  150. align-items: center;
  151. &>text {
  152. font-size: 24rpx;
  153. font-family: PingFang SC, PingFang SC;
  154. font-weight: 400;
  155. color: #999999;
  156. margin-right: 10rpx;
  157. }
  158. }
  159. }
  160. .o_menus {
  161. margin-top: 30rpx;
  162. padding-top: 30rpx;
  163. border-top: 1rpx solid #F1F1F1;
  164. display: flex;
  165. align-items: center;
  166. justify-content: space-around;
  167. flex-wrap: wrap;
  168. &>view {
  169. width: 25%;
  170. display: flex;
  171. flex-direction: column;
  172. align-items: center;
  173. image {
  174. width: 64rpx;
  175. height: 64rpx;
  176. }
  177. text {
  178. font-size: 24rpx;
  179. font-family: PingFang SC, PingFang SC;
  180. font-weight: 400;
  181. color: #1F2425;
  182. margin-top: 10rpx;
  183. }
  184. }
  185. }
  186. }
  187. .menu {
  188. margin-top: 30rpx;
  189. display: flex;
  190. align-items: center;
  191. justify-content: space-between;
  192. text {
  193. font-size: 30rpx;
  194. font-family: PingFang SC, PingFang SC;
  195. font-weight: 400;
  196. color: #333333;
  197. }
  198. }
  199. }
  200. </style>