index.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798
  1. <template>
  2. <!-- 个人中心模块 -->
  3. <view class="user-page" :style="colorStyle">
  4. <template v-if="userInfo && isObjectData(diyData)">
  5. <user-member :userInfo="userInfo" :memberData="diyData.member" :orderAdminData="orderAdminData"
  6. :balanceStatus="balanceStatus" :isScrolling="isScrolling"></user-member>
  7. <view class="num-wrapper"
  8. :class="[member_style==3?'unNum-wrapper':member_style==2?'Tnum-wrapper':'',((vip_type==2 && stu) || (vip_type==1 && memberStatus))?'':'height']"
  9. v-if="userInfo.uid">
  10. <!-- <view class="num-item" v-show="userInfo.balance_func_status"
  11. @click="goMenuPage('/pages/users/user_money/index')">
  12. <text class="num">{{userInfo.now_money || 0}}</text>
  13. <view class="txt">余额</view>
  14. </view> -->
  15. <view class="num-item" @click="goMenuPage('/pages/users/user_integral/greed')">
  16. <text class="num">{{userInfo.green_integral || 0}}</text>
  17. <view class="txt">绿积分</view>
  18. </view>
  19. <!-- <view class="num-item" @click="goMenuPage('/pages/users/user_integral/integral')"> -->
  20. <view class="num-item">
  21. <text class="num">{{userInfo.award_range || 0}}</text>
  22. <view class="txt">分红额度</view>
  23. </view>
  24. <!-- <view class="num-item" @click="goMenuPage('/pages/users/user_integral/integral')">
  25. <text class="num">{{userInfo.static_integral || 0}}</text>
  26. <view class="txt">消费分</view>
  27. </view> -->
  28. </view>
  29. <user-order :orderMenu="orderMenu" :orderAdminData="orderAdminData" :userInfo="userInfo"
  30. :memberData="diyData.member" :orderData="diyData.order"></user-order>
  31. <user-order-static v-if="isObjectData(orderAdminData) && orderAdminData.order.user_order"
  32. :orderAdminData="orderAdminData.order" :orderStaticData="diyData.orderStatic"></user-order-static>
  33. <user-poster :posterData="diyData.poster"></user-poster>
  34. <user-menu :menuData="diyData.menu"></user-menu>
  35. <user-mer-menu v-if="diyData.merMenu.list.length" :merMenuData="diyData.merMenu"></user-mer-menu>
  36. <user-store-menu v-if="diyData.storeMenu.list.length" :storeMenuData="diyData.storeMenu"></user-store-menu>
  37. <view class="copy_right pb-20">
  38. <template v-if="copyRightText">
  39. <image :src="copyRightImg" mode="aspectFill" class="copyRightImg"></image>
  40. <view class="copyRightText">
  41. {{ copyRightText }}
  42. </view>
  43. </template>
  44. <image v-else :src="copyRightImg" mode="aspectFill" class="support"></image>
  45. </view>
  46. </template>
  47. <!-- 店员推广码 extension-->
  48. <view class="fixed-ct w-620 h-690 bg--w111-fff rd-24rpx ml-f310 mt-f400 z-1000" v-show="isextension"
  49. @touchmove.stop.prevent>
  50. <view class="fs-32 text-#333 fw-500 mt-48 mb-48 text-center">店员推广码</view>
  51. <view class="acea-row row-center-wrapper">
  52. <!-- #ifdef MP -->
  53. <image :src="extension.code" class="w-380 h-380" @click="downloadCode"></image>
  54. <!-- #endif -->
  55. <!-- #ifndef MP -->
  56. <view class="acea-row row-center-wrapper" @click="downloadCode">
  57. <w-qrcode id="hah" :options="extension" @generate="hello"></w-qrcode>
  58. </view>
  59. <!-- #endif -->
  60. <view class="fs-26 text--w111-999 mt-40 w-312 text-center">如遇到扫码失败,</view>
  61. <view class="fs-26 text--w111-999 mt-10 w-312 text-center">请将屏幕调至最亮重新扫码</view>
  62. </view>
  63. <view class="iconfont icon-ic_close1 text--w111-fff absolute fs-50 bottom-f100rpx left-50 ml-f25"
  64. @click="closeCode"></view>
  65. </view>
  66. <view class="fixed-lt bg-w111-000-s111-80 w-full h-full z-999" v-show="isextension" @touchmove.stop.prevent>
  67. </view>
  68. <pageFooter :style="colorStyle"></pageFooter>
  69. <ewcomerPop v-if="isComerGift" :comerGift="comerGift" @comerPop="comerPop"></ewcomerPop>
  70. <!-- #ifdef MP -->
  71. <editUserModal :isShow="editModal" @closeEdit="closeEdit" @editSuccess="editSuccess"></editUserModal>
  72. <!-- #endif -->
  73. </view>
  74. </template>
  75. <script>
  76. import {
  77. storeCardApi
  78. } from '@/api/store.js';
  79. import {
  80. newcomerGift
  81. } from '@/api/activity.js';
  82. import {
  83. copyRight
  84. } from '@/api/api.js';
  85. import {
  86. getMenuList,
  87. getUserInfo,
  88. setVisit,
  89. updateUserInfo,
  90. getRandCode,
  91. updateWechatInfo,
  92. getMenuData
  93. } from '@/api/user.js';
  94. import {
  95. wechatAuthV2,
  96. silenceAuth
  97. } from '@/api/public.js';
  98. import {
  99. toLogin
  100. } from '@/libs/login.js';
  101. import {
  102. mapState,
  103. mapGetters
  104. } from 'vuex';
  105. // #ifdef H5
  106. import Auth from '@/libs/wechat';
  107. // #endif
  108. import {
  109. HTTP_REQUEST_URL
  110. } from '@/config/app';
  111. const app = getApp();
  112. import ewcomerPop from '@/components/ewcomerPop/index.vue';
  113. import pageFooter from '@/components/pageFooter/index.vue';
  114. import dayjs from '@/plugin/dayjs/dayjs.min.js';
  115. import Routine from '@/libs/routine';
  116. import colors from '@/mixins/color';
  117. // #ifdef MP
  118. import editUserModal from '@/components/eidtUserModal/index.vue';
  119. // #endif
  120. import userMember from './components/member/index.vue';
  121. import userOrder from './components/order/index.vue';
  122. import userOrderStatic from './components/order_static/index.vue';
  123. import userMenu from './components/menus/index.vue';
  124. import userMerMenu from './components/merMenus/index.vue';
  125. import userStoreMenu from './components/storeMenus/index.vue';
  126. import userPoster from './components/poster/index.vue';
  127. export default {
  128. components: {
  129. userMember,
  130. userOrder,
  131. userOrderStatic,
  132. userMenu,
  133. userMerMenu,
  134. userStoreMenu,
  135. userPoster,
  136. pageFooter,
  137. ewcomerPop,
  138. // #ifdef MP
  139. editUserModal
  140. // #endif
  141. },
  142. computed: {
  143. ...mapGetters({
  144. cartNum: 'cartNum',
  145. isLogin: 'isLogin'
  146. })
  147. },
  148. filters: {},
  149. mixins: [colors],
  150. provide() {
  151. return {
  152. tapQrCode: this.tapQrCode,
  153. bindPhone: this.bindPhone,
  154. intoPage: this.intoPage,
  155. goMenuPage: this.goMenuPage,
  156. getMenuData: this.getMenuData,
  157. goEdit: this.goEdit
  158. };
  159. },
  160. data() {
  161. return {
  162. diyData: {},
  163. orderAdminData: {},
  164. // #ifdef MP
  165. getHeight: this.$util.getWXStatusHeight(),
  166. // #endif
  167. vipStatus: 0,
  168. stu: false,
  169. orderMenu: [{
  170. icon: '',
  171. title: '待付款',
  172. url: '/pages/goods/order_list/index?status=0'
  173. },
  174. {
  175. icon: '',
  176. title: '待发货',
  177. url: '/pages/goods/order_list/index?status=1'
  178. },
  179. {
  180. icon: '',
  181. title: '待收货',
  182. url: '/pages/goods/order_list/index?status=2'
  183. },
  184. {
  185. icon: '',
  186. title: '待评价',
  187. url: '/pages/goods/order_list/index?status=3'
  188. },
  189. {
  190. icon: '',
  191. title: '售后/退款',
  192. url: '/pages/users/user_return_list/index'
  193. }
  194. ],
  195. imgUrls: [],
  196. orderStatusNum: {},
  197. userInfo: '',
  198. showStatus: 1,
  199. // #ifdef H5 || MP
  200. pageHeight: '100%',
  201. routineContact: 0,
  202. // #endif
  203. // #ifdef APP-PLUS
  204. pageHeight: app.globalData.windowHeight,
  205. // #endif
  206. // #ifdef H5
  207. isWeixin: Auth.isWeixin(),
  208. //#endif
  209. footerSee: false,
  210. member_style: 1,
  211. my_banner_status: 1,
  212. menu_status: 1,
  213. service_status: 1,
  214. newcomer_status: 1,
  215. isextension: false,
  216. extension: {
  217. code: '',
  218. size: 380, // 二维码大小
  219. level: 3, //等级 0~4
  220. bgColor: '#FFFFFF', //二维码背景色 默认白色
  221. color: ['#333', '#333'] //边框颜色支持渐变色
  222. },
  223. imgHost: HTTP_REQUEST_URL,
  224. copyRightText: '',
  225. copyRightImg: '',
  226. giftPic: '',
  227. vip_type: 1,
  228. newcomer_style: 1,
  229. newList: [],
  230. newBg: '',
  231. comerGift: {},
  232. isComerGift: false,
  233. memberStatus: 0,
  234. balanceStatus: 0, // 余额是否展示
  235. editModal: false, // 编辑头像信息
  236. isScrolling: false,
  237. orderStyle: {
  238. 1: ['icon-ic_daifukuan12', 'icon-ic_daifahuo11', 'icon-ic_daishouhuo1', 'icon-ic_daipingjia1',
  239. 'icon-ic_daituikuan1'
  240. ],
  241. 2: ['icon-ic_daifukuan2', 'icon-ic_daifahuo2', 'icon-ic_daishouhuo2', 'icon-ic_daipingji2',
  242. 'icon-ic_daituikuan2'
  243. ],
  244. 3: ['icon-ic_daifukuan', 'icon-ic_daifahuo', 'icon-ic_daishouhuo', 'icon-ic_daipingjia',
  245. 'icon-ic_daituikuan'
  246. ]
  247. },
  248. codeImg: ''
  249. };
  250. },
  251. created() {
  252. let that = this;
  253. // #ifdef MP
  254. // 小程序静默授权
  255. if (!this.$store.getters.isLogin) {
  256. // Routine.getCode()
  257. // .then(code => {
  258. // Routine.silenceAuth(code).then(res => {
  259. // this.onLoadFun();
  260. // })
  261. // })
  262. // .catch(res => {
  263. // uni.hideLoading();
  264. // });
  265. }
  266. // #endif
  267. // #ifdef APP-PLUS
  268. that.$set(that, 'pageHeight', app.globalData.windowHeight);
  269. // #endif
  270. },
  271. async onLoad(option) {
  272. if (this.isLogin) {
  273. // this.getNewcomerGift();
  274. }
  275. // #ifdef H5
  276. if (this.isLogin && Auth.isWeixin() && option.code) {
  277. try {
  278. let res = await updateWechatInfo({
  279. code: option.code
  280. });
  281. this.userInfo.nickname = res.data.nickname;
  282. this.userInfo.avatar = res.data.avatar;
  283. this.userInfo.is_complete = 1;
  284. } catch (e) {}
  285. }
  286. // #endif
  287. this.colorData();
  288. },
  289. onReady() {},
  290. onShow() {
  291. if (!this.isLogin) {
  292. this.userInfo = '';
  293. toLogin();
  294. return;
  295. }
  296. if (this.cartNum > 0) {
  297. uni.setTabBarBadge({
  298. index: 3,
  299. text: this.cartNum > 99 ? '99+' : this.cartNum + ''
  300. });
  301. } else {
  302. uni.hideTabBarRedDot({
  303. index: 3
  304. });
  305. }
  306. this.copyRightText = uni.getStorageSync('copyNameInfo');
  307. this.copyRightImg = uni.getStorageSync('copyImageInfo');
  308. uni.removeStorageSync('form_type_cart');
  309. if (!this.copyRightText) {
  310. this.getCopyRight();
  311. }
  312. let that = this;
  313. // #ifdef APP-PLUS
  314. uni.getSystemInfo({
  315. success: function(res) {
  316. that.pageHeight = res.windowHeight + 'px';
  317. }
  318. });
  319. // #endif
  320. if (that.isLogin) {
  321. this.getUserInfo();
  322. this.getMyMenus();
  323. this.setVisit();
  324. this.getMenuData();
  325. }
  326. },
  327. // #ifdef MP || APP-PLUS
  328. onPageScroll(e) {
  329. if (e.scrollTop > 50) {
  330. this.isScrolling = true;
  331. } else if (e.scrollTop < 50) {
  332. this.isScrolling = false;
  333. }
  334. },
  335. // #endif
  336. methods: {
  337. hello(res) {
  338. this.codeImg = res.img.tempFilePath;
  339. },
  340. downloadCode() {
  341. let that = this
  342. // #ifdef H5
  343. var canvas = document.getElementById("hah").getElementsByTagName("canvas")
  344. var imgURL = canvas[0].toDataURL("image/png")
  345. var dlLink = document.createElement('a');
  346. dlLink.download = "店员推广码";
  347. dlLink.href = imgURL;
  348. dlLink.dataset.downloadurl = ["image/png", dlLink.download, dlLink.href].join(':');
  349. document.body.appendChild(dlLink);
  350. dlLink.click();
  351. document.body.removeChild(dlLink);
  352. // #endif
  353. // #ifdef MP
  354. uni.downloadFile({
  355. url: that.extension.code, //仅为示例,并非真实的资源
  356. success: (res) => {
  357. if (res.statusCode === 200) {
  358. uni.saveImageToPhotosAlbum({
  359. filePath: res.tempFilePath,
  360. success: function(res) {
  361. that.$util.Tips({
  362. title: '保存成功',
  363. icon: 'success'
  364. });
  365. },
  366. fail: function(res) {
  367. console.log(res)
  368. that.$util.Tips({
  369. title: '保存失败'
  370. });
  371. }
  372. });
  373. }
  374. }
  375. });
  376. // #endif
  377. // #ifdef APP-PLUS
  378. uni.saveImageToPhotosAlbum({
  379. filePath: that.codeImg,
  380. success: function(res) {
  381. that.$util.Tips({
  382. title: '保存成功',
  383. icon: 'success'
  384. });
  385. },
  386. fail: function(res) {
  387. that.$util.Tips({
  388. title: '保存失败'
  389. });
  390. }
  391. });
  392. // #endif
  393. },
  394. closeCode() {
  395. this.isextension = false
  396. },
  397. isObjectData(obj) {
  398. return Object.keys(obj).length !== 0;
  399. },
  400. // #ifdef MP
  401. editSuccess() {
  402. this.editModal = false;
  403. this.getUserInfo();
  404. },
  405. closeEdit() {
  406. this.editModal = false;
  407. },
  408. // #endif
  409. getCopyRight() {
  410. copyRight()
  411. .then((res) => {
  412. let data = res.data;
  413. if (!data.copyrightContext && !data.copyrightImage) {
  414. data.copyrightImage = '/static/images/support.png';
  415. }
  416. uni.setStorageSync('copyNameInfo', data.copyrightContext);
  417. uni.setStorageSync('copyImageInfo', data.copyrightImage);
  418. this.copyRightText = data.copyrightContext;
  419. this.copyRightImg = data.copyrightImage;
  420. })
  421. .catch((err) => {
  422. return this.$util.Tips({
  423. title: err.msg
  424. });
  425. });
  426. },
  427. // 查看订单
  428. intoPage(url) {
  429. if (this.isLogin) {
  430. if (['/pages/users/user_vip/index', '/pages/annex/vip_grade_active/index'].includes(url) && !this
  431. .userInfo.member_func_status) {
  432. this.$util.Tips({
  433. title: '会员卡功能暂未开启'
  434. });
  435. } else {
  436. this.$util.JumpPath(url);
  437. }
  438. } else {
  439. toLogin();
  440. }
  441. },
  442. // 编辑页面
  443. goEdit() {
  444. if (this.isLogin == false || !this.userInfo.uid) {
  445. toLogin();
  446. } else {
  447. // #ifdef MP
  448. if (this.userInfo.is_default_avatar) {
  449. this.editModal = true;
  450. return;
  451. }
  452. // #endif
  453. uni.navigateTo({
  454. url: '/pages/users/user_set/index'
  455. });
  456. }
  457. },
  458. goDetail(item) {
  459. uni.navigateTo({
  460. url: `/pages/goods_details/index?id=${item.id}&fromPage='newVip'`
  461. });
  462. },
  463. comerPop() {
  464. this.isComerGift = false;
  465. },
  466. getNewcomerGift() {
  467. if (uni.getStorageSync('newcomerGift')) {
  468. return (this.isComerGift = false);
  469. }
  470. newcomerGift()
  471. .then((res) => {
  472. this.comerGift = res.data;
  473. if (Object.prototype.toString.call(this.comerGift) == '[object Object]') {
  474. if (res.data.coupon_count || res.data.product_count || res.data.register_give_money || res
  475. .data.first_order_discount || res.data.register_give_integral) {
  476. uni.setStorageSync('newcomerGift', true);
  477. this.isComerGift = true;
  478. }
  479. }
  480. })
  481. .catch((err) => {
  482. return this.$util.Tips({
  483. title: err
  484. });
  485. });
  486. },
  487. tapQrCode() {
  488. uni.navigateTo({
  489. url: '/pages/users/user_member_code/index'
  490. });
  491. },
  492. getRoutineUserInfo(e) {
  493. updateUserInfo({
  494. userInfo: e.detail.userInfo
  495. })
  496. .then((res) => {
  497. this.getUserInfo();
  498. return this.$util.Tips('更新用户信息成功');
  499. })
  500. .catch((err) => {
  501. return this.$util.Tips(err);
  502. });
  503. },
  504. // 记录会员访问
  505. setVisit() {
  506. setVisit({
  507. url: '/pages/user/index'
  508. }).then((res) => {});
  509. },
  510. // 打开授权
  511. openAuto() {
  512. toLogin();
  513. },
  514. // 授权回调
  515. onLoadFun(e) {
  516. this.getUserInfo(e);
  517. this.getMyMenus();
  518. this.setVisit();
  519. },
  520. // 绑定手机
  521. bindPhone() {
  522. uni.navigateTo({
  523. url: '/pages/users/user_phone/index'
  524. });
  525. },
  526. // 获取行销数据
  527. getMenuData() {
  528. getMenuData().then((res) => {
  529. this.orderAdminData = res.data;
  530. });
  531. },
  532. /**
  533. * 获取个人用户信息
  534. */
  535. getUserInfo() {
  536. let that = this;
  537. getUserInfo().then((res) => {
  538. that.userInfo = res.data;
  539. that.stu = res.data.svip_open;
  540. that.balanceStatus = res.data.balance_func_status;
  541. that.memberStatus = parseInt(res.data.member_func_status);
  542. that.vipStatus = res.data.vip_status;
  543. that.$store.commit('SETUID', res.data.uid);
  544. that.$store.commit('UPDATE_USERINFO', res.data);
  545. that.orderMenu.forEach((item, index) => {
  546. switch (item.title) {
  547. case '待付款':
  548. this.$set(item, 'num', res.data.orderStatusNum.unpaid_count);
  549. break;
  550. case '待发货':
  551. this.$set(item, 'num', res.data.orderStatusNum.unshipped_count);
  552. break;
  553. case '待收货':
  554. this.$set(item, 'num', res.data.orderStatusNum.received_count);
  555. break;
  556. case '待评价':
  557. this.$set(item, 'num', res.data.orderStatusNum.evaluated_count);
  558. break;
  559. case '售后/退款':
  560. this.$set(item, 'num', res.data.orderStatusNum.refunding_count);
  561. break;
  562. }
  563. });
  564. });
  565. },
  566. getMyMenus: function() {
  567. let that = this;
  568. getMenuList().then((res) => {
  569. this.diyData = res.data.diy_data;
  570. this.switchTab(this.diyData.order.style);
  571. this.my_banner_status = res.data.diy_data.my_banner_status;
  572. this.menu_status = res.data.diy_data.menu_status;
  573. this.service_status = res.data.diy_data.service_status;
  574. this.vip_type = res.data.diy_data.vip_type;
  575. this.newcomer_style = res.data.diy_data.newcomer_style;
  576. this.newcomer_status = res.data.diy_data.newcomer_status;
  577. this.imgUrls = res.data.routine_my_banner;
  578. this.routineContact = Number(res.data.routine_contact_type);
  579. });
  580. },
  581. switchTab(style) {
  582. this.orderMenu.forEach((item, index) => {
  583. item.icon = this.orderStyle[style][index];
  584. });
  585. },
  586. goMenuPage(url, name) {
  587. console.log(url);
  588. if (this.isLogin) {
  589. let arr = url.split('@APPID=');
  590. if (arr.length > 1) {
  591. //#ifdef MP
  592. uni.navigateToMiniProgram({
  593. appId: arr[arr.length - 1], // 此为生活缴费appid
  594. path: arr[0], // 此为生活缴费首页路径
  595. envVersion: 'release',
  596. success: (res) => {
  597. console.log('打开成功', res);
  598. },
  599. fail: (err) => {
  600. console.log('sgdhgf', err);
  601. }
  602. });
  603. //#endif
  604. //#ifndef MP
  605. this.Tips({
  606. title: 'h5与app端不支持跳转外部小程序'
  607. });
  608. //#endif
  609. } else {
  610. if (url == '/pages/extension/customer_list/chat' || url == 'https://chat.crmeb.net/chat/mobile') {
  611. this.$util.getCustomer(this.userInfo);
  612. } else {
  613. if (url.indexOf('http') === -1) {
  614. // #ifdef H5
  615. if (name && name === '订单核销') {
  616. return (window.location.href = `${location.origin}${url}`);
  617. }
  618. // #endif
  619. // #ifdef MP
  620. if (url != '#' && url == '/pages/users/user_set/index') {
  621. uni.openSetting({
  622. success: function(res) {}
  623. });
  624. }
  625. // #endif
  626. if (url == '/pages/store_spread/index') {
  627. storeCardApi()
  628. .then((res) => {
  629. this.isextension = true;
  630. this.$nextTick(function() {
  631. this.extension.code = res.data.url;
  632. });
  633. })
  634. .catch((err) => {
  635. uni.hideLoading();
  636. this.$util.Tips({
  637. title: err
  638. });
  639. });
  640. }
  641. if (
  642. ['/pages/goods_cate/goods_cate', '/pages/order_addcart/order_addcart',
  643. '/pages/user/index', '/pages/store_cate/store_cate', '/pages/index/index'
  644. ].indexOf(url) == -1
  645. ) {
  646. uni.navigateTo({
  647. url: url
  648. });
  649. } else {
  650. uni.reLaunch({
  651. url: url
  652. });
  653. }
  654. } else {
  655. // #ifdef H5
  656. this.$util.JumpPath(url);
  657. // #endif
  658. // #ifndef H5
  659. uni.navigateTo({
  660. url: `/pages/annex/web_view/index?url=${url}`
  661. });
  662. // #endif
  663. }
  664. }
  665. }
  666. }
  667. }
  668. }
  669. };
  670. </script>
  671. <style lang="scss" scoped>
  672. .footer-placeholder {
  673. height: calc(98rpx+ constant(safe-area-inset-bottom));
  674. height: calc(98rpx + env(safe-area-inset-bottom));
  675. height: 98rpx;
  676. }
  677. .user-page {
  678. padding-bottom: calc(100rpx+ constant(safe-area-inset-bottom));
  679. padding-bottom: calc(100rpx + env(safe-area-inset-bottom));
  680. padding-bottom: 100rpx;
  681. }
  682. .copy_right {
  683. text-align: center;
  684. color: #ccc;
  685. font-size: 22rpx;
  686. margin-top: 40rpx;
  687. .copyRightImg {
  688. width: 219rpx;
  689. height: 74rpx;
  690. margin: 16rpx auto;
  691. display: block;
  692. }
  693. .support {
  694. width: 219rpx;
  695. height: 74rpx;
  696. margin: 54rpx auto;
  697. display: block;
  698. }
  699. .copyRightText {
  700. margin-top: 0rpx;
  701. color: #ccc;
  702. font-size: 20rpx;
  703. margin-bottom: 20rpx;
  704. }
  705. }
  706. .num-wrapper {
  707. background-color: #fff;
  708. z-index: 29;
  709. position: relative;
  710. display: flex;
  711. align-items: center;
  712. justify-content: space-between;
  713. margin-top: 22rpx;
  714. color: #333;
  715. margin: 20rpx 20rpx 20rpx 20rpx;
  716. border-radius: 16rpx;
  717. height: 160rpx;
  718. &.on {
  719. height: 128rpx;
  720. margin-top: -68rpx;
  721. .gift {
  722. color: var(--view-theme);
  723. margin-left: 10rpx;
  724. font-weight: bold;
  725. }
  726. }
  727. .img {
  728. margin-left: 38rpx;
  729. width: 76rpx;
  730. height: 68rpx;
  731. }
  732. .text {
  733. font-size: 28rpx;
  734. font-weight: 400;
  735. color: #333333;
  736. margin-left: -60rpx;
  737. }
  738. .btn-login {
  739. width: 144rpx;
  740. height: 56rpx;
  741. // background: linear-gradient(270deg, #FF7931 0%, #E93323 100%);
  742. background-color: var(--view-theme);
  743. border-radius: 28rpx;
  744. text-align: center;
  745. line-height: 56rpx;
  746. margin-right: 32rpx;
  747. font-size: 28rpx;
  748. font-weight: 500;
  749. color: #FFFFFF;
  750. }
  751. .num-item {
  752. width: 33.33%;
  753. text-align: center;
  754. flex-grow: 1;
  755. &~.num-item {
  756. position: relative;
  757. &:before {
  758. content: '';
  759. position: absolute;
  760. width: 1rpx;
  761. height: 28rpx;
  762. top: 50%;
  763. margin-top: -14rpx;
  764. background-color: rgba(255, 255, 255, 0.4);
  765. left: 0;
  766. }
  767. }
  768. .num {
  769. font-size: 36rpx;
  770. font-weight: bold;
  771. }
  772. .txt {
  773. margin-top: 8rpx;
  774. font-size: 26rpx;
  775. color: #555;
  776. }
  777. }
  778. }
  779. </style>