修改商城医生选择bug

master
chen 2022-03-21 09:44:07 +08:00
parent 306949fc25
commit e8f3205187
70 changed files with 185 additions and 154 deletions

View File

@ -84,7 +84,7 @@
this.showAuth = true; this.showAuth = true;
} }
let pagesArr = getCurrentPages(); let pagesArr = getCurrentPages();
console.log(pagesArr.length,'获取页面栈大小'); // console.log(pagesArr.length,'');
if(pagesArr.length==1) { if(pagesArr.length==1) {
uni.setStorageSync('outside',6); uni.setStorageSync('outside',6);
} }
@ -161,6 +161,7 @@
uni.setStorageSync('token',res.data.token); // token uni.setStorageSync('token',res.data.token); // token
uni.setStorageSync('expire',res.data.expire); // uni.setStorageSync('expire',res.data.expire); //
uni.setStorageSync('invite_code',res.data.invite_code); // uni.setStorageSync('invite_code',res.data.invite_code); //
uni.setStorageSync('is_active',res.data.is_active);
uni.setStorageSync('phone_active',res.data.phone_active); // uni.setStorageSync('phone_active',res.data.phone_active); //
this.isAnimation++; this.isAnimation++;
if(res.data.phone_active==1){ if(res.data.phone_active==1){

View File

@ -245,7 +245,7 @@ const tools = {
// 判断是否授权,没授权,前往登录页面授权 // 判断是否授权,没授权,前往登录页面授权
judgeAuth(){ judgeAuth(){
let auth = true; let auth = true;
if(uni.getStorageSync('phone_active')==0) { if(uni.getStorageSync('phone_active')==0 || uni.getStorageSync('is_active')==0) {
uni.navigateTo({url:'/pages/login/login'}); uni.navigateTo({url:'/pages/login/login'});
auth = false auth = false
} else { } else {
@ -347,7 +347,7 @@ const tools = {
var date = new Date(); var date = new Date();
var timestamp = date.getTime();//精确到毫秒 var timestamp = date.getTime();//精确到毫秒
// 如果过期时间 减 10分钟 小于当前时间刷新token // 如果过期时间 减 10分钟 小于当前时间刷新token
if((uni.getStorageSync('expire')*1000 - 600000) < timestamp) { if((uni.getStorageSync('expire')*1000 - 600000) < timestamp && uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0) {
// 调用登录事件 // 调用登录事件
this.loginEv(); this.loginEv();
} }
@ -368,6 +368,7 @@ const tools = {
uni.setStorageSync('token',res.data.data.token); // 缓存token uni.setStorageSync('token',res.data.data.token); // 缓存token
uni.setStorageSync('expire',res.data.data.expire); // 缓存失效时间(时间戳格式) uni.setStorageSync('expire',res.data.data.expire); // 缓存失效时间(时间戳格式)
uni.setStorageSync('phone_active',res.data.data.phone_active); // 是否绑定手机号 uni.setStorageSync('phone_active',res.data.data.phone_active); // 是否绑定手机号
uni.setStorageSync('is_active',res.data.data.is_active)//是否第一次授权
} }
} }
}) })

View File

@ -167,6 +167,7 @@
uni.setStorageSync('token',res.data.token)//token uni.setStorageSync('token',res.data.token)//token
uni.setStorageSync('expire',res.data.expire)// uni.setStorageSync('expire',res.data.expire)//
uni.setStorageSync('phone_active',res.data.phone_active)// uni.setStorageSync('phone_active',res.data.phone_active)//
uni.setStorageSync('is_active',res.data.is_active)//
uni.setStorageSync('invite_code',res.data.invite_code) uni.setStorageSync('invite_code',res.data.invite_code)
uni.hideToast() uni.hideToast()
// if(res.data.phone_active!=1){ // if(res.data.phone_active!=1){

View File

@ -212,14 +212,14 @@
this.$toolAll.tools.plantPoint(7); this.$toolAll.tools.plantPoint(7);
this.checkSwi() this.checkSwi()
if(uni.getStorageSync('phone_active')!=0){ if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
this.checkBZ()// this.checkBZ()//
} }
}, },
onShow() { onShow() {
this.$toolAll.tools.isLogin(); this.$toolAll.tools.isLogin();
this.isAutoPlay = true; this.isAutoPlay = true;
if(uni.getStorageSync('phone_active')!=0){ if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
if(this.category_id!='') this.checkCate(this.category_id)// if(this.category_id!='') this.checkCate(this.category_id)//
this.$requst.post('index/mini-program-setting').then(res=>{ this.$requst.post('index/mini-program-setting').then(res=>{
// log('',res); // log('',res);

View File

@ -238,7 +238,7 @@
uni.removeStorageSync('uinfo')// uni.removeStorageSync('uinfo')//
this.$toolAll.tools.isLogin(); this.$toolAll.tools.isLogin();
uni.removeStorageSync('shareAll')// uni.removeStorageSync('shareAll')//
if(uni.getStorageSync('phone_active')!=0){ if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
this.checkInfo(); this.checkInfo();
this.$requst.post('index/mini-program-setting').then(res=>{ this.$requst.post('index/mini-program-setting').then(res=>{
// log('',res); // log('',res);

View File

@ -198,11 +198,12 @@
this.$requst.post('user/login',params).then(res => { this.$requst.post('user/login',params).then(res => {
uni.setStorageSync('phone_active',res.data.phone_active); uni.setStorageSync('phone_active',res.data.phone_active);
uni.setStorageSync('invite_code',res.data.invite_code); uni.setStorageSync('invite_code',res.data.invite_code);
uni.setStorageSync('is_active',res.data.is_active)//
uni.setStorageSync('token',res.data.token); uni.setStorageSync('token',res.data.token);
},error => {}) },error => {})
}, },
}); });
} else if(uni.getStorageSync('token')=='' || uni.getStorageSync('phone_active')==0){ } else if(uni.getStorageSync('token')=='' || uni.getStorageSync('phone_active')==0 && uni.getStorageSync('is_active')!=0){
this.loginEv(options); this.loginEv(options);
} }
const query = wx.createSelectorQuery() const query = wx.createSelectorQuery()
@ -236,6 +237,7 @@
this.$requst.post('user/login',params).then(res => { this.$requst.post('user/login',params).then(res => {
uni.setStorageSync('phone_active',res.data.phone_active); uni.setStorageSync('phone_active',res.data.phone_active);
uni.setStorageSync('invite_code',res.data.invite_code); uni.setStorageSync('invite_code',res.data.invite_code);
uni.setStorageSync('is_active',res.data.is_active)//
uni.setStorageSync('token',res.data.token); uni.setStorageSync('token',res.data.token);
},error => {}) },error => {})
}, },
@ -523,10 +525,18 @@
searchEv(){// searchEv(){//
// log(this.searchVal); // log(this.searchVal);
if(this.$toolAll.tools.judgeAuth()){ if(this.$toolAll.tools.judgeAuth()){
this.$requst.post('archives/keyword-check',{keyword:this.searchVal}).then(res=>{
if(res.data.has) {
uni.navigateTo({
url:`/${res.data.target}`
})
} else {
uni.navigateTo({ uni.navigateTo({
url:'/pagesB/searchPage/searchPage?keyWorld='+this.searchVal url:'/pagesB/searchPage/searchPage?keyWorld='+this.searchVal
}) })
} }
})
}
}, },
chooseReEv(index){ chooseReEv(index){
if(this.$toolAll.tools.judgeAuth()){ if(this.$toolAll.tools.judgeAuth()){

View File

@ -25,7 +25,7 @@
<view v-if="doctorVal!=''">{{doctorVal}}<view class="mar-z10" @tap="deleteSX(1)">×</view></view> <view v-if="doctorVal!=''">{{doctorVal}}<view class="mar-z10" @tap="deleteSX(1)">×</view></view>
<view v-if="activityVal!=''">{{activityVal}}<view class="mar-z10" @tap="deleteSX(2)">×</view></view> <view v-if="activityVal!=''">{{activityVal}}<view class="mar-z10" @tap="deleteSX(2)">×</view></view>
</view> </view>
<view v-if="isXiao"> <view v-if="isXiao" @tap="doctorBlur">
<view class="pad-zy30"> <view class="pad-zy30">
<view class="mar-s50 mar-x20 fon28 bold">{{cateTitle}}</view> <view class="mar-s50 mar-x20 fon28 bold">{{cateTitle}}</view>
<view class="disac fw"> <view class="disac fw">
@ -34,9 +34,9 @@
<view v-if="activeIndex==1"> <view v-if="activeIndex==1">
<view class="fon28 bold mar-sx40">医生选择</view> <view class="fon28 bold mar-sx40">医生选择</view>
<view class="posir"> <view class="posir">
<input disabled @tap="chooseEv" type="text" class="mar-x40" v-model="doctor_name" placeholder="请输入医生姓名并选择" /> <input @tap.stop="chooseEv" type="text" class="mar-x40" v-model="doctor_name" placeholder="请输入医生姓名并选择" />
<view v-if="showDoctor" class="posia" style="top: 52px;left: 0;right: 0;border: 1rpx solid #E6E6E6;padding: 20rpx;background: #FFFFFF;"> <view v-if="showDoctor" class="posia" style="top: 52px;left: 0;right: 0;border: 1rpx solid #E6E6E6;padding: 20rpx;background: #FFFFFF;max-height: 400rpx;overflow: hidden;overflow-y: scroll;">
<view @tap="chooseDoctor(index)" class="disjbac fon28 col9" v-for="(item,index) in doctorList" :key="index"> <view @tap.stop="chooseDoctor(index)" class="disjbac fon28 col9" v-for="(item,index) in doctorList" :key="index">
<span>姓名{{item.doctor_extra.name}}</span> <span>姓名{{item.doctor_extra.name}}</span>
<!-- <span>部门{{item.doctor_extra.skill}}</span> --> <!-- <span>部门{{item.doctor_extra.skill}}</span> -->
</view> </view>
@ -46,12 +46,12 @@
</view> </view>
<!-- 重置筛选 --> <!-- 重置筛选 -->
<view class="disjbac pad-zy20 mar-s50 mar-x30 pad-s20"> <view class="disjbac pad-zy20 mar-s50 mar-x30 pad-s20">
<view @tap="chongz"></view> <view @tap.stop="chongz"></view>
<view @tap.stop="shaix">筛选</view> <view @tap.stop="shaix">筛选</view>
</view> </view>
</view> </view>
</view> </view>
<view v-if="isXiao" @tap="isXiao=false" class="moban"></view> <view v-if="isXiao" @tap="closePop" class="moban"></view>
<!-- 数据列表 --> <!-- 数据列表 -->
<!-- <view v-if="loading" :style="{marginTop:statusHNH+titleHeight+(isClick?52:0)+'px'}"> --> <!-- <view v-if="loading" :style="{marginTop:statusHNH+titleHeight+(isClick?52:0)+'px'}"> -->
<view v-if="loading" :style="{marginTop:(gaodu==242?titleHeight : 0)+'px'}"> <view v-if="loading" :style="{marginTop:(gaodu==242?titleHeight : 0)+'px'}">
@ -244,7 +244,7 @@
// //
this.checkSwi(); this.checkSwi();
if(uni.getStorageSync('phone_active')!=0){ if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
this.checkSX(); this.checkSX();
this.$requst.post('index/mini-program-setting').then(res=>{ this.$requst.post('index/mini-program-setting').then(res=>{
// log('',res); // log('',res);
@ -317,10 +317,6 @@
this.showDoctor = false; this.showDoctor = false;
}, },
chooseEv(){// chooseEv(){//
console.log(this.dataList.length);
if(this.dataList.length){
this.showDoctor = false;
} else {
this.$requst.post('user/doctor-list',{page:1,size:1000}).then(res=>{ this.$requst.post('user/doctor-list',{page:1,size:1000}).then(res=>{
if(res.code==0){ if(res.code==0){
this.doctor_name = ''; this.doctor_name = '';
@ -330,7 +326,16 @@
} else this.$toolAll.tools.showToast('暂无医生可选'); } else this.$toolAll.tools.showToast('暂无医生可选');
} else this.$toolAll.tools.showToast(res.msg); } else this.$toolAll.tools.showToast(res.msg);
}) })
} },
//
doctorBlur(){
setTimeout(()=>{
this.showDoctor = false;
},500)
},
closePop(){
this.isXiao = false;
this.showDoctor = false;
}, },
cartNumEv(){// cartNumEv(){//
this.$requst.post('order/shopping-cart-count',{type:'spu'}).then(res=>{ this.$requst.post('order/shopping-cart-count',{type:'spu'}).then(res=>{

View File

@ -89,7 +89,7 @@
}, },
onShow() { onShow() {
this.$toolAll.tools.isLogin(); this.$toolAll.tools.isLogin();
if(uni.getStorageSync('phone_active')!=0){ if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
this.checkList(); this.checkList();
} }
}, },

View File

@ -88,7 +88,7 @@
// console.log('+',rect); // console.log('+',rect);
this.chuTop = rect.height; this.chuTop = rect.height;
}).exec() }).exec()
if(uni.getStorageSync('phone_active')!=0){ if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
this.checkAllList(0); this.checkAllList(0);
} }
}, },

View File

@ -90,7 +90,7 @@
this.$toolAll.tools.isLogin(); this.$toolAll.tools.isLogin();
}, },
onLoad(options) { onLoad(options) {
if(uni.getStorageSync('phone_active')!=0){ if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
this.checkInfo(); this.checkInfo();
this.checkList(); this.checkList();
} }

View File

@ -77,7 +77,7 @@
}, },
onShow() { onShow() {
this.$toolAll.tools.isLogin() this.$toolAll.tools.isLogin()
if(uni.getStorageSync('phone_active')!=0){ if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
this.$toolAll.tools.showToast('加载中...','loading') this.$toolAll.tools.showToast('加载中...','loading')
this.checkPoint()// this.checkPoint()//
} }

View File

@ -74,7 +74,7 @@
this.$toolAll.tools.isLogin(); this.$toolAll.tools.isLogin();
}, },
onLoad(options) { onLoad(options) {
if(uni.getStorageSync('phone_active')!=0){ if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
this.checkList(); this.checkList();
this.checkInfo(); this.checkInfo();
} }

View File

@ -110,7 +110,7 @@
this.$toolAll.tools.isLogin(); this.$toolAll.tools.isLogin();
}, },
onLoad(options) { onLoad(options) {
if(uni.getStorageSync('phone_active')!=0){ if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
// //
if(options.id!=undefined){ if(options.id!=undefined){
this.checkDiaryInfo(options.id); this.checkDiaryInfo(options.id);

View File

@ -59,7 +59,7 @@
}, },
onShow() { onShow() {
this.$toolAll.tools.isLogin() this.$toolAll.tools.isLogin()
if(uni.getStorageSync('phone_active')!=0){ if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
this.checkDiaryEv(); this.checkDiaryEv();
} }
}, },

View File

@ -122,7 +122,7 @@
}, },
onLoad(options) { onLoad(options) {
this.isWhere = options.isWhere; this.isWhere = options.isWhere;
if(uni.getStorageSync('phone_active')!=0){ if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
this.checkList(); this.checkList();
} }
}, },

View File

@ -174,7 +174,7 @@
// //
this.$toolAll.tools.disableShareEv(); this.$toolAll.tools.disableShareEv();
this.$toolAll.tools.isLogin(); this.$toolAll.tools.isLogin();
if(uni.getStorageSync('phone_active')!=0){ if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
this.checkZT(this.activeIndex); this.checkZT(this.activeIndex);
this.checkList(this.activeIndex); this.checkList(this.activeIndex);
} }

View File

@ -103,7 +103,7 @@
this.$toolAll.tools.isLogin(); this.$toolAll.tools.isLogin();
}, },
onLoad(options) { onLoad(options) {
if(uni.getStorageSync('phone_active')!=0){ if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
this.checkInfo(); this.checkInfo();
this.checkList(this.ntype); this.checkList(this.ntype);
} }

View File

@ -84,7 +84,7 @@
// tools.js // tools.js
this.$toolAll.tools.plantPoint(12); this.$toolAll.tools.plantPoint(12);
if(uni.getStorageSync('phone_active')!=0){ if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
this.checkList(); this.checkList();
} }
}, },

View File

@ -117,7 +117,7 @@
onLoad() { onLoad() {
this.category = this.xialone[0] this.category = this.xialone[0]
this.categoryT = this.xialTwo[0] this.categoryT = this.xialTwo[0]
if(uni.getStorageSync('phone_active')!=0){ if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
this.checkZParmas(); this.checkZParmas();
this.lphone = uni.getStorageSync('phone'); this.lphone = uni.getStorageSync('phone');
} }

View File

@ -88,7 +88,7 @@
}, },
onLoad(options) { onLoad(options) {
options.isScore=='score' ? this.isScore = 'score' : '' options.isScore=='score' ? this.isScore = 'score' : ''
if(uni.getStorageSync('phone_active')!=0){ if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
this.checkList(); this.checkList();
} }
}, },

View File

@ -80,7 +80,7 @@
this.$toolAll.tools.isLogin(); this.$toolAll.tools.isLogin();
}, },
onLoad() { onLoad() {
if(uni.getStorageSync('phone_active')!=0){ if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
this.checkTime(); this.checkTime();
this.checkList(); this.checkList();
} }

View File

@ -96,7 +96,7 @@
this.$toolAll.tools.isLogin() this.$toolAll.tools.isLogin()
}, },
onLoad() { onLoad() {
if(uni.getStorageSync('phone_active')!=0){ if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
this.checkCate(); this.checkCate();
this.tphone = uni.getStorageSync('phone'); this.tphone = uni.getStorageSync('phone');
this.$requst.post('index/mini-program-setting').then(res=>{ this.$requst.post('index/mini-program-setting').then(res=>{

View File

@ -102,7 +102,7 @@
}, },
onLoad(options) { onLoad(options) {
this.checkSwi() this.checkSwi()
if(uni.getStorageSync('phone_active')!=0){ if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
this.checkAbout(this.category_id) this.checkAbout(this.category_id)
} }
}, },

View File

@ -106,7 +106,7 @@
onLoad(options) { onLoad(options) {
this.detailId = options.id this.detailId = options.id
this.category_id = options.category_id this.category_id = options.category_id
if(uni.getStorageSync('phone_active')!=0){ if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
this.checkDetail(options.id); this.checkDetail(options.id);
this.checkAbout(this.category_id); this.checkAbout(this.category_id);
} }

View File

@ -28,7 +28,7 @@
this.$toolAll.tools.isLogin() this.$toolAll.tools.isLogin()
}, },
onLoad() { onLoad() {
if(uni.getStorageSync('phone_active')!=0){ if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
this.checkImg() this.checkImg()
} }
}, },

View File

@ -76,7 +76,7 @@
this.$toolAll.tools.isLogin(); this.$toolAll.tools.isLogin();
}, },
onLoad(options) { onLoad(options) {
if(uni.getStorageSync('phone_active')!=0){ if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
this.checkList() this.checkList()
} }
}, },

View File

@ -158,7 +158,7 @@
this.$toolAll.tools.isLogin(); this.$toolAll.tools.isLogin();
}, },
onLoad() { onLoad() {
if(uni.getStorageSync('phone_active')!=0){ if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
this.checkKF()// this.checkKF()//
this.checkCL()// this.checkCL()//
this.checkLY()// this.checkLY()//

View File

@ -103,7 +103,7 @@
}, },
onShow() { onShow() {
this.$toolAll.tools.isLogin(); this.$toolAll.tools.isLogin();
if(uni.getStorageSync('phone_active')!=0){ if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
this.checkConList(this.category_id) this.checkConList(this.category_id)
} }
}, },
@ -113,7 +113,7 @@
this.chuTop = rect.top this.chuTop = rect.top
}).exec() }).exec()
this.doctorId = options.doctor_id; this.doctorId = options.doctor_id;
if(uni.getStorageSync('phone_active')!=0){ if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
this.checkDoD(this.doctorId) this.checkDoD(this.doctorId)
} }
}, },

View File

@ -79,7 +79,7 @@
this.chuTop = rect.height this.chuTop = rect.height
}).exec() }).exec()
if(options.index==undefined){this.isWen = false;this.ntype = 'message';} if(options.index==undefined){this.isWen = false;this.ntype = 'message';}
if(uni.getStorageSync('phone_active')!=0){ if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
this.checkMsg(); this.checkMsg();
let that = this ; let that = this ;
wx.showModal({ wx.showModal({

View File

@ -180,7 +180,7 @@
// //
this.$toolAll.tools.disableShareEv(); this.$toolAll.tools.disableShareEv();
this.$toolAll.tools.isLogin() this.$toolAll.tools.isLogin()
if(uni.getStorageSync('phone_active')!=0){ if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
this.checkConList(this.category_id); this.checkConList(this.category_id);
this.shopCollection(); this.shopCollection();
} }

View File

@ -88,7 +88,7 @@
this.navH = rect.height this.navH = rect.height
}).exec() }).exec()
} }
if(uni.getStorageSync('phone_active')!=0){ if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
this.checkShare()// this.checkShare()//
this.checkPeople()// this.checkPeople()//
} }

View File

@ -153,7 +153,7 @@
this.$toolAll.tools.isLogin(); this.$toolAll.tools.isLogin();
}, },
onLoad(options) { onLoad(options) {
if(uni.getStorageSync('phone_active')!=0){ if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
this.checkInfo(options.id); this.checkInfo(options.id);
} }
}, },

View File

@ -56,7 +56,7 @@
} }
}, },
onLoad(options) { onLoad(options) {
if(uni.getStorageSync('phone_active')!=0){ if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
this.$toolAll.tools.isLogin() ; this.$toolAll.tools.isLogin() ;
// //
if(uni.getStorageSync('imgSrcList')!='') this.imgSrcList = uni.getStorageSync('imgSrcList')// if(uni.getStorageSync('imgSrcList')!='') this.imgSrcList = uni.getStorageSync('imgSrcList')//

View File

@ -47,7 +47,7 @@
style="width: 42rpx;height: 42rpx;" mode=""></image> style="width: 42rpx;height: 42rpx;" mode=""></image>
<view class="fon24 col9 tc">{{likeCon}}</view> <view class="fon24 col9 tc">{{likeCon}}</view>
</view> </view>
<view @tap="shareEv" class="disac fc mar-zy36 posir"> <view class="disac fc mar-zy36 posir">
<image src="/static/public/weix.png" style="width: 42rpx;height: 42rpx;" mode=""></image> <image src="/static/public/weix.png" style="width: 42rpx;height: 42rpx;" mode=""></image>
<view class="fon24 col9">分享</view> <view class="fon24 col9">分享</view>
<button class="posia" open-type="share" <button class="posia" open-type="share"
@ -186,6 +186,7 @@
}, error => {}) }, error => {})
// tools.js // tools.js
this.$toolAll.tools.plantPoint(4,this.detailObj.id); this.$toolAll.tools.plantPoint(4,this.detailObj.id);
console.log(`/pagesB/problemDetail/problemDetail?id=${this.detailObj.id}&category_id=${this.category_id}&share_id=${uni.getStorageSync('userId')}&invite_code=${uni.getStorageSync('invite_code')}`);
var shareObj = { var shareObj = {
title: `${ya.detailObj.title}`, // (slogan) title: `${ya.detailObj.title}`, // (slogan)
path: `/pagesB/problemDetail/problemDetail?id=${this.detailObj.id}&category_id=${this.category_id}&share_id=${uni.getStorageSync('userId')}&invite_code=${uni.getStorageSync('invite_code')}`, // / path: `/pagesB/problemDetail/problemDetail?id=${this.detailObj.id}&category_id=${this.category_id}&share_id=${uni.getStorageSync('userId')}&invite_code=${uni.getStorageSync('invite_code')}`, // /
@ -205,7 +206,7 @@
this.isAutoPlay = false; this.isAutoPlay = false;
}, },
onLoad(options) { onLoad(options) {
if(uni.getStorageSync('phone_active')!=0){ if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
if (options.category_id != undefined) { if (options.category_id != undefined) {
this.category_id = options.category_id this.category_id = options.category_id
if(options.invite_code!=undefined){this.invite_code = options.invite_code;} if(options.invite_code!=undefined){this.invite_code = options.invite_code;}

View File

@ -77,7 +77,7 @@
onLoad(options) { onLoad(options) {
this.category_id = options.category_id;//id this.category_id = options.category_id;//id
this.titleStr = options.title;// this.titleStr = options.title;//
if(uni.getStorageSync('phone_active')!=0){ if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
this.searchEv() this.searchEv()
} }
}, },

View File

@ -101,7 +101,7 @@
uni.removeStorageSync('cateList') uni.removeStorageSync('cateList')
}, },
onLoad(options) { onLoad(options) {
if(uni.getStorageSync('phone_active')!=0){ if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
if(options.keyWorld!=undefined && options.keyWorld!='') { if(options.keyWorld!=undefined && options.keyWorld!='') {
this.searchVal = options.keyWorld this.searchVal = options.keyWorld
this.searchEv() this.searchEv()
@ -112,7 +112,7 @@
}, },
onShow() { onShow() {
this.$toolAll.tools.isLogin() this.$toolAll.tools.isLogin()
if(uni.getStorageSync('phone_active')!=0){ if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
if(this.searchVal!=undefined && this.searchVal!='') this.searchEv() if(this.searchVal!=undefined && this.searchVal!='') this.searchEv()
} }
}, },
@ -180,6 +180,16 @@
searchEv(){// searchEv(){//
// console.log('ID',this.category_id,'',this.searchVal); // console.log('ID',this.category_id,'',this.searchVal);
this.$toolAll.tools.showToast('搜索中...') this.$toolAll.tools.showToast('搜索中...')
//
this.$requst.post('archives/keyword-check',{keyword:this.searchVal}).then(res=>{
if(res.data.has) {
this.searchVal = '';
//
uni.navigateTo({
url:`/${res.data.target}`
})
} else {
//
this.$requst.post('archives/category',{page:this.page,size:this.size,category_id:this.category_id,keyword:this.searchVal}).then(res=>{ this.$requst.post('archives/category',{page:this.page,size:this.size,category_id:this.category_id,keyword:this.searchVal}).then(res=>{
// console.log('',res); // console.log('',res);
if(res.code==0){ if(res.code==0){
@ -238,8 +248,10 @@
} }
this.reSearchList[0].list.push(obj) this.reSearchList[0].list.push(obj)
this.isList = false this.isList = false
} else this.$toolAll.tools.showToast(res.msg); }
},error=>{this.$toolAll.tools.showToast(error.msg);}) })
}
})
}, },
delev(){// delev(){//
this.isShowT = true this.isShowT = true

View File

@ -78,7 +78,7 @@
  return shareObj;   return shareObj;
}, },
onLoad(options) { onLoad(options) {
if(uni.getStorageSync('phone_active')!=0){this.$toolAll.tools.isLogin()} if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){this.$toolAll.tools.isLogin()}
uni.getStorageSync('shareAll')!='' ? this.dataList[1].num = uni.getStorageSync('shareAll').share_users.total : this.dataList[1].num = 0 uni.getStorageSync('shareAll')!='' ? this.dataList[1].num = uni.getStorageSync('shareAll').share_users.total : this.dataList[1].num = 0
this.$requst.post('index/mini-program-setting').then(res=>{ this.$requst.post('index/mini-program-setting').then(res=>{
// log('',res); // log('',res);

View File

@ -384,7 +384,7 @@
this.isAutoPlay = false; this.isAutoPlay = false;
}, },
onLoad(options) { onLoad(options) {
if(uni.getStorageSync('phone_active')!=0){ if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
this.checkDetail(options.id,options.is_activity); this.checkDetail(options.id,options.is_activity);
this.cartNumEv(); this.cartNumEv();
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long