酒店桌布为微信小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

322 lines
6.6 KiB

9 months ago
8 months ago
9 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
9 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
9 months ago
8 months ago
8 months ago
9 months ago
8 months ago
9 months ago
9 months ago
9 months ago
9 months ago
8 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
  1. <template>
  2. <view class="page">
  3. <navbar title="个人中心" />
  4. <view class="head">
  5. <view class="headImage">
  6. <image src="" mode=""></image>
  7. </view>
  8. <view class="info">
  9. <view class="name">
  10. {{ userInfo.nickName || '微信用户' }}
  11. </view>
  12. <!-- <view class="vip">
  13. VIP1
  14. </view> -->
  15. <!-- <view class="tips">
  16. 今天是您来的的第32天
  17. </view> -->
  18. </view>
  19. <view class="headBtn" @click="headBtn">
  20. 角色切换
  21. </view>
  22. <view class="setting">
  23. <uv-icon name="setting" size="40rpx"></uv-icon>
  24. </view>
  25. </view>
  26. <!-- 水洗店 -->
  27. <view class="userShop" v-if="userShop">
  28. <userShopCommission />
  29. <view class="userList">
  30. <view class="title">
  31. 我的用户
  32. </view>
  33. <view class="list">
  34. <view class="item" v-for="(item, index) in 20" :key="index">
  35. <view class="name">
  36. 客户王生
  37. </view>
  38. <view class="num">
  39. 剩余水洗布198
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. <!-- 酒店 -->
  46. <view class="user" v-else>
  47. <view class="line">
  48. <view class="item">
  49. <view class="image">
  50. <image src="/static/image/center/1.png" mode=""></image>
  51. </view>
  52. <view class="">
  53. 余额 {{ userInfo.balance || 0 }}
  54. </view>
  55. </view>
  56. <view class="item">
  57. <view class="image">
  58. <image src="/static/image/center/4.png" mode=""></image>
  59. </view>
  60. <view class="">
  61. 押金{{ userInfo.deposit || 0 }}
  62. </view>
  63. </view>
  64. </view>
  65. <view class="line grid">
  66. <view class="title">
  67. 常用功能
  68. </view>
  69. <uv-grid :col="4" :border="false">
  70. <uv-grid-item @click="$utils.navigateTo('/pages_order/mine/address')">
  71. <image class="image" src="/static/image/center/7.png" mode=""></image>
  72. <text class="grid-text">地址管理</text>
  73. </uv-grid-item>
  74. <uv-grid-item @click="$utils.redirectTo('/index/order')">
  75. <image class="image" src="/static/image/center/8.png" mode=""></image>
  76. <text class="grid-text">订单管理</text>
  77. </uv-grid-item>
  78. <uv-grid-item @click="$utils.navigateTo('/pages_order/order/refundsOrExchange?index='+0)">
  79. <image class="image" src="/static/image/center/5.png" mode=""></image>
  80. <text class="grid-text">换货</text>
  81. </uv-grid-item>
  82. <uv-grid-item @click="$utils.navigateTo('/pages_order/order/refundsOrExchange?index='+1)">
  83. <image class="image" src="/static/image/center/7.png" mode=""></image>
  84. <text class="grid-text">退货</text>
  85. </uv-grid-item>
  86. </uv-grid>
  87. </view>
  88. <view class="line grid">
  89. <uv-grid :col="4" :border="false">
  90. <uv-grid-item @click="$refs.customerServicePopup.open()">
  91. <image class="image" src="/static/image/center/9.png" mode=""></image>
  92. <text class="grid-text">联系客服</text>
  93. </uv-grid-item>
  94. <uv-grid-item @click="$utils.navigateTo('/pages_order/mine/lease')">
  95. <image class="image" src="/static/image/center/6.png" mode=""></image>
  96. <text class="grid-text">我的租赁</text>
  97. </uv-grid-item>
  98. <uv-grid-item @click="$utils.redirectTo('/index/cart')">
  99. <image class="image" src="/static/image/center/7.png" mode=""></image>
  100. <text class="grid-text">租赁车</text>
  101. </uv-grid-item>
  102. <uv-grid-item
  103. @click="$utils.navigateTo('/pages_order/auth/loginAndRegisterAndForgetPassword?index='+2)">
  104. <image class="image" src="/static/image/center/7.png" mode=""></image>
  105. <text class="grid-text">申请成为水洗店</text>
  106. </uv-grid-item>
  107. </uv-grid>
  108. </view>
  109. </view>
  110. <customerServicePopup ref="customerServicePopup"/>
  111. <tabber select="4" />
  112. </view>
  113. </template>
  114. <script>
  115. import customerServicePopup from '@/components/config/customerServicePopup.vue'
  116. import tabber from '@/components/base/tabbar.vue'
  117. import {
  118. mapGetters,
  119. mapState,
  120. } from 'vuex'
  121. import userShopCommission from '@/components/userShop/userShopCommission.vue'
  122. export default {
  123. components: {
  124. tabber,
  125. userShopCommission,
  126. customerServicePopup,
  127. },
  128. computed: {
  129. ...mapGetters(['userShop']),
  130. ...mapState(['userInfo']),
  131. },
  132. data() {
  133. return {
  134. }
  135. },
  136. onShow() {
  137. this.$store.commit('getUserInfo')
  138. },
  139. methods: {
  140. headBtn() {
  141. let self = this
  142. uni.showModal({
  143. title: '演示切换角色之后的效果',
  144. success(res) {
  145. if (res.confirm) {
  146. self.$store.state.shop = !self.$store.state.shop
  147. }
  148. }
  149. })
  150. },
  151. }
  152. }
  153. </script>
  154. <style scoped lang="scss">
  155. .page {
  156. }
  157. image {
  158. width: 100%;
  159. height: 100%;
  160. }
  161. .head {
  162. display: flex;
  163. background-color: #fff;
  164. padding: 40rpx 20rpx;
  165. align-items: center;
  166. position: relative;
  167. .headImage {
  168. width: 120rpx;
  169. height: 120rpx;
  170. background-image: url(/static/image/center/3.png);
  171. background-size: 100% 100%;
  172. overflow: hidden;
  173. border-radius: 50%;
  174. margin-right: 40rpx;
  175. }
  176. .info {
  177. font-size: 28rpx;
  178. .vip {
  179. background-color: #FCCC92;
  180. color: #FA6239;
  181. width: 100rpx;
  182. display: flex;
  183. justify-content: center;
  184. align-items: center;
  185. height: 40rpx;
  186. border-radius: 20rpx;
  187. margin-top: 20rpx;
  188. }
  189. .name {
  190. font-size: 32rpx;
  191. }
  192. .tips {
  193. font-size: 26rpx;
  194. color: #ABABAB;
  195. }
  196. }
  197. .headBtn {
  198. margin-left: auto;
  199. padding: 15rpx 20rpx;
  200. background-color: $uni-color;
  201. color: #fff;
  202. border-radius: 20rpx;
  203. margin-top: 50rpx;
  204. }
  205. .setting {
  206. position: absolute;
  207. right: 50rpx;
  208. top: 50rpx;
  209. }
  210. }
  211. .userShop {
  212. .userList {
  213. .title {
  214. font-size: 32rpx;
  215. font-weight: 900;
  216. padding: 20rpx;
  217. }
  218. .list {
  219. display: flex;
  220. flex-wrap: wrap;
  221. .item {
  222. width: 270rpx;
  223. margin: 20rpx;
  224. display: flex;
  225. flex-direction: column;
  226. padding: 40rpx 30rpx;
  227. background-color: #fff;
  228. border-radius: 30rpx;
  229. line-height: 60rpx;
  230. .name {}
  231. .num {
  232. color: $uni-color;
  233. font-weight: 600;
  234. font-size: 28rpx;
  235. }
  236. }
  237. }
  238. }
  239. }
  240. .user {
  241. .line {
  242. display: flex;
  243. background-color: #fff;
  244. margin-top: 20rpx;
  245. padding: 20rpx 0;
  246. .item {
  247. flex: 1;
  248. display: flex;
  249. justify-content: center;
  250. align-items: center;
  251. padding: 20rpx 0;
  252. &:nth-child(1) {
  253. border-right: 1px solid #00000013;
  254. }
  255. .image {
  256. width: 100rpx;
  257. height: 70rpx;
  258. margin-right: 20rpx;
  259. }
  260. }
  261. }
  262. .grid {
  263. flex-direction: column;
  264. font-size: 26rpx;
  265. padding: 20rpx;
  266. .title {
  267. margin-bottom: 30rpx;
  268. font-size: 28rpx;
  269. font-weight: 600;
  270. }
  271. .image {
  272. width: 70rpx;
  273. height: 70rpx;
  274. margin-bottom: 10rpx;
  275. }
  276. text {
  277. text-align: center;
  278. width: 120rpx;
  279. }
  280. }
  281. }
  282. </style>