index.vue 25 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027
  1. <template>
  2. <view :data-theme="theme">
  3. <!-- #ifdef MP -->
  4. <view class="cart_nav" :style='"height:"+navH+"rpx;"'>
  5. <nav-bar iconColor='#fff' ref="navBarRef" navTitle="个人中心">
  6. </nav-bar>
  7. </view>
  8. <!-- #endif -->
  9. <tui-skeleton v-if="showSkeleton"></tui-skeleton>
  10. <view class="new-users copy-data tui-skeleton">
  11. <view class="mid" style="flex:1;overflow: hidden;">
  12. <scroll-view scroll-y="true">
  13. <view class="head borderPad">
  14. <view class="bg"
  15. :style="{'background-image': `url(${urlDomain}crmebimage/presets/user_bg.png)`}">
  16. <view class="user-card">
  17. <view class="user-info">
  18. <image class="avatar tui-skeleton-rect" :src='userInfo.avatar'
  19. v-if="userInfo.avatar" @click="goEdit()"></image>
  20. <image v-else class="avatar tui-skeleton-rect"
  21. :src="urlDomain+'crmebimage/presets/morenT.png'" mode="" @click="goEdit()">
  22. </image>
  23. <view class="info">
  24. <view class="name" v-if="!isLogin" @tap="openAuto">
  25. 请点击登录
  26. </view>
  27. <view class="name" v-if="userInfo && uid">
  28. <view @click="goEdit()">
  29. {{userInfo && userInfo.nickname && uid ? userInfo.nickname : ''}}
  30. </view>
  31. <view class="vip" v-if="userInfo.vipIcon" @click="goEdit()">
  32. <image :src="userInfo.vipIcon" alt=""></image>
  33. </view>
  34. <view class="vip" v-if="userInfo.isPaidMember"
  35. @click="menusTap('/pages/activity/vip_paid/index')">
  36. <image
  37. :style="{'background-image': `url(${urlDomain}crmebimage/presets/viptu.png)`}">
  38. </image>
  39. </view>
  40. </view>
  41. <view class="num mt10" v-if="userInfo && userInfo.phone && uid"
  42. @click="goEdit()">
  43. <view class="num-txt">{{userInfo.phone}}</view>
  44. </view>
  45. </view>
  46. <view class="app_set" @click="handleUserSetting()">
  47. <text class="iconfont icon-shezhi"></text>
  48. </view>
  49. </view>
  50. <view class="num-wrapper tui-skeleton-rect">
  51. <view class="num-item" @click="goMenuPage('/pages/merchant/user_integral/index')">
  52. <text class="num">{{userInfo.integral && uid ? userInfo.integral: 0}}</text>
  53. <view class="txt">积分</view>
  54. </view>
  55. <view class="num-item" @click="goMenuPage('/pages/users/user_coupon/index')">
  56. <text
  57. class="num">{{userInfo.couponCount && uid ? userInfo.couponCount : 0}}</text>
  58. <view class="txt">优惠券</view>
  59. </view>
  60. <view class="num-item"
  61. @click="goMenuPage('/pages/goods/user_goods_collection/index')">
  62. <text
  63. class="num">{{userInfo.collectCount && uid ? userInfo.collectCount : 0}}</text>
  64. <view class="txt">收藏</view>
  65. </view>
  66. <view class="num-item" @click="goMenuPage('/pages/goods/browsing_history/index')">
  67. <text class="num">{{userInfo.browseNum && uid ? userInfo.browseNum:0}}</text>
  68. <view class="txt">浏览记录</view>
  69. </view>
  70. </view>
  71. </view>
  72. </view>
  73. <view v-show="userInfo.paidMemberPaidEntrance===1"
  74. @click="menusTap('/pages/activity/vip_paid/index')" class="h-128 svip-box px-30"
  75. :style="{'background-image': `url(${urlDomain}crmebimage/presets/cardbj.png)`}">
  76. <view class="acea-row row-middle row-between h-94">
  77. <view class="acea-row">
  78. <view class="w-34 h-28 no-repeat vipicon"
  79. :style="{'background-image': `url(${urlDomain}crmebimage/presets/huangguan.png)`}">
  80. </view>
  81. <view class="f-s-24 text ml-12">加入SVIP畅享精彩</view>
  82. </view>
  83. <view class="acea-row row-middle">
  84. <view class="f-s-24 text mr10">{{userInfo.isPaidMember?'去查看':'去开通'}}</view>
  85. <text class="iconfont icon-gengduo3 text f-s-20"></text>
  86. </view>
  87. </view>
  88. </view>
  89. <view class="order-wrapper tui-skeleton-rect"
  90. :class="userInfo.paidMemberPaidEntrance===1?'mt34rpx':''" v-if="orderMenu.length">
  91. <view class="order-hd flex">
  92. <view class="left">订单中心</view>
  93. <view class="right flex" @click="menusTap('/pages/goods/order_list/index')">查看全部
  94. <text class="iconfont icon-xiangyou"></text>
  95. </view>
  96. </view>
  97. <view class="order-bd">
  98. <block v-for="(item,index) in orderMenu" :key="index">
  99. <view class="order-item" @click="menusTap(item.url)">
  100. <view class="pic">
  101. <image :src="item.pic" class="image"></image>
  102. <!-- <text class="iconfont pic_status" :class="item.img"></text> -->
  103. <text class="order-status-num" v-if="item.num > 0">{{ item.num }}</text>
  104. </view>
  105. <view class="txt tui-skeleton-rect">{{item.title}}</view>
  106. </view>
  107. </block>
  108. </view>
  109. </view>
  110. </view>
  111. <view class="contenBox borderPad" id="pageIndex">
  112. <!-- 轮播 -->
  113. <view class="slider-wrapper tui-skeleton-rect" @click.native="bindEdit('userBanner')"
  114. v-if="centerBanner != null && centerBanner.length > 0">
  115. <swiper v-if="centerBanner.length>0" indicator-dots="true" :autoplay="autoplay"
  116. :circular="circular" :interval="interval" :duration="duration"
  117. indicator-color="rgba(255,255,255,0.6)" indicator-active-color="#fff">
  118. <block v-for="(item,index) in centerBanner" :key="index">
  119. <swiper-item class="borRadius14">
  120. <image :src="item.pic" class="slide-image" @click="navito(item.url)"></image>
  121. </swiper-item>
  122. </block>
  123. </swiper>
  124. </view>
  125. <!-- 会员菜单 -->
  126. <view class="user-menus mt20" @click.native="bindEdit('userMenus')">
  127. <view class="menu-title">我的服务</view>
  128. <view class="list-box">
  129. <block v-for="(item,index) in centerMenu" :key="index">
  130. <view class="item tui-skeleton-rect" @click="menusTap(item.url)"
  131. v-if="!(item.url =='/pages/service/index' || (item.url =='/pages/users/user_spread_user/index' && !userInfo.isPromoter)||(!isEmployee&&item.url=='/pages/admin/work/index'))">
  132. <image :src="item.pic"></image>
  133. <text>{{item.name}}</text>
  134. </view>
  135. </block>
  136. <!-- #ifndef MP -->
  137. <view class="item" @click="kefuClick">
  138. <image :src="servicePic"></image>
  139. <text>联系客服</text>
  140. </view>
  141. <!-- #endif -->
  142. <!-- #ifdef MP -->
  143. <button class="item" hover-class='none' @click="kefuClick"
  144. v-if="chatConfig.telephone_service_switch === 'true'">
  145. <image :src="servicePic"></image>
  146. <text>联系客服</text>
  147. </button>
  148. <button class="item" open-type='contact' hover-class='none' v-else>
  149. <image :src="servicePic"></image>
  150. <text>联系客服</text>
  151. </button>
  152. <!-- #endif -->
  153. </view>
  154. </view>
  155. <!-- 商家管理 -->
  156. <view class="user-menus mt20" v-if="isEmployee && isLogin">
  157. <view class="menu-title">店铺管理</view>
  158. <view class="list-box">
  159. <view class="item" @click="toggle('bottom')">
  160. <image :src="urlDomain+'crmebimage/presets/adminImg/sjgl.png'"></image>
  161. <text>商家管理</text>
  162. </view>
  163. </view>
  164. </view>
  165. <!-- 骑手管理 -->
  166. <view class="user-menus mt20" v-if="userInfo.isRider && isLogin">
  167. <view class="menu-title">骑手管理</view>
  168. <view class="list-box">
  169. <view class="item" @click="menusTap('/pages/rider_index/work/index')">
  170. <image :src="urlDomain+'crmebimage/presets/adminImg/ic-rider.png'"></image>
  171. <text>骑手管理</text>
  172. </view>
  173. </view>
  174. </view>
  175. </view>
  176. <image :src="copyImage" alt="" class='support'></image>
  177. </scroll-view>
  178. </view>
  179. </view>
  180. <!-- <view v-if="bottomNavigationIsCustom" class="footerBottom"></view> -->
  181. <!-- <pageFooter></pageFooter> -->
  182. <uni-popup ref="popup" type="bottom" background-color="rgba(0,0,0,0)" border-radius="10px 10px 0 0">
  183. <view class="popup-content">
  184. <view class="item" v-for="(item,index) in merchantEmployeeList" :key="index"
  185. :class="{bottom_border:index!=merchantEmployeeList.length-1}">
  186. <view class="item_main">
  187. <image :src="item.currentMerchant.avatar" mode="" class="item_img"></image>
  188. <view class="item_name" :class="{nameColor:item.merId==selectMerId}">
  189. {{item.currentMerchant.name}}</view>
  190. </view>
  191. <text v-if="item.merId==selectMerId" class="iconfont icon-xuanzhong11 icon-size icon_color"></text>
  192. <text v-else class="iconfont icon-weixuan icon-size" @click="radioChange(item)"></text>
  193. </view>
  194. </view>
  195. </uni-popup>
  196. <!-- 底部导航距离,做兼容处理的-->
  197. <view v-if="bottomNavigationIsCustom" class="footerBottom"></view>
  198. <pageFooter></pageFooter>
  199. </view>
  200. </template>
  201. <script>
  202. let sysHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
  203. import Cache from '@/utils/cache';
  204. import navBar from '@/components/navBar';
  205. import {
  206. goPage
  207. } from '@/libs/iframe.js'
  208. import {
  209. BACK_URL,
  210. USER_INFO
  211. } from '@/config/cache';
  212. import {
  213. userCenterInfo,
  214. copyrightImageApi
  215. } from '@/api/user.js';
  216. import {
  217. MerchantBelongListApi,
  218. merchantActive
  219. } from '@/api/work.js';
  220. import {
  221. orderNum
  222. } from '@/api/order.js';
  223. import {
  224. toLogin
  225. } from '@/libs/login.js';
  226. import {
  227. mapGetters
  228. } from "vuex";
  229. import {
  230. getCityList
  231. } from "@/utils";
  232. import {
  233. tokenIsExistApi
  234. } from '@/api/api.js';
  235. // #ifdef H5
  236. import Auth from '@/libs/wechat';
  237. // #endif
  238. import {
  239. getShare
  240. } from '@/api/public.js';
  241. import {
  242. setThemeColor
  243. } from '@/utils/setTheme.js'
  244. import animationType from '@/utils/animationType.js'
  245. import {
  246. chatConfig
  247. } from '@/utils/consumerType.js'
  248. import tuiSkeleton from '@/components/base/tui-skeleton.vue';
  249. import pageFooter from "@/components/pageFooter/index.vue";
  250. const app = getApp();
  251. export default {
  252. computed: mapGetters(['isLogin', 'chatUrl', 'uid', 'globalData', 'bottomNavigationIsCustom',
  253. 'merchantEmployeeList', 'isEmployee', 'selectMerId'
  254. ]),
  255. data() {
  256. return {
  257. scrollHeight: 0,
  258. triggered: false,
  259. isRefresher: false, //下拉刷新状态
  260. urlDomain: this.$Cache.get("imgHost"),
  261. showSkeleton: true, //骨架屏显示隐藏
  262. orderMenu:[],
  263. // orderMenu: [{
  264. // img: 'icon-daifukuan',
  265. // title: '待付款',
  266. // url: '/pages/goods/order_list/index?status=0',
  267. // num: 0
  268. // },
  269. // {
  270. // img: 'icon-daifahuo',
  271. // title: '待取餐',
  272. // url: '/pages/goods/order_list/index?status=1',
  273. // num: 0
  274. // },
  275. // {
  276. // img: 'icon-daihexiao',
  277. // title: '待核销',
  278. // url: '/pages/goods/order_list/index?status=3',
  279. // num: 0
  280. // },
  281. // {
  282. // img: 'icon-daishouhuo',
  283. // title: '配送中',
  284. // url: '/pages/goods/order_list/index?status=4',
  285. // num: 0
  286. // },
  287. // {
  288. // img: 'icon-daipingjia',
  289. // title: '待评价',
  290. // url: '/pages/goods/evaluation_list/index',
  291. // num: 0
  292. // },
  293. // {
  294. // img: 'icon-a-shouhoutuikuan',
  295. // title: '售后/退款',
  296. // url: '/pages/goods/user_return_list/index',
  297. // num: 0
  298. // },
  299. // ],
  300. centerBanner: [],
  301. userMenu: [],
  302. autoplay: true,
  303. circular: true,
  304. interval: 3000,
  305. duration: 500,
  306. isAuto: false, //没有授权的不会自动授权
  307. isShowAuth: false, //是否隐藏授权
  308. orderStatusNum: {},
  309. centerMenu: [],
  310. wechatUrl: [],
  311. servicePic: '',
  312. sysHeight: sysHeight,
  313. // #ifdef MP
  314. pageHeight: '100%',
  315. // #endif
  316. // #ifdef H5 || APP-PLUS
  317. pageHeight: '',
  318. // #endif
  319. // #ifdef H5
  320. isWeixin: Auth.isWeixin(),
  321. //#endif
  322. configApi: {}, //分享类容配置
  323. theme: app.globalData.theme,
  324. bgColor: '#e93323',
  325. userInfo: {},
  326. copyImage: '',
  327. navH:''
  328. }
  329. },
  330. components: {
  331. tuiSkeleton,
  332. pageFooter,
  333. navBar
  334. },
  335. onLoad() {
  336. this.servicePic = this.urlDomain + 'crmebimage/presets/customer.png'
  337. this.getTokenIsExist();
  338. // #ifdef MP
  339. this.navH = this.globalData.navHeight;
  340. // #endif
  341. // #ifndef MP
  342. this.navH = 96;
  343. // #endif
  344. if (this.globalData.isIframe) {
  345. setTimeout(() => {
  346. let active;
  347. document.getElementById('pageIndex').children.forEach(dom => {
  348. dom.addEventListener('click', (e) => {
  349. e.stopPropagation();
  350. e.preventDefault();
  351. if (dom === active) return;
  352. dom.classList.add('borderShow');
  353. active && active.classList.remove('borderShow');
  354. active = dom;
  355. })
  356. })
  357. });
  358. }
  359. // #ifdef APP-PLUS
  360. setTimeout(()=>{
  361. uni.setNavigationBarColor({
  362. frontColor: '#ffffff',
  363. backgroundColor:that.bgColor,
  364. });
  365. },500)
  366. // #endif
  367. let that = this;
  368. // #ifdef H5 || APP-PLUS
  369. that.$set(that, 'pageHeight', this.globalData.windowHeight);
  370. // #endif
  371. that.$set(that, 'centerMenu', this.globalData.centerMenu);
  372. that.bgColor = setThemeColor();
  373. },
  374. onShow: function() {
  375. if (this.isLogin) {
  376. this.getUserCenterInfo();
  377. this.getMerchantList()
  378. }
  379. this.copyrightImage();
  380. this.showSkeleton = false
  381. let that = this;
  382. if (!that.$Cache.get('cityList')) getCityList();
  383. // #ifdef H5
  384. uni.getSystemInfo({
  385. success: function(res) {
  386. that.pageHeight = res.windowHeight + 'px'
  387. }
  388. });
  389. // #endif
  390. // #ifdef MP
  391. let query = uni.createSelectorQuery();
  392. let dom = query.select('.new-users');
  393. // #endif
  394. },
  395. methods: {
  396. /**
  397. * 发现列表滑动中用到的方法
  398. */
  399. onScroll() {
  400. uni.$emit('scroll');
  401. },
  402. toggle(type) {
  403. if (this.merchantEmployeeList.length == 1) {
  404. merchantActive(this.merchantEmployeeList[0].merId).then(res => {
  405. this.$store.commit('SetSelectMerId', this.merchantEmployeeList[0].merId);
  406. this.$store.commit('SetSelectMerchantRole', this.merchantEmployeeList[0].role);
  407. this.$store.commit('SET_MANAGER_TOKEN', {
  408. managerToken: res.data.token
  409. });
  410. Cache.set('electrPrintingSwitch', res.data.electrPrintingSwitch);
  411. uni.navigateTo({
  412. url: '/pages/admin/work/index'
  413. })
  414. return
  415. })
  416. return
  417. }
  418. if (this.selectMerId) {
  419. uni.navigateTo({
  420. url: '/pages/admin/work/index'
  421. })
  422. } else {
  423. this.type = type
  424. // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
  425. this.$refs.popup.open(type)
  426. }
  427. },
  428. //选中商户
  429. radioChange(item) {
  430. let that = this
  431. merchantActive(item.merId).then(res => {
  432. if (res.code == 200) {
  433. that.$store.commit('SET_MANAGER_TOKEN', {
  434. managerToken: res.data.token
  435. });
  436. Cache.set('electrPrintingSwitch', res.data.electrPrintingSwitch);
  437. that.$store.commit('SetSelectMerId', item.merId);
  438. this.$store.commit('SetSelectMerchantRole', item.role);
  439. this.$refs.popup.close()
  440. uni.navigateTo({
  441. url: '/pages/admin/work/index'
  442. })
  443. }
  444. })
  445. },
  446. //获取商户列表
  447. getMerchantList() {
  448. let that = this
  449. MerchantBelongListApi().then(res => {
  450. if (this.selectMerId) {
  451. let flag = res.data.find(item => item.merId === this.selectMerId);
  452. !flag && that.$store.commit('CLEAR_SELECTMERID');
  453. }
  454. this.$store.commit("SetMerchantEmployeeList", res.data);
  455. })
  456. },
  457. //校验token是否有效,true为有效,false为无效
  458. getTokenIsExist() {
  459. tokenIsExistApi().then(res => {
  460. let tokenIsExist = res.data;
  461. if (!tokenIsExist) {
  462. this.$store.commit('UPDATE_LOGIN', '');
  463. this.$store.commit('UPDATE_USERINFO', {});
  464. }
  465. })
  466. },
  467. copyrightImage() {
  468. copyrightImageApi().then(res => {
  469. if (res.data) {
  470. this.copyImage = res.data;
  471. } else {
  472. this.copyImage = `${this.urlDomain}crmebimage/presets/support.png`;
  473. }
  474. }).catch(err => {
  475. return this.$util.Tips({
  476. title: err
  477. })
  478. });
  479. },
  480. bindEdit(name) {
  481. if (this.globalData.isIframe) {
  482. window.parent.postMessage({
  483. name: name
  484. },
  485. '*'
  486. );
  487. return;
  488. }
  489. },
  490. menusTap(url) {
  491. if (!this.isLogin) {
  492. this.openAuto();
  493. } else {
  494. if (url === '/pages/activity/vip_paid/index' && this.userInfo.paidMemberPaidEntrance === 0) return
  495. this.$util.navigateTo(url);
  496. }
  497. },
  498. //轮播图跳转
  499. navito(url) {
  500. this.$util.navigateTo(url);
  501. },
  502. kefuClick() {
  503. chatConfig(this.$Cache.getItem('platChatConfig'));
  504. },
  505. getOrderData() {
  506. let that = this;
  507. orderNum().then(res => {
  508. that.orderMenu.forEach((item, index) => {
  509. switch (item.title) {
  510. case '待付款':
  511. item.num = res.data.awaitPayCount
  512. break
  513. case '待取餐':
  514. item.num = res.data.awaitShippedCount
  515. break
  516. case '配送中':
  517. item.num = res.data.receiptCount
  518. break
  519. case '待核销':
  520. item.num = res.data.verificationCount
  521. break
  522. case '待评价':
  523. item.num = res.data.awaitReplyCount
  524. break
  525. default:
  526. item.num = res.data.refundCount
  527. }
  528. })
  529. that.$set(that, 'orderMenu', that.orderMenu);
  530. })
  531. },
  532. // 绑定手机
  533. bindPhone() {
  534. uni.navigateTo({
  535. animationType: animationType.type,
  536. animationDuration: animationType.duration,
  537. url: '/pages/users/app_login/index'
  538. })
  539. },
  540. /**
  541. *
  542. * 获取个人中心详情
  543. */
  544. getUserCenterInfo: function() {
  545. userCenterInfo().then(res => {
  546. let data = res.data;
  547. this.userInfo = data;
  548. this.orderMenu = data.orderMenu.map(item => ({
  549. ...item,
  550. title: item.name,
  551. num: 0
  552. }));
  553. this.getOrderData();
  554. this.$store.commit("SETUID", data.id);
  555. this.$store.commit("SetIsEmployee", data.isEmployee);
  556. this.$set(this, 'centerMenu', data.centerMenu);
  557. this.$store.commit('UPDATE_USERINFO', {
  558. avatar: data.avatar,
  559. nickname: data.nickname,
  560. phone: data.phone
  561. });
  562. if (data.centerBanner) {
  563. this.centerBanner = data.centerBanner
  564. }
  565. this.showSkeleton = false;
  566. }).catch(err => {
  567. this.showSkeleton = false;
  568. });
  569. },
  570. // 编辑页面
  571. goEdit() {
  572. if (this.isLogin == false) {
  573. this.openAuto();
  574. } else {
  575. uni.navigateTo({
  576. animationType: animationType.type,
  577. animationDuration: animationType.duration,
  578. url: '/pages/users/user_info/index'
  579. })
  580. }
  581. },
  582. goMenuPage(url) {
  583. if (this.isLogin) {
  584. uni.navigateTo({
  585. animationType: animationType.type,
  586. animationDuration: animationType.duration,
  587. url
  588. })
  589. } else {
  590. // #ifdef MP
  591. this.openAuto()
  592. // #endif
  593. }
  594. },
  595. // 打开授权
  596. openAuto() {
  597. Cache.set(BACK_URL, '')
  598. toLogin();
  599. },
  600. // 去设置页面
  601. handleUserSetting() {
  602. if (!this.isLogin) {
  603. return this.openAuto();
  604. }
  605. uni.navigateTo({
  606. url: '/pages/users/user_setting/index'
  607. })
  608. },
  609. shareApi: function() {
  610. getShare().then(res => {
  611. this.$set(this, 'configApi', res.data);
  612. // #ifdef H5
  613. this.setOpenShare(res.data);
  614. // #endif
  615. })
  616. },
  617. // 微信分享;
  618. setOpenShare: function() {
  619. let that = this;
  620. if (that.$wechat.isWeixin()) {
  621. let configAppMessage = {
  622. desc: 'crmeb',
  623. title: 'crmeb',
  624. link: location.href,
  625. imgUrl: ''
  626. };
  627. that.$wechat.wechatEvevt([
  628. "updateAppMessageShareData",
  629. "updateTimelineShareData",
  630. "onMenuShareAppMessage",
  631. "onMenuShareTimeline",
  632. ],
  633. configAppMessage);
  634. }
  635. }
  636. }
  637. }
  638. </script>
  639. <style lang="scss" scoped>
  640. .vipicon {
  641. background-size: 100% 100%;
  642. }
  643. .mt34rpx {
  644. margin-top: -34rpx;
  645. }
  646. .svip-box {
  647. width: 702rpx;
  648. background-repeat: no-repeat;
  649. background-size: 702rpx 128rpx;
  650. .text {
  651. color: #FFD89C;
  652. }
  653. }
  654. .num-txt {
  655. padding: 6rpx 20rpx;
  656. border-radius: 36rpx;
  657. background: rgba(255, 255, 255, 0.2);
  658. }
  659. page,
  660. body {
  661. height: 100%;
  662. margin: 0;
  663. }
  664. .ma .mp-header {
  665. @include main_bg_color(theme);
  666. }
  667. .bg {
  668. width: 100%;
  669. background-repeat: no-repeat;
  670. background-size: 100% 100%;
  671. }
  672. .support {
  673. width: 219rpx;
  674. height: 74rpx;
  675. margin: 20rpx auto;
  676. display: block;
  677. }
  678. .new-users {
  679. display: flex;
  680. flex-direction: column;
  681. height: 100%;
  682. .sys-head {
  683. position: relative;
  684. width: 100%;
  685. background: linear-gradient(90deg, $bg-star1 0%, $bg-end1 100%);
  686. .sys-title {
  687. z-index: 10;
  688. position: relative;
  689. height: 43px;
  690. text-align: center;
  691. line-height: 43px;
  692. font-size: 36rpx;
  693. color: #FFFFFF;
  694. }
  695. }
  696. .head {
  697. width: 100%;
  698. background-repeat: no-repeat;
  699. background-size: 100% 100%;
  700. @include index-gradient(theme);
  701. .user-card {
  702. width: 100%;
  703. margin: 0 auto;
  704. padding: 35rpx 0 40rpx 0;
  705. .user-info {
  706. z-index: 20;
  707. display: flex;
  708. align-items: center;
  709. color: #fff;
  710. .avatar {
  711. width: 120rpx;
  712. height: 120rpx;
  713. border-radius: 50%;
  714. }
  715. .app_set {
  716. color: #fff;
  717. width: 140rpx;
  718. height: 110rpx;
  719. text-align: right;
  720. line-height: 110rpx;
  721. .icon-shezhi {
  722. font-size: 36rpx;
  723. }
  724. }
  725. .info {
  726. flex: 1;
  727. display: flex;
  728. flex-direction: column;
  729. justify-content: space-between;
  730. margin-left: 20rpx;
  731. padding: 15rpx 0;
  732. .name {
  733. display: flex;
  734. align-items: center;
  735. color: #fff;
  736. font-size: 31rpx;
  737. .vip {
  738. display: flex;
  739. align-items: center;
  740. border-radius: 18px;
  741. font-size: 20rpx;
  742. margin-left: 14rpx;
  743. image {
  744. width: 27rpx;
  745. height: 27rpx;
  746. background-repeat: no-repeat;
  747. background-size: 100% 100%;
  748. }
  749. }
  750. }
  751. .num {
  752. display: flex;
  753. align-items: center;
  754. font-size: 26rpx;
  755. color: rgba(255, 255, 255, 0.6);
  756. image {
  757. width: 22rpx;
  758. height: 23rpx;
  759. margin-left: 20rpx;
  760. }
  761. }
  762. }
  763. }
  764. .num-wrapper {
  765. z-index: 30;
  766. position: relative;
  767. display: flex;
  768. align-items: center;
  769. justify-content: space-between;
  770. margin-top: 30rpx;
  771. color: #fff;
  772. .num-item {
  773. width: 33.33%;
  774. text-align: center;
  775. .num {
  776. font-size: 42rpx;
  777. font-weight: bold;
  778. }
  779. .txt {
  780. margin-top: 10rpx;
  781. font-size: 26rpx;
  782. color: rgba(255, 255, 255, 0.6);
  783. }
  784. }
  785. }
  786. .sign {
  787. z-index: 200;
  788. position: absolute;
  789. right: -12rpx;
  790. top: 80rpx;
  791. display: flex;
  792. align-items: center;
  793. justify-content: center;
  794. width: 120rpx;
  795. height: 60rpx;
  796. background: linear-gradient(90deg, rgba(255, 225, 87, 1) 0%, rgba(238, 193, 15, 1) 100%);
  797. border-radius: 29rpx 4rpx 4rpx 29rpx;
  798. color: #282828;
  799. font-size: 28rpx;
  800. font-weight: bold;
  801. }
  802. }
  803. .order-wrapper {
  804. background-color: #fff;
  805. border-radius: 14rpx;
  806. padding: 30rpx 16rpx;
  807. position: relative;
  808. z-index: 11;
  809. .order-hd {
  810. justify-content: space-between;
  811. font-size: 30rpx;
  812. color: #282828;
  813. margin-bottom: 40rpx;
  814. padding: 0 16rpx;
  815. .left {
  816. color: #282828;
  817. font-size: 30rpx;
  818. font-weight: 600;
  819. }
  820. .right {
  821. align-items: center;
  822. color: #666666;
  823. font-size: 26rpx;
  824. .icon-xiangyou {
  825. margin-left: 5rpx;
  826. font-size: 24rpx;
  827. }
  828. }
  829. }
  830. .order-bd {
  831. display: flex;
  832. justify-content: space-between;
  833. padding: 0;
  834. .order-item {
  835. display: flex;
  836. flex-direction: column;
  837. justify-content: center;
  838. align-items: center;
  839. .pic {
  840. position: relative;
  841. text-align: center;
  842. image {
  843. width: 48rpx;
  844. height: 48rpx;
  845. }
  846. }
  847. .txt {
  848. margin-top: 15rpx;
  849. font-size: 26rpx;
  850. color: #454545;
  851. }
  852. }
  853. }
  854. }
  855. }
  856. .slider-wrapper {
  857. margin: 20rpx 0;
  858. height: 138rpx;
  859. swiper,
  860. swiper-item {
  861. height: 100%;
  862. }
  863. image {
  864. width: 100%;
  865. height: 100%;
  866. }
  867. }
  868. .user-menus {
  869. background-color: #fff;
  870. border-radius: 14rpx;
  871. .menu-title {
  872. padding: 30rpx 30rpx 40rpx;
  873. font-size: 30rpx;
  874. color: #282828;
  875. font-weight: 600;
  876. }
  877. .list-box {
  878. display: flex;
  879. flex-wrap: wrap;
  880. padding: 0;
  881. }
  882. .item {
  883. position: relative;
  884. display: flex;
  885. align-items: center;
  886. justify-content: space-between;
  887. flex-direction: column;
  888. width: 25%;
  889. margin-bottom: 47rpx;
  890. font-size: 26rpx;
  891. color: #333333;
  892. image {
  893. width: 52rpx;
  894. height: 52rpx;
  895. margin-bottom: 18rpx;
  896. }
  897. &:last-child::before {
  898. display: none;
  899. }
  900. }
  901. button {
  902. font-size: 28rpx;
  903. }
  904. }
  905. .phone {
  906. color: #fff;
  907. }
  908. .pic_status {
  909. font-size: 43rpx;
  910. @include main_color(theme);
  911. }
  912. .order-status-num {
  913. min-width: 13rpx;
  914. background-color: #fff;
  915. @include main_color(theme);
  916. border-radius: 15px;
  917. position: absolute;
  918. right: -14rpx;
  919. top: -15rpx;
  920. font-size: 20rpx;
  921. padding: 0 8rpx;
  922. @include coupons_border_color(theme);
  923. }
  924. }
  925. .sub_btn {
  926. width: 690rpx;
  927. height: 86rpx;
  928. line-height: 86rpx;
  929. margin-top: 60rpx;
  930. background: $theme-color;
  931. border-radius: 43rpx;
  932. color: #fff;
  933. font-size: 28rpx;
  934. text-align: center;
  935. }
  936. .popup-content {
  937. border-radius: 16rpx 16rpx 0px 0px;
  938. .bottom_border {
  939. border-bottom: 1px solid #F5F5F5;
  940. }
  941. .item {
  942. display: flex;
  943. align-items: center;
  944. justify-content: space-between;
  945. padding: 20rpx;
  946. .icon_color {
  947. color: #2A7EFB;
  948. }
  949. .item_main {
  950. display: flex;
  951. align-items: center;
  952. .item_name {
  953. margin-left: 20rpx;
  954. font-weight: 500;
  955. font-size: 28rpx;
  956. }
  957. }
  958. .item_img {
  959. width: 60rpx;
  960. height: 60rpx;
  961. border-radius: 60rpx;
  962. }
  963. }
  964. }
  965. </style>