index.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  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" mode="aspectFill"></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/roomPosition')">
  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 = uni.getStorageSync('userInfo').realName;
  80. this.avatar = 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({
  91. url
  92. })
  93. }
  94. }
  95. }
  96. </script>
  97. <style scoped lang="less">
  98. .page {
  99. background: #F3F4F4;
  100. padding-bottom: 40rpx;
  101. box-sizing: border-box;
  102. overflow-y: auto;
  103. .bg {
  104. width: 100%;
  105. height: 412rpx;
  106. padding: 0 60rpx;
  107. background: url(https://i.ringzle.com/file/20240107/fc66824bcef14a3b9e19f8b966a128c7.png) no-repeat;
  108. background-size: 100% 100%;
  109. box-sizing: border-box;
  110. position: relative;
  111. z-index: 1;
  112. .account {
  113. display: flex;
  114. align-items: center;
  115. image {
  116. width: 96rpx;
  117. height: 96rpx;
  118. border-radius: 50rpx;
  119. }
  120. text {
  121. font-size: 40rpx;
  122. font-family: PingFang SC, PingFang SC;
  123. font-weight: 800;
  124. color: #FFFFFF;
  125. margin: 0 20rpx;
  126. }
  127. }
  128. }
  129. .box {
  130. width: calc(100% - 60rpx);
  131. margin: 0 30rpx;
  132. padding: 30rpx;
  133. box-sizing: border-box;
  134. background: #FFFFFF;
  135. border-radius: 10rpx 10rpx 10rpx 10rpx;
  136. }
  137. .orders {
  138. margin-top: -25rpx;
  139. position: relative;
  140. z-index: 2;
  141. .o_top {
  142. display: flex;
  143. align-items: center;
  144. justify-content: space-between;
  145. &>text {
  146. font-size: 32rpx;
  147. font-family: PingFang SC, PingFang SC;
  148. font-weight: 800;
  149. color: #333333;
  150. }
  151. &>view {
  152. display: flex;
  153. align-items: center;
  154. &>text {
  155. font-size: 24rpx;
  156. font-family: PingFang SC, PingFang SC;
  157. font-weight: 400;
  158. color: #999999;
  159. margin-right: 10rpx;
  160. }
  161. }
  162. }
  163. .o_menus {
  164. margin-top: 30rpx;
  165. padding-top: 30rpx;
  166. border-top: 1rpx solid #F1F1F1;
  167. display: flex;
  168. align-items: center;
  169. justify-content: space-around;
  170. flex-wrap: wrap;
  171. &>view {
  172. width: 25%;
  173. display: flex;
  174. flex-direction: column;
  175. align-items: center;
  176. image {
  177. width: 64rpx;
  178. height: 64rpx;
  179. }
  180. text {
  181. font-size: 24rpx;
  182. font-family: PingFang SC, PingFang SC;
  183. font-weight: 400;
  184. color: #1F2425;
  185. margin-top: 10rpx;
  186. }
  187. }
  188. }
  189. }
  190. .menu {
  191. margin-top: 30rpx;
  192. display: flex;
  193. align-items: center;
  194. justify-content: space-between;
  195. text {
  196. font-size: 30rpx;
  197. font-family: PingFang SC, PingFang SC;
  198. font-weight: 400;
  199. color: #333333;
  200. }
  201. }
  202. }
  203. ::v-deep .bottomBg {
  204. background: transparent !important;
  205. }
  206. </style>