index.vue 25 KB

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