index.vue 25 KB

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