2021-10-22 03:07:32 +00:00
|
|
|
|
<template>
|
|
|
|
|
<view>
|
|
|
|
|
<!-- 状态栏 -->
|
|
|
|
|
<status-nav :backgroudColor="publicColor" :tabcolor="publicColor" :statusTitle="true" :statusBack="false"></status-nav>
|
2021-11-02 10:23:53 +00:00
|
|
|
|
<image src="/static/public/staff-head.png" class="blue-img"></image>
|
2021-10-22 03:07:32 +00:00
|
|
|
|
<view class="mar-zy32 posir pad-x260" :style="{paddingTop:statusHNH+'px'}">
|
|
|
|
|
<view class="radius20 posir gao">
|
2021-11-02 10:23:53 +00:00
|
|
|
|
<view class="posia" :style="{top:`-${gaoh*0.4}px`,height:gaoh+'px'}"></view>
|
2021-10-22 03:07:32 +00:00
|
|
|
|
<view class="disjbac">
|
|
|
|
|
<view class="disac colf">
|
|
|
|
|
<!-- 头像 -->
|
2021-11-02 10:23:53 +00:00
|
|
|
|
<image class="mar-sx30" :src="userInfo.headimgurl || ''" mode="aspectFill"></image>
|
2021-10-22 03:07:32 +00:00
|
|
|
|
<view class="mar-z30">
|
|
|
|
|
<!-- 昵称 -->
|
|
|
|
|
<view class="disac">
|
|
|
|
|
<view class="fon36 bold">{{userInfo.nickname || ''}}</view>
|
2021-11-02 10:23:53 +00:00
|
|
|
|
<view class="gao-name">黄金</view>
|
2021-10-22 03:07:32 +00:00
|
|
|
|
</view>
|
2021-11-11 02:50:50 +00:00
|
|
|
|
<view class="disac mar-s10" v-if="userPhone!==''">
|
2021-11-02 10:23:53 +00:00
|
|
|
|
<image src="/static/public/phone-02.png" class="gao-phone" mode=""></image>
|
2021-10-22 03:07:32 +00:00
|
|
|
|
<!-- 手机号 -->
|
2021-11-11 02:50:50 +00:00
|
|
|
|
<view class="fon24 mar-z10">{{userPhone}}</view>
|
2021-10-22 03:07:32 +00:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="mar-y25 disac">
|
|
|
|
|
<!-- 二维码 -->
|
2021-11-02 10:23:53 +00:00
|
|
|
|
<image @tap="isQrcode=true" src="/static/public/staff-qro.png" class="gao-m" mode=""></image>
|
2021-10-22 03:07:32 +00:00
|
|
|
|
<!-- 前进键 -->
|
2021-11-02 10:23:53 +00:00
|
|
|
|
<view @tap="goNodifyData" class="disac gao-next-box">
|
|
|
|
|
<image class="" src="/static/public/next-white.png" mode="aspectFill"></image>
|
2021-10-22 03:07:32 +00:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="disjbac posir mar-s40 fon24 pad-zy50" style="z-index: 1;color: #F8CE59;">
|
|
|
|
|
<view>
|
2021-11-02 10:23:53 +00:00
|
|
|
|
<view class="disac"><span class="bold mar-y20">VIP</span>黄金会员</view>
|
2021-10-22 03:07:32 +00:00
|
|
|
|
</view>
|
|
|
|
|
<navigator url="/pagesA/member/member" hover-class="none">
|
|
|
|
|
<view class="disac">
|
|
|
|
|
<view>更多权益</view>
|
2021-11-02 10:23:53 +00:00
|
|
|
|
<image src="/static/public/next-yellow.png" class="white-next" mode=""></image>
|
2021-10-22 03:07:32 +00:00
|
|
|
|
</view>
|
|
|
|
|
</navigator>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="disja posir" style="z-index: 1;margin-top: 75rpx;">
|
2021-11-02 10:23:53 +00:00
|
|
|
|
<view @tap="chooseone(indext)" class="disac fc flexs width33" v-for="(itemt,indext) in tongList" :key="indext">
|
2021-10-22 03:07:32 +00:00
|
|
|
|
<view class="fon28 bold mar-sx20 clips1">{{itemt.num}}<text v-if="indext==2">天</text></view>
|
|
|
|
|
<view class="fon28 mar-x25">{{itemt.title}}</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- 员工功能 v-if="userInfo.is_staff && yuanList.length!=0" -->
|
|
|
|
|
<view v-if="userInfo.is_staff==1" class="bacf radius20 mar-s20 pad20">
|
2021-11-02 10:23:53 +00:00
|
|
|
|
<view class="mar-x30 fon28 bold col3">员工功能</view>
|
|
|
|
|
<view class="disja yuan-box">
|
|
|
|
|
<view @tap="chooseYitem(indexy)" v-for="(itemy,indexy) in yuanList" :key="indexy">
|
|
|
|
|
<view class="disac fc">
|
|
|
|
|
<image :src="itemy.src" mode="aspectFill"></image>
|
|
|
|
|
<view class="fon28 mar-s20 mar-x10">{{itemy.title}}</view>
|
2021-10-22 03:07:32 +00:00
|
|
|
|
</view>
|
2021-11-02 10:23:53 +00:00
|
|
|
|
<block v-if="indexy<yuanList.length-1">
|
|
|
|
|
<view class="xian-right"></view>
|
|
|
|
|
</block>
|
2021-10-22 03:07:32 +00:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- 我的订单 -->
|
|
|
|
|
<view class="bacf radius20 mar-s20 pad20">
|
|
|
|
|
<view class="mar-x30 fon28 col3 disjbac">
|
|
|
|
|
<view>我的订单</view>
|
|
|
|
|
<navigator url="/pagesA/myOrder/myOrder?index=0" hover-class="none">
|
|
|
|
|
<view class="disac">
|
|
|
|
|
<view class="fon24 col9">全部</view>
|
2021-11-02 10:23:53 +00:00
|
|
|
|
<image src="/static/public/nextM.png" class="white-next" mode=""></image>
|
2021-10-22 03:07:32 +00:00
|
|
|
|
</view>
|
|
|
|
|
</navigator>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="disja fon28 col3">
|
|
|
|
|
<view @tap="chooseOrderStatus(indexo)" v-for="(itemo,indexo) in myOrderList" :key="indexo">
|
|
|
|
|
<view class="disac fc posir">
|
2021-11-02 10:23:53 +00:00
|
|
|
|
<image :src="itemo.src" class="icon-img" mode="aspectFill"></image>
|
2021-10-22 03:07:32 +00:00
|
|
|
|
<view class="mar-s20 mar-x10">{{itemo.title}}</view>
|
2021-11-02 10:23:53 +00:00
|
|
|
|
<view class="posia red-num" style="right: 0;top: 0;" v-if="itemo.num!=0">{{itemo.num}}</view>
|
2021-10-22 03:07:32 +00:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- 广告 -->
|
|
|
|
|
<image @tap="goPage" class="width100 radius20 mar-sx20" :src="guangImg" style="height: 160rpx;" mode="aspectFill"></image>
|
|
|
|
|
<!-- 功能列表① -->
|
2021-11-02 10:23:53 +00:00
|
|
|
|
<view class="bacf radius20">
|
2021-10-22 03:07:32 +00:00
|
|
|
|
<view class="disjbac fon28 col3 fw">
|
2021-11-02 10:23:53 +00:00
|
|
|
|
<view @tap="goPageNew(indexm)" v-for="(itemm,indexm) in moneyList" :key="indexm" class="mar-s20 mar-x20 width25">
|
2021-10-22 03:07:32 +00:00
|
|
|
|
<view class="disac fc">
|
2021-11-02 10:23:53 +00:00
|
|
|
|
<image :src="itemm.src" class="icon-img" mode="aspectFill"></image>
|
2021-10-22 03:07:32 +00:00
|
|
|
|
<view class="mar-s20 mar-x10">{{itemm.title}}</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- 功能列表② -->
|
|
|
|
|
<view class="bacf radius20 mar-s20">
|
|
|
|
|
<view class="disac fon28 col3 fw">
|
2021-11-02 10:23:53 +00:00
|
|
|
|
<view @tap="goPageTwo(indexf)" v-for="(itemf,indexf) in toolsList" :key="indexf" class="mar-s20 mar-x20 width25">
|
2021-10-22 03:07:32 +00:00
|
|
|
|
<view class="disac fc posir">
|
2021-11-02 10:23:53 +00:00
|
|
|
|
<image :src="itemf.src" class="icon-img" mode="aspectFill"></image>
|
2021-10-22 03:07:32 +00:00
|
|
|
|
<view class="mar-s20 mar-x10">{{itemf.title}}</view>
|
2021-11-02 10:23:53 +00:00
|
|
|
|
<view v-if="indexf==4 && itemf.num!=0" class="posia red-num">{{itemf.num}}</view>
|
2021-10-22 03:07:32 +00:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- 我的二维码弹框 -->
|
|
|
|
|
<view v-if="isQrcode" class="posAll disjcac">
|
|
|
|
|
<view>
|
|
|
|
|
<view class="bacf radius20" style="margin: 0 130rpx;">
|
|
|
|
|
<view class="fon28 col3 tc pad-s40">我的二维码</view>
|
2021-11-02 10:23:53 +00:00
|
|
|
|
<image :src="myqr" class="person-m" mode="aspectFill"></image>
|
2021-10-22 03:07:32 +00:00
|
|
|
|
</view>
|
|
|
|
|
<view class="disjcac">
|
2021-11-02 10:23:53 +00:00
|
|
|
|
<image @tap="isQrcode=false" class="mar-s50 close-m" src="/static/public/qrcodec.png" mode="aspectFill"></image>
|
2021-10-22 03:07:32 +00:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- 底部tab -->
|
|
|
|
|
<foot-tab :titleList="titleList" :imgList="imgList" :newcurrent='4'></foot-tab>
|
|
|
|
|
<!-- 弹框授权 -->
|
|
|
|
|
<empower :vision="vision" @cancleEv="cancleEv"></empower>
|
2021-11-02 10:23:53 +00:00
|
|
|
|
<view v-if="isQian" class="sigin-box">
|
2021-11-11 02:50:50 +00:00
|
|
|
|
<view>{{contentVal}}</view>
|
2021-10-22 03:07:32 +00:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import {base64ToPath} from '@/jsFile/base64-src.js';
|
|
|
|
|
import empower from '@/components/empower.vue';
|
|
|
|
|
import {checkBanner} from '@/jsFile/publicAPI.js';
|
|
|
|
|
export default {
|
|
|
|
|
components:{empower},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
vision:false,
|
|
|
|
|
statusHNH:uni.getStorageSync('statusHNH'),
|
|
|
|
|
publicColor:uni.getStorageSync('publicColor'),
|
|
|
|
|
tongList:[
|
|
|
|
|
{num:'0',title:'我的积分'},
|
|
|
|
|
{num:'0',title:'孔雀币'},
|
|
|
|
|
{num:'0',title:'连续签到'}
|
|
|
|
|
],
|
|
|
|
|
yuanList:[], //'customer-list','footmarks','scan'
|
|
|
|
|
zanCyuanList:[
|
|
|
|
|
{src:'/static/public/keh.png',title:'客户列表',rule:'customer-list'},
|
|
|
|
|
{src:'/static/public/zu.png',title:'用户足迹',rule:'footmarks'},
|
|
|
|
|
{src:'/static/public/scan.png',title:'扫码签到',rule:'scan'},
|
2021-11-02 10:23:53 +00:00
|
|
|
|
{src:'/static/public/customer-check.png',title:'客服查询',rule:'customer-list'},
|
|
|
|
|
{src:'/static/public/scan.png',title:'核销扫码',rule:'check-scan'},
|
2021-10-22 03:07:32 +00:00
|
|
|
|
],
|
|
|
|
|
myOrderList:[//我的订单状态
|
2021-11-02 10:23:53 +00:00
|
|
|
|
{src:'/static/public/dai-fu60.png',title:'待付款',num:0},
|
|
|
|
|
{src:'/static/public/dai-fa60.png',title:'待发货',num:0},
|
|
|
|
|
{src:'/static/public/dai-shou60.png',title:'待收货',num:0},
|
|
|
|
|
{src:'/static/public/wan-60.png',title:'已完成',num:0},
|
2021-10-22 03:07:32 +00:00
|
|
|
|
],
|
|
|
|
|
moneyList:[
|
|
|
|
|
{src:'/static/public/integral60.png',title:'积分商城'},
|
|
|
|
|
{src:'/static/public/address60.png',title:'地址管理'},
|
|
|
|
|
{src:'/static/public/day60.png',title:'日程提醒'},
|
|
|
|
|
{src:'/static/public/ren60.png',title:'活动任务'},
|
|
|
|
|
{src:'/static/public/quan60.png',title:'优惠券'},
|
|
|
|
|
{src:'/static/public/kong60.png',title:'孔雀币'},
|
|
|
|
|
{src:'/static/public/scor60.png',title:'积分管理'},
|
|
|
|
|
{src:'/static/public/signIn.png',title:'签到记录'},
|
|
|
|
|
],
|
|
|
|
|
toolsList:[
|
|
|
|
|
{src:'/static/public/staff-yue60.png',title:'自助预约',num:''},
|
|
|
|
|
{src:'/static/public/staff-hai60.png',title:'个人海报',num:''},
|
|
|
|
|
{src:'/static/public/staff-collection60.png',title:'收藏',num:''},
|
|
|
|
|
{src:'/static/public/staff-share.png',title:'分享中心',num:''},
|
|
|
|
|
{src:'/static/public/staff-msg60.png',title:'消息通知',num:''},
|
|
|
|
|
{src:'/static/public/staff-tou60.png',title:'投诉与建议',num:''},
|
|
|
|
|
{src:'/static/public/staff-about60.png',title:'关于我们',num:''},
|
|
|
|
|
],
|
|
|
|
|
isQrcode:false,//是否显示我的二维码
|
|
|
|
|
userInfo:{},//用户信息
|
|
|
|
|
gaoh:uni.getStorageSync('gao'),
|
|
|
|
|
myqr:'/static/public/qrcode.png',
|
|
|
|
|
is_worker:'',//是否为职工账号,0否(客户), 1是
|
|
|
|
|
is_doctor:'',//是否为医生,0否,1是
|
|
|
|
|
is_servicer:'',//是否为客服,0否,1是
|
|
|
|
|
is_staff:'',//是否为普通员工,0否,1是
|
|
|
|
|
titleList:[],
|
|
|
|
|
imgList:[],
|
|
|
|
|
isQian:false,
|
|
|
|
|
bannerList:[],
|
|
|
|
|
guangImg:'',
|
|
|
|
|
isAuth:'',
|
|
|
|
|
guanggao:'',
|
2021-11-11 02:50:50 +00:00
|
|
|
|
userToken:'',
|
|
|
|
|
contentVal:'',//扫码后的提示内容
|
|
|
|
|
userPhone:''
|
2021-10-22 03:07:32 +00:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onUnload: function() {
|
|
|
|
|
//相当于监听返回按钮
|
|
|
|
|
let pages = getCurrentPages();
|
|
|
|
|
// console.log('pages:',pages);
|
|
|
|
|
},
|
|
|
|
|
onShow() {
|
|
|
|
|
uni.removeStorageSync('uinfo')//清空用户缓存信息
|
2021-11-08 07:50:30 +00:00
|
|
|
|
this.$toolAll.tools.isLogin();
|
|
|
|
|
this.checkInfo();
|
2021-10-22 03:07:32 +00:00
|
|
|
|
uni.removeStorageSync('shareAll')//清空分享中心里的统计信息
|
|
|
|
|
this.$requst.post('index/mini-program-setting').then(res=>{
|
|
|
|
|
// log('数据:',res);
|
|
|
|
|
if(res.code==0){
|
|
|
|
|
if(res.data.length!=0){
|
|
|
|
|
if(res.data.footBar.length!=0){//底部导航
|
|
|
|
|
res.data.footBar.forEach(item=>{
|
|
|
|
|
let newName = item.name
|
|
|
|
|
let newObj = {
|
|
|
|
|
iconPath:this.$http + item.icon[0],
|
|
|
|
|
selectedIconPath:this.$http + item.icon[1],
|
|
|
|
|
}
|
|
|
|
|
if(item.key=="home"){
|
|
|
|
|
this.imgList[0] = newObj
|
|
|
|
|
this.titleList[0] = newName
|
|
|
|
|
}
|
|
|
|
|
if(item.key=="category"){
|
|
|
|
|
this.imgList[1] = newObj
|
|
|
|
|
this.titleList[1] = newName
|
|
|
|
|
}
|
|
|
|
|
if(item.key=="service"){
|
|
|
|
|
this.imgList[2] = newObj
|
|
|
|
|
this.titleList[2] = newName
|
|
|
|
|
}
|
|
|
|
|
if(item.key=="shop"){
|
|
|
|
|
this.imgList[3] = newObj
|
|
|
|
|
this.titleList[3] = newName
|
|
|
|
|
}
|
|
|
|
|
if(item.key=="my"){
|
|
|
|
|
this.imgList[4] = newObj
|
|
|
|
|
this.titleList[4] = newName
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
uni.setStorageSync('footTitle',this.titleList)
|
|
|
|
|
uni.setStorageSync('footimg',this.imgList)
|
|
|
|
|
this.titleList = uni.getStorageSync('footTitle')
|
|
|
|
|
this.imgList = uni.getStorageSync('footimg')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},error=>{})
|
|
|
|
|
},
|
|
|
|
|
onLoad() {
|
|
|
|
|
if(uni.getStorageSync('gao')==''){
|
|
|
|
|
const query = wx.createSelectorQuery()
|
|
|
|
|
query.select('.gao').boundingClientRect((rect) => {
|
|
|
|
|
uni.setStorageSync('gao',rect.height)
|
|
|
|
|
this.gaoh = rect.height
|
|
|
|
|
}).exec()
|
|
|
|
|
}
|
|
|
|
|
this.checkSwi()
|
|
|
|
|
this.checkGM()
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
2021-11-02 10:23:53 +00:00
|
|
|
|
chooseone(index){
|
|
|
|
|
if(index==2){uni.navigateTo({url:'/pagesA/signIn/signIn'})}
|
|
|
|
|
},
|
2021-10-22 03:07:32 +00:00
|
|
|
|
goPageNew(index){
|
|
|
|
|
if(index==0){uni.navigateTo({url:'/pagesA/pointsMall/pointsMall'})}
|
|
|
|
|
if(index==1){uni.navigateTo({url:'/pagesA/myAddress/myAddress'})}
|
|
|
|
|
if(index==2){uni.navigateTo({url:'/pagesB/messagecenter/messagecenter?index=true'})}
|
|
|
|
|
if(index==3){uni.navigateTo({url:'/pagesA/activityTask/activityTask'})}
|
|
|
|
|
if(index==4){uni.navigateTo({url:'/pagesA/coupon/coupon'})}
|
|
|
|
|
if(index==5){uni.navigateTo({url:'/pagesA/peacockCoin/peacockCoin'})}
|
|
|
|
|
if(index==6){uni.navigateTo({url:'/pagesA/integralManage/integralManage'})}
|
|
|
|
|
if(index==7){uni.navigateTo({url:'/pagesA/signIn/signIn'})}
|
|
|
|
|
},
|
|
|
|
|
goPageTwo(index){
|
|
|
|
|
if(index==0){uni.navigateTo({url:'/pagesA/makeAnPppointment/makeAnPppointment'})}
|
|
|
|
|
if(index==1){uni.navigateTo({url:'/pagesB/personalPoster/personalPoster'})}
|
|
|
|
|
if(index==2){uni.navigateTo({url:'/pagesB/myCollection/myCollection'})}
|
|
|
|
|
if(index==3){uni.navigateTo({url:'/pagesB/sharingCenter/sharingCenter'})}
|
|
|
|
|
if(index==4){uni.navigateTo({url:'/pagesB/messagecenter/messagecenter'})}
|
|
|
|
|
if(index==5){uni.navigateTo({url:'/pagesA/suggestions/suggestions'})}
|
|
|
|
|
if(index==6){uni.navigateTo({url:'/pagesB/aboutUs/aboutUs'})}
|
|
|
|
|
},
|
|
|
|
|
chooseOrderStatus(index){
|
|
|
|
|
let statusIndex = ''
|
|
|
|
|
if(index==0) statusIndex = 1;
|
|
|
|
|
if(index==1) statusIndex = 2;
|
|
|
|
|
if(index==2) statusIndex = 4;
|
|
|
|
|
if(index==3) statusIndex = 5;
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url:'/pagesA/myOrder/myOrder?index='+statusIndex
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
goPage(){
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url:this.guanggao
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
checkSwi(){
|
|
|
|
|
checkBanner({position:'personal-center-banner'}).then(res=>{
|
|
|
|
|
// console.log('res',res);
|
|
|
|
|
if(res.code==0){
|
|
|
|
|
if(res.data.length!=0){
|
|
|
|
|
this.guangImg = this.$http + res.data[0].src
|
|
|
|
|
this.guanggao = res.data[0].url
|
|
|
|
|
// res.data.forEach(item=>{
|
|
|
|
|
// let isVideo = false
|
|
|
|
|
// if(item.type!='img') isVideo = true
|
|
|
|
|
// let banObj = {
|
|
|
|
|
// imgSrc:this.$http + item.src,
|
|
|
|
|
// url:item.url,
|
|
|
|
|
// isVideo:isVideo,
|
|
|
|
|
// poster:this.$http + item.src,
|
|
|
|
|
// }
|
|
|
|
|
// this.bannerList.push(banObj)
|
|
|
|
|
// })
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
cancleEv(e){
|
|
|
|
|
if(e==0) this.vision = false
|
|
|
|
|
},
|
|
|
|
|
checkGM(){//查询个人二维码事件
|
|
|
|
|
this.$requst.post('user/personal-qr').then(res=>{
|
|
|
|
|
// console.log('个人二维码:',res);
|
|
|
|
|
if(res.code==0){
|
|
|
|
|
base64ToPath(res.data.qr).then(path => {
|
|
|
|
|
this.myqr = path
|
|
|
|
|
uni.setStorageSync('imgSrc',path)
|
|
|
|
|
}).catch(error => {})
|
|
|
|
|
}
|
|
|
|
|
},error=>{})
|
|
|
|
|
},
|
|
|
|
|
checkInfo(){
|
|
|
|
|
this.$requst.post('user/info').then(res=>{
|
|
|
|
|
// console.log('用户信息:',res);
|
|
|
|
|
if(res.code==0 && res.data.length!=0) {
|
|
|
|
|
this.userInfo = res.data;
|
2021-11-11 07:53:51 +00:00
|
|
|
|
uni.setStorageSync('userId',res.data.id);
|
2021-11-11 02:50:50 +00:00
|
|
|
|
this.userPhone = this.$toolAll.tools.hideMPhone(this.userInfo.mobile)
|
2021-11-02 10:23:53 +00:00
|
|
|
|
this.tongList[0].num = res.data.score;//个人积分
|
|
|
|
|
this.tongList[1].num = res.data.coin;//个人孔雀币
|
|
|
|
|
this.tongList[2].num = res.data.continuity_sign;//个人连续签到
|
|
|
|
|
this.toolsList[4].num = res.data.unread_messages;//分享人总数
|
|
|
|
|
this.myOrderList[0].num = res.data.order_count.waiting;//待支付总数
|
|
|
|
|
this.myOrderList[1].num = res.data.order_count.paid;//待发货总数
|
|
|
|
|
this.myOrderList[2].num = res.data.order_count.shipped;//待收货总数
|
|
|
|
|
this.is_worker = res.data.is_worker;//是否为职工账号,0否(客户), 1是
|
|
|
|
|
this.is_doctor = res.data.is_doctor;//是否为医生,0否,1是
|
|
|
|
|
this.is_servicer = res.data.is_servicer;//是否为客服,0否,1是
|
|
|
|
|
this.is_staff = res.data.is_staff;//是否为普通员工,0否,1是
|
2021-10-22 03:07:32 +00:00
|
|
|
|
if(res.data.is_staff==1){
|
|
|
|
|
if(this.toolsList.length!=8){
|
|
|
|
|
this.toolsList.push({src:'/static/public/aboutus.png',title:'客服二维码',num:''})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
uni.setStorageSync('shareAll',res.data)
|
|
|
|
|
if(res.data.rules.length!=0){
|
|
|
|
|
let result = this.zanCyuanList.filter(item => res.data.rules.some(itemt => itemt===item.rule))
|
|
|
|
|
this.yuanList = result
|
|
|
|
|
uni.setStorageSync('rules',res.data.rules)
|
|
|
|
|
} else this.yuanList = []
|
|
|
|
|
}
|
|
|
|
|
},error=>{})
|
|
|
|
|
},
|
|
|
|
|
chooseItem(index){//列表事件
|
|
|
|
|
// console.log('当前选项:',this.toolsList[index].title);
|
|
|
|
|
let newUrl = ''
|
|
|
|
|
if(index==0) newUrl = '/pagesA/makeAnPppointment/makeAnPppointment'
|
|
|
|
|
if(index==1) newUrl = '/pagesB/personalPoster/personalPoster'
|
|
|
|
|
if(index==2) newUrl = '/pagesB/myCollection/myCollection'
|
|
|
|
|
if(index==3) newUrl = '/pagesB/sharingCenter/sharingCenter'
|
|
|
|
|
if(index==4) newUrl = '/pagesB/messagecenter/messagecenter'
|
|
|
|
|
if(index==5) newUrl = '/pagesA/suggestions/suggestions'
|
|
|
|
|
if(index==6) newUrl = '/pagesB/aboutUs/aboutUs'
|
|
|
|
|
if(index==7) newUrl = '/pagesB/customer/customer'
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url:newUrl
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
chooseYitem(index){//员工功能事件
|
|
|
|
|
// console.log('当前选项:',this.yuanList[index].title);
|
2021-11-02 10:23:53 +00:00
|
|
|
|
if(this.yuanList[index].title=='客户列表') {
|
2021-10-22 03:07:32 +00:00
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url:'/pagesB/customerList/customerList'
|
|
|
|
|
})
|
2021-11-02 10:23:53 +00:00
|
|
|
|
}
|
|
|
|
|
if(this.yuanList[index].title=='用户足迹') {
|
2021-10-22 03:07:32 +00:00
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url:'/pagesB/userFootprint/userFootprint'
|
|
|
|
|
})
|
2021-11-02 10:23:53 +00:00
|
|
|
|
}
|
|
|
|
|
if(this.yuanList[index].title=='扫码签到') {
|
2021-10-22 03:07:32 +00:00
|
|
|
|
wx.scanCode({ // 微信扫码 调起客户端扫码界面进行扫码
|
|
|
|
|
complete: (res) => {}, //接口调用结束的回调函数(调用成功、失败都会执行)
|
|
|
|
|
fail: (res) => {}, //接口调用失败的回调函数
|
|
|
|
|
onlyFromCamera: false, //是否只能从相机扫码,不允许从相册选择图片,这里是只允许相机扫码
|
|
|
|
|
scanType: ['qrCode'], // scanType:扫码类型 : 二维码
|
|
|
|
|
success: (rt) => { // 接口调用成功的回调函数
|
2021-11-08 07:50:30 +00:00
|
|
|
|
if(rt.result.slice(0,1)=='{'){
|
|
|
|
|
let uc = JSON.parse(rt.result).user_coding
|
|
|
|
|
this.$requst.post('user/sign-in',{user_coding:uc}).then(res=>{
|
|
|
|
|
// console.log('执行扫码事件:',res);
|
|
|
|
|
if(res.code==0){
|
|
|
|
|
this.isQian = true
|
2021-11-11 02:50:50 +00:00
|
|
|
|
this.contentVal = "签到成功";
|
2021-11-08 07:50:30 +00:00
|
|
|
|
setTimeout(()=>{
|
|
|
|
|
this.isQian = false
|
|
|
|
|
},2000)
|
|
|
|
|
}
|
|
|
|
|
},error=>{})
|
|
|
|
|
} else this.$toolAll.tools.showToast('请出示正确的码');
|
2021-10-22 03:07:32 +00:00
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
2021-11-02 10:23:53 +00:00
|
|
|
|
if(this.yuanList[index].title=='核销扫码') {
|
|
|
|
|
wx.scanCode({ // 微信扫码 调起客户端扫码界面进行扫码
|
|
|
|
|
complete: (res) => {}, //接口调用结束的回调函数(调用成功、失败都会执行)
|
|
|
|
|
fail: (res) => {}, //接口调用失败的回调函数
|
|
|
|
|
onlyFromCamera: false, //是否只能从相机扫码,不允许从相册选择图片,这里是只允许相机扫码
|
|
|
|
|
scanType: ['qrCode'], // scanType:扫码类型 : 二维码
|
|
|
|
|
success: (rt) => { // 接口调用成功的回调函数
|
|
|
|
|
let narr = rt.result.split(',');
|
2021-11-08 07:50:30 +00:00
|
|
|
|
if(narr[1]=='true'){//体验券核销
|
2021-11-11 07:53:51 +00:00
|
|
|
|
this.$requst.post('staff/coupon/write-off-experience-coupon',{coupon_id:narr[0],secret:narr[2],account_id:narr[3]}).then(res=>{
|
2021-11-11 04:04:41 +00:00
|
|
|
|
this.isQian = true
|
2021-11-08 07:50:30 +00:00
|
|
|
|
if(res.code==0){
|
2021-11-11 02:50:50 +00:00
|
|
|
|
this.contentVal = "核销成功";
|
2021-11-11 04:04:41 +00:00
|
|
|
|
} else {
|
|
|
|
|
this.contentVal = res.msg;
|
|
|
|
|
}
|
|
|
|
|
setTimeout(()=>{
|
|
|
|
|
this.isQian = false
|
|
|
|
|
},2000)
|
2021-11-08 07:50:30 +00:00
|
|
|
|
},error=>{})
|
|
|
|
|
} else {//订单核销
|
|
|
|
|
this.$requst.post('order/check',{order_coding:narr[0],id:narr[1],check_user:this.userInfo.id}).then(res=>{
|
2021-11-11 04:04:41 +00:00
|
|
|
|
this.isQian = true
|
2021-11-08 07:50:30 +00:00
|
|
|
|
if(res.code==0){
|
2021-11-11 02:50:50 +00:00
|
|
|
|
this.contentVal = "核销成功";
|
2021-11-11 04:04:41 +00:00
|
|
|
|
} else {
|
|
|
|
|
this.contentVal = res.msg;
|
|
|
|
|
}
|
|
|
|
|
setTimeout(()=>{
|
|
|
|
|
this.isQian = false
|
|
|
|
|
},2000)
|
2021-11-08 07:50:30 +00:00
|
|
|
|
},error=>{})
|
|
|
|
|
}
|
2021-11-02 10:23:53 +00:00
|
|
|
|
}
|
2021-10-22 03:07:32 +00:00
|
|
|
|
})
|
2021-11-02 10:23:53 +00:00
|
|
|
|
}
|
|
|
|
|
if( this.yuanList[index].title=='客服查询') {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url:'/pagesB/customerCheck/customerCheck'
|
2021-10-22 03:07:32 +00:00
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
goNodifyData(){//去修改资料页面
|
|
|
|
|
uni.setStorageSync('uinfo',this.userInfo)
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url:'/pagesA/nodifyData/nodifyData'
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
|
|
|
|
|
</style>
|