member-copy.vue 28 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075
  1. <template>
  2. <view class="container clearfix">
  3. <view class="cm-member-top">
  4. <view
  5. class="cm-member-cel"
  6. v-if="userVip.vipFlag == 1 || userVip.vipFlag == -1"
  7. @click="hanldPayUrl('/pages/user/member/member-record')"
  8. >购买记录</view
  9. >
  10. <view class="cm-member-head">
  11. <view class="cm-member-text" v-if="isRequest">
  12. <view class="cm-member-h1">
  13. <text v-if="userVip.vipFlag == 0">采美·超级会员</text>
  14. <text v-if="userVip.vipFlag == 1">已开通采美·超级会员</text>
  15. <text v-if="userVip.vipFlag == -1">采美·超级会员已过期</text>
  16. </view>
  17. <view class="cm-member-p">
  18. <text v-if="userVip.vipFlag == 0">享专属特权</text>
  19. <text v-else>有效期至:{{ userVip.time }}</text>
  20. </view>
  21. </view>
  22. <view class="cm-member-btn" v-if="userVip.vipFlag == 1 || userVip.vipFlag == -1">
  23. <view class="btn" @click="hanldPayUrl('/pages/user/member/member-renew')">续费</view>
  24. </view>
  25. </view>
  26. </view>
  27. <view class="cm-member-main" v-if="userVip.vipFlag == 0 || userVip.vipFlag == -1">
  28. <view class="title">超级会员套餐</view>
  29. <view class="cm-member-pay">
  30. <view
  31. class="pay-item"
  32. v-for="(pay, index) in payList"
  33. :key="index"
  34. :class="{ current: tabCurrent === index }"
  35. @click="handleCheckedPay(index, pay)"
  36. >
  37. <view class="hot" v-if="index == 0">推荐</view> <view class="text-1">{{ pay.duration }}个月</view>
  38. <view class="text-2"> <text>¥</text>{{ pay.price }}</view>
  39. <view class="text-3" v-if="index == 0 || index == 1">{{ pay.price / pay.duration }}元/月</view>
  40. </view>
  41. </view>
  42. <view class="cm-member-button" v-if="!popupShow">
  43. <view class="pay-btn pay" @click="hanldWechatPay">查看客服二维码联系购买</view>
  44. </view>
  45. </view>
  46. <view class="cm-member-main">
  47. <view class="title">专属特权</view>
  48. <view class="cm-member-privilege clearfix">
  49. <view class="privilege-item" v-for="(priv, index) in privilegeList" :key="index">
  50. <image class="image" :src="priv.icon" mode=""></image>
  51. <view class="text-2">{{ priv.privText }}</view> <view class="text-3">{{ priv.privName }}</view>
  52. </view>
  53. </view>
  54. </view>
  55. <view class="cm-member-main" v-if="productCouponList.length > 0">
  56. <view class="title">专属优惠券<text class="small">每月可领4个</text></view>
  57. <view class="cm-member-coupon clearfix">
  58. <view
  59. v-for="(coupon, index) in productCouponList"
  60. :key="index"
  61. :id="coupon.couponId"
  62. class="coupon-list"
  63. :class="coupon.useStatus == 2 ? 'none' : ''"
  64. >
  65. <view class="list-cell-tags">{{ coupon.couponType | TypeFormat }}</view>
  66. <view class="list-cell-le">
  67. <view class="coupon-maxMoney"><text class="small">¥</text>{{ coupon.couponAmount }}</view>
  68. <view class="coupon-minMoney">满{{ coupon.touchPrice }}可用</view>
  69. <view class="coupon-texts">
  70. <text v-if="coupon.couponType == 0">
  71. {{
  72. coupon.productType && coupon.productType == 1
  73. ? '全商城商品通用'
  74. : '仅可购买指定商品'
  75. }}
  76. </text>
  77. <text v-if="coupon.couponType == 1">
  78. {{ coupon.categoryType == 1 ? '仅限购买产品类商品' : '仅限购买仪器类商品' }}
  79. </text>
  80. <text v-if="coupon.couponType == 3">仅限购买店铺【...】</text>
  81. <text v-if="coupon.couponType == 4 || coupon.couponType == 2">全商城商品通用</text>
  82. </view>
  83. </view>
  84. <view class="list-cell-ri">
  85. <template v-if="coupon.useStatus == 2">
  86. <view class="icon-used-btn make">已使用</view>
  87. </template>
  88. <template v-else>
  89. <view
  90. class="icon-used-btn receive"
  91. v-if="coupon.getFlag == 0"
  92. @click="receiveCoupon(coupon)"
  93. >立即领取</view
  94. >
  95. <view class="icon-used-btn make" v-if="coupon.getFlag == 1" @click="toUseCoupon(coupon)">
  96. 去使用</view
  97. >
  98. </template>
  99. </view>
  100. </view>
  101. </view>
  102. </view>
  103. <view class="cm-member-main none" :style="{ paddingBottom: popupShow ? '260rpx' : '0rpx' }">
  104. <view class="title">
  105. 优惠商品
  106. <view class="more" @click="hanldPayUrl('/pages/user/member/member-product')"
  107. >更多<text class="iconfont icon-xiayibu"></text
  108. ></view>
  109. </view>
  110. <view class="cm-member-product clearfix">
  111. <view
  112. v-for="(pro, index) in productList"
  113. :key="index"
  114. :id="pro.productId"
  115. class="product-list"
  116. @click="productDetail(pro.productId)"
  117. >
  118. <view class="product-image"> <image :src="pro.image" mode=""></image> </view>
  119. <view class="product-mains">
  120. <view class="product-name"> {{ pro.name }} </view>
  121. <view class="product-tags">
  122. <view class="floor-item-act">
  123. <view class="coupon-tags" v-if="pro.couponsLogo">优惠券</view>
  124. <template v-if="pro.actStatus == 1">
  125. <view class="floor-tags" v-if="PromotionsFormat(pro.promotions)">
  126. {{ pro.promotions.name }}
  127. <text v-if="pro.priceFlag != 1">:¥{{ pro.price | NumFormat }}</text>
  128. </view>
  129. <view class="floor-tags" v-else>{{ pro.promotions.name }}</view>
  130. </template>
  131. <template v-if="pro.svipProductFlag == 1">
  132. <view class="svip-tags">
  133. <view class="tags" :class="{ none: !isShowVipFlag }">SVIP</view>
  134. <view class="price" v-if="isShowVipFlag(pro)">{{ pro.svipPriceTag }}</view>
  135. </view>
  136. </template>
  137. </view>
  138. </view>
  139. <view class="product-price">
  140. <!-- 价格未公开 -->
  141. <view class="list-none" v-if="pro.priceFlag == 1">¥未公开价格</view>
  142. <!-- 价格公开 -->
  143. <template v-else>
  144. <!-- 个人机构且不是超级会员 -->
  145. <template v-if="userIdentity == 4 && userVip.vipFlag != 1">
  146. <!-- 价格仅会员可见 -->
  147. <view class="list-none" v-if="pro.priceFlag == 2"
  148. >¥价格仅会员可见</view
  149. >
  150. <!-- 价格仅医美机构可见 -->
  151. <view class="list-none" v-else-if="pro.priceFlag == 3"
  152. >¥仅医美机构可见</view
  153. >
  154. <view class="list-none-price" v-else>¥{{ pro.originalPrice | NumFormat }}</view>
  155. </template>
  156. <!-- 资质机构 || 个人机构且是超级会员 -->
  157. <template v-else>
  158. <!-- 价格仅医美机构可见 -->
  159. <view class="list-none" v-if="pro.priceFlag == 3 && firstClubType!=1"
  160. >¥仅医美机构可见</view
  161. >
  162. <view class="list-none-price" v-else>¥{{ pro.originalPrice | NumFormat }}</view>
  163. </template>
  164. </template>
  165. </view>
  166. </view>
  167. </view>
  168. </view>
  169. </view>
  170. <!-- 透明模态层 -->
  171. <modal-layer v-if="isModallayer" />
  172. <!-- 弹窗 -->
  173. <template>
  174. <view class="cm-model-alert" v-if="isShowBeansModal">
  175. <view class="content">
  176. <view class="title">
  177. <text>购买超级会员</text>
  178. <text class="iconfont icon-iconfontguanbi" @click.stop="handelCanelBeans"></text>
  179. </view>
  180. <view class="text-content">
  181. <view class="text"
  182. >确定使用<text class="text-p">{{ handelPayMsg.beans }}</text
  183. >个采美豆抵扣{{ handelPayMsg.duration }}个月的采美超级会员吗?</view
  184. >
  185. </view>
  186. <view class="text-button">
  187. <view class="btn btn-cancel" @click="handelCanelBeans">取消</view>
  188. <view class="btn btn-confirm" @click="handelConfirmBeans">确定</view>
  189. </view>
  190. </view>
  191. </view>
  192. </template>
  193. <!-- 悬浮按钮 -->
  194. <tui-bottom-popup :radius="false" :mask="false" :show="popupShow">
  195. <view class="tui-popup-box clearfix" :style="{ paddingBottom: isIphoneX ? '68rpx' : '34rpx' }">
  196. <view class="cm-member-button">
  197. <view class="pay-btn pay" @click="hanldWechatPay">查看客服二维码联系购买</view>
  198. </view>
  199. </view>
  200. </tui-bottom-popup>
  201. </view>
  202. </template>
  203. <script>
  204. import { mapState, mapMutations } from 'vuex'
  205. import modalLayer from '@/components/modal-layer'
  206. import wxLogin from '@/common/config/wxLogin.js'
  207. export default {
  208. components: {
  209. modalLayer
  210. },
  211. data() {
  212. return {
  213. StaticUrl: this.$Static,
  214. isIphoneX: this.$store.state.isIphoneX,
  215. isRequest: false,
  216. isModallayer: false,
  217. isShowBeansModal: false,
  218. popupShow: false,
  219. memberType: 0,
  220. tabCurrent: 0,
  221. userIdentity: 0,
  222. firstClubType:0,
  223. userVip: {},
  224. handelPayMsg: {
  225. beans: 0,
  226. price: 0,
  227. month: '',
  228. packageId: 0
  229. },
  230. payParam: {
  231. userId: 0,
  232. packageId: 0
  233. },
  234. payList: [
  235. {duration:12,price:1800},
  236. {duration:3,price:600}
  237. ],
  238. privilegeList: [
  239. {
  240. icon: 'https://static.caimei365.com/app/img/icon/icon-member-prer1@2x.png',
  241. privText: '优惠商品',
  242. privName: '超级会员专享'
  243. },
  244. {
  245. icon: 'https://static.caimei365.com/app/img/icon/icon-member-prer2@2x.png',
  246. privText: '专属优惠券',
  247. privName: '超级会员专享'
  248. },
  249. {
  250. icon: 'https://static.caimei365.com/app/img/icon/icon-member-prer8@2x.png',
  251. privText: '免运费',
  252. privName: '下单全包邮'
  253. },
  254. {
  255. icon: 'https://static.caimei365.com/app/img/icon/icon-member-prer3@2x.png',
  256. privText: '采美豆翻倍',
  257. privName: '下单返采美豆'
  258. },
  259. {
  260. icon: 'https://static.caimei365.com/app/img/icon/icon-member-prer4@2x.png',
  261. privText: '专属客服',
  262. privName: '一对一'
  263. },
  264. {
  265. icon: 'https://static.caimei365.com/app/img/icon/icon-member-prer5@2x.png',
  266. privText: '专属销售顾问',
  267. privName: '一对一'
  268. },
  269. {
  270. icon: 'https://static.caimei365.com/app/img/icon/icon-member-prer6@2x.png',
  271. privText: '快速发货',
  272. privName: '会员加速'
  273. },
  274. {
  275. icon: 'https://static.caimei365.com/app/img/icon/icon-member-prer7@2x.png',
  276. privText: '售后服务',
  277. privName: '会员加速'
  278. }
  279. ],
  280. listQuery: {
  281. userId: 0,
  282. source: 1,
  283. pageNum: 1,
  284. pageSize: 4
  285. },
  286. productCouponList: [],
  287. productList: [],
  288. isReceiveLoading: false,
  289. previewUrls:['https://static.caimei365.com/app/img/icon/icon-vxkecode.png'],
  290. }
  291. },
  292. onLoad() {
  293. wxLogin.wxLoginAuthorize()
  294. // this.getUserSuperPackage()
  295. },
  296. filters: {
  297. TypeFormat(value) {
  298. switch (value) {
  299. case 0:
  300. return '活动券'
  301. break
  302. case 1:
  303. return '品类券'
  304. break
  305. case 2:
  306. return '用户专享券'
  307. break
  308. case 3:
  309. return '店铺券'
  310. break
  311. case 4:
  312. return '新用户券'
  313. break
  314. }
  315. },
  316. NumFormat(value) {
  317. //处理金额
  318. return Number(value).toFixed(2)
  319. }
  320. },
  321. computed: {
  322. ...mapState(['hasLogin','clubType'])
  323. },
  324. methods: {
  325. async initGetStotage() {
  326. const userInfo = await this.$api.getStorage()
  327. this.payParam.userId = this.listQuery.userId = userInfo.userId ? userInfo.userId : 0
  328. this.userIdentity = userInfo.userIdentity ? userInfo.userIdentity : 0
  329. this.firstClubType = this.clubType
  330. this.getUserSuperCenter()
  331. this.getSvipProductPage()
  332. },
  333. getUserSuperCenter() {
  334. // 获取会员中心数据
  335. this.UserService.getUserSuperCenter({ userId: this.payParam.userId })
  336. .then(response => {
  337. let data = response.data
  338. this.userVip = data.vip
  339. this.productCouponList = data.coupon
  340. console.log('this.productCouponList', this.productCouponList)
  341. this.isRequest = true
  342. })
  343. .catch(error => {
  344. this.$util.msg(error.msg, 2000)
  345. })
  346. },
  347. getSvipProductPage() {
  348. // 获取会员中心商品数据
  349. this.ProductService.getSvipProductPage(this.listQuery)
  350. .then(response => {
  351. let data = response.data.svipProductPage
  352. this.productList = data.results
  353. })
  354. .catch(error => {
  355. this.$util.msg(error.msg, 2000)
  356. })
  357. },
  358. getUserSuperPackage() {
  359. //获取会员中心套餐
  360. this.UserService.getUserSuperPackage()
  361. .then(response => {
  362. let data = response.data
  363. data.forEach(el => {
  364. el.beans = el.price * el.proportion
  365. el.packageId = el.id
  366. })
  367. this.payList = data
  368. this.handelPayMsg = data[0]
  369. this.payParam.packageId = data[0].packageId
  370. })
  371. .catch(error => {
  372. console.log('获取会员套餐异常~')
  373. })
  374. },
  375. receiveCoupon(coupon) {
  376. // 点击优惠券领取按钮
  377. if (this.isReceiveLoading) {
  378. return
  379. }
  380. if (this.userVip.vipFlag != 1) {
  381. this.$util.msg('您还未开通超级会员,不能领取', 2000)
  382. return
  383. }
  384. this.ProductService.ReceiveCoupon({
  385. userId: this.payParam.userId,
  386. couponId: coupon.couponId,
  387. source: 2
  388. })
  389. .then(response => {
  390. this.isReceiveLoading = true
  391. this.$util.msg('领取成功', 1500, true, 'success')
  392. setTimeout(() => {
  393. coupon.getFlag = 1
  394. this.isReceiveLoading = false
  395. }, 1500)
  396. })
  397. .catch(error => {
  398. this.$util.msg(error.msg, 2000)
  399. this.isReceiveLoading = false
  400. })
  401. },
  402. hanldeShowBeans() {
  403. // 显示采美豆抵扣开通超级会员弹窗
  404. if (process.env.NODE_ENV != 'development') {
  405. // 友盟埋点收集采美豆抵扣会员
  406. this.$uma.trackEvent('Um_Event_userClubMemberBeansConfirm', {
  407. Um_Key_Month: `${this.handelPayMsg.duration}个月`,
  408. Um_Key_SourcePage: '会员中心'
  409. })
  410. }
  411. this.isShowBeansModal = true
  412. },
  413. handelCanelBeans() {
  414. // 取消采美豆抵扣超级会员
  415. if (process.env.NODE_ENV != 'development') {
  416. // 友盟埋点收集取消采抵扣会员
  417. this.$uma.trackEvent('Um_Event_userClubMemberBeansCancel', {
  418. Um_Key_Month: `${this.handelPayMsg.duration}个月`,
  419. Um_Key_SourcePage: '会员中心'
  420. })
  421. }
  422. this.isShowBeansModal = false
  423. },
  424. handelConfirmBeans() {
  425. // 确认采美豆抵扣开通超级会员
  426. if (process.env.NODE_ENV != 'development') {
  427. // 友盟埋点收集确定采抵扣会员
  428. this.$uma.trackEvent('Um_Event_userClubMemberBeansConfirms', {
  429. Um_Key_Month: `${this.handelPayMsg.duration}个月`,
  430. Um_Key_SourcePage: '会员中心'
  431. })
  432. }
  433. this.PayService.getUserRegisterSuperBeans(this.payParam)
  434. .then(response => {
  435. this.isShowBeansModal = false
  436. this.$util.msg('开通成功', 2000, true, 'success')
  437. setTimeout(() => {
  438. this.getUserSuperCenter()
  439. }, 2000)
  440. })
  441. .catch(error => {
  442. this.$util.msg(error.msg, 2000)
  443. })
  444. },
  445. hanldWechatPay() {
  446. let previewUrls = this.previewUrls
  447. uni.previewImage({
  448. current: 0, //图片索引
  449. urls: previewUrls, //必须是http图片,本地图片无效
  450. longPressActions:''
  451. })
  452. },
  453. handleCheckedPay(index, pay) {
  454. // 选择会员
  455. this.tabCurrent = index
  456. this.payParam.packageId = pay.packageId
  457. this.handelPayMsg = pay
  458. },
  459. toUseCoupon(coupon) {
  460. // 去使用跳转路径
  461. switch (coupon.couponType) {
  462. case 0: // 活动券:跳转到商城首页 / 或者活动页(看是否指定了商品)
  463. if (coupon.productType == 1) {
  464. // 1 全商城通用 2 指定商品
  465. this.$api.switchTabTo('/pages/tabBar/home/index')
  466. } else {
  467. this.$api.navigateTo('/pages/user/coupon/coupon-product?couponId=' + coupon.couponId)
  468. }
  469. break
  470. case 1: // 品类券:跳转到产品 287 / 仪器页 286
  471. this.$api.navigateTo(`/pages/goods/good-floor?linkId=${coupon.categoryType == 1 ? 287 : 286}`)
  472. break
  473. case 2: // 用户专享券:跳转到商城首页
  474. this.$api.switchTabTo('/pages/tabBar/home/index')
  475. break
  476. case 3: // 店铺券:跳转到店铺首页
  477. this.$api.navigateTo('/pages/supplier/user/my-shop?shopId=' + coupon.shopId)
  478. break
  479. case 4: // 新用户券:跳转到商城首页
  480. this.$api.switchTabTo('/pages/tabBar/home/index')
  481. break
  482. }
  483. },
  484. hanldRenewPayUrl(url) {
  485. // 监听续费跳转并做友盟埋点
  486. if (process.env.NODE_ENV != 'development') {
  487. // 友盟埋点收集续费按钮点击事件
  488. this.$uma.trackEvent('Um_Event_userClubRenewMember', {
  489. Um_Key_Time: this.getNowTime(),
  490. Um_Key_SourcePage: '会员中心'
  491. })
  492. }
  493. this.$api.navigateTo(url)
  494. },
  495. hanldPayUrl(url) {
  496. // 跳转
  497. this.$api.navigateTo(url)
  498. },
  499. PromotionsFormat(promo) {
  500. //促销活动类型数据处理
  501. if (promo != null) {
  502. if (promo.type == 1 && promo.mode == 1) {
  503. return true
  504. } else {
  505. return false
  506. }
  507. }
  508. return false
  509. },
  510. productDetail(productId) {
  511. // 跳转商品详情
  512. this.isModallayer = true
  513. this.$api.navigateTo(`/pages/goods/product?id=${productId}`)
  514. this.isModallayer = false
  515. },
  516. isShowVipFlag(pros) {
  517. /**
  518. *显示SVIP和超级会员价格:
  519. * 个人机构(不是超级会员,但价格所有机构可见),
  520. * 资质机构(不是超级会员,但价格所有机构可见或仅会员可见),
  521. * 超级会员(价格所有机构可见或仅会员可见),超级会员(是医美机构,价格仅医美可见)
  522. *商品价格是否可见:priceFlag 0:所有机构可见 1:未公开价格 2:仅会员可见 3:仅医美机构可见
  523. * 普通机构
  524. * 超级会员 && priceFlag === 0
  525. * 资质机构
  526. * priceFlag !== 1 ||
  527. * 超级会员
  528. * 商品priceFlag === 3 && 是否是医美机构
  529. */
  530. // 未登录 || 非会员
  531. if(!this.hasLogin || !this.vipFlag === 1) return false
  532. // 商品所有机构可见
  533. if(pros.priceFlag === 0 ) return true
  534. // 商品价格仅资质机构可见
  535. if(pros.priceFlag === 2 && this.userIdentity === 2) return true
  536. // 商品价格仅医美机构可见
  537. if(pros.priceFlag === 3 && this.userIdentity === 2 && this.firstClubType == 1) return true
  538. // 其它
  539. return false
  540. },
  541. getNowTime() {
  542. let dateTime
  543. let yy = new Date().getFullYear()
  544. let mm = new Date().getMonth() + 1
  545. let dd = new Date().getDate()
  546. let hh = new Date().getHours()
  547. let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes() : new Date().getMinutes()
  548. let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds() : new Date().getSeconds()
  549. dateTime = yy + '-' + mm + '-' + dd + ' ' + hh + ':' + mf + ':' + ss
  550. console.log(dateTime)
  551. return dateTime
  552. }
  553. },
  554. onPageScroll(e) {
  555. //实时获取到滚动的值
  556. if (this.userVip.vipFlag == 0) {
  557. if (e.scrollTop > 400) {
  558. this.popupShow = true
  559. } else {
  560. this.popupShow = false
  561. }
  562. }
  563. },
  564. onPullDownRefresh() {
  565. setTimeout(() => {
  566. uni.stopPullDownRefresh()
  567. }, 200)
  568. },
  569. onShow() {
  570. this.initGetStotage()
  571. }
  572. }
  573. </script>
  574. <style lang="scss">
  575. page {
  576. background-color: #f7f7f7;
  577. }
  578. .container {
  579. width: 100%;
  580. height: auto;
  581. }
  582. .cm-member-top {
  583. width: 100%;
  584. height: 242rpx;
  585. box-sizing: border-box;
  586. padding: 0 24rpx;
  587. background: url(https://static.caimei365.com/app/img/icon/icon-member-bg01@2x.png) no-repeat;
  588. background-size: cover;
  589. position: relative;
  590. .cm-member-cel {
  591. float: right;
  592. line-height: 40rpx;
  593. font-size: $font-size-26;
  594. margin-top: 40rpx;
  595. color: #f0cb72;
  596. text-align: right;
  597. }
  598. .cm-member-head {
  599. width: 702rpx;
  600. height: 132rpx;
  601. box-sizing: border-box;
  602. padding: 30rpx 32rpx 0 109rpx;
  603. background: url(https://static.caimei365.com/app/img/icon/icon-member-bg02@2x.png) no-repeat;
  604. background-size: cover;
  605. position: absolute;
  606. bottom: 0;
  607. left: 24rpx;
  608. border-radius: 16rpx 16rpx 0 0;
  609. .cm-member-text {
  610. float: left;
  611. .cm-member-h1 {
  612. line-height: 42rpx;
  613. font-size: $font-size-30;
  614. color: #55331d;
  615. text-align: left;
  616. margin-bottom: 12rpx;
  617. font-weight: bold;
  618. }
  619. .cm-member-p {
  620. line-height: 30rpx;
  621. font-size: $font-size-22;
  622. color: #55331d;
  623. text-align: left;
  624. }
  625. }
  626. .cm-member-btn {
  627. float: right;
  628. padding-top: 12rpx;
  629. .btn {
  630. width: 118rpx;
  631. height: 48rpx;
  632. background: linear-gradient(270deg, #585658 0%, #323031 100%);
  633. border-radius: 24rpx;
  634. line-height: 48rpx;
  635. text-align: center;
  636. font-size: $font-size-24;
  637. color: #f0cb72;
  638. }
  639. }
  640. }
  641. }
  642. .cm-member-main {
  643. width: 100%;
  644. box-sizing: border-box;
  645. padding: 40rpx 24rpx;
  646. background-color: #ffffff;
  647. margin-bottom: 20rpx;
  648. &.none {
  649. background-color: #f7f7f7;
  650. padding: 20rpx 24rpx 0 24rpx;
  651. }
  652. .title {
  653. font-size: $font-size-32;
  654. line-height: 45rpx;
  655. text-align: left;
  656. color: #55331d;
  657. font-weight: bold;
  658. .small {
  659. font-size: $font-size-24;
  660. color: #e4aa43;
  661. font-weight: normal;
  662. margin-left: 15rpx;
  663. }
  664. .more {
  665. float: right;
  666. font-weight: normal;
  667. line-height: 45rpx;
  668. font-size: $font-size-26;
  669. color: #999999;
  670. .iconfont {
  671. margin-left: 10rpx;
  672. }
  673. }
  674. }
  675. .cm-member-pay {
  676. width: 100%;
  677. height: 236rpx;
  678. margin: 40rpx 0;
  679. .pay-item {
  680. width: 218rpx;
  681. height: 100%;
  682. float: left;
  683. margin-right: 24rpx;
  684. border: 1px solid #f0f0f0;
  685. border-radius: 16rpx;
  686. box-sizing: border-box;
  687. text-align: center;
  688. padding: 40rpx 0;
  689. position: relative;
  690. .hot {
  691. width: 80rpx;
  692. height: 36rpx;
  693. text-align: center;
  694. line-height: 36rpx;
  695. font-size: $font-size-24;
  696. color: #ffffff;
  697. background-color: #ff2a2a;
  698. border-radius: 0 8rpx 8rpx 8rpx;
  699. position: absolute;
  700. left: 0;
  701. top: -10rpx;
  702. }
  703. &.current {
  704. background-color: #fdf8ee;
  705. border: 1px solid #f0cc8c;
  706. }
  707. &:last-child {
  708. margin-right: 0;
  709. }
  710. .text-1 {
  711. line-height: 40rpx;
  712. font-size: $font-size-28;
  713. margin-bottom: 10rpx;
  714. color: #55331d;
  715. }
  716. .text-2 {
  717. line-height: 59rpx;
  718. font-size: $font-size-40;
  719. margin-bottom: 10rpx;
  720. color: #ff2a2a;
  721. font-weight: bold;
  722. text {
  723. font-size: $font-size-26;
  724. }
  725. }
  726. .text-3 {
  727. line-height: 33rpx;
  728. font-size: $font-size-24;
  729. color: #666666;
  730. }
  731. }
  732. }
  733. .cm-member-button {
  734. width: 100%;
  735. box-sizing: border-box;
  736. padding: 0 51rpx;
  737. .pay-btn {
  738. width: 100%;
  739. height: 90rpx;
  740. line-height: 90rpx;
  741. border-radius: 50rpx;
  742. text-align: center;
  743. font-size: $font-size-30;
  744. color: #55331d;
  745. box-sizing: border-box;
  746. margin-bottom: $font-size-24;
  747. &.pay {
  748. background: linear-gradient(90deg, #fee9ba 0%, #f0cb72 100%);
  749. font-weight: bold;
  750. }
  751. &.none {
  752. border: 1px solid #f0cb72;
  753. margin-bottom: 0;
  754. }
  755. }
  756. }
  757. .cm-member-privilege {
  758. width: 100%;
  759. margin: 24rpx 0 16rpx 0;
  760. background-color: #ffffff;
  761. .privilege-item {
  762. width: 25%;
  763. height: 196rpx;
  764. margin: 16rpx 0;
  765. float: left;
  766. display: flex;
  767. flex-direction: column;
  768. align-items: center;
  769. .image {
  770. width: 90rpx;
  771. height: 90rpx;
  772. display: block;
  773. }
  774. .text-2 {
  775. font-size: $font-size-26;
  776. color: #333333;
  777. line-height: 36rpx;
  778. margin-top: 12rpx;
  779. }
  780. .text-3 {
  781. font-size: $font-size-22;
  782. color: #999999;
  783. line-height: 30rpx;
  784. margin-top: 6rpx;
  785. }
  786. }
  787. }
  788. .cm-member-coupon {
  789. width: 100%;
  790. margin: 24rpx 0 0 0;
  791. .coupon-list {
  792. width: 338rpx;
  793. height: 148rpx;
  794. border-radius: 8rpx;
  795. margin-bottom: 24rpx;
  796. box-sizing: border-box;
  797. background: url(https://static.caimei365.com/app/img/icon/icon-member-coupon@2x.png);
  798. background-size: cover;
  799. margin-right: 24rpx;
  800. float: left;
  801. position: relative;
  802. &:nth-child(2n) {
  803. margin-right: 0;
  804. }
  805. &.none {
  806. background: url(https://static.caimei365.com/app/img/icon/icon-member-coupon-none@2x.png);
  807. background-size: cover;
  808. }
  809. .list-cell-tags {
  810. display: inline-block;
  811. padding: 0 10rpx;
  812. height: 27rpx;
  813. line-height: 27rpx;
  814. background-color: #e4aa43;
  815. color: #55331d;
  816. font-size: $font-size-20;
  817. border-radius: 8rpx 0 8rpx 0;
  818. text-align: center;
  819. position: absolute;
  820. top: 0;
  821. left: 0;
  822. }
  823. .list-cell-le {
  824. width: 258rpx;
  825. height: 100%;
  826. box-sizing: border-box;
  827. padding: 27rpx 24rpx 0 26rpx;
  828. float: left;
  829. .coupon-maxMoney {
  830. width: 100%;
  831. height: 50rpx;
  832. line-height: 50rpx;
  833. font-size: 40rpx;
  834. color: #55331d;
  835. text-align: left;
  836. .small {
  837. font-size: $font-size-24;
  838. }
  839. }
  840. .coupon-minMoney {
  841. width: 100%;
  842. height: 30rpx;
  843. line-height: 30rpx;
  844. font-size: $font-size-24;
  845. color: #55331d;
  846. text-align: left;
  847. }
  848. .coupon-texts {
  849. width: 100%;
  850. height: 30rpx;
  851. line-height: 30rpx;
  852. font-size: $font-size-24;
  853. color: #55331d;
  854. text-align: left;
  855. -o-text-overflow: ellipsis;
  856. text-overflow: ellipsis;
  857. display: -webkit-box;
  858. word-break: break-all;
  859. -webkit-box-orient: vertical;
  860. -webkit-line-clamp: 1;
  861. overflow: hidden;
  862. }
  863. }
  864. .list-cell-ri {
  865. width: 80rpx;
  866. height: 100%;
  867. float: right;
  868. .icon-used-btn {
  869. width: 100%;
  870. height: 100%;
  871. box-sizing: border-box;
  872. font-size: $font-size-22;
  873. text-align: center;
  874. &.receive {
  875. color: #55331d;
  876. padding: 15rpx 28rpx;
  877. }
  878. &.make {
  879. padding: 30rpx 28rpx;
  880. color: #55331d;
  881. }
  882. }
  883. }
  884. }
  885. }
  886. .cm-member-product {
  887. width: 100%;
  888. margin-top: 16rpx;
  889. .product-list {
  890. width: 339rpx;
  891. height: 516rpx;
  892. border-radius: 16rpx;
  893. float: left;
  894. margin-right: 24rpx;
  895. margin-bottom: 24rpx;
  896. background-color: #ffffff;
  897. &:nth-child(2n) {
  898. margin-right: 0;
  899. }
  900. .product-image {
  901. width: 339rpx;
  902. height: 339rpx;
  903. image {
  904. width: 339rpx;
  905. height: 339rpx;
  906. display: block;
  907. border-radius: 16rpx 16rpx 0 0;
  908. }
  909. }
  910. .product-mains {
  911. width: 100%;
  912. height: auto;
  913. box-sizing: border-box;
  914. padding: 0 24rpx;
  915. margin-top: 8rpx;
  916. .product-name {
  917. height: 72rpx;
  918. line-height: 36rpx;
  919. text-overflow: ellipsis;
  920. overflow: hidden;
  921. display: -webkit-box;
  922. -webkit-line-clamp: 2;
  923. line-clamp: 2;
  924. -webkit-box-orient: vertical;
  925. font-size: $font-size-26;
  926. color: #333333;
  927. text-align: justify;
  928. }
  929. .product-tags {
  930. width: 100%;
  931. height: 32rpx;
  932. margin-top: 6rpx;
  933. .floor-item-act {
  934. width: 100%;
  935. height: 32rpx;
  936. text-align: center;
  937. box-sizing: border-box;
  938. float: left;
  939. }
  940. }
  941. .product-price {
  942. width: 100%;
  943. line-height: 37rpx;
  944. font-size: $font-size-26;
  945. color: #f94b4b;
  946. margin-top: 8rpx;
  947. .list-none-price {
  948. text-decoration: line-through;
  949. color: #999999;
  950. }
  951. }
  952. }
  953. }
  954. }
  955. }
  956. .cm-model-alert {
  957. width: 100%;
  958. height: 100%;
  959. background: rgba(0, 0, 0, 0.5);
  960. position: fixed;
  961. top: 0;
  962. left: 0;
  963. z-index: 8888;
  964. transition: all 0.4s;
  965. .content {
  966. width: 580rpx;
  967. height: 390rpx;
  968. position: absolute;
  969. background: $bg-color;
  970. left: 0;
  971. right: 0;
  972. bottom: 0;
  973. top: 0;
  974. margin: auto;
  975. padding: 20rpx 32rpx;
  976. border-radius: 12rpx;
  977. .title {
  978. width: 100%;
  979. height: 68rpx;
  980. line-height: 68rpx;
  981. font-size: $font-size-28;
  982. color: $text-color;
  983. text-align: center;
  984. position: relative;
  985. .icon-iconfontguanbi {
  986. width: 68rpx;
  987. height: 68rpx;
  988. text-align: center;
  989. line-height: 68rpx;
  990. position: absolute;
  991. right: 0;
  992. top: 0;
  993. font-size: $font-size-36;
  994. color: #999999;
  995. }
  996. }
  997. .text-content {
  998. width: 100%;
  999. height: auto;
  1000. margin-top: 20px;
  1001. .text {
  1002. padding: 20rpx 0 0 0;
  1003. line-height: 44rpx;
  1004. font-size: $font-size-26;
  1005. color: #666666;
  1006. text-align: justify;
  1007. .text-p {
  1008. color: #FF5B00;
  1009. }
  1010. }
  1011. }
  1012. .text-button {
  1013. width: 100%;
  1014. height: 72rpx;
  1015. display: flex;
  1016. box-sizing: border-box;
  1017. padding: 0 50rpx;
  1018. margin-top: 30px;
  1019. .btn {
  1020. width: 200rpx;
  1021. height: 72rpx;
  1022. line-height: 72rpx;
  1023. color: #fff;
  1024. display: flex;
  1025. align-items: center;
  1026. justify-content: center;
  1027. font-size: $font-size-26;
  1028. border-radius: 44rpx;
  1029. box-sizing: border-box;
  1030. &.btn-confirm {
  1031. background: $btn-confirm;
  1032. margin-left: 78rpx;
  1033. }
  1034. &.btn-cancel {
  1035. border: 1px solid #b2b2b2;
  1036. color: #333333;
  1037. }
  1038. }
  1039. }
  1040. }
  1041. }
  1042. .tui-popup-box {
  1043. position: relative;
  1044. box-sizing: border-box;
  1045. min-height: 168rpx;
  1046. padding: 6rpx 24rpx;
  1047. .cm-member-button {
  1048. width: 100%;
  1049. box-sizing: border-box;
  1050. padding: 24rpx 51rpx;
  1051. .pay-btn {
  1052. width: 100%;
  1053. height: 90rpx;
  1054. line-height: 90rpx;
  1055. border-radius: 50rpx;
  1056. text-align: center;
  1057. font-size: $font-size-30;
  1058. color: #55331d;
  1059. box-sizing: border-box;
  1060. margin-bottom: $font-size-24;
  1061. &.pay {
  1062. background: linear-gradient(90deg, #fee9ba 0%, #f0cb72 100%);
  1063. font-weight: bold;
  1064. }
  1065. &.none {
  1066. border: 1px solid #f0cb72;
  1067. margin-bottom: 0;
  1068. }
  1069. }
  1070. }
  1071. }
  1072. </style>