酒店桌布为微信小程序
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.

316 lines
6.1 KiB

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