index.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026
  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. <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. img: 'icon-daifukuan',
  264. title: '待付款',
  265. url: '/pages/goods/order_list/index?status=0',
  266. num: 0
  267. },
  268. {
  269. img: 'icon-daifahuo',
  270. title: '待取餐',
  271. url: '/pages/goods/order_list/index?status=1',
  272. num: 0
  273. },
  274. {
  275. img: 'icon-daihexiao',
  276. title: '待核销',
  277. url: '/pages/goods/order_list/index?status=3',
  278. num: 0
  279. },
  280. {
  281. img: 'icon-daishouhuo',
  282. title: '配送中',
  283. url: '/pages/goods/order_list/index?status=4',
  284. num: 0
  285. },
  286. {
  287. img: 'icon-daipingjia',
  288. title: '待评价',
  289. url: '/pages/goods/evaluation_list/index',
  290. num: 0
  291. },
  292. {
  293. img: 'icon-a-shouhoutuikuan',
  294. title: '售后/退款',
  295. url: '/pages/goods/user_return_list/index',
  296. num: 0
  297. },
  298. ],
  299. centerBanner: [],
  300. userMenu: [],
  301. autoplay: true,
  302. circular: true,
  303. interval: 3000,
  304. duration: 500,
  305. isAuto: false, //没有授权的不会自动授权
  306. isShowAuth: false, //是否隐藏授权
  307. orderStatusNum: {},
  308. centerMenu: [],
  309. wechatUrl: [],
  310. servicePic: '',
  311. sysHeight: sysHeight,
  312. // #ifdef MP
  313. pageHeight: '100%',
  314. // #endif
  315. // #ifdef H5 || APP-PLUS
  316. pageHeight: '',
  317. // #endif
  318. // #ifdef H5
  319. isWeixin: Auth.isWeixin(),
  320. //#endif
  321. configApi: {}, //分享类容配置
  322. theme: app.globalData.theme,
  323. bgColor: '#e93323',
  324. userInfo: {},
  325. copyImage: '',
  326. navH:''
  327. }
  328. },
  329. components: {
  330. tuiSkeleton,
  331. pageFooter,
  332. navBar
  333. },
  334. onLoad() {
  335. this.servicePic = this.urlDomain + 'crmebimage/presets/customer.png'
  336. this.getTokenIsExist();
  337. // #ifdef MP
  338. this.navH = this.globalData.navHeight;
  339. // #endif
  340. // #ifndef MP
  341. this.navH = 96;
  342. // #endif
  343. if (this.globalData.isIframe) {
  344. setTimeout(() => {
  345. let active;
  346. document.getElementById('pageIndex').children.forEach(dom => {
  347. dom.addEventListener('click', (e) => {
  348. e.stopPropagation();
  349. e.preventDefault();
  350. if (dom === active) return;
  351. dom.classList.add('borderShow');
  352. active && active.classList.remove('borderShow');
  353. active = dom;
  354. })
  355. })
  356. });
  357. }
  358. // #ifdef APP-PLUS
  359. setTimeout(()=>{
  360. uni.setNavigationBarColor({
  361. frontColor: '#ffffff',
  362. backgroundColor:that.bgColor,
  363. });
  364. },500)
  365. // #endif
  366. let that = this;
  367. // #ifdef H5 || APP-PLUS
  368. that.$set(that, 'pageHeight', this.globalData.windowHeight);
  369. // #endif
  370. that.$set(that, 'centerMenu', this.globalData.centerMenu);
  371. that.bgColor = setThemeColor();
  372. },
  373. onShow: function() {
  374. if (this.isLogin) {
  375. this.getUserCenterInfo();
  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.orderMenu = data.orderMenu.map(item => ({
  548. ...item,
  549. title: item.name,
  550. num: 0
  551. }));
  552. this.getOrderData();
  553. this.$store.commit("SETUID", data.id);
  554. this.$store.commit("SetIsEmployee", data.isEmployee);
  555. this.$set(this, 'centerMenu', data.centerMenu);
  556. this.$store.commit('UPDATE_USERINFO', {
  557. avatar: data.avatar,
  558. nickname: data.nickname,
  559. phone: data.phone
  560. });
  561. if (data.centerBanner) {
  562. this.centerBanner = data.centerBanner
  563. }
  564. this.showSkeleton = false;
  565. }).catch(err => {
  566. this.showSkeleton = false;
  567. });
  568. },
  569. // 编辑页面
  570. goEdit() {
  571. if (this.isLogin == false) {
  572. this.openAuto();
  573. } else {
  574. uni.navigateTo({
  575. animationType: animationType.type,
  576. animationDuration: animationType.duration,
  577. url: '/pages/users/user_info/index'
  578. })
  579. }
  580. },
  581. goMenuPage(url) {
  582. if (this.isLogin) {
  583. uni.navigateTo({
  584. animationType: animationType.type,
  585. animationDuration: animationType.duration,
  586. url
  587. })
  588. } else {
  589. // #ifdef MP
  590. this.openAuto()
  591. // #endif
  592. }
  593. },
  594. // 打开授权
  595. openAuto() {
  596. Cache.set(BACK_URL, '')
  597. toLogin();
  598. },
  599. // 去设置页面
  600. handleUserSetting() {
  601. if (!this.isLogin) {
  602. return this.openAuto();
  603. }
  604. uni.navigateTo({
  605. url: '/pages/users/user_setting/index'
  606. })
  607. },
  608. shareApi: function() {
  609. getShare().then(res => {
  610. this.$set(this, 'configApi', res.data);
  611. // #ifdef H5
  612. this.setOpenShare(res.data);
  613. // #endif
  614. })
  615. },
  616. // 微信分享;
  617. setOpenShare: function() {
  618. let that = this;
  619. if (that.$wechat.isWeixin()) {
  620. let configAppMessage = {
  621. desc: 'crmeb',
  622. title: 'crmeb',
  623. link: location.href,
  624. imgUrl: ''
  625. };
  626. that.$wechat.wechatEvevt([
  627. "updateAppMessageShareData",
  628. "updateTimelineShareData",
  629. "onMenuShareAppMessage",
  630. "onMenuShareTimeline",
  631. ],
  632. configAppMessage);
  633. }
  634. }
  635. }
  636. }
  637. </script>
  638. <style lang="scss" scoped>
  639. .vipicon {
  640. background-size: 100% 100%;
  641. }
  642. .mt34rpx {
  643. margin-top: -34rpx;
  644. }
  645. .svip-box {
  646. width: 702rpx;
  647. background-repeat: no-repeat;
  648. background-size: 702rpx 128rpx;
  649. .text {
  650. color: #FFD89C;
  651. }
  652. }
  653. .num-txt {
  654. padding: 6rpx 20rpx;
  655. border-radius: 36rpx;
  656. background: rgba(255, 255, 255, 0.2);
  657. }
  658. page,
  659. body {
  660. height: 100%;
  661. margin: 0;
  662. }
  663. .ma .mp-header {
  664. @include main_bg_color(theme);
  665. }
  666. .bg {
  667. width: 100%;
  668. background-repeat: no-repeat;
  669. background-size: 100% 100%;
  670. }
  671. .support {
  672. width: 219rpx;
  673. height: 74rpx;
  674. margin: 20rpx auto;
  675. display: block;
  676. }
  677. .new-users {
  678. display: flex;
  679. flex-direction: column;
  680. height: 100%;
  681. .sys-head {
  682. position: relative;
  683. width: 100%;
  684. background: linear-gradient(90deg, $bg-star1 0%, $bg-end1 100%);
  685. .sys-title {
  686. z-index: 10;
  687. position: relative;
  688. height: 43px;
  689. text-align: center;
  690. line-height: 43px;
  691. font-size: 36rpx;
  692. color: #FFFFFF;
  693. }
  694. }
  695. .head {
  696. width: 100%;
  697. background-repeat: no-repeat;
  698. background-size: 100% 100%;
  699. @include index-gradient(theme);
  700. .user-card {
  701. width: 100%;
  702. margin: 0 auto;
  703. padding: 35rpx 0 40rpx 0;
  704. .user-info {
  705. z-index: 20;
  706. display: flex;
  707. align-items: center;
  708. color: #fff;
  709. .avatar {
  710. width: 120rpx;
  711. height: 120rpx;
  712. border-radius: 50%;
  713. }
  714. .app_set {
  715. color: #fff;
  716. width: 140rpx;
  717. height: 110rpx;
  718. text-align: right;
  719. line-height: 110rpx;
  720. .icon-shezhi {
  721. font-size: 36rpx;
  722. }
  723. }
  724. .info {
  725. flex: 1;
  726. display: flex;
  727. flex-direction: column;
  728. justify-content: space-between;
  729. margin-left: 20rpx;
  730. padding: 15rpx 0;
  731. .name {
  732. display: flex;
  733. align-items: center;
  734. color: #fff;
  735. font-size: 31rpx;
  736. .vip {
  737. display: flex;
  738. align-items: center;
  739. border-radius: 18px;
  740. font-size: 20rpx;
  741. margin-left: 14rpx;
  742. image {
  743. width: 27rpx;
  744. height: 27rpx;
  745. background-repeat: no-repeat;
  746. background-size: 100% 100%;
  747. }
  748. }
  749. }
  750. .num {
  751. display: flex;
  752. align-items: center;
  753. font-size: 26rpx;
  754. color: rgba(255, 255, 255, 0.6);
  755. image {
  756. width: 22rpx;
  757. height: 23rpx;
  758. margin-left: 20rpx;
  759. }
  760. }
  761. }
  762. }
  763. .num-wrapper {
  764. z-index: 30;
  765. position: relative;
  766. display: flex;
  767. align-items: center;
  768. justify-content: space-between;
  769. margin-top: 30rpx;
  770. color: #fff;
  771. .num-item {
  772. width: 33.33%;
  773. text-align: center;
  774. .num {
  775. font-size: 42rpx;
  776. font-weight: bold;
  777. }
  778. .txt {
  779. margin-top: 10rpx;
  780. font-size: 26rpx;
  781. color: rgba(255, 255, 255, 0.6);
  782. }
  783. }
  784. }
  785. .sign {
  786. z-index: 200;
  787. position: absolute;
  788. right: -12rpx;
  789. top: 80rpx;
  790. display: flex;
  791. align-items: center;
  792. justify-content: center;
  793. width: 120rpx;
  794. height: 60rpx;
  795. background: linear-gradient(90deg, rgba(255, 225, 87, 1) 0%, rgba(238, 193, 15, 1) 100%);
  796. border-radius: 29rpx 4rpx 4rpx 29rpx;
  797. color: #282828;
  798. font-size: 28rpx;
  799. font-weight: bold;
  800. }
  801. }
  802. .order-wrapper {
  803. background-color: #fff;
  804. border-radius: 14rpx;
  805. padding: 30rpx 16rpx;
  806. position: relative;
  807. z-index: 11;
  808. .order-hd {
  809. justify-content: space-between;
  810. font-size: 30rpx;
  811. color: #282828;
  812. margin-bottom: 40rpx;
  813. padding: 0 16rpx;
  814. .left {
  815. color: #282828;
  816. font-size: 30rpx;
  817. font-weight: 600;
  818. }
  819. .right {
  820. align-items: center;
  821. color: #666666;
  822. font-size: 26rpx;
  823. .icon-xiangyou {
  824. margin-left: 5rpx;
  825. font-size: 24rpx;
  826. }
  827. }
  828. }
  829. .order-bd {
  830. display: flex;
  831. justify-content: space-between;
  832. padding: 0;
  833. .order-item {
  834. display: flex;
  835. flex-direction: column;
  836. justify-content: center;
  837. align-items: center;
  838. .pic {
  839. position: relative;
  840. text-align: center;
  841. image {
  842. width: 48rpx;
  843. height: 48rpx;
  844. }
  845. }
  846. .txt {
  847. margin-top: 15rpx;
  848. font-size: 26rpx;
  849. color: #454545;
  850. }
  851. }
  852. }
  853. }
  854. }
  855. .slider-wrapper {
  856. margin: 20rpx 0;
  857. height: 138rpx;
  858. swiper,
  859. swiper-item {
  860. height: 100%;
  861. }
  862. image {
  863. width: 100%;
  864. height: 100%;
  865. }
  866. }
  867. .user-menus {
  868. background-color: #fff;
  869. border-radius: 14rpx;
  870. .menu-title {
  871. padding: 30rpx 30rpx 40rpx;
  872. font-size: 30rpx;
  873. color: #282828;
  874. font-weight: 600;
  875. }
  876. .list-box {
  877. display: flex;
  878. flex-wrap: wrap;
  879. padding: 0;
  880. }
  881. .item {
  882. position: relative;
  883. display: flex;
  884. align-items: center;
  885. justify-content: space-between;
  886. flex-direction: column;
  887. width: 25%;
  888. margin-bottom: 47rpx;
  889. font-size: 26rpx;
  890. color: #333333;
  891. image {
  892. width: 52rpx;
  893. height: 52rpx;
  894. margin-bottom: 18rpx;
  895. }
  896. &:last-child::before {
  897. display: none;
  898. }
  899. }
  900. button {
  901. font-size: 28rpx;
  902. }
  903. }
  904. .phone {
  905. color: #fff;
  906. }
  907. .pic_status {
  908. font-size: 43rpx;
  909. @include main_color(theme);
  910. }
  911. .order-status-num {
  912. min-width: 13rpx;
  913. background-color: #fff;
  914. @include main_color(theme);
  915. border-radius: 15px;
  916. position: absolute;
  917. right: -14rpx;
  918. top: -15rpx;
  919. font-size: 20rpx;
  920. padding: 0 8rpx;
  921. @include coupons_border_color(theme);
  922. }
  923. }
  924. .sub_btn {
  925. width: 690rpx;
  926. height: 86rpx;
  927. line-height: 86rpx;
  928. margin-top: 60rpx;
  929. background: $theme-color;
  930. border-radius: 43rpx;
  931. color: #fff;
  932. font-size: 28rpx;
  933. text-align: center;
  934. }
  935. .popup-content {
  936. border-radius: 16rpx 16rpx 0px 0px;
  937. .bottom_border {
  938. border-bottom: 1px solid #F5F5F5;
  939. }
  940. .item {
  941. display: flex;
  942. align-items: center;
  943. justify-content: space-between;
  944. padding: 20rpx;
  945. .icon_color {
  946. color: #2A7EFB;
  947. }
  948. .item_main {
  949. display: flex;
  950. align-items: center;
  951. .item_name {
  952. margin-left: 20rpx;
  953. font-weight: 500;
  954. font-size: 28rpx;
  955. }
  956. }
  957. .item_img {
  958. width: 60rpx;
  959. height: 60rpx;
  960. border-radius: 60rpx;
  961. }
  962. }
  963. }
  964. </style>