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

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