修改商城医生选择bug
parent
306949fc25
commit
e8f3205187
|
@ -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){
|
||||||
|
|
|
@ -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)//是否第一次授权
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -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){
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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()){
|
||||||
|
|
|
@ -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=>{
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
|
@ -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()//调用自主预约列表事件
|
||||||
}
|
}
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -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');
|
||||||
}
|
}
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
|
@ -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=>{
|
||||||
|
|
|
@ -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)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -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()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -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()//渠道来源
|
||||||
|
|
|
@ -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)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -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({
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
|
@ -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()//查询分享一二级列表人数
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -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')//弹框关闭
|
||||||
|
|
|
@ -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;}
|
||||||
|
|
|
@ -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()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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
Loading…
Reference in New Issue