更改医生列表,医生详情接口

master
chen 2021-08-24 08:54:50 +08:00
parent c6d68573bf
commit a63409f75f
52 changed files with 258 additions and 113 deletions

View File

@ -145,12 +145,12 @@
} }
}, },
comfirmev(){ comfirmev(){
console.log('取消收藏成功'); // console.log('');
this.$emit('comfirmev',this.current) this.$emit('comfirmev',this.current)
this.isShowT = false this.isShowT = false
}, },
cancleev(){ cancleev(){
console.log('关闭弹框'); // console.log('');
this.isShowT = false this.isShowT = false
} }
} }

View File

@ -4,12 +4,12 @@
<view v-if="isXiala" class="pad-x20"> <view v-if="isXiala" class="pad-x20">
<view class="mar-s30 mar-x40 tc">请选择客服</view> <view class="mar-s30 mar-x40 tc">请选择客服</view>
<view @tap="openXia" class="disjbac radius10 pad-zy20 mar-zy20 xialak mar-x50 posir"> <view @tap="openXia" class="disjbac radius10 pad-zy20 mar-zy20 xialak mar-x50 posir">
<view class="col3">{{category[current]}}</view> <view class="col3">{{category[current].title}}</view>
<image :class="isZhuan?'zhuan':'nozhuan'" src="/static/public/sanj.png" mode="aspectFill"></image> <image :class="isZhuan?'zhuan':'nozhuan'" src="/static/public/sanj.png" mode="aspectFill"></image>
<!-- 下拉列表 --> <!-- 下拉列表 -->
<view v-if="isZhuan" class="posia bacf radius10 xial-box"> <view v-if="isZhuan" class="posia bacf radius10 xial-box">
<view class="pad-zy20 xial-item-box"> <view class="pad-zy20 xial-item-box">
<view @tap="chooseXia(index)" :class="current==index?'pcol':''" v-for="(item,index) in category" :key="index">{{item}}</view> <view @tap="chooseXia(index)" :class="current==index?'pcol':''" v-for="(item,index) in category" :key="index">{{item.title}}</view>
</view> </view>
</view> </view>
</view> </view>
@ -67,9 +67,13 @@
}, },
methods:{ methods:{
comfirEv(){// comfirEv(){//
this.isZhuan = false
this.current = 0
this.$emit('comfirmev') this.$emit('comfirmev')
}, },
cancleEv(){// cancleEv(){//
this.isZhuan = false
this.current = 0
this.$emit('cancleev') this.$emit('cancleev')
}, },
chooseXia(index){ chooseXia(index){

View File

@ -199,7 +199,7 @@ const tools = {
}, },
escape2Html(str) {//富文本 escape2Html(str) {//富文本
var arrEntities = { 'lt': '<', 'gt': '>', 'nbsp': ' ', 'amp': '&', 'quot': '"' }; var arrEntities = { 'lt': '<', 'gt': '>', 'nbsp': ' ', 'amp': '&', 'quot': '"' };
return str.replace(/&(lt|gt|nbsp|amp|quot|src);/ig, function (all, t) { return arrEntities[t]; }).replace('<section', '<div').replace(/\<img/g, '<img @tap="pre" style="max-width:100%;height:auto" ').replace(/src=\"/g,'src="https://hengmei.scdxtc.cn'); return str.replace(/&(lt|gt|nbsp|amp|quot|src);/ig, function (all, t) { return arrEntities[t]; }).replace('<section', '<div').replace(/\<img/g, '<img @tap="pre" style="max-width:100%;height:auto" ').replace(/src=\"/g,'src="https://oss.hmzfyy.cn');
}, },
setTime(url,title,time){ setTime(url,title,time){
// console.log(url,title,time); // console.log(url,title,time);
@ -301,6 +301,7 @@ const tools = {
uni.setStorageSync('openid',res.data.data.openid)//缓存Openid uni.setStorageSync('openid',res.data.data.openid)//缓存Openid
uni.setStorageSync('expire',res.data.data.expire)//缓存失效时间(时间戳格式) uni.setStorageSync('expire',res.data.data.expire)//缓存失效时间(时间戳格式)
uni.setStorageSync('is_active',res.data.data.is_active)//是否第一次授权 uni.setStorageSync('is_active',res.data.data.is_active)//是否第一次授权
uni.setStorageSync('userId',res.data.data.account_id)
// console.log('is_active',uni.getStorageSync('is_active')); // console.log('is_active',uni.getStorageSync('is_active'));
} }
} }

View File

@ -142,6 +142,7 @@
} }
uni.setStorageSync('params',params) uni.setStorageSync('params',params)
uni.setStorageSync('comeOn',comeOn) uni.setStorageSync('comeOn',comeOn)
uni.setStorageSync('userId',res.data.account_id)
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('is_active',res.data.is_active)// uni.setStorageSync('is_active',res.data.is_active)//

View File

@ -37,8 +37,8 @@
</view> </view>
<image class="posia" style="top: 0;left: 0;right: 0;bottom: 0;width: 100%;height: 100%;z-index: 0;" src="/static/public/mybt.png" mode=""></image> <image class="posia" style="top: 0;left: 0;right: 0;bottom: 0;width: 100%;height: 100%;z-index: 0;" src="/static/public/mybt.png" mode=""></image>
</view> </view>
<!-- 员工功能 --> <!-- 员工功能 v-if="userInfo.is_staff && yuanList.length!=0" -->
<view v-if="userInfo.is_staff && yuanList.length!=0" class="bacf radius20 mar-s20 pad20"> <view v-if="userInfo.is_staff==1" class="bacf radius20 mar-s20 pad20">
<view class="mar-x30 fon28 bold col3">员工功能</view> <view class="mar-x30 fon28 bold col3">员工功能</view>
<view class="disac yuan-box"> <view class="disac yuan-box">
<view @tap="chooseYitem(indexy)" style="width: 33%;display: flex;justify-content: center;align-items: center;position: relative;" v-for="(itemy,indexy) in yuanList" :key="indexy"> <view @tap="chooseYitem(indexy)" style="width: 33%;display: flex;justify-content: center;align-items: center;position: relative;" v-for="(itemy,indexy) in yuanList" :key="indexy">
@ -51,7 +51,7 @@
</view> </view>
</view> </view>
<!-- 广告 --> <!-- 广告 -->
<image class="width100 radius20 mar-sx20" :src="guangImg" style="height: 160rpx;" mode="aspectFill"></image> <image @tap="goPage" class="width100 radius20 mar-sx20" :src="guangImg" style="height: 160rpx;" mode="aspectFill"></image>
<!-- 功能列表 --> <!-- 功能列表 -->
<view class="bacf radius20 pad-zy30"> <view class="bacf radius20 pad-zy30">
<view @tap="chooseItem(indexl)" class="disjbac pad-sx30 borbot" v-for="(iteml,indexl) in toolsList" :key="indexl"> <view @tap="chooseItem(indexl)" class="disjbac pad-sx30 borbot" v-for="(iteml,indexl) in toolsList" :key="indexl">
@ -120,7 +120,6 @@
{src:'/static/public/message.png',title:'消息通知',num:''}, {src:'/static/public/message.png',title:'消息通知',num:''},
{src:'/static/public/ts.png',title:'投诉与建议',num:''}, {src:'/static/public/ts.png',title:'投诉与建议',num:''},
{src:'/static/public/aboutus.png',title:'关于我们',num:''}, {src:'/static/public/aboutus.png',title:'关于我们',num:''},
{src:'/static/public/aboutus.png',title:'客服二维码',num:''},
], ],
isQrcode:false,// isQrcode:false,//
userInfo:{},// userInfo:{},//
@ -135,7 +134,8 @@
isQian:false, isQian:false,
bannerList:[], bannerList:[],
guangImg:'', guangImg:'',
isAuth:'' isAuth:'',
guanggao:''
} }
}, },
onUnload: function() { onUnload: function() {
@ -164,12 +164,18 @@
// if(uni.getStorageSync('headImg')=='') this.vision = true // if(uni.getStorageSync('headImg')=='') this.vision = true
}, },
methods: { methods: {
goPage(){
uni.navigateTo({
url:this.guanggao
})
},
checkSwi(){ checkSwi(){
checkBanner({position:'personal-center-banner'}).then(res=>{ checkBanner({position:'personal-center-banner'}).then(res=>{
// console.log('res',res); // console.log('res',res);
if(res.code==0){ if(res.code==0){
if(res.data.length!=0){ if(res.data.length!=0){
this.guangImg = this.$http + res.data[0].src this.guangImg = this.$http + res.data[0].src
this.guanggao = res.data[0].url
// res.data.forEach(item=>{ // res.data.forEach(item=>{
// let isVideo = false // let isVideo = false
// if(item.type!='img') isVideo = true // if(item.type!='img') isVideo = true
@ -212,8 +218,8 @@
this.is_doctor = res.data.is_doctor//01 this.is_doctor = res.data.is_doctor//01
this.is_servicer = res.data.is_servicer//01 this.is_servicer = res.data.is_servicer//01
this.is_staff = res.data.is_staff//01 this.is_staff = res.data.is_staff//01
if(res.data.is_staff==0){ if(res.data.is_staff==1){
this.toolsList.splice((this.toolsList.length-1),1) this.toolsList.push({src:'/static/public/aboutus.png',title:'客服二维码',num:''})
} }
uni.setStorageSync('shareAll',res.data) uni.setStorageSync('shareAll',res.data)
if(uni.getStorageSync('rules')==''){ if(uni.getStorageSync('rules')==''){

View File

@ -15,7 +15,7 @@
<view class="disac width100"> <view class="disac width100">
<image class="searchImg flexs" src="/static/public/search.png" mode="aspectFill"></image> <image class="searchImg flexs" src="/static/public/search.png" mode="aspectFill"></image>
<!-- 输入框 --> <!-- 输入框 -->
<input class="width100 fon28" type="text" v-model="searchVal" placeholder="请输入问题/病种/医生姓名"/> <input @confirm="searchEv" class="width100 fon28" type="text" v-model="searchVal" placeholder="请输入问题/病种/医生姓名"/>
<!-- 竖线 --> <!-- 竖线 -->
<view class="linev"></view> <view class="linev"></view>
<!-- 搜索 --> <!-- 搜索 -->
@ -145,6 +145,7 @@
this.$toolAll.tools.daoTime() this.$toolAll.tools.daoTime()
uni.setStorageSync('chu',1) uni.setStorageSync('chu',1)
} }
this.checkKT()
}, },
onLoad() { onLoad() {
const query = wx.createSelectorQuery() const query = wx.createSelectorQuery()
@ -153,7 +154,6 @@
uni.setStorageSync('statusHNH',rect.height) uni.setStorageSync('statusHNH',rect.height)
this.statusHNH = rect.height this.statusHNH = rect.height
}).exec() }).exec()
this.checkKT()
this.checkBCate() this.checkBCate()
this.checkKey() this.checkKey()
this.checkSwi()// this.checkSwi()//

View File

@ -8,13 +8,13 @@
<view v-if="dataList.length!=0" class="mar-s30 bacf pad20" v-for="(item,index) in dataList" :key="index" style="border-radius: 28rpx;"> <view v-if="dataList.length!=0" class="mar-s30 bacf pad20" v-for="(item,index) in dataList" :key="index" style="border-radius: 28rpx;">
<view class="disjbac"> <view class="disjbac">
<view class="disac"> <view class="disac">
<image class="radius20 mar-y20" src="/static/public/logo.png" style="width: 98rpx;height: 98rpx;" mode=""></image> <image class="radius20 mar-y20 flexs" src="/static/public/logo.png" style="width: 98rpx;height: 98rpx;" mode=""></image>
<view> <view>
<view class="fon36 col3 bold">{{item.name}}</view> <view class="fon36 col3 bold clips1">{{item.name}}</view>
<view class="fon24 col3 mar-s10">{{item.content}}</view> <view class="fon24 col3 mar-s10">{{item.content}}</view>
</view> </view>
</view> </view>
<view :style="{background:[ingColor,publicColor,failColor,failColor,failColor][item.status]}" class="fon24 colf radius10" style="padding: 14rpx 24rpx;">{{['审核中...','预约成功','预约失败','预约取消','预约完成'][item.status]}}</view> <view :style="{background:[ingColor,publicColor,failColor,failColor,failColor][item.status]}" class="fon24 colf radius10 flexs" style="padding: 14rpx 24rpx;">{{['审核中...','预约成功','预约失败','预约取消','预约完成'][item.status]}}</view>
</view> </view>
<view class="mar-s36 fon24 col3">预约时间{{item.yuTime}}</view> <view class="mar-s36 fon24 col3">预约时间{{item.yuTime}}</view>
<view class="disjbac fon24 col3 mar-s30"> <view class="disjbac fon24 col3 mar-s30">

View File

@ -130,7 +130,7 @@
}, },
}) })
let firstObj = uni.getStorageSync('firstInfo') let firstObj = uni.getStorageSync('firstInfo')
console.log('firstObj',firstObj); // console.log('firstObj',firstObj);
if(firstObj==''){ if(firstObj==''){
let obj = uni.getStorageSync('uinfo') let obj = uni.getStorageSync('uinfo')
if(obj!='') this.uinfo = obj if(obj!='') this.uinfo = obj
@ -164,7 +164,13 @@
if(res.code==0){ if(res.code==0){
this.$toolAll.tools.showToast('资料修改成功') this.$toolAll.tools.showToast('资料修改成功')
setTimeout(()=>{ setTimeout(()=>{
if(this.whereCome==2){
uni.navigateTo({
url:'/pages/tabbar/my/my'
})
} else {
uni.navigateBack({delta:1}) uni.navigateBack({delta:1})
}
},1000) },1000)
} }
},error=>{}) },error=>{})

View File

@ -51,7 +51,7 @@
<view class="disac mar-s30"> <view class="disac mar-s30">
<view class="mar-y20 flexs titlel"> </view> <view class="mar-y20 flexs titlel"> </view>
<view class="width100 radius10 pad-zy20 borbot-cc height-68"> <view class="width100 radius10 pad-zy20 borbot-cc height-68">
<input v-model="lname" class="fon28 height-68" type="text" placeholder="请填写联系人姓名"/> <input v-model="lname" maxlength="10" class="fon28 height-68" type="text" placeholder="请填写联系人姓名"/>
</view> </view>
</view> </view>
<!-- 联系方式 --> <!-- 联系方式 -->

View File

@ -88,7 +88,7 @@
}, },
methods: { methods: {
checkSwi(){ checkSwi(){
checkBanner({position:'home-banner'}).then(res=>{ checkBanner({position:'about-banner'}).then(res=>{
if(res.code==0){ if(res.code==0){
if(res.data.length!=0){ if(res.data.length!=0){
res.data.forEach(item=>{ res.data.forEach(item=>{

View File

@ -13,32 +13,37 @@
<!-- 下拉列表 --> <!-- 下拉列表 -->
<view v-if="isZhuan" class="posia bacf radius10 xial-box"> <view v-if="isZhuan" class="posia bacf radius10 xial-box">
<view class="pad-zy20 xial-item-box"> <view class="pad-zy20 xial-item-box">
<view @tap="chooseXia(indexl)" :class="xialCurrent==indexl?'pcol':''" v-for="(iteml,indexl) in xialone" :key="indexl">{{iteml}}</view> <view @tap="chooseXia(indexl)" :class="xialCurrent==indexl?'pcol':''" v-for="(iteml,indexl) in xialone" :key="indexl">{{iteml.title}}</view>
</view> </view>
</view> </view>
</view> </view>
<view class="flexs tc mar-z30 colf radius10 customer-btn" :style="{background:publicColor}">搜索</view> <view @tap="searchEv" class="flexs tc mar-z30 colf radius10 customer-btn" :style="{background:publicColor}">搜索</view>
</view> </view>
</view> </view>
<!-- 列表 --> <!-- 列表 -->
<view class="dis bacf radius10 pad20 mar-x20 posir" v-for="(item,index) in dataList" :key="index"> <view v-if="dataList.length!=0" class="dis bacf radius10 pad20 mar-x20 posir" v-for="(item,index) in dataList" :key="index">
<image class="mar-y20 flexs" :src="item.imgSrc" style="width: 98rpx;height: 98rpx;" mode="aspectFill"></image> <image class="mar-y20 flexs" :src="item.imgSrc" style="width: 98rpx;height: 98rpx;" mode="aspectFill"></image>
<view class="fon24 col3 width100"> <view class="fon24 col3 width100">
<view class="bold disjbac"> <view class="bold disjbac">
<view class="fon28 clips1">{{item.name}}</view> <view class="fon28 clips1">{{item.name}}</view>
<view class="flexs">来源{{item.come}}</view> <view class="flexs">来源{{item.come}}</view>
</view> </view>
<view style="margin: 15rpx 0;">联系方式{{item.phone}}</view> <view style="margin: 15rpx 0;">联系方式{{item.phone || '暂无'}}</view>
<view>客服{{item.customer || '暂无'}}</view> <view>客服{{item.customer || '暂无'}}</view>
<view class="col80 disjbac" style="margin: 15rpx 0 0 0;"> <view class="col80 disjbac" style="margin: 15rpx 0 0 0;">
<view>{{item.time}}</view> <view>{{item.time}}</view>
<view class="col3">{{item.qudao}}</view> <view class="col3">{{item.qudao}}</view>
</view> </view>
</view> </view>
<view @tap="fenCustomer" class="posia colf fon24 radius10 tc customer-btn" style="right: 20rpx;bottom: 50rpx;" v-if="item.customer==''" :style="{background:publicColor}"></view> <view @tap="fenCustomer(index)" class="posia colf fon24 radius10 tc customer-btn"
style="right: 20rpx;bottom: 50rpx;" v-if="item.customer=='' || item.customer==null" :style="{background:publicColor}">分配客服</view>
</view>
<view v-if="dataList.length==0" class="disjcac fc" style="margin-top: 50%;">
<image class="zanw-img" src="/static/public/nothing.png" mode="aspectFill"></image>
<view class="fon24 col3">您搜索的内容暂无结果换个关键词试试吧</view>
</view> </view>
<!-- 弹框 --> <!-- 弹框 -->
<pu-po :category="xialtList" @chooseXiaT="chooseXiaT" :isXiala="true" :isShowT="isShowT" :clearVal="'暂不分配'" :comfrimVal="'立即分配'" @comfirmev="comfirmev" @cancleev="isShowT=false"></pu-po> <pu-po :category="xialtList" @chooseXiaT="chooseXiaT" :isXiala="true" :isShowT="isShowT" :clearVal="'暂不分配'" :comfrimVal="'立即分配'" @comfirmev="comfirmev" @cancleev="cancleev"></pu-po>
<!-- 返回顶部 --> <!-- 返回顶部 -->
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> --> <!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
</view> </view>
@ -52,43 +57,117 @@
statusHNH:uni.getStorageSync('statusHNH'), statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),// publicColor:uni.getStorageSync('publicColor'),//
category:'', category:'',
dataList:[ dataList:[],
{imgSrc:'/static/public/like.png',name:'USER',come:'顾客分享',phone:'18888888888',customer:'恒美植发客服-01',time:'2021-07-15 14:25',qudao:'第一渠道'},
{imgSrc:'/static/public/like.png',name:'USER',come:'顾客分享',phone:'18888888888',customer:'恒美植发客服-01',time:'2021-07-15 14:25',qudao:'第一渠道'},
{imgSrc:'/static/public/like.png',name:'USER',come:'顾客分享',phone:'18888888888',customer:'',time:'2021-07-15 14:25',qudao:''},
{imgSrc:'/static/public/like.png',name:'USER',come:'顾客分享',phone:'18888888888',customer:'恒美植发客服-01',time:'2021-07-15 14:25',qudao:'第二渠道'},
{imgSrc:'/static/public/like.png',name:'USER',come:'顾客分享',phone:'18888888888',customer:'恒美植发客服-01',time:'2021-07-15 14:25',qudao:'第二渠道'},
{imgSrc:'/static/public/like.png',name:'USER',come:'顾客分享',phone:'18888888888',customer:'恒美植发客服-01',time:'2021-07-15 14:25',qudao:'第二渠道'},
{imgSrc:'/static/public/like.png',name:'USER',come:'顾客分享',phone:'18888888888',customer:'恒美植发客服-01',time:'2021-07-15 14:25',qudao:'第二渠道'},
],
showTop:false, showTop:false,
isShowT:false, isShowT:false,
isXiala:true, isXiala:true,
isZhuan:false, isZhuan:false,
xialCurrent:0, xialCurrent:0,
xialone:['全部','顾客分享'], xialone:['全部'],
xialtList:['许嵩','周星驰','周星驰','周星驰','周星驰','许嵩','周星驰','周星驰','周星驰'] xialtList:[],
staff_id:'',//ID
customer_id:'',//ID
page:1,
size:10,
total:'',
isZanw:true,
ntype:''
} }
}, },
onPageScroll(e) { onPageScroll(e) {
e.scrollTop > 360 ? this.showTop = true : this.showTop = false e.scrollTop > 360 ? this.showTop = true : this.showTop = false
}, },
onReachBottom() {// onReachBottom() {//
for (let i = 0; i < 4; i++) { // for (let i = 0; i < 4; i++) {
let obj = {imgSrc:'/static/public/like.png',name:'USER',come:'顾客分享',phone:'18888888888',customer:'恒美植发客服-01',time:'2021-07-15 14:25',qudao:'第二渠道'} // let obj = {imgSrc:'/static/public/like.png',name:'USER',come:'',phone:'18888888888',customer:'-01',time:'2021-07-15 14:25',qudao:''}
this.dataList.push(obj) // this.dataList.push(obj)
// }
if(this.total!=this.dataList.length){
this.page++
this.checkCL()
} else {
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多列表数据')
this.isZanw = false
} }
}, },
onShow() { onShow() {
this.$toolAll.tools.isLogin() this.$toolAll.tools.isLogin()
}, },
onLoad() { onLoad() {
this.category = this.xialone[0] this.checkKF()//
this.checkCL()//
this.checkLY()//
}, },
methods: { methods: {
fenCustomer(){// checkKF(){//
console.log('分配客服调起弹框'); this.$requst.post('user/servicer-list').then(res=>{
// console.log('',res);
if(res.code==0){
if(res.data.length!=0){
res.data.forEach(item=>{
let obj = {
title:item.name,
id:item.id
}
this.xialtList.push(obj)
})
this.staff_id = this.xialtList[0].id
}
}
},error=>{})
},
searchEv(){//
this.page = 1
this.isZanw = true
this.checkCL(this.ntype)
},
checkLY(){//
this.$requst.post('user/channel').then(res=>{
// console.log('',res);
if(res.code==0){
for (let key in res.data) {
let lyObj = {
title:res.data[key],
name:key
}
this.xialone.push(lyObj)
}
this.xialone.unshift({title:"全部",name:'all'})
this.category = this.xialone[0].title
}
},error=>{})
},
checkCL(ntype){//
this.$requst.post('user/customer',{page:this.page,size:this.size,type:ntype}).then(res=>{
// console.log('',res);
if(res.code==0){
if(this.page==1) this.dataList = []
this.total = res.data.total
if(res.data.list.length!=0){
res.data.list.forEach(item=>{
let cuObj = {
id:item.id,
imgSrc:item.headimgurl,
name:item.nickname,
come:item.channel_text,
phone:item.mobile,
customer:item.service[0],
time:item.created_at,
qudao:item.tag[0],
service:item.service
}
this.dataList.push(cuObj)
})
}
}
},error=>{})
},
fenCustomer(index){//
// console.log('');
this.isShowT = true this.isShowT = true
//
this.customer_id = this.dataList[index].id//ID
if(this.xialtList.length==0) this.xialtList = ['暂无可分配客服']
}, },
backTop(){// backTop(){//
uni.pageScrollTo({ uni.pageScrollTo({
@ -97,19 +176,31 @@
}); });
}, },
comfirmev(){// comfirmev(){//
console.log('立即分配'); // console.log('');
this.isShowT = false
this.$requst.post('user/customer-allot',{staff_id:this.staff_id,customer_id:this.customer_id}).then(res=>{
// console.log(':',res);
if(res.code==0){
this.page = 1
this.$toolAll.tools.showToast('分配成功')
this.checkCL(this.ntype)//
}
},error=>{})
},
cancleev(){
this.isShowT = false this.isShowT = false
}, },
openXial(){ openXial(){
this.isZhuan = !this.isZhuan this.isZhuan = !this.isZhuan
console.log('开启下拉'); // console.log('');
}, },
chooseXia(index){ chooseXia(index){
this.xialCurrent = index this.xialCurrent = index
this.category = this.xialone[index] this.ntype = this.xialone[index].name
this.category = this.xialone[index].title
}, },
chooseXiaT(e){ chooseXiaT(e){
console.log(e); this.staff_id = e.id
} }
} }
} }

View File

@ -85,15 +85,18 @@
this.total = res.data.total this.total = res.data.total
res.data.list.forEach(item=>{ res.data.list.forEach(item=>{
let newG = item.diseases let newG = item.diseases
let ndeptName = ''
if(item.doctor_extra.dept_name==undefined || item.doctor_extra.dept_name=='') ndeptName = item.dept_name
else ndeptName = item.doctor_extra.dept_name
let dObj = { let dObj = {
id:item.id, id:item.id,
imgSrc:this.$http + item.headimg,// imgSrc:item.doctor_extra.headimg,//
name:item.name,// name:item.name,//
cyear:item.work_time,// cyear:parseFloat(item.doctor_extra.work_time),//
bmen:item.dept_name,// bmen:ndeptName,//
zcheng:'主任医师', zcheng:'主任医师',
goodAt:item.diseases, goodAt:item.diseases,
show_detail:item.show_detail//10 show_detail:item.doctor_extra.show_detail//10
} }
this.dataList.push(dObj) this.dataList.push(dObj)
}) })

View File

@ -12,9 +12,9 @@
<view class="disac col80 fon24" style="margin: 6rpx 0;"> <view class="disac col80 fon24" style="margin: 6rpx 0;">
<view>{{['未知','男','女'][doctorObj.gender]}}</view> <view>{{['未知','男','女'][doctorObj.gender]}}</view>
<view class="doctorx"></view> <view class="doctorx"></view>
<view>从业{{doctorObj.work_time}}</view> <view>从业{{parseFloat(doctorObj.doctor_extra.work_time)}}</view>
<view v-if="doctorObj.dept_name!=''" class="doctorx"></view> <view v-if="doctorObj.doctor_extra.dept_name!='' && doctorObj.doctor_extra.dept_name!=undefined" class="doctorx"></view>
<view>{{doctorObj.dept_name}}</view> <view>{{doctorObj.doctor_extra.dept_name}}</view>
</view> </view>
<view class="col80 fon24 disac"> <view class="col80 fon24 disac">
<view class="flexs">擅长领域</view> <view class="flexs">擅长领域</view>
@ -27,12 +27,12 @@
</scroll-view> </scroll-view>
</view> </view>
</view> </view>
<image class="radius10" :src="doctorObj.headimg || moImg" style="width: 246rpx;height: 188rpx;" mode="aspectFill"></image> <image class="radius10" :src="doctorObj.doctor_extra.headimg || moImg" style="width: 246rpx;height: 188rpx;" mode="aspectFill"></image>
</view> </view>
<view class="mar-z32"> <view class="mar-z32">
<view class="bbot mar-s30"></view> <view class="bbot mar-s30"></view>
<view class="fon28 bold col3 mar-sx20">个人简介</view> <view class="fon28 bold col3 mar-sx20">个人简介</view>
<view class="fon26 col3" style="line-height: 37rpx;">{{doctorObj.summary}}</view> <view class="fon26 col3" style="line-height: 37rpx;">{{doctorObj.doctor_extra.summary}}</view>
</view> </view>
</view> </view>
<view id="daoh" :class="isTop?'isTop':''" class="isTops" :style="{top:(statusHNH-10)+'px'}"> <view id="daoh" :class="isTop?'isTop':''" class="isTops" :style="{top:(statusHNH-10)+'px'}">
@ -40,7 +40,7 @@
<cate-pu :newCurrent="newCurrent*1" :activeb="publicColor" @choosecateEv="chooseTwo" :newbmo="'#F2F2F2'" :isCenter="false" :newcateList="cateList"></cate-pu> <cate-pu :newCurrent="newCurrent*1" :activeb="publicColor" @choosecateEv="chooseTwo" :newbmo="'#F2F2F2'" :isCenter="false" :newcateList="cateList"></cate-pu>
</view> </view>
</view> </view>
<view class="mar-zy32 mar-s20" v-if="dataList.length!=0"><list-pu :list="dataList"></list-pu></view> <view class="mar-zy32 mar-s20" v-if="dataList.length!=0"><list-pu @chooseLike="chooseLike" @comfirmev="comfirmev" :list="dataList"></list-pu></view>
<view style="margin-top: 30%;" v-if="dataList.length==0"><list-pu :list="dataList"></list-pu></view> <view style="margin-top: 30%;" v-if="dataList.length==0"><list-pu :list="dataList"></list-pu></view>
</view> </view>
<view class="pad-zy20 mar-sx30"> <view class="pad-zy20 mar-sx30">
@ -51,6 +51,7 @@
</template> </template>
<script> <script>
import {collectionEV,cancleCollectionEV} from '@/jsFile/publicAPI.js';
export default { export default {
data() { data() {
return { return {
@ -75,7 +76,7 @@
total:'',// total:'',//
isZanw:true, isZanw:true,
chuTop:'', chuTop:'',
isTop:false isTop:false,
} }
}, },
onPageScroll(e) { onPageScroll(e) {
@ -84,9 +85,10 @@
else this.isTop = false else this.isTop = false
}, },
onReachBottom() {// onReachBottom() {//
console.log(this.total,this.dataList.length); // console.log(this.total,this.dataList.length);
if(this.total!=this.dataList.length){ if(this.total!=this.dataList.length){
this.page++ this.page++
if(this.category_id==0) this.category_id = this.cateList[0].id
this.checkConList(this.category_id)// this.checkConList(this.category_id)//
} else { } else {
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多列表','none',1000) if(this.isZanw) this.$toolAll.tools.showToast('暂无更多列表','none',1000)
@ -95,18 +97,31 @@
}, },
onShow() { onShow() {
this.$toolAll.tools.isLogin() this.$toolAll.tools.isLogin()
this.checkConList(this.category_id)
}, },
onLoad(options) { onLoad(options) {
this.checkDoD(options.doctor_id) this.checkDoD(options.doctor_id)
this.checkConList(this.category_id)
const query = wx.createSelectorQuery() const query = wx.createSelectorQuery()
query.select('#daoh').boundingClientRect((rect) => { query.select('#daoh').boundingClientRect((rect) => {
// console.log('+',rect);
this.chuTop = rect.top this.chuTop = rect.top
}).exec() }).exec()
}, },
methods: { methods: {
chooseLike(e){//
// console.log(this.dataList[e].is_collected);
if(this.dataList[e].is_collected==0){
this.dataList[e].is_collected = 1
//
collectionEV({action:'collect',archive_id:this.dataList[e].id})
}
},
comfirmev(e){//
this.dataList[e].is_collected = 0
this.$toolAll.tools.showToast('正在取消...','loading')
//
cancleCollectionEV({action:'collect',archive_id:this.dataList[e].id})
},
checkDoD(doctor_id){ checkDoD(doctor_id){
this.$requst.post('user/doctor-info',{doctor_id:doctor_id}).then(res=>{ this.$requst.post('user/doctor-info',{doctor_id:doctor_id}).then(res=>{
// console.log('',res); // console.log('',res);
@ -116,7 +131,6 @@
},error=>{}) },error=>{})
}, },
checkConList(category_id){// checkConList(category_id){//
this.$toolAll.tools.showToast('加载中...')
let params = { let params = {
category_id:category_id, category_id:category_id,
page:this.page, page:this.page,
@ -140,18 +154,15 @@
this.cateList.push(cateObj) this.cateList.push(cateObj)
}) })
uni.setStorageSync('cateList',this.cateList) uni.setStorageSync('cateList',this.cateList)
this.category_id = this.cateList[0].id
} }
} else { } else {
// //
this.cateList = uni.getStorageSync('cateList') this.cateList = uni.getStorageSync('cateList')
this.category_id = this.cateList[0].id
} }
// //
if(this.page==1) this.dataList = [] if(this.page==1) this.dataList = []
this.total = res.data.list.total this.total = res.data.list.total
if(res.data.list.list.length!=0){ if(res.data.list.list.length!=0){
uni.hideToast()
res.data.list.list.forEach(item=>{ res.data.list.list.forEach(item=>{
let num = item.video.search(".mp4") let num = item.video.search(".mp4")
let isVideo = false let isVideo = false
@ -184,7 +195,7 @@
this.isZanw = true this.isZanw = true
this.page = 1 this.page = 1
this.category_id = this.cateList[index].id this.category_id = this.cateList[index].id
this.checkConList(this.cateList[index].id) this.checkConList(this.category_id)
}, },
backTop(){// backTop(){//
uni.pageScrollTo({ uni.pageScrollTo({

View File

@ -61,9 +61,9 @@
}, },
onShow() { onShow() {
this.$toolAll.tools.isLogin() this.$toolAll.tools.isLogin()
this.checkConList(this.category_id)
}, },
onLoad() { onLoad() {
this.checkConList(this.category_id)
const query = wx.createSelectorQuery() const query = wx.createSelectorQuery()
query.select('#daoh').boundingClientRect((rect) => { query.select('#daoh').boundingClientRect((rect) => {
// console.log('+',rect); // console.log('+',rect);

View File

@ -178,7 +178,8 @@
detailInfo:'',// detailInfo:'',//
category_id:'',//ID category_id:'',//ID
active:'',// active:'',//
jieDuan:false jieDuan:false,
share_id:0
} }
}, },
onPageScroll(e) { onPageScroll(e) {
@ -208,7 +209,7 @@
var ya = this; var ya = this;
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}`, // /     path: `/pagesB/problemDetail/problemDetail?id=${this.detailObj.id}&category_id=${this.category_id}&share_id=${uni.getStorageSync('userId')}`, // /
    imageUrl: '', //PNGJPG imageUrl 使 5:4     imageUrl: '', //PNGJPG imageUrl 使 5:4
    success: function(res){     success: function(res){
      //       //
@ -236,11 +237,15 @@
}, },
onShow() { onShow() {
this.$toolAll.tools.isLogin() this.$toolAll.tools.isLogin()
setTimeout(()=>{
this.choosecateEv(this.cateCurrent)
},500)
}, },
onLoad(options) { onLoad(options) {
if(options.category_id!=undefined) { if(options.category_id!=undefined) {
this.category_id = options.category_id this.category_id = options.category_id
this.conid = options.id this.conid = options.id
this.share_id = options.share_id
} }
this.checkDetail(options.id) this.checkDetail(options.id)
let maiOjb = { let maiOjb = {
@ -348,7 +353,7 @@
} }
}, },
checkDetail(newId){ checkDetail(newId){
this.$requst.post('archives/detail',{id:newId}).then(res=>{ this.$requst.post('archives/detail',{id:newId,share_id:this.share_id}).then(res=>{
// console.log('',res); // console.log('',res);
if(res.code==0){ if(res.code==0){
this.isLoading=true this.isLoading=true

View File

@ -6,7 +6,7 @@
<view class="search-input-box bacf" :style="{paddingTop: statusHNH+'px'}"> <view class="search-input-box bacf" :style="{paddingTop: statusHNH+'px'}">
<view class="disac pad-zy30 mar-s20"> <view class="disac pad-zy30 mar-s20">
<!-- 输入框 --> <!-- 输入框 -->
<input style="border: 2rpx solid #E0E0E0;padding: 10rpx 20rpx;" class="width100 fon28 radius10" type="text" v-model="searchVal" placeholder="请输入问题/病种/医生姓名"/> <input @confirm="searchEv" style="border: 2rpx solid #E0E0E0;padding: 10rpx 20rpx;" class="width100 fon28 radius10" type="text" v-model="searchVal" placeholder="请输入问题/病种/医生姓名"/>
<!-- 搜索 --> <!-- 搜索 -->
<view @tap="searchEv" class="flexs mar-z30 radius10 pad-sx10 pad-zy40 fon28 colf" :style="{background:publicColor}">搜索</view> <view @tap="searchEv" class="flexs mar-z30 radius10 pad-sx10 pad-zy40 fon28 colf" :style="{background:publicColor}">搜索</view>
</view> </view>
@ -58,11 +58,11 @@
title:'热门搜索', title:'热门搜索',
src:'', src:'',
list:[ list:[
{content:'秃顶种植需要的条件'}, // {content:''},
{content:'眉毛种植的是什么'}, // {content:''},
{content:'那些人能种植'}, // {content:''},
{content:'眉毛种植需要多少钱'}, // {content:''},
{content:'那些人能种植'}, // {content:''},
] ]
}, },
], ],
@ -104,12 +104,29 @@
this.searchEv() this.searchEv()
} }
this.checkSearchHistory() this.checkSearchHistory()
this.checkKey()
}, },
onShow() { onShow() {
this.$toolAll.tools.isLogin() this.$toolAll.tools.isLogin()
if(this.searchVal!=undefined && this.searchVal!='') this.searchEv() if(this.searchVal!=undefined && this.searchVal!='') this.searchEv()
}, },
methods: { methods: {
checkKey(){//
this.$requst.get('index/hot-keywords').then(res=>{
// console.log('',res);
if(res.code==0){
if(res.data.length!=0){
res.data.forEach(item=>{
let reObj = {
id:item.id,
content:item.keyword
}
this.reSearchList[1].list.push(reObj)
})
}
}
},error=>{})
},
chooseLike(e){// chooseLike(e){//
// console.log(this.dataList[e].is_collected); // console.log(this.dataList[e].is_collected);
if(this.dataList[e].is_collected==0){ if(this.dataList[e].is_collected==0){

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

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