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

418 lines
8.2 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
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. 倾心.
  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. 余额3000
  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. 押金30000
  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='+1)">
  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='+0)">
  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="contactUs">
  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>
  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. <image class="image" src="/static/image/center/7.png" mode=""></image>
  104. <text class="grid-text">申请成为水洗店</text>
  105. </uv-grid-item>
  106. </uv-grid>
  107. </view>
  108. </view>
  109. <!-- 联系客服弹框 -->
  110. <uv-overlay :show="show" @click="show = false">
  111. <view class="warp">
  112. <view class="rect" @tap.stop>
  113. <view class="title">联系客服</view>
  114. <view class="center">确定拨打客服电话?</view>
  115. <view class="bottom">
  116. <view>
  117. <uv-button type="info" shape="circle" text="取消" :custom-style="customStyle1"
  118. @click="cancle"></uv-button>
  119. </view>
  120. <view>
  121. <uv-button type="info" shape="circle" text="确定" :custom-style="customStyle2"
  122. @click="confirm"></uv-button>
  123. </view>
  124. </view>
  125. </view>
  126. </view>
  127. </uv-overlay>
  128. <tabber select="4" />
  129. </view>
  130. </template>
  131. <script>
  132. import tabber from '@/components/base/tabbar.vue'
  133. import {
  134. mapGetters
  135. } from 'vuex'
  136. import userShopCommission from '@/components/userShop/userShopCommission.vue'
  137. export default {
  138. components: {
  139. tabber,
  140. userShopCommission,
  141. },
  142. computed: {
  143. ...mapGetters(['userShop']),
  144. customStyle1() {
  145. return {
  146. height: '60rpx',
  147. background: '#FFF',
  148. color: '#000000',
  149. fontSize: '34px',
  150. borderRadius: '40rpx', //圆角
  151. // nvue中必须是下方的写法
  152. 'border-top-right-radius': '40rpx',
  153. 'border-bottom-left-radius': '40rpx',
  154. 'border-bottom-right-radius': '40rpx',
  155. 'width': '150rpx',
  156. }
  157. },
  158. customStyle2() {
  159. return {
  160. height: '60rpx',
  161. background: '#fd5100',
  162. color: '#FFF',
  163. fontSize: '34px',
  164. borderRadius: '40rpx', //圆角
  165. // nvue中必须是下方的写法
  166. 'border-top-right-radius': '40rpx',
  167. 'border-bottom-left-radius': '40rpx',
  168. 'border-bottom-right-radius': '40rpx',
  169. 'width': '150rpx',
  170. }
  171. }
  172. },
  173. data() {
  174. return {
  175. show: false,
  176. }
  177. },
  178. methods: {
  179. headBtn() {
  180. let self = this
  181. uni.showModal({
  182. title: '演示切换角色之后的效果',
  183. success(res) {
  184. if (res.confirm) {
  185. self.$store.state.shop = !self.$store.state.shop
  186. }
  187. }
  188. })
  189. },
  190. // 联系客服按钮回调
  191. contactUs() {
  192. this.show = true
  193. },
  194. confirm() {
  195. this.show = false
  196. },
  197. cancle() {
  198. this.show = false
  199. },
  200. }
  201. }
  202. </script>
  203. <style scoped lang="scss">
  204. .page {
  205. padding-bottom: 200rpx;
  206. .warp {
  207. display: flex;
  208. align-items: center;
  209. justify-content: center;
  210. height: 100%;
  211. }
  212. .rect {
  213. width: 600rpx;
  214. height: 300rpx;
  215. background-color: #fff;
  216. border-radius: 20rpx;
  217. overflow: hidden;
  218. .title {
  219. padding: 10rpx 0 0 15rpx;
  220. background-color: #fd5100;
  221. color: #FFF;
  222. text-align: left;
  223. width: 100%;
  224. height: 18%;
  225. font-size: 36rpx;
  226. }
  227. .center {
  228. height: 40%;
  229. display: flex;
  230. justify-content: center;
  231. align-items: center;
  232. font-size: 36rpx;
  233. }
  234. .bottom {
  235. display: flex;
  236. justify-content: center;
  237. gap: 50rpx;
  238. }
  239. }
  240. }
  241. image {
  242. width: 100%;
  243. height: 100%;
  244. }
  245. .head {
  246. display: flex;
  247. background-color: #fff;
  248. padding: 40rpx 20rpx;
  249. align-items: center;
  250. position: relative;
  251. .headImage {
  252. width: 120rpx;
  253. height: 120rpx;
  254. background-image: url(/static/image/center/3.png);
  255. background-size: 100% 100%;
  256. overflow: hidden;
  257. border-radius: 50%;
  258. margin-right: 40rpx;
  259. }
  260. .info {
  261. font-size: 28rpx;
  262. .vip {
  263. background-color: #FCCC92;
  264. color: #FA6239;
  265. width: 100rpx;
  266. display: flex;
  267. justify-content: center;
  268. align-items: center;
  269. height: 40rpx;
  270. border-radius: 20rpx;
  271. margin-top: 20rpx;
  272. }
  273. .name {
  274. font-size: 32rpx;
  275. }
  276. .tips {
  277. font-size: 26rpx;
  278. color: #ABABAB;
  279. }
  280. }
  281. .headBtn {
  282. margin-left: auto;
  283. padding: 15rpx 20rpx;
  284. background-color: $uni-color;
  285. color: #fff;
  286. border-radius: 20rpx;
  287. margin-top: 50rpx;
  288. }
  289. .setting {
  290. position: absolute;
  291. right: 50rpx;
  292. top: 50rpx;
  293. }
  294. }
  295. .userShop {
  296. .userList {
  297. .title {
  298. font-size: 32rpx;
  299. font-weight: 900;
  300. padding: 20rpx;
  301. }
  302. .list {
  303. display: flex;
  304. flex-wrap: wrap;
  305. .item {
  306. width: 270rpx;
  307. margin: 20rpx;
  308. display: flex;
  309. flex-direction: column;
  310. padding: 40rpx 30rpx;
  311. background-color: #fff;
  312. border-radius: 30rpx;
  313. line-height: 60rpx;
  314. .name {}
  315. .num {
  316. color: $uni-color;
  317. font-weight: 600;
  318. font-size: 28rpx;
  319. }
  320. }
  321. }
  322. }
  323. }
  324. .user {
  325. .line {
  326. display: flex;
  327. background-color: #fff;
  328. margin-top: 20rpx;
  329. padding: 20rpx 0;
  330. .item {
  331. flex: 1;
  332. display: flex;
  333. justify-content: center;
  334. align-items: center;
  335. padding: 20rpx 0;
  336. &:nth-child(1) {
  337. border-right: 1px solid #00000013;
  338. }
  339. .image {
  340. width: 100rpx;
  341. height: 70rpx;
  342. margin-right: 20rpx;
  343. }
  344. }
  345. }
  346. .grid {
  347. flex-direction: column;
  348. font-size: 26rpx;
  349. padding: 20rpx;
  350. .title {
  351. margin-bottom: 30rpx;
  352. font-size: 28rpx;
  353. font-weight: 600;
  354. }
  355. .image {
  356. width: 70rpx;
  357. height: 70rpx;
  358. margin-bottom: 10rpx;
  359. }
  360. text {
  361. text-align: center;
  362. width: 120rpx;
  363. }
  364. }
  365. }
  366. </style>