珠宝小程序前端代码
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.

465 lines
10 KiB

5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
  1. <template>
  2. <view class="page">
  3. <navbar title="个人中心" />
  4. <!-- 头部 -->
  5. <view class="head">
  6. <view class="headImage">
  7. <image :src="userInfo.headImage" mode="widthFix"></image>
  8. </view>
  9. <view class="user-info">
  10. <view class="user-base-info">
  11. <view class="user-base-top">
  12. <view class="user-name">倾心.临时决定离开军队费时费力士大夫</view>
  13. <view class="member-level">
  14. <image src="@/static/image/center/diamond-min.png" mode="widthFix" class="level"></image>
  15. <image v-if="false" src="@/static/image/center/gold-min.png" mode="widthFix" class="level">
  16. </image>
  17. <image v-if="false" src="@/static/image/center/sliver-min.png" mode="widthFix"
  18. class="level">
  19. </image>
  20. </view>
  21. <view class="user-tag">
  22. 合伙人
  23. </view>
  24. </view>
  25. <view class="edit-user">
  26. <image src="@/static/image/center/edit-icon.png" mode="widthFix" class="edit-icon"></image>
  27. <view class="edit-btn">
  28. 修改资料
  29. </view>
  30. </view>
  31. </view>
  32. <view class="user-phone">
  33. 手机号:1820000000
  34. </view>
  35. </view>
  36. </view>
  37. <!-- 会员卡片 -->
  38. <view class="earnings">
  39. <view v-if="index==1" v-for="(item,index) in memberList" :key="item.id" class="member-item">
  40. <image :src="item.memberBg" mode="widthFix" class="member-image"></image>
  41. <view class="member-info">
  42. <view class="profile-photo">
  43. <image src="@/pages_order/static/card/profilePhoto.png" mode="widthFix" class="pro-img"></image>
  44. <view class="open-status">
  45. 已开通29天
  46. </view>
  47. </view>
  48. <view class="open">
  49. 剩余一天到期
  50. </view>
  51. </view>
  52. </view>
  53. </view>
  54. <!-- 佣金数据 -->
  55. <view class="brokerage-data">
  56. <view class="brokerage">
  57. <image src="@/static/image/center/brokerage.png" mode="widthFix" class="brokerage-img"></image>
  58. <div class="main">
  59. <div class="title">我的佣金</div>
  60. <div class="money">240</div>
  61. </div>
  62. </view>
  63. <view class="balance">
  64. <image src="@/static/image/center/balance.png" mode="widthFix" class="balance-img"></image>
  65. <div class="main">
  66. <div class="title">我的余额</div>
  67. <div class="money">1200</div>
  68. </div>
  69. </view>
  70. </view>
  71. <!-- 我的服务 -->
  72. <view class="myServer">
  73. <view class="server-title">
  74. 我的服务
  75. </view>
  76. <view class="box">
  77. <view class="boxs" @click="$utils.navigateTo('/pages/index/order?type=1')">
  78. <image src="@/static/image/center/1.png" mode="widthFix" />
  79. <view class="title">我的订单</view>
  80. </view>
  81. <view class="boxs" @click="$utils.navigateTo('/pages/index/order?type=2')">
  82. <image src="@/static/image/center/2.png" mode="widthFix" />
  83. <view class="title">我的团队</view>
  84. </view>
  85. <view class="boxs" @click="$utils.navigateTo('/pages/index/order?type=3')">
  86. <image src="@/static/image/center/3.png" mode="widthFix" />
  87. <view class="title">联系客服</view>
  88. </view>
  89. <view class="boxs" @click="$utils.navigateTo('/pages/index/order?type=4')">
  90. <image src="@/static/image/center/4.png" mode="widthFix" />
  91. <view class="title">邀请好友</view>
  92. </view>
  93. </view>
  94. <view class="box">
  95. <view class="boxs" @click="$utils.navigateTo('/pages/index/order?type=1')">
  96. <image src="@/static/image/center/5.png" mode="widthFix" />
  97. <view class="title">广告招商</view>
  98. </view>
  99. <view class="boxs" @click="$utils.navigateTo('/pages/index/order?type=2')">
  100. <image src="@/static/image/center/6.png" mode="widthFix" />
  101. <view class="title">会员权益</view>
  102. </view>
  103. <view class="boxs" @click="$utils.navigateTo('/pages/index/order?type=3')">
  104. <image src="@/static/image/center/7.png" mode="widthFix" />
  105. <view class="title">优惠券</view>
  106. </view>
  107. <view class="boxs" @click="$utils.navigateTo('/pages/index/order?type=4')">
  108. <image src="@/static/image/center/8.png" mode="widthFix" />
  109. <view class="title">帮助与反馈</view>
  110. </view>
  111. </view>
  112. </view>
  113. <!-- 广告 -->
  114. <div v-if="showAdvertising" class="ad">
  115. <swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="true" :interval="2000"
  116. :duration="duration">
  117. <swiper-item v-for="item in 10">
  118. <view class="swiper-main">
  119. <view @click="closeAdvertising" class="close">
  120. <image src="@/static/image/center/close.png" mode="widthFix" class="close-img"></image>
  121. </view>
  122. <image src="@/static/image/center/ad.png" mode="widthFix" class="swiper-main-img"></image>
  123. <div class="ad-tag">
  124. <image src="@/static/image/center/ad-tag.png" mode="widthFix" class="ad-tag-img"></image>
  125. </div>
  126. </view>
  127. </swiper-item>
  128. </swiper>
  129. </div>
  130. <customerServicePopup ref="customerServicePopup" />
  131. <tabber select="center" />
  132. </view>
  133. </template>
  134. <script>
  135. import tabber from '@/components/base/tabbar.vue'
  136. import {
  137. mapState
  138. } from 'vuex'
  139. import customerServicePopup from '@/components/config/customerServicePopup.vue'
  140. export default {
  141. components: {
  142. tabber,
  143. customerServicePopup,
  144. },
  145. computed: {
  146. ...mapState(['userInfo', 'riceInfo']),
  147. },
  148. data() {
  149. return {
  150. vipType: ['普通会员', '黄金会员', '渠道商'],
  151. vipImage: ['vip_vip', 'vip_user', 'vip_shop'],
  152. memberList: [{
  153. id: 1,
  154. memberBg: "/pages_order/static/card/diamond.png",
  155. },
  156. {
  157. id: 2,
  158. memberBg: "/pages_order/static/card/gold.png",
  159. },
  160. {
  161. id: 3,
  162. memberBg: "/pages_order/static/card/silver.png",
  163. }
  164. ],
  165. showAdvertising: true,
  166. }
  167. },
  168. onShow() {
  169. this.$store.commit('getUserInfo')
  170. this.$store.commit('getRiceInfo')
  171. },
  172. methods: {
  173. clickNo() {
  174. uni.showModal({
  175. title: '暂未开放',
  176. })
  177. },
  178. //关闭广告
  179. closeAdvertising() {
  180. this.showAdvertising = false;
  181. }
  182. }
  183. }
  184. </script>
  185. <style scoped lang="scss">
  186. .page {
  187. // 头部
  188. .head {
  189. display: flex;
  190. align-items: center;
  191. padding: 110rpx 20rpx;
  192. background: $uni-color;
  193. .headImage {
  194. width: 130rpx;
  195. height: 130rpx;
  196. background-image: url(/static/image/center/head-img.png);
  197. background-size: 100%;
  198. overflow: hidden;
  199. border-radius: 50%;
  200. margin-right: 40rpx;
  201. image {
  202. width: 100%;
  203. height: 100%;
  204. }
  205. }
  206. .user-info {
  207. width: calc(100% - 130rpx);
  208. .user-base-info {
  209. display: flex;
  210. flex-wrap: wrap;
  211. justify-content: space-between;
  212. .user-base-top {
  213. width: 65%;
  214. display: flex;
  215. align-items: center;
  216. flex-wrap: wrap;
  217. color: white;
  218. .user-name {
  219. max-width: calc(100% - 240rpx);
  220. white-space: nowrap;
  221. text-overflow: ellipsis;
  222. overflow: hidden;
  223. font-size: 34rpx;
  224. }
  225. .member-level {
  226. margin-left: 10rpx;
  227. .level {
  228. width: 120rpx;
  229. }
  230. }
  231. .user-tag {
  232. display: flex;
  233. align-items: center;
  234. justify-content: center;
  235. background: #000;
  236. width: 100rpx;
  237. height: 40rpx;
  238. border-radius: 20rpx;
  239. font-size: 24rpx;
  240. margin-left: 10rpx;
  241. }
  242. }
  243. .edit-user {
  244. width: 35%;
  245. display: flex;
  246. align-items: center;
  247. justify-content: flex-end;
  248. .edit-icon {
  249. width: 30rpx;
  250. }
  251. .edit-btn {
  252. color: white;
  253. margin-left: 10rpx;
  254. }
  255. }
  256. }
  257. .user-phone {
  258. color: white;
  259. font-size: 24rpx;
  260. }
  261. }
  262. }
  263. // 会员卡片
  264. .earnings {
  265. padding: 20rpx;
  266. box-sizing: border-box;
  267. margin-top: -20%;
  268. .member-item {
  269. position: relative;
  270. .member-image {
  271. width: 100%;
  272. }
  273. .member-info {
  274. position: absolute;
  275. bottom: 30rpx;
  276. left: 0rpx;
  277. display: flex;
  278. align-items: center;
  279. padding: 0rpx 40rpx;
  280. box-sizing: border-box;
  281. width: 100%;
  282. .profile-photo {
  283. display: flex;
  284. justify-content: center;
  285. align-items: center;
  286. .pro-img {
  287. width: 60rpx;
  288. height: 60rpx;
  289. }
  290. .open-status {
  291. color: #F8A95F;
  292. border: 1px solid #F8A95F;
  293. border-radius: 30rpx;
  294. padding: 7rpx 20rpx;
  295. margin-left: 10rpx;
  296. }
  297. }
  298. .open {
  299. font-size: 26rpx;
  300. margin-left: 20rpx;
  301. }
  302. }
  303. }
  304. }
  305. // 佣金数据
  306. .brokerage-data {
  307. padding: 20rpx;
  308. background: white;
  309. border-radius: 20rpx;
  310. display: flex;
  311. flex-wrap: wrap;
  312. box-sizing: border-box;
  313. margin: 0rpx 20rpx 20rpx 20rpx;
  314. .brokerage,
  315. .balance {
  316. display: flex;
  317. flex-wrap: wrap;
  318. width: 50%;
  319. .brokerage-img,
  320. .balance-img {
  321. width: 50%;
  322. }
  323. .main {
  324. display: flex;
  325. flex-direction: column;
  326. justify-content: space-around;
  327. width: 50%;
  328. box-sizing: border-box;
  329. padding: 30rpx 0rpx;
  330. .title {
  331. font-size: 34rpx;
  332. }
  333. .money {
  334. font-size: 40rpx;
  335. color: #DC2828;
  336. font-weight: bold;
  337. }
  338. }
  339. }
  340. }
  341. // 我的服务
  342. .myServer {
  343. margin: 0rpx 20rpx 20rpx 20rpx;
  344. background: white;
  345. border-radius: 20rpx;
  346. padding: 20rpx;
  347. box-sizing: border-box;
  348. .server-title {
  349. margin-bottom: 20rpx;
  350. font-size: 34rpx;
  351. }
  352. .box {
  353. display: flex;
  354. width: 100%;
  355. justify-content: space-around;
  356. margin-bottom: 20rpx;
  357. .boxs {
  358. width: 25%;
  359. display: flex;
  360. flex-direction: column;
  361. justify-content: center;
  362. align-items: center;
  363. image {
  364. width: 60rpx;
  365. height: 60rpx;
  366. display: block;
  367. margin: 0rpx auto 10rpx auto;
  368. }
  369. }
  370. &:last-child {
  371. margin-bottom: 0rpx;
  372. }
  373. }
  374. }
  375. // 广告
  376. .ad {
  377. margin: 0rpx 20rpx;
  378. .swiper {
  379. .swiper-main {
  380. position: relative;
  381. .close {
  382. position: absolute;
  383. top: 20rpx;
  384. right: 20rpx;
  385. .close-img {
  386. width: 40rpx;
  387. height: 40rpx;
  388. }
  389. }
  390. .swiper-main-img {
  391. width: 100%;
  392. }
  393. .ad-tag {
  394. position: absolute;
  395. left: 20rpx;
  396. bottom: 20rpx;
  397. .ad-tag-img {
  398. width: 100rpx;
  399. }
  400. }
  401. }
  402. }
  403. }
  404. }
  405. </style>