敢为人鲜小程序前端代码仓库
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.

405 lines
8.4 KiB

5 months ago
  1. <!-- 会员中心页面 -->
  2. <template>
  3. <view class="member-center">
  4. <!-- 导航栏 -->
  5. <navbar title="会员中心" leftClick @leftClick="$utils.navigateBack" />
  6. <!-- 会员卡片 -->
  7. <swiper :slides-per-view="3" :space-between="50" @swiper="onSwiper" @slideChange="onSlideChange">
  8. <swiper-slide v-for="item in memberList" :key="item.id" class="member-item">
  9. <image :src="item.memberBg" mode="widthFix" class="member-image"></image>
  10. <view class="member-info">
  11. <view class="profile-photo">
  12. <image src="@/pages_order/static/card/profilePhoto.png" mode="widthFix" class="pro-img">
  13. </image>
  14. <view class="open-status">
  15. 暂未开通
  16. </view>
  17. </view>
  18. <view class="open">
  19. 立即开通
  20. </view>
  21. </view>
  22. </swiper-slide>
  23. </swiper>
  24. <!-- 充值套餐 -->
  25. <view class="top-up-package">
  26. <view class="title">
  27. 充值套餐
  28. </view>
  29. <view class="set-meal-list">
  30. <view v-for="item in cardList" :key="item.id" :class="{'active-set-meal-item' : item.id == 1}"
  31. class="set-meal-item">
  32. <view class="card-tag">
  33. 限时折扣
  34. </view>
  35. <view class="card-title">{{ item.title }}</view>
  36. <view class="money">
  37. <text class="unit"></text>{{ item.money }}
  38. </view>
  39. </view>
  40. </view>
  41. <view class="member-descript">
  42. 不同会员等级商品价格不一样可以设置给与推荐人佣金
  43. </view>
  44. </view>
  45. <!-- 会员权益 -->
  46. <view class="member-equity-title">
  47. <image src="@/pages_order/static/memberCenter/equity.png" mode="widthFix" class="eqyity-img"></image>
  48. </view>
  49. <view class="equity-card-list">
  50. <view v-for="(item,index) in equityList" :key="item.id" class="equity-card">
  51. <view class="equity-title">{{ item.title }}</view>
  52. <view class="equity-descript-list">
  53. <view class="equity-descript-icon">
  54. <image :src="item.icon" mode="widthFix" class="equity-descript-img"></image>
  55. </view>
  56. <view v-for="(litem,lindex) in item.list" :key="lindex" class="equity-descript-item">
  57. <view class="num">
  58. {{ lindex + 1 }}
  59. </view>
  60. <view class="content">
  61. {{ litem }}
  62. </view>
  63. </view>
  64. </view>
  65. </view>
  66. </view>
  67. </view>
  68. </template>
  69. <script>
  70. import {
  71. Swiper,
  72. SwiperSlide
  73. } from 'vue-awesome-swiper'
  74. import 'swiper/css/swiper.css'
  75. export default {
  76. name: "MemberCenter",
  77. data() {
  78. return {
  79. memberList: [{
  80. id: 1,
  81. memberBg: "/pages_order/static/card/diamond.png",
  82. },
  83. {
  84. id: 2,
  85. memberBg: "/pages_order/static/card/gold.png",
  86. },
  87. {
  88. id: 3,
  89. memberBg: "/pages_order/static/card/silver.png",
  90. }
  91. ],
  92. list: [
  93. 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
  94. 'https://cdn.uviewui.com/uview/swiper/swiper2.png',
  95. 'https://cdn.uviewui.com/uview/swiper/swiper1.png'
  96. ],
  97. memberList: [{
  98. id: 1,
  99. memberBg: "/pages_order/static/card/diamond.png",
  100. },
  101. {
  102. id: 2,
  103. memberBg: "/pages_order/static/card/gold.png",
  104. },
  105. {
  106. id: 3,
  107. memberBg: "/pages_order/static/card/silver.png",
  108. }
  109. ],
  110. cardList: [{
  111. id: 1,
  112. title: "金卡",
  113. money: "39"
  114. },
  115. {
  116. id: 2,
  117. title: "银卡",
  118. money: "29"
  119. },
  120. {
  121. id: 3,
  122. title: "钻石卡",
  123. money: "99"
  124. }
  125. ],
  126. equityList: [{
  127. id: 1,
  128. title: "权益1·专属推广码",
  129. icon: "/pages_order/static/memberCenter/descript1.png",
  130. list: [
  131. "购买会员卡或者购物金额满500元!有专属推广码。",
  132. "显示直推,间推人员信息及下单佣金明细。"
  133. ]
  134. },
  135. {
  136. id: 2,
  137. title: "权益2·直推奖励",
  138. icon: "/pages_order/static/memberCenter/descript2.png",
  139. list: [
  140. "通过扫专属推广码进来的用户下单,享受30%的直推奖励!(比例可调)",
  141. "显示直推,间推人员信息及下单佣金明细。"
  142. ]
  143. },
  144. {
  145. id: 3,
  146. title: "权益3·间推奖励",
  147. icon: "/pages_order/static/memberCenter/descript1.png",
  148. list: [
  149. "下级发展的用户下单,享受20%的间推奖励!(比例可调)",
  150. ]
  151. },
  152. {
  153. id: 4,
  154. title: "权益4·会员等级奖励",
  155. icon: "/pages_order/static/memberCenter/descript2.png",
  156. list: [
  157. "银,金,钻不同会员等级,同一个商品分佣比例不一样,等级越高,佣金比例越高!"
  158. ]
  159. }
  160. ]
  161. }
  162. },
  163. methods: {
  164. }
  165. }
  166. </script>
  167. <style lang="scss" scoped>
  168. .member-center {
  169. //会员卡片
  170. .member-image {
  171. width: 100%;
  172. }
  173. .member-info {
  174. position: absolute;
  175. bottom: 30rpx;
  176. left: 0rpx;
  177. display: flex;
  178. justify-content: space-between;
  179. padding: 0rpx 40rpx;
  180. box-sizing: border-box;
  181. width: 100%;
  182. .profile-photo {
  183. display: flex;
  184. justify-content: center;
  185. align-items: center;
  186. .pro-img {
  187. width: 60rpx;
  188. height: 60rpx;
  189. }
  190. .open-status {
  191. color: #F8A95F;
  192. border: 1px solid #F8A95F;
  193. border-radius: 30rpx;
  194. padding: 7rpx 20rpx;
  195. margin-left: 10rpx;
  196. }
  197. }
  198. .open {
  199. display: flex;
  200. align-items: center;
  201. justify-content: center;
  202. background: #F8A95F;
  203. color: white;
  204. border-radius: 30rpx;
  205. padding: 7rpx 20rpx;
  206. }
  207. }
  208. // 充值套餐
  209. .top-up-package {
  210. padding: 0rpx 20rpx;
  211. box-sizing: border-box;
  212. .title {
  213. font-size: 36rpx;
  214. font-weight: bold;
  215. margin-top: 30rpx;
  216. }
  217. .set-meal-list {
  218. display: flex;
  219. flex-wrap: wrap;
  220. margin-top: 20rpx;
  221. .set-meal-item {
  222. position: relative;
  223. width: 30%;
  224. margin-right: calc(9% / 2);
  225. border-radius: 10rpx;
  226. overflow: hidden;
  227. box-sizing: border-box;
  228. background: white;
  229. margin-bottom: 20rpx;
  230. padding: 40rpx;
  231. &:nth-child(3n) {
  232. margin-right: 0rpx;
  233. }
  234. .card-tag {
  235. position: absolute;
  236. left: 0;
  237. top: 0;
  238. background: #FF9633;
  239. border-bottom-right-radius: 10rpx;
  240. color: white;
  241. padding: 5rpx 10rpx;
  242. font-size: 20rpx;
  243. }
  244. .card-title {
  245. text-align: center;
  246. font-size: 38rpx;
  247. font-weight: bold;
  248. }
  249. .money {
  250. color: #FF9633;
  251. font-size: 30rpx;
  252. text-align: center;
  253. .unit {}
  254. }
  255. }
  256. .active-set-meal-item {
  257. border: 2rpx solid #FF9633;
  258. background: #FFF5EB;
  259. }
  260. }
  261. .member-descript {
  262. font-size: 24rpx;
  263. color: #333333;
  264. text-align: center;
  265. }
  266. }
  267. // 会员权益
  268. .member-equity-title {
  269. margin: 30rpx 0rpx;
  270. padding: 0rpx 20rpx;
  271. box-sizing: border-box;
  272. .eqyity-img {
  273. width: 240rpx;
  274. }
  275. }
  276. .equity-card-list {
  277. padding: 0rpx 20rpx;
  278. box-sizing: border-box;
  279. .equity-card {
  280. background: white;
  281. border-radius: 10rpx;
  282. margin-bottom: 40rpx;
  283. padding: 20rpx;
  284. box-sizing: border-box;
  285. .equity-title {
  286. color: #F18F09;
  287. font-size: 28rpx;
  288. font-weight: bold;
  289. }
  290. .equity-descript-list {
  291. position: relative;
  292. .equity-descript-icon {
  293. .equity-descript-img {
  294. width: 150rpx;
  295. }
  296. }
  297. .equity-descript-item {
  298. position: relative;
  299. background: #FDF9EF;
  300. border-radius: 10rpx;
  301. border: 1px solid #F7C47B;
  302. margin: 20rpx 0rpx;
  303. padding: 20rpx;
  304. box-sizing: border-box;
  305. color: #BA7E2B;
  306. font-size: 24rpx;
  307. .num {
  308. display: flex;
  309. justify-content: center;
  310. align-items: center;
  311. position: absolute;
  312. top: -15rpx;
  313. left: -15rpx;
  314. width: 30rpx;
  315. height: 30rpx;
  316. border-radius: 50%;
  317. background: #F18F09;
  318. border: 2px solid #F8CB8E;
  319. box-sizing: border-box;
  320. color: white;
  321. font-size: 24rpx;
  322. }
  323. }
  324. }
  325. &:nth-child(1) {
  326. .equity-descript-list {
  327. display: flex;
  328. justify-content: space-between;
  329. flex-wrap: wrap;
  330. .equity-descript-icon {
  331. position: absolute;
  332. bottom: 100%;
  333. right: 0rpx;
  334. z-index: 200;
  335. }
  336. .equity-descript-item {
  337. width: 49%;
  338. }
  339. }
  340. }
  341. &:nth-child(2) {
  342. .equity-descript-icon {
  343. position: absolute;
  344. bottom: -10%;
  345. right: 0rpx;
  346. z-index: 200;
  347. }
  348. .equity-descript-item {
  349. &:nth-child(3) {
  350. width: calc(100% - 160rpx);
  351. margin-right: 10rpx;
  352. }
  353. }
  354. }
  355. &:nth-child(3),
  356. &:nth-child(4) {
  357. .equity-descript-icon {
  358. position: absolute;
  359. bottom: 100%;
  360. right: 0rpx;
  361. z-index: 200;
  362. }
  363. }
  364. }
  365. }
  366. }
  367. </style>