From 81626ff788c66dbc9425c9c16370abe5b4319d8d Mon Sep 17 00:00:00 2001 From: chen <2659004835@qq.com> Date: Thu, 2 Dec 2021 17:31:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=86=E9=A2=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/auth-phone.vue | 48 +++++++++ jsFile/tools.js | 6 +- main.js | 5 +- pages/tabbar/pagehome/pagehome.vue | 32 +++--- pages/tabbar/shop/shop.vue | 10 +- pagesA/getReadyDan/getReadyDan.vue | 42 ++++++++ pagesA/integralManage/integralManage.vue | 46 +++++++- pagesA/member/member.vue | 46 +++++++- pagesA/peacockCoin/peacockCoin.vue | 44 +++++++- pagesA/pointsMall/pointsMall.vue | 46 +++++++- pagesA/shopCart/shopCart.vue | 44 +++++++- pagesA/signIn/signIn.vue | 46 +++++++- pagesA/suggestions/suggestions.vue | 10 +- pagesB/aboutUs/aboutUs.vue | 46 +++++++- pagesB/articleDetail/articleDetail.vue | 82 +++++++------- pagesB/doctor/doctor.vue | 46 +++++++- pagesB/doctorDetail/doctorDetail.vue | 45 +++++++- pagesB/myCollection/myCollection.vue | 44 +++++++- pagesB/mysharer/mysharer.vue | 44 +++++++- pagesB/orderDetail/orderDetail.vue | 44 +++++++- pagesB/personalPoster/personalPoster.vue | 46 +++++++- pagesB/problemDetail/problemDetail.vue | 79 ++++++-------- pagesB/searchPage/searchPage.vue | 44 +++++++- pagesB/sharingCenter/sharingCenter.vue | 46 +++++++- pagesB/shopDetail/shopDetail.vue | 102 +++++++----------- pagesB/shopSearch/shopSearch.vue | 44 +++++++- pagesB/userFootprint/userFootprint.vue | 46 +++++++- .../.sourcemap/mp-weixin/common/main.js.map | 2 +- .../mp-weixin/common/runtime.js.map | 2 +- .../.sourcemap/mp-weixin/common/vendor.js.map | 2 +- .../mp-weixin/components/backTop.js.map | 2 +- .../components/cate-items/cate-pu.js.map | 2 +- .../mp-weixin/components/empower.js.map | 2 +- .../mp-weixin/components/foot-tab.js.map | 2 +- .../mp-weixin/components/nothing-page.js.map | 2 +- .../components/public-customer.js.map | 2 +- .../simple-address/simple-address.js.map | 2 +- .../mp-weixin/components/status-nav.js.map | 2 +- .../mp-weixin/components/swiper-pu.js.map | 2 +- .../mp-weixin/components/wfalls-flow.js.map | 2 +- .../mp-weixin/pages/login/login.js.map | 2 +- .../mp-weixin/pages/login/xiey.js.map | 2 +- .../mp-weixin/pages/tabbar/cate/cate.js.map | 2 +- .../mp-weixin/pages/tabbar/my/my.js.map | 2 +- .../pages/tabbar/pageHome/pageHome.js.map | 2 +- .../mp-weixin/pages/tabbar/shop/shop.js.map | 2 +- .../makeAnPppointment.js.map | 2 +- .../pagesA/nodifyData/nodifyData.js.map | 2 +- .../pagesA/ppointmentEv/ppointmentEv.js.map | 2 +- .../pagesA/suggestions/suggestions.js.map | 2 +- .../mp-weixin/pagesB/aboutUs/aboutUs.js.map | 2 +- .../pagesB/articleDetail/articleDetail.js.map | 2 +- .../mp-weixin/pagesB/customer/customer.js.map | 2 +- .../pagesB/customerList/customerList.js.map | 2 +- .../mp-weixin/pagesB/doctor/doctor.js.map | 2 +- .../pagesB/doctorDetail/doctorDetail.js.map | 2 +- .../pagesB/messagecenter/messagecenter.js.map | 2 +- .../pagesB/myCollection/myCollection.js.map | 2 +- .../mp-weixin/pagesB/mysharer/mysharer.js.map | 2 +- .../personalPoster/personalPoster.js.map | 2 +- .../pagesB/problemDetail/problemDetail.js.map | 2 +- .../pagesB/searchPage/searchPage.js.map | 2 +- .../pagesB/sharingCenter/sharingCenter.js.map | 2 +- .../pagesB/userFootprint/userFootprint.js.map | 2 +- .../mp-weixin/pagesB/video/playVideo.js.map | 2 +- 65 files changed, 1020 insertions(+), 239 deletions(-) create mode 100644 components/auth-phone.vue diff --git a/components/auth-phone.vue b/components/auth-phone.vue new file mode 100644 index 0000000..bd0bb26 --- /dev/null +++ b/components/auth-phone.vue @@ -0,0 +1,48 @@ + + + + + diff --git a/jsFile/tools.js b/jsFile/tools.js index 81f6920..8e48423 100644 --- a/jsFile/tools.js +++ b/jsFile/tools.js @@ -16,11 +16,11 @@ const tools = { uni.removeStorageSync('daoTime')//清空倒计时 clearInterval(this.timer)//关闭倒计时 // console.log('上/报,埋点'); - // reportBuriedPoint(uni.getStorageSync('maiList'))//上报事件 + reportBuriedPoint(uni.getStorageSync('maiList'))//上报事件 uni.removeStorageSync('maiList')//清空上报参数 this.daoTime()//重新倒计时 } - },1000) + },1000) } else {//继续当前倒计时倒计 this.timer = setInterval(()=>{ uni.setStorageSync('daoTime',daoTime--)//设置倒计时 @@ -30,7 +30,7 @@ const tools = { uni.removeStorageSync('daoTime')//清空倒计时 clearInterval(this.timer)//关闭倒计时 // console.log('上报,埋点'); - // reportBuriedPoint(uni.getStorageSync('maiList'))//上报事件 + reportBuriedPoint(uni.getStorageSync('maiList'))//上报事件 uni.removeStorageSync('maiList')//清空上报参数 this.daoTime()//重新倒计时 } diff --git a/main.js b/main.js index deb04d9..ec71eb2 100644 --- a/main.js +++ b/main.js @@ -16,7 +16,10 @@ import nothingPage from './components/nothing-page.vue'//引入无内容组件 Vue.component('nothing-page',nothingPage)//全局注册无内容组件 import publicCustomer from './components/public-customer.vue'//引入客服组件 Vue.component('public-customer',publicCustomer)//全局注册客服组件 - +import authPhone from './components/auth-phone.vue'//引入手机授权组件 +Vue.component('auth-phone',authPhone)//全局注册手机授权组件 +import empower from './components/empower.vue'//引入用户授权组件 +Vue.component('empower',empower)//全局注册用户授权组件 // 常用工具 diff --git a/pages/tabbar/pagehome/pagehome.vue b/pages/tabbar/pagehome/pagehome.vue index dd67637..6ab9241 100644 --- a/pages/tabbar/pagehome/pagehome.vue +++ b/pages/tabbar/pagehome/pagehome.vue @@ -187,18 +187,12 @@   return shareObj; }, onLoad(options) { - if (options.invite_code!=undefined) { - uni.login({ - provider: 'weixin', - success: (res)=> { - var params = { - code:res.code, - invite_code:options.invite_code,//用户邀请码 - } - this.$requst.post('user/login',params).then(res => {console.log('调用成功');},error => {}) - }, - }); - } + if(options.source_code!='' && options.source_code!=undefined){ + this.loginEv(options); + } + if(options.invite_code!='' && options.invite_code!=undefined){ + this.loginEv(options); + } const query = wx.createSelectorQuery() query.select('.statusHNH').boundingClientRect((rect) => { // log('状态栏+标题栏:',rect.height); @@ -218,6 +212,20 @@ this.checkUserInfo(); }, methods: { + loginEv(option){ + uni.login({ + provider: 'weixin', + success: (res)=> { + var params = { + code:res.code, + invite_code:option.invite_code || '',//用户邀请码 + source_code:option.source_code || '', + channel:option.channel || '' + } + this.$requst.post('user/login',params).then(res => {console.log('调用成功');},error => {}) + }, + }); + }, checkUserInfo(){ this.$requst.post('user/info').then(res=>{ if(res.code==0){ diff --git a/pages/tabbar/shop/shop.vue b/pages/tabbar/shop/shop.vue index 7873aa2..b657b0b 100644 --- a/pages/tabbar/shop/shop.vue +++ b/pages/tabbar/shop/shop.vue @@ -160,7 +160,7 @@ statusHNH:uni.getStorageSync('statusHNH'), publicColor:uni.getStorageSync('publicColor'), activeIndex:'-1', - shopCate:['全部病种','全部医生','全部活动'], + shopCate:['全部分类','全部医生','全部活动'], cateTitle:'', bingzList:[],//小分类列表 zanBingArr:[],//暂存小分类 @@ -198,7 +198,7 @@ const query = wx.createSelectorQuery() query.select('.search-input-box').boundingClientRect((rect) => { // console.log('状态栏+标题栏:',rect.height); - this.titleHeight = rect.height + this.titleHeight = rect.height; }).exec() this.checkSX(); }, @@ -246,7 +246,7 @@ let arr = []; let obj = {}; if(this.activeIndex==0) { - this.cateTitle = '病种选择'; + this.cateTitle = '项目选择'; this.zanBingArr.disease.forEach(item=>{ obj = { pid: item.pid, @@ -363,7 +363,7 @@ this.timeList.push(obj); } }) - if(this.timeList!=0){ + if(this.timeList.length!=0){ this.$toolAll.tools.showToast('加载中...') this.timer = setInterval(()=>{//定时器 if(this.timeList.length!=0){ @@ -388,6 +388,8 @@ },1000) } else { this.dataList = this.zanArr; + this.search_result = true; + this.loading = true; } } else { this.search_result = true; diff --git a/pagesA/getReadyDan/getReadyDan.vue b/pagesA/getReadyDan/getReadyDan.vue index cf09f8c..1abe2e0 100644 --- a/pagesA/getReadyDan/getReadyDan.vue +++ b/pagesA/getReadyDan/getReadyDan.vue @@ -161,6 +161,10 @@ + + + + @@ -209,6 +213,8 @@ ntype:'money',//默认money孔雀币转钱 coin钱转孔雀币 times:0,//点击次数 isCurrent:2, + vision:true, + isShowP:false, } }, onShow() { @@ -220,6 +226,12 @@ },2000) }, onLoad(options) { + if(uni.getStorageSync('is_active')!=1){this.vision = true;} + if(options.invite_code!='' && options.invite_code!=undefined){ + this.loginEv(options.invite_code); + } else if(options.source_code!='' && options.source_code!=undefined){ + this.loginEv('',options.source_code,options.channel); + } this.checkexpress();//查询快递 this.checkeList();//查询订单列表 this.checkOrderDetail();//查询订单信息 @@ -231,6 +243,36 @@ } }, methods: { + loginEv(invite_code='',source='',channel=''){ + uni.login({ + provider: 'weixin', + success: (res)=> { + if (res.code) { + var params = { + code:res.code, + invite_code:invite_code,//用户邀请码 + source_code:source, + channel:channel + } + this.$requst.post('user/login',params).then(res => { + if(res.data.token!=''){ + if(res.data.is_active==0) { + this.haveImg = false; + this.vision = true; + } + } + },error => {}) + } + }, + }); + }, + buttonH(e){//授权成功 + this.haveImg = e + if(e) { + this.vision = false + this.isShowP = true + } + }, checkChoose(){ if(uni.getStorageSync('chooseAddress')==''){ this.checkAddress();//查询地址 diff --git a/pagesA/integralManage/integralManage.vue b/pagesA/integralManage/integralManage.vue index 2c4649b..fdaad23 100644 --- a/pagesA/integralManage/integralManage.vue +++ b/pagesA/integralManage/integralManage.vue @@ -49,6 +49,10 @@ + + + + @@ -72,7 +76,9 @@ total:0, isZanw:true, ntype:'in', - isHave:false + isHave:false, + vision:true, + isShowP:false, } }, onReachBottom() { @@ -84,12 +90,48 @@ this.isZanw = false } }, - onLoad() { + onLoad(options) { + if(uni.getStorageSync('is_active')!=1){this.vision = true;} + if(options.invite_code!='' && options.invite_code!=undefined){ + this.loginEv(options.invite_code); + } else if(options.source_code!='' && options.source_code!=undefined){ + this.loginEv('',options.source_code,options.channel); + } this.$toolAll.tools.isLogin(); this.checkInfo(); this.checkList(); }, methods: { + loginEv(invite_code='',source='',channel=''){ + uni.login({ + provider: 'weixin', + success: (res)=> { + if (res.code) { + var params = { + code:res.code, + invite_code:invite_code,//用户邀请码 + source_code:source, + channel:channel + } + this.$requst.post('user/login',params).then(res => { + if(res.data.token!=''){ + if(res.data.is_active==0) { + this.haveImg = false; + this.vision = true; + } + } + },error => {}) + } + }, + }); + }, + buttonH(e){//授权成功 + this.haveImg = e + if(e) { + this.vision = false + this.isShowP = true + } + }, checkList(){//查询积分列表 this.$requst.post('user/score-log',{page:this.page,size:this.size,type:this.ntype}).then(res=>{ if(res.code==0){ diff --git a/pagesA/member/member.vue b/pagesA/member/member.vue index 34f8e5a..c365724 100644 --- a/pagesA/member/member.vue +++ b/pagesA/member/member.vue @@ -43,6 +43,10 @@ 积分兑换 + + + + @@ -66,15 +70,53 @@ ], dataList:[], levelInfo:{}, - detailInfo:''//富文本 + detailInfo:'',//富文本 + vision:false, + isShowP:false, } }, - onLoad() { + onLoad(options) { + if(uni.getStorageSync('is_active')!=1){this.vision = true;} + if(options.invite_code!='' && options.invite_code!=undefined){ + this.loginEv(options.invite_code); + } else if(options.source_code!='' && options.source_code!=undefined){ + this.loginEv('',options.source_code,options.channel); + } this.$toolAll.tools.isLogin(); this.checkList(); this.checkInfo(); }, methods: { + loginEv(invite_code='',source='',channel=''){ + uni.login({ + provider: 'weixin', + success: (res)=> { + if (res.code) { + var params = { + code:res.code, + invite_code:invite_code,//用户邀请码 + source_code:source, + channel:channel + } + this.$requst.post('user/login',params).then(res => { + if(res.data.token!=''){ + if(res.data.is_active==0) { + this.haveImg = false; + this.vision = true; + } + } + },error => {}) + } + }, + }); + }, + buttonH(e){//授权成功 + this.haveImg = e + if(e) { + this.vision = false + this.isShowP = true + } + }, checkInfo(){ this.$requst.post('level/index').then(res=>{ if(res.code==0){ diff --git a/pagesA/peacockCoin/peacockCoin.vue b/pagesA/peacockCoin/peacockCoin.vue index 0cf6c4d..b03d01f 100644 --- a/pagesA/peacockCoin/peacockCoin.vue +++ b/pagesA/peacockCoin/peacockCoin.vue @@ -54,6 +54,10 @@ + + + + @@ -83,6 +87,8 @@ size:10, total:'',//总数 isZanw:true, + vision:true, + isShowP:false, } }, onReachBottom() { @@ -94,12 +100,48 @@ this.isZanw = false } }, - onLoad() { + onLoad(options) { + if(uni.getStorageSync('is_active')!=1){this.vision = true;} + if(options.invite_code!='' && options.invite_code!=undefined){ + this.loginEv(options.invite_code); + } else if(options.source_code!='' && options.source_code!=undefined){ + this.loginEv('',options.source_code,options.channel); + } this.$toolAll.tools.isLogin(); this.checkInfo(); this.checkList(this.ntype); }, methods: { + loginEv(invite_code='',source='',channel=''){ + uni.login({ + provider: 'weixin', + success: (res)=> { + if (res.code) { + var params = { + code:res.code, + invite_code:invite_code,//用户邀请码 + source_code:source, + channel:channel + } + this.$requst.post('user/login',params).then(res => { + if(res.data.token!=''){ + if(res.data.is_active==0) { + this.haveImg = false; + this.vision = true; + } + } + },error => {}) + } + }, + }); + }, + buttonH(e){//授权成功 + this.haveImg = e + if(e) { + this.vision = false + this.isShowP = true + } + }, confrimT(){//确定提现事件 if(this.kNum=='' || this.kNum<=0){ this.$toolAll.tools.showToast('请输入孔雀币数量'); diff --git a/pagesA/pointsMall/pointsMall.vue b/pagesA/pointsMall/pointsMall.vue index efbfc88..bf6d042 100644 --- a/pagesA/pointsMall/pointsMall.vue +++ b/pagesA/pointsMall/pointsMall.vue @@ -37,6 +37,10 @@ + + + + @@ -61,14 +65,22 @@ sort_field:'',//排序字段 score=积分 num=兑换量 sort_value:'asc',//排序值 asc=升序 desc=降序 cishu:0, - cartNum:0 + cartNum:0, + vision:true, + isShowP:false, } }, onShow() { this.$toolAll.tools.isLogin(); this.cartNumEv(); }, - onLoad() { + onLoad(options) { + if(uni.getStorageSync('is_active')!=1){this.vision = true;} + if(options.invite_code!='' && options.invite_code!=undefined){ + this.loginEv(options.invite_code); + } else if(options.source_code!='' && options.source_code!=undefined){ + this.loginEv('',options.source_code,options.channel); + } this.titleList = uni.getStorageSync('footTitle') this.imgList = uni.getStorageSync('footimg') // 缓存状态栏+标题栏的高度 @@ -80,6 +92,36 @@ this.checkList(); }, methods: { + loginEv(invite_code='',source='',channel=''){ + uni.login({ + provider: 'weixin', + success: (res)=> { + if (res.code) { + var params = { + code:res.code, + invite_code:invite_code,//用户邀请码 + source_code:source, + channel:channel + } + this.$requst.post('user/login',params).then(res => { + if(res.data.token!=''){ + if(res.data.is_active==0) { + this.haveImg = false; + this.vision = true; + } + } + },error => {}) + } + }, + }); + }, + buttonH(e){//授权成功 + this.haveImg = e + if(e) { + this.vision = false + this.isShowP = true + } + }, cartNumEv(){//购物车数量 this.$requst.post('order/shopping-cart-count',{type:'score'}).then(res=>{ if(res.code==0){ diff --git a/pagesA/shopCart/shopCart.vue b/pagesA/shopCart/shopCart.vue index ef29e30..87831a1 100644 --- a/pagesA/shopCart/shopCart.vue +++ b/pagesA/shopCart/shopCart.vue @@ -55,6 +55,10 @@ 删除 + + + + @@ -75,7 +79,9 @@ delIndex:[],//待删除商品的ID page:1, size:10, - isScore:'' + isScore:'', + vision:true, + isShowP:false, } }, onShow() { @@ -83,6 +89,12 @@ uni.removeStorageSync('orderList'); }, onLoad(options) { + if(uni.getStorageSync('is_active')!=1){this.vision = true;} + if(options.invite_code!='' && options.invite_code!=undefined){ + this.loginEv(options.invite_code); + } else if(options.source_code!='' && options.source_code!=undefined){ + this.loginEv('',options.source_code,options.channel); + } options.isScore=='score' ? this.isScore = 'score' : '' this.checkList(); }, @@ -96,6 +108,36 @@ }, }, methods: { + loginEv(invite_code='',source='',channel=''){ + uni.login({ + provider: 'weixin', + success: (res)=> { + if (res.code) { + var params = { + code:res.code, + invite_code:invite_code,//用户邀请码 + source_code:source, + channel:channel + } + this.$requst.post('user/login',params).then(res => { + if(res.data.token!=''){ + if(res.data.is_active==0) { + this.haveImg = false; + this.vision = true; + } + } + },error => {}) + } + }, + }); + }, + buttonH(e){//授权成功 + this.haveImg = e + if(e) { + this.vision = false + this.isShowP = true + } + }, checkList(){//查询列表事件 this.$requst.post('order/shopping-cart',{page:this.page,size:this.size,type:this.isScore}).then(res=>{ if(res.code==0){ diff --git a/pagesA/signIn/signIn.vue b/pagesA/signIn/signIn.vue index fab2d0a..0c9d441 100644 --- a/pagesA/signIn/signIn.vue +++ b/pagesA/signIn/signIn.vue @@ -43,6 +43,10 @@ + + + + @@ -62,7 +66,9 @@ total:'',//总数 isZanw:true, isSigin:0, - loading:false + loading:false, + vision:true, + isShowP:false, } }, onReachBottom() {//触底事件 @@ -74,12 +80,48 @@ this.isZanw = false } }, - onLoad() { + onLoad(options) { + if(uni.getStorageSync('is_active')!=1){this.vision = true;} + if(options.invite_code!='' && options.invite_code!=undefined){ + this.loginEv(options.invite_code); + } else if(options.source_code!='' && options.source_code!=undefined){ + this.loginEv('',options.source_code,options.channel); + } this.$toolAll.tools.isLogin(); this.checkTime(); this.checkList(); }, methods: { + loginEv(invite_code='',source='',channel=''){ + uni.login({ + provider: 'weixin', + success: (res)=> { + if (res.code) { + var params = { + code:res.code, + invite_code:invite_code,//用户邀请码 + source_code:source, + channel:channel + } + this.$requst.post('user/login',params).then(res => { + if(res.data.token!=''){ + if(res.data.is_active==0) { + this.haveImg = false; + this.vision = true; + } + } + },error => {}) + } + }, + }); + }, + buttonH(e){//授权成功 + this.haveImg = e + if(e) { + this.vision = false + this.isShowP = true + } + }, siginEv(){ this.$toolAll.tools.showToast('正在签到...'); this.$requst.post('sign/online-singIn').then(res=>{ diff --git a/pagesA/suggestions/suggestions.vue b/pagesA/suggestions/suggestions.vue index db4c19c..5ed3c04 100644 --- a/pagesA/suggestions/suggestions.vue +++ b/pagesA/suggestions/suggestions.vue @@ -22,19 +22,19 @@ - 建议意见 + 意见建议 -