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

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