my.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922
  1. <template>
  2. <view>
  3. <view class="head-bg">
  4. <view class="head-bg-content" :style="{'background-color':setColor}">
  5. </view>
  6. <image src="https://zxzhdc.zx-xcx.com/dining/home7.png"></image>
  7. </view>
  8. <view class="hg300"></view>
  9. <view class="head-portrait-content" v-if="systemInfo.is_vip==1">
  10. <view class="head-portrait flex-y-center">
  11. <view class="head-portrait-por" @click="bindRecharge(3)">
  12. <image class="head-portrait-icon"
  13. :src="userInfo.avatar?userInfo.avatar:'../../static/avatar_def.png'"></image>
  14. <image class="head-portrait-poa" v-if="userInfo.mobile" src="../../static/VIP2.png"></image>
  15. </view>
  16. <view @click="bindRecharge(3)">
  17. <view class="head-portrait-level_name">
  18. {{userInfo.level_name||''}}
  19. </view>
  20. <view class="head-portrait-moblie flex-y-center" :style="{color:setColor}">
  21. {{userInfo.mobile||'完善会员信息,享有更多优惠'}}
  22. </view>
  23. </view>
  24. <navigator class="Membership-rights flex-center" url="../../menber/membership"
  25. :style="{'background-color':setColor}">
  26. 会员权益
  27. </navigator>
  28. </view>
  29. <view class="head-portrait-center flex box-pack-between">
  30. <navigator url="../couponList/couponList" class="flex-grow-1">
  31. <text>{{listCouponLength||0}}</text>
  32. <view class="head-portrait-center-conpun">
  33. 优惠劵
  34. </view>
  35. </navigator>
  36. <view class="flex-grow-1">
  37. <text>{{userInfo.balance||0}}</text>
  38. <view class="head-portrait-center-conpun">
  39. 余额
  40. </view>
  41. </view>
  42. <navigator :url="`../../menber/record?type=2`" class="flex-grow-1"
  43. v-if="systemInfo.set.is_jf==1 ||systemInfo.set.is_jf==3">
  44. <text>{{userInfo.integral||0}}</text>
  45. <view class="head-portrait-center-conpun">
  46. 积分
  47. </view>
  48. </navigator>
  49. <view class="flex-grow-1">
  50. <text>{{userInfo.discount||0}}</text>
  51. <view class="head-portrait-center-conpun">
  52. 会员折扣
  53. </view>
  54. </view>
  55. </view>
  56. </view>
  57. <view v-else class="head-portrait-content" style="height: auto;">
  58. <view class="head-portrait flex-y-center">
  59. <view class="head-portrait-por">
  60. <image class="head-portrait-icon"
  61. :src="userInfo.avatar?userInfo.avatar:'../../static/avatar_def.png'"></image>
  62. <image class="head-portrait-poa" v-if="userInfo.mobile" src="../../static/VIP2.png"></image>
  63. </view>
  64. <view>
  65. <view class="head-portrait-level_name">
  66. {{userInfo.level_name||''}}
  67. </view>
  68. <view class="head-portrait-moblie flex-y-center" :style="{color:setColor}">
  69. </view>
  70. </view>
  71. </view>
  72. </view>
  73. <view class="main">
  74. <view class="box-pack-between flex-y-center">
  75. <view class="block-title">我的服务</view>
  76. <!-- #ifdef MP-WEIXIN -->
  77. <view @click="bindAd" v-if="systemInfo.set.adv_jf>0" class="flex-y-center ad_title"
  78. style="margin-right: 20rpx;">
  79. <text class="ft24">
  80. <text style="color: red;">*观看视频得积分</text>
  81. <text class="iconfont icon-jiantou ft20" style="font-size: 22rpx;"></text> </text>
  82. </view>
  83. <!-- #endif -->
  84. </view>
  85. <view class="menu-list">
  86. <view @click="bindRecharge(1)" class="item" v-if="systemInfo.is_vip==1">
  87. <i class="iconfont icon-chuzhiyouli1" :style="{color:setColor}"></i>
  88. <view class="name">储值有礼</view>
  89. <view class="iconfont icon-rehot"></view>
  90. </view>
  91. <block v-if="agent_info.is_shared==1 && agent_info.status==1 ">
  92. <block v-if="agent_info.is_hehuoren==1">
  93. <navigator class="item" :url="`/agent/share?title=共享合伙人&pay_type=${agent_info.pay_type}`">
  94. <i class="iconfont icon-jifen01" :style="{color:setColor}"></i>
  95. <view class="name">共享合伙人</view>
  96. </navigator>
  97. </block>
  98. <block v-else>
  99. <navigator class="item" url="/agent/share?title=客源中心" v-if="agent_info.is_kyzx==1">
  100. <i class="iconfont icon-jifen01" :style="{color:setColor}"></i>
  101. <view class="name">客源中心</view>
  102. </navigator>
  103. <view class="item" @click="bindRecharge(4)" v-if="agent_info.is_kyzx==2">
  104. <i class="iconfont icon-jifen01" :style="{color:setColor}"></i>
  105. <view class="name">申请成为合伙人</view>
  106. </view>
  107. </block>
  108. </block>
  109. <navigator url="../../subscribe/order" class="item">
  110. <i class="iconfont icon-dingdan" :style="{color:setColor}"></i>
  111. <view class="name">我的预约</view>
  112. </navigator>
  113. <navigator url="../../miaosha/order" class="item">
  114. <i class="iconfont icon-wodedingdan2" :style="{color:setColor}"></i>
  115. <view class="name">我的秒杀</view>
  116. </navigator>
  117. <navigator url="../../pintuan/order" class="item">
  118. <i class="iconfont icon-dingdandingdanmingxishouzhimingxi" :style="{color:setColor}"></i>
  119. <view class="name">我的拼团</view>
  120. </navigator>
  121. <navigator class="item" url="../couponList/couponList">
  122. <i class="iconfont icon-wodeyouhuiquan" :style="{color:setColor}"></i>
  123. <view class="name">我的优惠劵</view>
  124. </navigator>
  125. <!-- #ifdef MP-WEIXIN -->
  126. <!-- <navigator class="item" url="../../menber/live">
  127. <i class="iconfont icon-shipinzhibo" :style="{color:setColor}"></i>
  128. <view class="name">直播列表</view>
  129. </navigator> -->
  130. <!-- #endif -->
  131. <!-- #ifdef MP-WEIXIN -->
  132. <view class="item" @click="navigateToMiniProgram" v-if="systemInfo.set.is_zhidou==1">
  133. <i class="iconfont icon-jifen01" :style="{color:setColor}"></i>
  134. <view class="name">智豆商圈</view>
  135. </view>
  136. <!-- #endif -->
  137. <!-- <view class="item" @click="navigateToMiniProgram" v-if="applet_info.appid">
  138. <i class="iconfont icon-jifen01" :style="{color:setColor}"></i>
  139. <view class="name">{{applet_info.name||'智豆商圈'}}</view>
  140. </view> -->
  141. <navigator url="../lineup/lineupInfo" class="item">
  142. <i class="iconfont icon-quhaojilu1" :style="{color:setColor}"></i>
  143. <view class="name">取号记录</view>
  144. </navigator>
  145. <navigator v-if="systemInfo.is_vip==1" class="item"
  146. :url="`../../menber/record?card_no=${info.ali_card_out}&type=1`">
  147. <i class="iconfont icon-chongzhijilu1" :style="{color:setColor}"></i>
  148. <view class="name">充值记录</view>
  149. </navigator>
  150. <navigator v-if="systemInfo.is_vip==1" class="item"
  151. url="../../menber/balance-record">
  152. <i class="iconfont icon-dingdandingdanmingxishouzhimingxi" :style="{color:setColor}"></i>
  153. <view class="name">余额扣款记录</view>
  154. </navigator>
  155. <navigator v-if="systemInfo.is_vip==1 && systemInfo.set.is_jf==1 || systemInfo.set.is_jf==3"
  156. :url="`../../menber/record?type=2`" class="item">
  157. <i class="iconfont icon-jifenjilu1" :style="{color:setColor}"></i>
  158. <view class="name">积分明细</view>
  159. </navigator>
  160. <navigator v-if="systemInfo.is_vip==1" url="../../menber/integral-commutation" class="item">
  161. <i class="iconfont icon-duihuanjilu1" :style="{color:setColor}"></i>
  162. <view class="name">兑换记录</view>
  163. </navigator>
  164. <navigator url="../shareList/shareList" class="item">
  165. <i class="iconfont icon-jifenjilu1" :style="{color:setColor}"></i>
  166. <view class="name">分享记录</view>
  167. </navigator>
  168. <navigator v-if="systemInfo.is_vip==1" class="item" url="../../menber/membership">
  169. <i class="iconfont icon-huiyuanquanyi1" :style="{color:setColor}"></i>
  170. <view class="name">会员权益</view>
  171. </navigator>
  172. <view v-if="systemInfo.is_vip==1&is_ali_card" class="item" @click="onOpenCard">
  173. <i class="iconfont icon-qiabao" :style="{color:setColor}"></i>
  174. <view class="name">领取会员卡</view>
  175. </view>
  176. <view v-if="systemInfo.is_vip==1&&systemInfo.set.is_jf==1 || systemInfo.set.is_jf==3"
  177. @click="bindRecharge(2)" class="item">
  178. <i class="iconfont icon-jifenshangcheng1" :style="{color:setColor}"></i>
  179. <view class="name">积分商城</view>
  180. </view>
  181. <navigator class="item" url="../address/address?teen_index=3">
  182. <i class="iconfont icon-shangjia" :style="{color:setColor}"></i>
  183. <view class="name">地址管理</view>
  184. </navigator>
  185. <navigator class="item" url="../../menber/shop">
  186. <i class="iconfont icon-shangjiaxinxi1" :style="{color:setColor}"></i>
  187. <view class="name">商家信息</view>
  188. </navigator>
  189. <view class="item" @click="tel">
  190. <i class="iconfont icon-lianxikefu1" :style="{color:setColor}"></i>
  191. <view class="name">联系我们</view>
  192. </view>
  193. </view>
  194. </view>
  195. <view class="brand_label">
  196. {{systemInfo.brand_label||''}}
  197. </view>
  198. <model :obj="modelObj"></model>
  199. <view class="hg100"></view>
  200. <page-btm-bar :active="4" />
  201. <!-- #ifdef MP-ALIPAY -->
  202. <!-- <subscribe-msg /> -->
  203. <!-- #endif -->
  204. <Vphone :getPhonePop="getPhonePop" @close="setClose"></Vphone>
  205. </view>
  206. </template>
  207. <script>
  208. // #ifdef MP-ALIPAY
  209. // const {
  210. // requestSubscribeMessage
  211. // } = requirePlugin('subscribeMsg');
  212. const alipassToolKit = requirePlugin("alipassToolKit") // 引用名称需与 app.json 中定义名称相同
  213. // #endif
  214. let hideLoading = true;
  215. import Vphone from '@/components/v-phone/v-phone.vue';
  216. import {
  217. mapState,
  218. mapMutations
  219. } from 'vuex';
  220. let videoAd = null;
  221. export default {
  222. components: {
  223. Vphone
  224. },
  225. data() {
  226. return {
  227. modelObj: {},
  228. getPhonePop: false,
  229. listCouponLength: 0,
  230. cardNumber: "",
  231. wxCardData: {},
  232. card_url: '',
  233. is_ali_card: true,
  234. agent_info: {},
  235. applet_info: {},
  236. }
  237. },
  238. computed: {
  239. ...mapState(['systemInfo', 'setColor', 'store_id', 'userInfo']),
  240. dateRange() {
  241. const {
  242. store_id,
  243. userInfo
  244. } = this;
  245. return {
  246. store_id,
  247. userInfo
  248. }
  249. }
  250. },
  251. watch: {
  252. systemInfo(val) {
  253. if (val.admin_id) {
  254. // #ifdef MP-ALIPAY
  255. this.alipaycard();
  256. // #endif
  257. // #ifdef MP-WEIXIN
  258. this.WechatCard();
  259. // #endif
  260. }
  261. },
  262. },
  263. onLoad() {
  264. uni.hideTabBar();
  265. if (this.systemInfo.admin_id) {
  266. // #ifdef MP-ALIPAY
  267. this.alipaycard();
  268. // #endif
  269. // #ifdef MP-WEIXIN
  270. this.WechatCard();
  271. // #endif
  272. }
  273. this.applet();
  274. },
  275. onShow() {
  276. this.menber_info();
  277. this.MyCoupon();
  278. this.agent();
  279. },
  280. onReady() {
  281. if (wx.createRewardedVideoAd) {
  282. videoAd = wx.createRewardedVideoAd({
  283. adUnitId: this.systemInfo.set.jili_id
  284. })
  285. videoAd.onLoad(() => {
  286. console.log('激励视频 广告加载成功')
  287. })
  288. videoAd.onError((err) => {
  289. console.log('激励视频 广告显示失败')
  290. })
  291. videoAd.onClose((res) => {
  292. // 用户点击了【关闭广告】按钮
  293. if (res && res.isEnded) {
  294. console.log('正常播放结束,可以下发游戏奖励')
  295. this.advertisements();
  296. // 正常播放结束,可以下发游戏奖励
  297. } else {
  298. // 播放中途退出,不下发游戏奖励
  299. uni.showToast({
  300. title: '播放结束才能获得积分喔',
  301. icon: 'none'
  302. })
  303. }
  304. })
  305. }
  306. },
  307. onShareAppMessage(e) {
  308. return {}
  309. },
  310. onShareTimeline() {},
  311. methods: {
  312. applet() {
  313. let type;
  314. // #ifdef MP-WEIXIN
  315. type = 1
  316. // #endif
  317. // #ifdef MP-ALIPAY
  318. type = 2
  319. // #endif
  320. this.$http.request('xcx/applet_index', {
  321. store_id: this.store_id,
  322. type: type,
  323. }, "", true, true).then(res => {
  324. this.applet_info = res.data;
  325. })
  326. },
  327. agent() {
  328. this.$http.request("shared/setting", {
  329. store_id: this.store_id,
  330. user_id: this.userInfo.id,
  331. }).then(res => {
  332. this.agent_info = res.data;
  333. })
  334. },
  335. navigateToMiniProgram() {
  336. // uni.showModal({
  337. // content: "敬请期待",
  338. // showCancel: false
  339. // })
  340. // return
  341. var mobile = this.userInfo.mobile,
  342. path = '',
  343. type = this.userInfo.mobile ? 1 : 2;
  344. // if('wx394da23b82f9863a'==this.applet_info.appid){
  345. // path = `${this.applet_info.pages}?mobile=${mobile}&type=${type}`;
  346. // }else{
  347. // path = this.applet_info.pages;
  348. // }
  349. // #ifdef MP-WEIXIN
  350. uni.navigateToMiniProgram({
  351. appId: 'wxf5a2bd2f2e47b5b7',
  352. path: `pages/integral-index/index?mobile=${mobile}&type=${type}`,
  353. envVersion: 'develop',
  354. success(res) {
  355. // 打开成功
  356. }
  357. })
  358. // #endif
  359. // #ifdef MP-ALIPAY
  360. uni.navigateToMiniProgram({
  361. appId: '2021002177604413',
  362. path: `pages/integral-index/index?mobile=${mobile}&type=${type}`,
  363. envVersion: 'develop',
  364. success(res) {
  365. // 打开成功
  366. }
  367. })
  368. // #endif
  369. // var mobile = this.userInfo.mobile,
  370. // type = this.userInfo.mobile ? 1 : 2;
  371. // uni.navigateToMiniProgram({
  372. // appId: 'wx394da23b82f9863a',
  373. // path: `pages/integral-index/index?mobile=${mobile}&type=${type}`,
  374. // envVersion: 'develop',
  375. // success(res) {}
  376. // })
  377. },
  378. bindAd() {
  379. console.log(this.systemInfo.set.jili_id, "this.systemInfo.set.jili_id")
  380. // 在页面中定义激励视频广告
  381. // 在页面onLoad回调事件中创建激励视频广告实例
  382. // 用户触发广告后,显示激励视频广告
  383. if (videoAd) {
  384. videoAd.show().catch(() => {
  385. // 失败重试
  386. videoAd.load()
  387. .then(() => videoAd.show())
  388. .catch(err => {
  389. console.log('激励视频 广告显示失败')
  390. uni.showToast({
  391. title: '激励视频 广告显示失败',
  392. icon: 'none'
  393. })
  394. })
  395. })
  396. }
  397. },
  398. advertisements() {
  399. let params = {
  400. user_id: this.userInfo.id,
  401. store_id: this.store_id
  402. }
  403. let share_user_id = uni.getStorageSync('share_user_id')
  404. if (share_user_id) {
  405. params.share_id = share_user_id
  406. }
  407. this.$http.request('yy/get_advertisements', params, "", "", hideLoading).then(res => {
  408. if (res.code == "200") {
  409. uni.showToast({
  410. title: res.message,
  411. icon: 'none'
  412. })
  413. setTimeout(() => {
  414. this.menber_info();
  415. }, 2000)
  416. }
  417. }).catch((res) => {});
  418. },
  419. // 子组件传参
  420. setClose(e) {
  421. this.getPhonePop = e;
  422. },
  423. WechatCard() {
  424. this.$http.request('xcx/WechatCard', {
  425. admin_id: this.systemInfo.admin_id,
  426. }, "", "", hideLoading).then(res => {
  427. if (res.code == "200") {
  428. if (res.data.length <= 0) {
  429. this.is_ali_card = false;
  430. } else {
  431. this.is_ali_card = true;
  432. this.Card()
  433. }
  434. }
  435. }).catch((res) => {});
  436. },
  437. alipaycard() {
  438. this.$http.request('Alipaymembership/alipaycard', {
  439. admin_id: this.systemInfo.admin_id,
  440. }, "", "", hideLoading).then(res => {
  441. if (res.code == "200") {
  442. this.is_ali_card = !res.data.card_id ? false : true;
  443. if (res.data.card_id) {
  444. this.Card();
  445. }
  446. }
  447. }).catch((res) => {});
  448. },
  449. Card() {
  450. // #ifdef MP-ALIPAY
  451. this.$http.request('Alipaymembership/Alipaymembershipcard_url', {
  452. admin_id: this.systemInfo.admin_id,
  453. }, "", "", hideLoading).then(res => {
  454. if (res.code == "200") {
  455. this.card_url = res.data;
  456. }
  457. }).catch((res) => {});
  458. // #endif
  459. // #ifdef MP-WEIXIN
  460. this.$http.request('xcx/Lqcard', {
  461. admin_id: this.systemInfo.admin_id,
  462. }, "", "", hideLoading).then(res => {
  463. this.is_ali_card = !res.data.card_id ? false : true;
  464. if (res.code == "200") {
  465. this.wxCardData = res.data;
  466. }
  467. }).catch((res) => {});
  468. // #endif
  469. },
  470. onOpenCard() {
  471. let subscribe = uni.getStorageSync('balance_subscribe');
  472. // #ifdef MP-WEIXIN
  473. let {
  474. card_id,
  475. code,
  476. timestamp,
  477. nonce_str,
  478. signature,
  479. } = this.wxCardData;
  480. let cardExt = {
  481. code,
  482. timestamp,
  483. nonce_str,
  484. signature,
  485. outer_str: 'miniProgram'
  486. }
  487. wx.addCard({
  488. cardList: [{
  489. cardId: card_id,
  490. cardExt: JSON.stringify(cardExt)
  491. }],
  492. success: (res) => {
  493. console.log(res, 'res')
  494. // uni.requestSubscribeMessage({
  495. // tmplIds: [subscribe.card_tid],
  496. // success: (r) => {},
  497. // complete: (r) => {
  498. this.addCardSuccess(res.cardList[0]);
  499. // }
  500. // })
  501. },
  502. fail: (err) => {
  503. console.log(err)
  504. }
  505. })
  506. // #endif
  507. // #ifdef MP-ALIPAY
  508. let that = this;
  509. let params = {
  510. url: that.card_url, //开卡链接,通过上文 获取投放链接 获取
  511. callback: function(res) {
  512. console.log('======', res)
  513. if (res.success === true) {
  514. console.log('----- success')
  515. }
  516. }
  517. }
  518. alipassToolKit.openCard(params); // 接口参数说明如下
  519. // my.addCardAuth({
  520. // url: that.card_url,
  521. // success: (res) => {
  522. // console.log(res, "res")
  523. // if (res.resultStatus == 9000) {
  524. // that.obj = res.result
  525. // my.alert({
  526. // content: '领取成功'
  527. // });
  528. // that.notify();
  529. // }
  530. // },
  531. // fail: (res) => {},
  532. // });
  533. // #endif
  534. },
  535. MyCoupon() {
  536. let arr = [];
  537. this.$http.request('xcx/MyCoupons', {
  538. user_id: this.userInfo.id,
  539. store_id: this.store_id,
  540. }, "", "", hideLoading).then(res => {
  541. for (let s of res.data) {
  542. if (s.state == 1) {
  543. arr.push(s)
  544. }
  545. };
  546. this.listCouponLength = arr.length;
  547. })
  548. },
  549. menber_info() {
  550. this.$http.request('xcx/userinfo', {
  551. id: this.userInfo.id,
  552. }, "", "", hideLoading).then(res => {
  553. if (res.code == "200") {
  554. this.$store.commit('SET_USER_INFO', res.data);
  555. }
  556. }).catch((res) => {
  557. uni.showToast({
  558. title: res.message,
  559. icon: 'none'
  560. })
  561. });
  562. },
  563. addCardSuccess({
  564. code,
  565. cardId
  566. }) {
  567. let userInfo = uni.getStorageSync('userInfo');
  568. this.$http.request('xcx/Lqcard_success', {
  569. user_id: userInfo.id,
  570. code: code,
  571. card_id: cardId
  572. }).then(res => {
  573. if (res.code == "200") {
  574. uni.showToast({
  575. title: "领取成功",
  576. icon: 'none'
  577. })
  578. }
  579. }).catch((res) => {
  580. console.log(res, "666")
  581. uni.showToast({
  582. title: res.message,
  583. icon: 'none'
  584. })
  585. });
  586. },
  587. notify() {
  588. let obj = this.obj;
  589. obj.user_id = uni.getStorageSync('userInfo').id;
  590. obj.admin_id = uni.getStorageSync('systemInfo').admin_id;
  591. this.$http.request('Alipaymembership/notify', obj, "", "", hideLoading).then(res => {
  592. if (res.code == "200") {}
  593. }).catch((res) => {
  594. console.log(res, "666")
  595. });
  596. },
  597. tel(e) {
  598. uni.makePhoneCall({
  599. phoneNumber: this.systemInfo.tel //仅为示例
  600. });
  601. },
  602. Subscribe() {
  603. let subscribe = uni.getStorageSync('balance_subscribe');
  604. let that = this;
  605. // 调用方法,唤起订阅组件
  606. my.requestSubscribeMessage({
  607. thirdTypeAppId: that.systemInfo.alipay_appid, // 可选,isv接入场景下必填
  608. entityIds: [subscribe.alipay_product], // 模板id列表,最多3个
  609. // 接收结果的回调方法
  610. complete:(r)=> {
  611. console.log('订阅回调', r);
  612. },
  613. });
  614. },
  615. // 开启会员弹窗
  616. onGetphone(e) {
  617. this.getPhonePop = true;
  618. },
  619. bindRecharge(type) {
  620. if (!this.userInfo.mobile) {
  621. // #ifdef MP-WEIXIN
  622. this.modelObj = {
  623. content: "完善资料享有更多优惠,是否完善?",
  624. };
  625. this.$store.commit('showAttrPicker', true)
  626. // #endif
  627. // #ifdef MP-ALIPAY
  628. this.getPhonePop = true;
  629. // #endif
  630. return
  631. }
  632. if (type == 1) {
  633. uni.navigateTo({
  634. url: '../../menber/recharge',
  635. })
  636. }
  637. if (type == 2) {
  638. uni.navigateTo({
  639. url: '../../menber/integral',
  640. })
  641. }
  642. if (type == 3) {
  643. uni.navigateTo({
  644. url: '../../menber/personal',
  645. })
  646. }
  647. if (type == 4) {
  648. console.log('点击')
  649. this.$http.request("shared/index", {
  650. store_id: this.store_id,
  651. user_id: this.userInfo.id,
  652. }).then(res => {
  653. console.log('点击')
  654. let user_info = res.data;
  655. let url = (user_info.state == 2 || user_info.state == 3) ? (
  656. '/agent/applicationStatus?status=' + user_info.state) : user_info.state == 1 ?
  657. '/agent/share' : '/agent/application';
  658. uni.navigateTo({
  659. url: url,
  660. })
  661. })
  662. }
  663. },
  664. }
  665. }
  666. </script>
  667. <style>
  668. page {
  669. background: #F1F1F1;
  670. }
  671. .brand_label {
  672. text-align: center;
  673. padding: 50rpx 40rpx;
  674. font-size: 26rpx;
  675. color: #999999;
  676. font-style: oblique;
  677. }
  678. .ad_title {
  679. color: #999999;
  680. }
  681. .hg100 {
  682. height: 100rpx;
  683. height: calc(100rpx + constant(safe-area-inset-bottom));
  684. height: calc(100rpx + env(safe-area-inset-bottom));
  685. }
  686. .line {
  687. width: 2rpx;
  688. height: 80rpx;
  689. background-color: #F1F1F1;
  690. }
  691. .Membership-rights {
  692. color: #FFFFFF;
  693. background-color: #fa9d3b;
  694. font-size: 22rpx;
  695. position: absolute;
  696. right: 0;
  697. top: 38rpx;
  698. border-radius: 40rpx 0rpx 0rpx 40rpx;
  699. height: 46rpx;
  700. width: 138rpx;
  701. }
  702. .head-bg {
  703. width: 100%;
  704. height: 450rpx;
  705. position: absolute;
  706. }
  707. .head-bg image {
  708. width: 100%;
  709. height: 100%;
  710. position: absolute;
  711. top: 0;
  712. left: 0;
  713. }
  714. .head-bg-content {
  715. width: 100%;
  716. height: 100%;
  717. position: absolute;
  718. top: 0;
  719. left: 0;
  720. }
  721. .hg300 {
  722. height: 300rpx;
  723. }
  724. .head-portrait {
  725. padding: 10rpx 0;
  726. position: relative;
  727. top: -20rpx;
  728. }
  729. .head-portrait-por {
  730. position: relative;
  731. margin-right: 20rpx;
  732. }
  733. .head-portrait-poa {
  734. position: absolute;
  735. right: 0;
  736. bottom: 20rpx;
  737. width: 35rpx;
  738. height: 35rpx;
  739. margin-right: 10rpx;
  740. }
  741. .head-portrait-content {
  742. width: 690rpx;
  743. background-color: #FFFFFF;
  744. position: relative;
  745. margin: 0 auto;
  746. padding: 0 0 0 30rpx;
  747. border-radius: 16rpx;
  748. height: 325rpx;
  749. text-align: center;
  750. }
  751. .head-portrait-level_name {
  752. font-size: 30rpx;
  753. text-align: left;
  754. }
  755. .head-portrait-moblie {
  756. font-size: 26rpx;
  757. color: #fa9d3b;
  758. margin-top: 10rpx;
  759. }
  760. .head-portrait-icon {
  761. width: 134rpx;
  762. height: 134rpx;
  763. margin-right: 10rpx;
  764. position: relative;
  765. top: -20rpx;
  766. border-radius: 100px;
  767. }
  768. .head-portrait-center {
  769. padding-top: 30rpx;
  770. font-size: 32rpx;
  771. }
  772. .head-portrait-center-conpun {
  773. font-size: 28rpx;
  774. color: #999;
  775. margin-top: 20rpx;
  776. }
  777. .main {
  778. border-radius: 20rpx 20rpx 0 0;
  779. background-color: #fff;
  780. width: 690rpx;
  781. margin: 0 auto;
  782. margin-top: 20rpx;
  783. position: relative
  784. }
  785. .main .block-title {
  786. height: 98rpx;
  787. line-height: 98rpx;
  788. font-size: 30rpx;
  789. font-weight: 500;
  790. color: #2c2c2c;
  791. border-bottom: 2rpx solid #f5f5f5;
  792. margin: 0 40rpx;
  793. }
  794. .main .menu-list {
  795. display: flex;
  796. flex-flow: row wrap;
  797. justify-content: flex-start;
  798. align-items: flex-start;
  799. align-content: flex-start;
  800. }
  801. .main .menu-list .item {
  802. flex: none;
  803. display: block;
  804. width: 25%;
  805. height: 154rpx;
  806. display: flex;
  807. flex-flow: column nowrap;
  808. justify-content: center;
  809. align-items: center;
  810. position: relative;
  811. }
  812. .icon-rehot {
  813. position: absolute;
  814. right: 32rpx;
  815. top: 10rpx;
  816. color: #dd524d;
  817. }
  818. .main .menu-list .item .iconfont {
  819. font-size: 40rpx;
  820. }
  821. page .main .menu-list .item .icon-lujing134 {
  822. font-size: 48rpx;
  823. }
  824. page .main .menu-list .item .icon-qiandaoquhao {
  825. font-size: 60rpx;
  826. }
  827. .main .menu-list .item .name {
  828. font-size: 24rpx;
  829. color: #2c2c2c;
  830. line-height: 33rpx;
  831. margin-top: 16rpx;
  832. text-align: center;
  833. }
  834. </style>