修改商城医生选择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,14 +84,14 @@
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);
} }
}, },
methods:{ methods:{
loginEv(data){ loginEv(data){
uni.login({ uni.login({
provider: 'weixin', provider: 'weixin',
success: (res)=> { success: (res)=> {
if (res.code) { if (res.code) {
@ -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,8 +525,16 @@
searchEv(){// searchEv(){//
// log(this.searchVal); // log(this.searchVal);
if(this.$toolAll.tools.judgeAuth()){ if(this.$toolAll.tools.judgeAuth()){
uni.navigateTo({ this.$requst.post('archives/keyword-check',{keyword:this.searchVal}).then(res=>{
url:'/pagesB/searchPage/searchPage?keyWorld='+this.searchVal if(res.data.has) {
uni.navigateTo({
url:`/${res.data.target}`
})
} else {
uni.navigateTo({
url:'/pagesB/searchPage/searchPage?keyWorld='+this.searchVal
})
}
}) })
} }
}, },

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,20 +317,25 @@
this.showDoctor = false; this.showDoctor = false;
}, },
chooseEv(){// chooseEv(){//
console.log(this.dataList.length); this.$requst.post('user/doctor-list',{page:1,size:1000}).then(res=>{
if(this.dataList.length){ if(res.code==0){
this.doctor_name = '';
if(res.data.list.length!=0){
this.showDoctor = true;
this.doctorList = res.data.list;
} else this.$toolAll.tools.showToast('暂无医生可选');
} else this.$toolAll.tools.showToast(res.msg);
})
},
//
doctorBlur(){
setTimeout(()=>{
this.showDoctor = false; this.showDoctor = false;
} else { },500)
this.$requst.post('user/doctor-list',{page:1,size:1000}).then(res=>{ },
if(res.code==0){ closePop(){
this.doctor_name = ''; this.isXiao = false;
if(res.data.list.length!=0){ this.showDoctor = false;
this.showDoctor = true;
this.doctorList = res.data.list;
} else this.$toolAll.tools.showToast('暂无医生可选');
} else this.$toolAll.tools.showToast(res.msg);
})
}
}, },
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,66 +180,78 @@
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/category',{page:this.page,size:this.size,category_id:this.category_id,keyword:this.searchVal}).then(res=>{ //
// console.log('',res); this.$requst.post('archives/keyword-check',{keyword:this.searchVal}).then(res=>{
if(res.code==0){ if(res.data.has) {
uni.hideToast() this.searchVal = '';
if(uni.getStorageSync('cateList')==''){// //
if(res.data.category.length!=0){ uni.navigateTo({
res.data.category.forEach((item,index)=>{ url:`/${res.data.target}`
let cateObj = { })
id:item.id,//ID } else {
title:item.title,// //
active:item.active,// this.$requst.post('archives/category',{page:this.page,size:this.size,category_id:this.category_id,keyword:this.searchVal}).then(res=>{
model_id:item.model_id,//ID // console.log('',res);
model_name:item.model_name,// if(res.code==0){
sort:item.sort uni.hideToast()
if(uni.getStorageSync('cateList')==''){//
if(res.data.category.length!=0){
res.data.category.forEach((item,index)=>{
let cateObj = {
id:item.id,//ID
title:item.title,//
active:item.active,//
model_id:item.model_id,//ID
model_name:item.model_name,//
sort:item.sort
}
this.cateList.push(cateObj)
})
uni.setStorageSync('cateList',this.cateList)
} }
this.cateList.push(cateObj) } else {
}) //
uni.setStorageSync('cateList',this.cateList) this.cateList = uni.getStorageSync('cateList')
}
} else {
//
this.cateList = uni.getStorageSync('cateList')
}
//
if(this.page==1) this.dataList = []
this.total = res.data.list.total
if(res.data.list.list.length!=0){
res.data.list.list.forEach(item=>{
let fabImg = '';
if(item.published_headimgurl!='' && item.published_headimgurl!=null) fabImg = this.$http + item.published_headimgurl;
let tObj = {
category_id:item.category_id,//ID
id:item.id,
is_collected:item.is_collected,//
collects:item.collects,//
views:item.views,//
main_img:this.$http + item.cover,//
video:this.$http + item.video,//
title:item.title,//
content:item.subtitle,//
head_img: fabImg || '/static/public/logo.png',//
name:item.published_by || '恒美植发',//
isVideo:item.video.includes(".mp4"),//
likes:item.likes,//
is_liked:item.is_liked//
} }
this.dataList.push(tObj); //
// if(this.newCurrent==0 && item.category_id==32) this.dataList.push(tObj) if(this.page==1) this.dataList = []
// if(this.newCurrent==1 && item.category_id==33) this.dataList.push(tObj) this.total = res.data.list.total
// if(this.newCurrent==2 && item.category_id==34) this.dataList.push(tObj) if(res.data.list.list.length!=0){
// if(this.newCurrent==3 && item.category_id==38) this.dataList.push(tObj) res.data.list.list.forEach(item=>{
}) let fabImg = '';
} if(item.published_headimgurl!='' && item.published_headimgurl!=null) fabImg = this.$http + item.published_headimgurl;
let obj = { let tObj = {
content:this.searchVal category_id:item.category_id,//ID
} id:item.id,
this.reSearchList[0].list.push(obj) is_collected:item.is_collected,//
this.isList = false collects:item.collects,//
} else this.$toolAll.tools.showToast(res.msg); views:item.views,//
},error=>{this.$toolAll.tools.showToast(error.msg);}) main_img:this.$http + item.cover,//
video:this.$http + item.video,//
title:item.title,//
content:item.subtitle,//
head_img: fabImg || '/static/public/logo.png',//
name:item.published_by || '恒美植发',//
isVideo:item.video.includes(".mp4"),//
likes:item.likes,//
is_liked:item.is_liked//
}
this.dataList.push(tObj);
// if(this.newCurrent==0 && item.category_id==32) this.dataList.push(tObj)
// if(this.newCurrent==1 && item.category_id==33) this.dataList.push(tObj)
// if(this.newCurrent==2 && item.category_id==34) this.dataList.push(tObj)
// if(this.newCurrent==3 && item.category_id==38) this.dataList.push(tObj)
})
}
let obj = {
content:this.searchVal
}
this.reSearchList[0].list.push(obj)
this.isList = false
}
})
}
})
}, },
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