修改病种title
parent
7d8d4e26b1
commit
664ddebb63
1
App.vue
1
App.vue
|
@ -16,6 +16,7 @@
|
|||
setTimeout(()=>{
|
||||
toolAll.tools.overdue()//查询是否第一次授权
|
||||
},3000)
|
||||
toolAll.tools.isVedio();
|
||||
// checkSwip()//查询轮播图位置
|
||||
},
|
||||
onHide: function() {
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
.list-box{width: 48.4%;}
|
||||
.list-like-box{top: 18rpx;right: 18rpx;z-index: 1;}
|
||||
.list-like-box>image{width: 69rpx;height: 69rpx;}
|
||||
.list-cont-box{bottom: 10rpx;left: 0rpx;right: 0; padding-top: 100rpx; background:-webkit-linear-gradient(bottom,rgba(0,0,0,0.79),rgba(255,255,255,0));padding-left: 22rpx;padding-right: 22rpx;padding-bottom: 18rpx;border-bottom-left-radius: 30rpx;border-bottom-right-radius: 30rpx;}
|
||||
.list-cont-box{bottom: 6rpx;left: 0rpx;right: 0; padding-top: 100rpx; background:-webkit-linear-gradient(bottom,rgba(0,0,0,0.79),rgba(255,255,255,0));padding-left: 22rpx;padding-right: 22rpx;padding-bottom: 18rpx;border-bottom-left-radius: 30rpx;border-bottom-right-radius: 30rpx;}
|
||||
.list-cont-box15{bottom: 10rpx;left: 0rpx;right: 0; padding-top: 100rpx; background:-webkit-linear-gradient(bottom,rgba(0,0,0,0.79),rgba(255,255,255,0));padding-left: 22rpx;padding-right: 22rpx;padding-bottom: 18rpx;border-bottom-left-radius: 15rpx;border-bottom-right-radius: 15rpx;}
|
||||
.list-headimg{width: 28rpx;height: 28rpx;margin-right: 6rpx;border-radius: 100%;}
|
||||
/* 分类 */
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
<template>
|
||||
<view v-if="showPhone" @touchmove.stop.prevent="moveHandle" class="disjcac posAll">
|
||||
<view class="bacf radius20 width100 tank-box">
|
||||
<view class="tc tank-box-itemone">请授权绑定手机号</view>
|
||||
<view class="fon28 colf pad-x30 pad-zy30 tc disjb">
|
||||
<view class="pad-sx10 radius10 tank-btn" style="background-color: rgba(230, 230, 230,1);color: #000000;">暂不绑定</view>
|
||||
<view class="pad-sx10 radius10 tank-btn posir pbackc">
|
||||
立即绑定
|
||||
<button open-type="getPhoneNumber" @getphonenumber="getphonenumber" class="posia syxzo">立即绑定</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name:"wx_auth_phone",
|
||||
data() {
|
||||
return {
|
||||
showPhone:true
|
||||
};
|
||||
},
|
||||
methods:{
|
||||
moveHandle(){//禁止底层滑动
|
||||
return false
|
||||
},
|
||||
getphonenumber(e){//授权绑定手机号
|
||||
if(e.detail.errMsg=="getPhoneNumber:ok"){
|
||||
this.$requst.post('user/bind-phone',{iv:e.detail.iv,encryptedData:e.detail.encryptedData}).then(res=>{
|
||||
// console.log('手机号信息:',res);
|
||||
if(res.code==0){
|
||||
this.showPhone = false;
|
||||
this.$toolAll.tools.showToast('手机号绑定成功','success');
|
||||
}
|
||||
},error=>{})
|
||||
} else {
|
||||
console.log('用户拒绝');
|
||||
this.showPhone = true;
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
|
@ -16,7 +16,8 @@
|
|||
<!-- 视频标题 -->
|
||||
<view class="fon30 bold mar-x10 disac" :style="{fontSize:nFon+'px'}">
|
||||
<view class="clips1">{{item.title}}</view>
|
||||
<text v-if="item.isVideo" :style="{fontSize:(nFon-2)+'px',marginLeft:nmarz+'px'}" style="border-radius: 5rpx;padding: 0 6rpx;text-align: center;" class="pbackc flexs">视频</text></view>
|
||||
<text v-if="item.isVideo && isVedio" :style="{fontSize:(nFon-2)+'px',marginLeft:nmarz+'px'}" style="border-radius: 5rpx;padding: 0 6rpx;text-align: center;" class="pbackc flexs">视频</text>
|
||||
</view>
|
||||
<!-- 视频描述 -->
|
||||
<view class="mar-x10 clips1 opc">{{item.content}}</view>
|
||||
<view class="disac">
|
||||
|
@ -26,7 +27,7 @@
|
|||
<view class="clips1 opc">{{item.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<image v-if="item.isVideo" :style="{width:nWidth+'rpx',height:nHeight+'rpx'}" class="posia" style="top: 50%;left: 50%;transform: translate(-50%,-50%);" src="/static/public/video.png" mode=""></image>
|
||||
<image v-if="item.isVideo && isVedio" :style="{width:nWidth+'rpx',height:nHeight+'rpx'}" class="posia" style="top: 50%;left: 50%;transform: translate(-50%,-50%);" src="/static/public/video.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 右侧列表 -->
|
||||
|
@ -44,7 +45,7 @@
|
|||
<!-- 视频标题 -->
|
||||
<view class="fon30 bold mar-x10 disac" :style="{fontSize:nFon+'px'}">
|
||||
<view class="clips1">{{item.title}}</view>
|
||||
<text v-if="item.isVideo" :style="{fontSize:(nFon-2)+'px',marginLeft:nmarz+'px'}" style="border-radius: 5rpx;padding: 0 6rpx;text-align: center;" class="pbackc flexs">视频</text>
|
||||
<text v-if="item.isVideo && isVedio" :style="{fontSize:(nFon-2)+'px',marginLeft:nmarz+'px'}" style="border-radius: 5rpx;padding: 0 6rpx;text-align: center;" class="pbackc flexs">视频</text>
|
||||
</view>
|
||||
<!-- 视频描述 -->
|
||||
<view class="mar-x10 clips1 opc">{{item.content}}</view>
|
||||
|
@ -55,7 +56,7 @@
|
|||
<view class="clips1 opc">{{item.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<image v-if="item.isVideo" :style="{width:nWidth+'rpx',height:nHeight+'rpx'}" class="posia" style="top: 50%;left: 50%;transform: translate(-50%,-50%);" src="/static/public/video.png" mode=""></image>
|
||||
<image v-if="item.isVideo && isVedio" :style="{width:nWidth+'rpx',height:nHeight+'rpx'}" class="posia" style="top: 50%;left: 50%;transform: translate(-50%,-50%);" src="/static/public/video.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -111,7 +112,7 @@
|
|||
isShowT:false,
|
||||
pu_content:'是否需要取消收藏?',
|
||||
current:'-1',
|
||||
jieDuan:false
|
||||
isVedio:uni.getStorageSync('isVedio')
|
||||
};
|
||||
},
|
||||
methods:{
|
||||
|
@ -119,35 +120,23 @@
|
|||
if(e==0) this.vision = false
|
||||
},
|
||||
goDetail(index){//查看详情
|
||||
if(this.jieDuan==false){
|
||||
let isAuth = this.$toolAll.tools.returnAuth()
|
||||
if(!isAuth){
|
||||
uni.navigateTo({
|
||||
// url:'/pagesB/problemDetail/problemDetail?isCate='+this.list[index].isCate
|
||||
url:'/pagesB/problemDetail/problemDetail?id='+this.list[index].id+'&category_id='+this.list[index].category_id
|
||||
})
|
||||
} else this.jieDuan = true
|
||||
}
|
||||
uni.navigateTo({
|
||||
url:'/pagesB/problemDetail/problemDetail?id='+this.list[index].id+'&category_id='+this.list[index].category_id
|
||||
})
|
||||
},
|
||||
chooseLike(index){//喜欢不喜欢事件
|
||||
// console.log('喜欢不喜欢:',index);
|
||||
if(this.jieDuan==false){
|
||||
let isAuth = this.$toolAll.tools.returnAuth()
|
||||
if(!isAuth){
|
||||
// this.$emit('chooseLike',this.list[index].id)
|
||||
this.$emit('chooseLike',index)
|
||||
this.current = index
|
||||
if(this.list[index].is_collected==1) {
|
||||
this.isShowT = true
|
||||
} else {
|
||||
let maiOjb = {
|
||||
e:3,//内容收藏
|
||||
c:this.list[index].id,
|
||||
t:new Date().getTime()//当前时间戳
|
||||
}
|
||||
this.$toolAll.tools.maiDian(maiOjb)
|
||||
}
|
||||
} else this.jieDuan = true
|
||||
chooseLike(index){//喜欢事件
|
||||
// console.log('喜欢:',index);
|
||||
this.$emit('chooseLike',index);
|
||||
this.current = index;
|
||||
if(this.list[index].is_collected==1) {
|
||||
this.isShowT = true
|
||||
} else {
|
||||
let maiOjb = {
|
||||
e:3,//内容收藏
|
||||
c:this.list[index].id,
|
||||
t:new Date().getTime()//当前时间戳
|
||||
}
|
||||
this.$toolAll.tools.maiDian(maiOjb)
|
||||
}
|
||||
},
|
||||
comfirmev(){
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<swiper-item v-for="(item,index) in bannerList" :key="index">
|
||||
<view @tap="chooseImg(index)" class="posir">
|
||||
<image :style="{borderRadius:newRadius+'px',height:newHeight+'px'}" class="img" :src="item.imgSrc" mode="aspectFill"></image>
|
||||
<image @tap.stop="playVideo(index)" v-if="item.isVideo" class="posia" style="top: 50%;left: 50%;transform: translate(-50%,-50%);width: 126rpx;height: 126rpx;z-index: 1;" src="/static/public/video.png" mode=""></image>
|
||||
<image @tap.stop="playVideo(index)" v-if="item.isVideo && isVedio" class="posia" style="top: 50%;left: 50%;transform: translate(-50%,-50%);width: 126rpx;height: 126rpx;z-index: 1;" src="/static/public/video.png" mode=""></image>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
|
@ -64,6 +64,7 @@
|
|||
bcurrent:0,
|
||||
isShowVideo:false,
|
||||
autoplay:false,
|
||||
isVedio:uni.getStorageSync('isVedio')
|
||||
};
|
||||
},
|
||||
methods:{
|
||||
|
@ -73,12 +74,22 @@
|
|||
if(this.browseP){
|
||||
let imgList = []
|
||||
this.bannerList.forEach(item=>{
|
||||
let nurl = ''
|
||||
item.url=='' ? nurl = item.imgSrc : nurl = item.url
|
||||
let obj = {
|
||||
url:nurl,
|
||||
type:item.isVideo?'video':'image',
|
||||
poster:item.poster
|
||||
let nurl = '';
|
||||
let obj = {}
|
||||
if(this.isVedio) {
|
||||
item.url=='' ? nurl = item.imgSrc : nurl = item.url
|
||||
obj = {
|
||||
url:nurl,
|
||||
type:item.isVideo?'video':'image',
|
||||
poster:item.poster
|
||||
}
|
||||
} else {
|
||||
nurl = item.imgSrc
|
||||
obj = {
|
||||
url:nurl,
|
||||
type:'image',
|
||||
poster:item.poster
|
||||
}
|
||||
}
|
||||
imgList.push(obj)
|
||||
})
|
||||
|
|
|
@ -6,13 +6,13 @@ const tools = {
|
|||
daoTime(){
|
||||
let daoTime = uni.getStorageSync('daoTime')
|
||||
if(daoTime==''){//初次判断倒计时是否为空
|
||||
uni.setStorageSync('daoTime',600)//设置倒计时
|
||||
uni.setStorageSync('daoTime',60)//设置倒计时
|
||||
daoTime = uni.getStorageSync('daoTime')
|
||||
this.timer = setInterval(()=>{
|
||||
uni.setStorageSync('daoTime',daoTime--)//设置倒计时
|
||||
// console.log('埋点倒计时初次:',daoTime);
|
||||
// console.log('埋点长度初次:',uni.getStorageSync('maiList').length);
|
||||
if(uni.getStorageSync('daoTime')<=0 || uni.getStorageSync('maiList').length==20){
|
||||
if(uni.getStorageSync('daoTime')<=0 || uni.getStorageSync('maiList').length==5){
|
||||
uni.removeStorageSync('daoTime')//清空倒计时
|
||||
clearInterval(this.timer)//关闭倒计时
|
||||
// console.log('上/报,埋点');
|
||||
|
@ -26,7 +26,7 @@ const tools = {
|
|||
uni.setStorageSync('daoTime',daoTime--)//设置倒计时
|
||||
// console.log('埋点倒计时:',daoTime);
|
||||
// console.log('埋点长度:',uni.getStorageSync('maiList').length);
|
||||
if(uni.getStorageSync('daoTime')<=0 || uni.getStorageSync('maiList').length==20){
|
||||
if(uni.getStorageSync('daoTime')<=0 || uni.getStorageSync('maiList').length==5){
|
||||
uni.removeStorageSync('daoTime')//清空倒计时
|
||||
clearInterval(this.timer)//关闭倒计时
|
||||
// console.log('上报,埋点');
|
||||
|
@ -322,6 +322,28 @@ const tools = {
|
|||
if(uni.getStorageSync('is_active')!='' && uni.getStorageSync('is_active') !=0){
|
||||
this.overdue()
|
||||
}
|
||||
},
|
||||
isVedio(){//是否显示视频内容
|
||||
uni.request({
|
||||
url: `https://hm.hmzfyy.cn/api/index/base-config`,
|
||||
method: 'get',
|
||||
header: {
|
||||
'Content-Type': 'application/json; charset=UTF-8',
|
||||
// "content-type": "application/x-www-form-urlencoded;charset=UTF-8",
|
||||
'Authorization': 'Bearer '+uni.getStorageSync('token') || ''
|
||||
},
|
||||
success: res => {
|
||||
// console.log(res);
|
||||
if(res.data.code==0){
|
||||
if(res.data.data.v==0) {
|
||||
uni.setStorageSync('isVedio',false);
|
||||
} else {
|
||||
uni.setStorageSync('isVedio',true);
|
||||
}
|
||||
// console.log(uni.getStorageSync('isVedio/'));
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
5
main.js
5
main.js
|
@ -16,7 +16,10 @@ import nothingPage from './components/nothing-page.vue'//引入无内容组件
|
|||
Vue.component('nothing-page',nothingPage)//全局注册无内容组件
|
||||
import publicCustomer from './components/public-customer.vue'//引入客服组件
|
||||
Vue.component('public-customer',publicCustomer)//全局注册客服组件
|
||||
|
||||
import authPhone from './components/auth-phone.vue'//引入手机授权组件
|
||||
Vue.component('auth-phone',authPhone)//全局注册手机授权组件
|
||||
import empower from './components/empower.vue'//引入用户授权组件
|
||||
Vue.component('empower',empower)//全局注册用户授权组件
|
||||
|
||||
|
||||
// 常用工具
|
||||
|
|
|
@ -47,6 +47,10 @@
|
|||
<foot-tab :titleList="titleList" :imgList="imgList" :newcurrent='1'></foot-tab>
|
||||
<!-- 返回顶部 -->
|
||||
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
|
||||
<!-- 弹框授权 -->
|
||||
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
|
||||
<!-- 弹框 -->
|
||||
<auth-phone v-if="isShowP"></auth-phone>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -85,7 +89,9 @@
|
|||
bannerList:[],
|
||||
titleList:[],
|
||||
imgList:[],
|
||||
isAutoPlay:false
|
||||
isAutoPlay:false,
|
||||
vision:false,
|
||||
isShowP:false,
|
||||
}
|
||||
},
|
||||
onPageScroll(e) {
|
||||
|
@ -106,7 +112,13 @@
|
|||
onUnload() {
|
||||
this.isAutoPlay = false;
|
||||
},
|
||||
onLoad() {
|
||||
onLoad(options) {
|
||||
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
|
||||
if(options.invite_code!='' && options.invite_code!=undefined){
|
||||
this.loginEv(options.invite_code);
|
||||
} else if(options.source_code!='' && options.source_code!=undefined){
|
||||
this.loginEv('',options.source_code,options.channel);
|
||||
}
|
||||
this.checkBZ()//调用病种列表事件
|
||||
let maiOjb = {
|
||||
e:7,//进入分类
|
||||
|
@ -124,6 +136,34 @@
|
|||
this.isAutoPlay = true;
|
||||
},
|
||||
methods: {
|
||||
loginEv(invite_code='',source='',channel=''){
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (res)=> {
|
||||
if (res.code) {
|
||||
var params = {
|
||||
code:res.code,
|
||||
invite_code:invite_code,//用户邀请码
|
||||
source_code:source,
|
||||
channel:channel
|
||||
}
|
||||
this.$requst.post('user/login',params).then(res => {
|
||||
if(res.data.token!=''){
|
||||
if(res.data.is_active==0) {
|
||||
this.vision = true;
|
||||
}
|
||||
}
|
||||
},error => {})
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
buttonH(e){//授权成功
|
||||
if(e) {
|
||||
this.vision = false;
|
||||
this.isShowP = true;
|
||||
}
|
||||
},
|
||||
checkSwi(){
|
||||
checkBanner({position:'category-hot-banner'}).then(res=>{
|
||||
if(res.code==0){
|
||||
|
@ -236,10 +276,11 @@
|
|||
name:item.published_by || '恒美植发',//发布者昵称
|
||||
isVideo:item.video.includes(".mp4")//是否是视频
|
||||
}
|
||||
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)
|
||||
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)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -83,23 +83,22 @@
|
|||
</view>
|
||||
<!-- 底部tab -->
|
||||
<foot-tab :titleList="titleList" :imgList="imgList" :newcurrent='4'></foot-tab>
|
||||
<!-- 弹框授权 -->
|
||||
<empower :vision="vision" @cancleEv="cancleEv"></empower>
|
||||
<view v-if="isQian" style="position: fixed;top: 50%;left: 50%;transform: translate(-50%,-50%);">
|
||||
<view style="padding: 20rpx 40rpx;background-color: rgba(0,0,0,.6);color: #FFFFFF;border-radius: 6rpx;">签到成功</view>
|
||||
</view>
|
||||
<!-- 弹框授权 -->
|
||||
<empower :vision="vision"></empower>
|
||||
<!-- 弹框 -->
|
||||
<auth-phone v-if="isShowP"></auth-phone>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {base64ToPath} from '@/jsFile/base64-src.js';
|
||||
import empower from '@/components/empower.vue';
|
||||
import {checkBanner} from '@/jsFile/publicAPI.js';
|
||||
export default {
|
||||
components:{empower},
|
||||
data() {
|
||||
return {
|
||||
vision:false,
|
||||
statusHNH:uni.getStorageSync('statusHNH'),
|
||||
publicColor:uni.getStorageSync('publicColor'),
|
||||
tongList:[
|
||||
|
@ -139,7 +138,9 @@
|
|||
isAuth:'',
|
||||
guanggao:'',
|
||||
timer:null,
|
||||
nonce_str:''
|
||||
nonce_str:'',
|
||||
vision:false,
|
||||
isShowP:false,
|
||||
}
|
||||
},
|
||||
onUnload: function() {
|
||||
|
@ -193,7 +194,13 @@
|
|||
}
|
||||
},error=>{})
|
||||
},
|
||||
onLoad() {
|
||||
onLoad(options) {
|
||||
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
|
||||
if(options.invite_code!='' && options.invite_code!=undefined){
|
||||
this.loginEv(options.invite_code);
|
||||
} else if(options.source_code!='' && options.source_code!=undefined){
|
||||
this.loginEv('',options.source_code,options.channel);
|
||||
}
|
||||
if(uni.getStorageSync('gao')==''){
|
||||
const query = wx.createSelectorQuery()
|
||||
query.select('.gao').boundingClientRect((rect) => {
|
||||
|
@ -204,6 +211,34 @@
|
|||
this.checkSwi()
|
||||
},
|
||||
methods: {
|
||||
loginEv(invite_code='',source='',channel=''){
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (res)=> {
|
||||
if (res.code) {
|
||||
var params = {
|
||||
code:res.code,
|
||||
invite_code:invite_code,//用户邀请码
|
||||
source_code:source,
|
||||
channel:channel
|
||||
}
|
||||
this.$requst.post('user/login',params).then(res => {
|
||||
if(res.data.token!=''){
|
||||
if(res.data.is_active==0) {
|
||||
this.vision = true;
|
||||
}
|
||||
}
|
||||
},error => {})
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
buttonH(e){//授权成功
|
||||
if(e) {
|
||||
this.vision = false;
|
||||
this.isShowP = true;
|
||||
}
|
||||
},
|
||||
tuneUpqr(){//调起二维码弹框
|
||||
this.isQrcode = true;
|
||||
this.checkGM();
|
||||
|
@ -250,9 +285,6 @@
|
|||
}
|
||||
})
|
||||
},
|
||||
cancleEv(e){
|
||||
if(e==0) this.vision = false
|
||||
},
|
||||
checkGM(){//查询个人二维码事件
|
||||
this.$requst.post('user/personal-qr').then(res=>{
|
||||
// console.log('个人二维码:',res);
|
||||
|
|
|
@ -175,7 +175,6 @@
|
|||
var ya = this;
|
||||
let maiOjb = {
|
||||
e:6,//内容分享
|
||||
c:this.detailObj.id*1,
|
||||
t:new Date().getTime()//当前时间戳
|
||||
}
|
||||
this.$toolAll.tools.maiDian(maiOjb)
|
||||
|
@ -186,39 +185,11 @@
|
|||
return shareObj;
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options.invite_code!=undefined) {
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (res)=> {
|
||||
var params = {
|
||||
code:res.code,
|
||||
invite_code:options.invite_code,//用户邀请码
|
||||
}
|
||||
this.$requst.post('user/login',params).then(res => {console.log('调用成功');},error => {})
|
||||
},
|
||||
});
|
||||
if(options.source_code!='' && options.source_code!=undefined){
|
||||
this.loginEv(options);
|
||||
}
|
||||
console.log(options.invite_code);
|
||||
if(options.invite_code!='' && options.invite_code!=undefined){
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (res)=> {
|
||||
if (res.code) {
|
||||
var params = {
|
||||
code:res.code,
|
||||
invite_code:options.invite_code,//用户邀请码
|
||||
}
|
||||
this.$requst.post('user/login',params).then(res => {
|
||||
if(res.data.token!=''){
|
||||
if(res.data.is_active==0) {
|
||||
this.haveImg = false
|
||||
this.vision = true
|
||||
}
|
||||
}
|
||||
},error => {})
|
||||
}
|
||||
},
|
||||
});
|
||||
this.loginEv(options);
|
||||
}
|
||||
const query = wx.createSelectorQuery()
|
||||
query.select('.statusHNH').boundingClientRect((rect) => {
|
||||
|
@ -226,14 +197,28 @@
|
|||
uni.setStorageSync('statusHNH',rect.height)
|
||||
this.statusHNH = rect.height
|
||||
}).exec()
|
||||
this.checkBCate()
|
||||
this.checkKey()
|
||||
this.checkSwi()//查询轮播图
|
||||
this.checkBCate();
|
||||
this.checkKey();
|
||||
this.checkSwi();//查询轮播图
|
||||
// this.checkBanner()//调用轮播图查询事件
|
||||
this.$toolAll.tools.buriedPointAll()//查询需要埋点的事件id
|
||||
this.checkUserInfo();
|
||||
},
|
||||
methods: {
|
||||
loginEv(option){
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (res)=> {
|
||||
var params = {
|
||||
code:res.code,
|
||||
invite_code:option.invite_code || '',//用户邀请码
|
||||
source_code:option.source_code || '',
|
||||
channel:option.channel || ''
|
||||
}
|
||||
this.$requst.post('user/login',params).then(res => {console.log('调用成功');},error => {})
|
||||
},
|
||||
});
|
||||
},
|
||||
checkUserInfo(){
|
||||
this.$requst.post('user/info').then(res=>{
|
||||
if(res.code==0){
|
||||
|
@ -454,32 +439,6 @@
|
|||
// 调用取消收藏事件
|
||||
cancleCollectionEV({action:'collect',archive_id:this.dataList[e].id})
|
||||
},
|
||||
// chooseLike(e){//收藏事件
|
||||
// // log(this.dataList[e].is_collected);
|
||||
// let active = ''
|
||||
// this.dataList.forEach((item,index)=>{
|
||||
// if(e==item.id){
|
||||
// active = index
|
||||
// }
|
||||
// })
|
||||
// if(this.dataList[active].is_collected==0){
|
||||
// this.dataList[active].is_collected = 1
|
||||
// // 调用收藏事件
|
||||
// collectionEV({action:'collect',archive_id:e})
|
||||
// }
|
||||
// },
|
||||
// comfirmev(e){//确认取消收藏事件
|
||||
// let active = ''
|
||||
// this.dataList.forEach((item,index)=>{
|
||||
// if(e==item.id){
|
||||
// active = index
|
||||
// }
|
||||
// })
|
||||
// this.dataList[active].is_collected = 0
|
||||
// this.$toolAll.tools.showToast('正在取消...','loading')
|
||||
// // 调用取消收藏事件
|
||||
// cancleCollectionEV({action:'collect',archive_id:e})
|
||||
// },
|
||||
chooseGon(index){//宫格事件
|
||||
if(!this.jieDuan){
|
||||
let isAuth = this.$toolAll.tools.returnAuth()
|
||||
|
|
|
@ -30,6 +30,10 @@
|
|||
<public-customer :nbottom="100"></public-customer>
|
||||
<!-- 返回顶部 -->
|
||||
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
|
||||
<!-- 弹框授权 -->
|
||||
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
|
||||
<!-- 弹框 -->
|
||||
<auth-phone v-if="isShowP"></auth-phone>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -38,7 +42,7 @@
|
|||
import {checkBanner} from '@/jsFile/publicAPI.js';
|
||||
export default {
|
||||
components:{
|
||||
swiperPu
|
||||
swiperPu,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -67,7 +71,9 @@
|
|||
total:'',//总数
|
||||
isZanw:true,
|
||||
bannerList:[],
|
||||
isAutoPlay:false
|
||||
isAutoPlay:false,
|
||||
vision:false,
|
||||
isShowP:false,
|
||||
}
|
||||
},
|
||||
onPageScroll(e) {
|
||||
|
@ -92,11 +98,45 @@
|
|||
onUnload() {
|
||||
this.isAutoPlay = false;
|
||||
},
|
||||
onLoad() {
|
||||
onLoad(options) {
|
||||
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
|
||||
if(options.invite_code!='' && options.invite_code!=undefined){
|
||||
this.loginEv(options.invite_code);
|
||||
} else if(options.source_code!='' && options.source_code!=undefined){
|
||||
this.loginEv('',options.source_code,options.channel);
|
||||
}
|
||||
this.checkAbout(this.category_id)
|
||||
this.checkSwi()
|
||||
},
|
||||
methods: {
|
||||
loginEv(invite_code='',source='',channel=''){
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (res)=> {
|
||||
if (res.code) {
|
||||
var params = {
|
||||
code:res.code,
|
||||
invite_code:invite_code,//用户邀请码
|
||||
source_code:source,
|
||||
channel:channel
|
||||
}
|
||||
this.$requst.post('user/login',params).then(res => {
|
||||
if(res.data.token!=''){
|
||||
if(res.data.is_active==0) {
|
||||
this.vision = true;
|
||||
}
|
||||
}
|
||||
},error => {})
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
buttonH(e){//授权成功
|
||||
if(e) {
|
||||
this.vision = false
|
||||
this.isShowP = true
|
||||
}
|
||||
},
|
||||
checkSwi(){
|
||||
checkBanner({position:'about-banner'}).then(res=>{
|
||||
if(res.code==0){
|
||||
|
|
|
@ -57,31 +57,17 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<empower @buttonH="buttonH" :vision="vision" :isWhere="2" @cancleEv="cancleEv"></empower>
|
||||
<!-- 底部客服 -->
|
||||
<public-customer :nbottom="140"></public-customer>
|
||||
<!-- 弹框授权 -->
|
||||
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
|
||||
<!-- 弹框 -->
|
||||
<view v-if="isShowP" @touchmove.stop.prevent="moveHandle" class="disjcac posAll">
|
||||
<view class="bacf radius20 width100 tank-box">
|
||||
<view class="tc tank-box-itemone">请授权绑定手机号</view>
|
||||
<view class="fon28 colf pad-x30 pad-zy30 tc disjb">
|
||||
<view @tap="isShowP=false" class="pad-sx10 radius10 tank-btn" style="background-color: rgba(230, 230, 230,1);color: #000000;">暂不绑定</view>
|
||||
<view class="pad-sx10 radius10 tank-btn posir pbackc">
|
||||
立即绑定
|
||||
<button open-type="getPhoneNumber" @getphonenumber="getphonenumber" class="posia syxzo">立即绑定</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<auth-phone v-if="isShowP"></auth-phone>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import empower from '@/components/empower.vue';
|
||||
export default {
|
||||
components:{
|
||||
empower
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
statusHNH:uni.getStorageSync('statusHNH'),
|
||||
|
@ -96,8 +82,6 @@
|
|||
haveImg:true,
|
||||
detailId:'',//当前关于我们新闻ID
|
||||
invite_code:'',
|
||||
vision:false,
|
||||
isShowP:false,
|
||||
newCurrent:0,
|
||||
cateListTwo:[],
|
||||
dataList:[],
|
||||
|
@ -106,6 +90,8 @@
|
|||
page:1,
|
||||
total:'',//总数
|
||||
isZanw:true,
|
||||
vision:false,
|
||||
isShowP:false,
|
||||
}
|
||||
},
|
||||
onShareAppMessage(res) {
|
||||
|
@ -130,28 +116,14 @@
|
|||
onLoad(options) {
|
||||
this.checkDetail(options.id)
|
||||
this.detailId = options.id
|
||||
this.category_id = options.category_id
|
||||
this.category_id = options.category_id;
|
||||
console.log(uni.getStorageSync('is_active'),'是否已注册');
|
||||
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
|
||||
if(options.invite_code!='' && options.invite_code!=undefined){
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (res)=> {
|
||||
if (res.code) {
|
||||
var params = {
|
||||
code:res.code,
|
||||
invite_code:options.invite_code,//用户邀请码
|
||||
}
|
||||
this.$requst.post('user/login',params).then(res => {
|
||||
if(res.data.token!=''){
|
||||
if(res.data.is_active==0) {
|
||||
this.vision = true
|
||||
this.haveImg = false
|
||||
}
|
||||
}
|
||||
},error => {})
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
this.loginEv(options.invite_code);
|
||||
} else if(options.source_code!='' && options.source_code!=undefined){
|
||||
this.loginEv('',options.source_code,options.channel);
|
||||
}
|
||||
this.checkAbout(this.category_id)
|
||||
},
|
||||
onReachBottom() {//触底事件
|
||||
|
@ -164,6 +136,36 @@
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
loginEv(invite_code='',source='',channel=''){
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (res)=> {
|
||||
if (res.code) {
|
||||
var params = {
|
||||
code:res.code,
|
||||
invite_code:invite_code,//用户邀请码
|
||||
source_code:source,
|
||||
channel:channel
|
||||
}
|
||||
this.$requst.post('user/login',params).then(res => {
|
||||
if(res.data.token!=''){
|
||||
if(res.data.is_active==0) {
|
||||
this.haveImg = false;
|
||||
this.vision = true;
|
||||
}
|
||||
}
|
||||
},error => {})
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
buttonH(e){//授权成功
|
||||
this.haveImg = e
|
||||
if(e) {
|
||||
this.vision = false
|
||||
this.isShowP = true
|
||||
}
|
||||
},
|
||||
checkAbout(category_id){
|
||||
let params = {
|
||||
category_id:category_id,
|
||||
|
@ -218,32 +220,6 @@
|
|||
url:'/pagesB/articleDetail/articleDetail?id='+this.dataList[index].id +"&category_id="+this.category_id
|
||||
})
|
||||
},
|
||||
moveHandle(){//禁止底层滑动
|
||||
return false
|
||||
},
|
||||
getphonenumber(e){//授权绑定手机号
|
||||
if(e.detail.errMsg=="getPhoneNumber:ok"){
|
||||
this.$requst.post('user/bind-phone',{iv:e.detail.iv,encryptedData:e.detail.encryptedData}).then(res=>{
|
||||
// console.log('手机号信息:',res);
|
||||
if(res.code==0){
|
||||
this.isShowP = false
|
||||
this.$toolAll.tools.showToast('手机号绑定成功','success')
|
||||
}
|
||||
},error=>{})
|
||||
} else {
|
||||
this.isShowP = false
|
||||
}
|
||||
},
|
||||
buttonH(e){//授权成功
|
||||
this.haveImg = e
|
||||
if(e) {
|
||||
this.vision = false
|
||||
this.isShowP = true
|
||||
}
|
||||
},
|
||||
cancleEv(e){//取消授权
|
||||
if(e==0) this.vision = false
|
||||
},
|
||||
backHome(){
|
||||
uni.navigateTo({
|
||||
url:'/pages/tabbar/pagehome/pagehome'
|
||||
|
|
|
@ -39,6 +39,10 @@
|
|||
</view>
|
||||
<!-- 底部客服 -->
|
||||
<public-customer :nbottom="100"></public-customer>
|
||||
<!-- 弹框授权 -->
|
||||
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
|
||||
<!-- 弹框 -->
|
||||
<auth-phone v-if="isShowP"></auth-phone>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -55,7 +59,9 @@
|
|||
size:10,
|
||||
total:'',//总数
|
||||
isZanw:true,
|
||||
ntype:''//类型 mine=自己绑定的客户 否则是全部
|
||||
ntype:'',//类型 mine=自己绑定的客户 否则是全部
|
||||
vision:false,
|
||||
isShowP:false,
|
||||
}
|
||||
},
|
||||
onPageScroll(e) {
|
||||
|
@ -73,10 +79,44 @@
|
|||
onShow() {
|
||||
this.$toolAll.tools.isLogin()
|
||||
},
|
||||
onLoad() {
|
||||
onLoad(options) {
|
||||
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
|
||||
if(options.invite_code!='' && options.invite_code!=undefined){
|
||||
this.loginEv(options.invite_code);
|
||||
} else if(options.source_code!='' && options.source_code!=undefined){
|
||||
this.loginEv('',options.source_code,options.channel);
|
||||
}
|
||||
this.checkList()
|
||||
},
|
||||
methods: {
|
||||
loginEv(invite_code='',source='',channel=''){
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (res)=> {
|
||||
if (res.code) {
|
||||
var params = {
|
||||
code:res.code,
|
||||
invite_code:invite_code,//用户邀请码
|
||||
source_code:source,
|
||||
channel:channel
|
||||
}
|
||||
this.$requst.post('user/login',params).then(res => {
|
||||
if(res.data.token!=''){
|
||||
if(res.data.is_active==0) {
|
||||
this.vision = true;
|
||||
}
|
||||
}
|
||||
},error => {})
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
buttonH(e){//授权成功
|
||||
if(e) {
|
||||
this.vision = false
|
||||
this.isShowP = true
|
||||
}
|
||||
},
|
||||
searchEv(){//搜索事件
|
||||
if(this.keyword!='') this.ntype = ''
|
||||
this.page = 1
|
||||
|
|
|
@ -51,6 +51,10 @@
|
|||
</view>
|
||||
<!-- 底部客服 -->
|
||||
<public-customer :nbottom="100"></public-customer>
|
||||
<!-- 弹框授权 -->
|
||||
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
|
||||
<!-- 弹框 -->
|
||||
<auth-phone v-if="isShowP"></auth-phone>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -76,7 +80,9 @@
|
|||
total:'',
|
||||
isZanw:true,
|
||||
ntype:'',
|
||||
isAllot:uni.getStorageSync('customer-allot')
|
||||
isAllot:uni.getStorageSync('customer-allot'),
|
||||
vision:false,
|
||||
isShowP:false,
|
||||
}
|
||||
},
|
||||
onPageScroll(e) {
|
||||
|
@ -98,12 +104,46 @@
|
|||
onShow() {
|
||||
this.$toolAll.tools.isLogin()
|
||||
},
|
||||
onLoad() {
|
||||
onLoad(options) {
|
||||
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
|
||||
if(options.invite_code!='' && options.invite_code!=undefined){
|
||||
this.loginEv(options.invite_code);
|
||||
} else if(options.source_code!='' && options.source_code!=undefined){
|
||||
this.loginEv('',options.source_code,options.channel);
|
||||
}
|
||||
this.checkKF()//查询客服列表
|
||||
this.checkCL()//客户列表
|
||||
this.checkLY()//渠道来源
|
||||
},
|
||||
methods: {
|
||||
loginEv(invite_code='',source='',channel=''){
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (res)=> {
|
||||
if (res.code) {
|
||||
var params = {
|
||||
code:res.code,
|
||||
invite_code:invite_code,//用户邀请码
|
||||
source_code:source,
|
||||
channel:channel
|
||||
}
|
||||
this.$requst.post('user/login',params).then(res => {
|
||||
if(res.data.token!=''){
|
||||
if(res.data.is_active==0) {
|
||||
this.vision = true;
|
||||
}
|
||||
}
|
||||
},error => {})
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
buttonH(e){//授权成功
|
||||
if(e) {
|
||||
this.vision = false
|
||||
this.isShowP = true
|
||||
}
|
||||
},
|
||||
checkKF(){//查看客户列表
|
||||
this.$requst.post('user/servicer-list').then(res=>{
|
||||
// console.log('查询客户列表:',res);
|
||||
|
|
|
@ -31,6 +31,10 @@
|
|||
</view>
|
||||
<!-- 底部客服 -->
|
||||
<public-customer :nbottom="100"></public-customer>
|
||||
<!-- 弹框授权 -->
|
||||
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
|
||||
<!-- 弹框 -->
|
||||
<auth-phone v-if="isShowP"></auth-phone>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -38,7 +42,7 @@
|
|||
import listDoctor from '@/components/list-doctor.vue';
|
||||
export default {
|
||||
components:{
|
||||
listDoctor
|
||||
listDoctor,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -56,7 +60,9 @@
|
|||
size:20,
|
||||
total:'',//总数
|
||||
isZanw:true,
|
||||
keyword:''
|
||||
keyword:'',
|
||||
vision:false,
|
||||
isShowP:false,
|
||||
}
|
||||
},
|
||||
onPageScroll(e) {
|
||||
|
@ -74,10 +80,44 @@
|
|||
onShow() {
|
||||
this.$toolAll.tools.isLogin()
|
||||
},
|
||||
onLoad() {
|
||||
onLoad(options) {
|
||||
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
|
||||
if(options.invite_code!='' && options.invite_code!=undefined){
|
||||
this.loginEv(options.invite_code);
|
||||
} else if(options.source_code!='' && options.source_code!=undefined){
|
||||
this.loginEv('',options.source_code,options.channel);
|
||||
}
|
||||
this.checkDor()
|
||||
},
|
||||
methods: {
|
||||
loginEv(invite_code='',source='',channel=''){
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (res)=> {
|
||||
if (res.code) {
|
||||
var params = {
|
||||
code:res.code,
|
||||
invite_code:invite_code,//用户邀请码
|
||||
source_code:source,
|
||||
channel:channel
|
||||
}
|
||||
this.$requst.post('user/login',params).then(res => {
|
||||
if(res.data.token!=''){
|
||||
if(res.data.is_active==0) {
|
||||
this.vision = true;
|
||||
}
|
||||
}
|
||||
},error => {})
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
buttonH(e){//授权成功
|
||||
if(e) {
|
||||
this.vision = false
|
||||
this.isShowP = true
|
||||
}
|
||||
},
|
||||
checkDor(){//查询医生列表事件
|
||||
this.$requst.post('user/doctor-list',{page:this.page,size:this.size,keyword:this.keyword}).then(res=>{
|
||||
// console.log('医生列表:',res);
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
<view :style="{paddingTop: statusHNH+'px'}">
|
||||
<view v-if="isLoading" class="bacf mar-s20 pad-s20 pad-y32 pad-x40">
|
||||
<view class="disjb">
|
||||
<view class="pad-z40">
|
||||
<image class="radius10 flexs mar-z30" :src="doctorObj.doctor_extra.headimg || moImg" style="width: 300rpx;height: 300rpx;" mode="aspectFill"></image>
|
||||
<view class="pad-z20">
|
||||
<view class="fon28 bold col3">{{doctorObj.doctor_extra.name}}</view>
|
||||
<view class="disac col80 fon24" style="margin: 6rpx 0;">
|
||||
<view>{{['未知','男','女'][doctorObj.gender]}}</view>
|
||||
|
@ -25,12 +26,16 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<image class="radius10 flexs" :src="doctorObj.doctor_extra.headimg || moImg" style="width: 246rpx;height: 188rpx;" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="mar-z32">
|
||||
<view class="bbot mar-s30"></view>
|
||||
<view class="fon28 bold col3 mar-sx20">个人简介</view>
|
||||
<view class="fon26 col3" style="line-height: 37rpx;">{{doctorObj.doctor_extra.summary}}</view>
|
||||
<view class="fon28 bold col3 mar-sx20">医生简介</view>
|
||||
<rich-text class="fon26 col3" :nodes="peopleJian"></rich-text>
|
||||
</view>
|
||||
<view class="mar-z32">
|
||||
<view class="bbot mar-s30"></view>
|
||||
<view class="fon28 bold col3 mar-sx20">医生详情</view>
|
||||
<rich-text class="fon26 col3" :nodes="detailInfo"></rich-text>
|
||||
</view>
|
||||
</view>
|
||||
<view id="daoh" :class="isTop?'isTop':''" class="isTops" :style="{top:(statusHNH-10)+'px'}">
|
||||
|
@ -47,6 +52,10 @@
|
|||
</view>
|
||||
<!-- 底部客服 -->
|
||||
<public-customer :nbottom="100"></public-customer>
|
||||
<!-- 弹框授权 -->
|
||||
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
|
||||
<!-- 弹框 -->
|
||||
<auth-phone v-if="isShowP"></auth-phone>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -77,7 +86,11 @@
|
|||
isZanw:true,
|
||||
chuTop:'',
|
||||
isTop:false,
|
||||
isLoading:false
|
||||
isLoading:false,
|
||||
detailInfo:'',
|
||||
peopleJian:'',
|
||||
vision:false,
|
||||
isShowP:false,
|
||||
}
|
||||
},
|
||||
onPageScroll(e) {
|
||||
|
@ -102,13 +115,46 @@
|
|||
},
|
||||
onLoad(options) {
|
||||
this.checkDoD(options.doctor_id)
|
||||
|
||||
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
|
||||
if(options.invite_code!='' && options.invite_code!=undefined){
|
||||
this.loginEv(options.invite_code);
|
||||
} else if(options.source_code!='' && options.source_code!=undefined){
|
||||
this.loginEv('',options.source_code,options.channel);
|
||||
}
|
||||
const query = wx.createSelectorQuery()
|
||||
query.select('#daoh').boundingClientRect((rect) => {
|
||||
this.chuTop = rect.top
|
||||
}).exec()
|
||||
},
|
||||
methods: {
|
||||
loginEv(invite_code='',source='',channel=''){
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (res)=> {
|
||||
if (res.code) {
|
||||
var params = {
|
||||
code:res.code,
|
||||
invite_code:invite_code,//用户邀请码
|
||||
source_code:source,
|
||||
channel:channel
|
||||
}
|
||||
this.$requst.post('user/login',params).then(res => {
|
||||
if(res.data.token!=''){
|
||||
if(res.data.is_active==0) {
|
||||
this.vision = true;
|
||||
}
|
||||
}
|
||||
},error => {})
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
buttonH(e){//授权成功
|
||||
if(e) {
|
||||
this.vision = false
|
||||
this.isShowP = true
|
||||
}
|
||||
},
|
||||
chooseLike(e){//收藏事件
|
||||
// console.log(this.dataList[e].is_collected);
|
||||
if(this.dataList[e].is_collected==0){
|
||||
|
@ -127,8 +173,11 @@
|
|||
this.$requst.post('user/doctor-info',{doctor_id:doctor_id}).then(res=>{
|
||||
// console.log('医生详情:',res);
|
||||
if(res.code==0){
|
||||
this.doctorObj = res.data
|
||||
this.isLoading = true
|
||||
this.doctorObj = res.data;
|
||||
// 富文本
|
||||
this.peopleJian = this.$toolAll.tools.escape2Html(this.doctorObj.doctor_extra.summary);
|
||||
this.detailInfo = this.$toolAll.tools.escape2Html(this.doctorObj.doctor_extra.content);
|
||||
this.isLoading = true;
|
||||
}
|
||||
},error=>{})
|
||||
},
|
||||
|
@ -182,10 +231,11 @@
|
|||
name:item.published_by || '恒美植发',//发布者昵称
|
||||
isVideo:item.video.includes(".mp4")//是否是视频
|
||||
}
|
||||
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)
|
||||
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)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,6 +22,10 @@
|
|||
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
|
||||
<!-- 底部客服 -->
|
||||
<public-customer :nbottom="100"></public-customer>
|
||||
<!-- 弹框授权 -->
|
||||
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
|
||||
<!-- 弹框 -->
|
||||
<auth-phone v-if="isShowP"></auth-phone>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -44,6 +48,8 @@
|
|||
isZanw:true,
|
||||
category_id:0,//栏目ID
|
||||
chuTop:'',
|
||||
vision:false,
|
||||
isShowP:false,
|
||||
}
|
||||
},
|
||||
onPageScroll(e) {
|
||||
|
@ -65,7 +71,13 @@
|
|||
this.$toolAll.tools.isLogin()
|
||||
this.checkConList(this.category_id)
|
||||
},
|
||||
onLoad() {
|
||||
onLoad(options) {
|
||||
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
|
||||
if(options.invite_code!='' && options.invite_code!=undefined){
|
||||
this.loginEv(options.invite_code);
|
||||
} else if(options.source_code!='' && options.source_code!=undefined){
|
||||
this.loginEv('',options.source_code,options.channel);
|
||||
}
|
||||
const query = wx.createSelectorQuery()
|
||||
query.select('#daoh').boundingClientRect((rect) => {
|
||||
// console.log('状态栏+标题栏:',rect);
|
||||
|
@ -73,6 +85,34 @@
|
|||
}).exec()
|
||||
},
|
||||
methods: {
|
||||
loginEv(invite_code='',source='',channel=''){
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (res)=> {
|
||||
if (res.code) {
|
||||
var params = {
|
||||
code:res.code,
|
||||
invite_code:invite_code,//用户邀请码
|
||||
source_code:source,
|
||||
channel:channel
|
||||
}
|
||||
this.$requst.post('user/login',params).then(res => {
|
||||
if(res.data.token!=''){
|
||||
if(res.data.is_active==0) {
|
||||
this.vision = true;
|
||||
}
|
||||
}
|
||||
},error => {})
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
buttonH(e){//授权成功
|
||||
if(e) {
|
||||
this.vision = false
|
||||
this.isShowP = true
|
||||
}
|
||||
},
|
||||
checkConList(category_id){//查询收藏列表
|
||||
// this.$toolAll.tools.showToast('加载中...')
|
||||
let params = {
|
||||
|
@ -105,7 +145,13 @@
|
|||
this.cateList = uni.getStorageSync('cateList')
|
||||
}
|
||||
// 获取列表
|
||||
if(this.page==1) this.dataList = []
|
||||
if(this.page==1) {
|
||||
this.dataList = [];
|
||||
uni.pageScrollTo({
|
||||
scrollTop:0,
|
||||
duration:0
|
||||
})
|
||||
}
|
||||
this.total = res.data.list.total
|
||||
if(res.data.list.list.length!=0){
|
||||
uni.hideToast()
|
||||
|
@ -126,10 +172,7 @@
|
|||
name:item.published_by || '恒美植发',//发布者昵称
|
||||
isVideo:item.video.includes(".mp4")//是否是视频
|
||||
}
|
||||
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)
|
||||
this.dataList.push(tObj);
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,6 +39,10 @@
|
|||
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
|
||||
<!-- 底部客服 -->
|
||||
<public-customer :nbottom="100"></public-customer>
|
||||
<!-- 弹框授权 -->
|
||||
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
|
||||
<!-- 弹框 -->
|
||||
<auth-phone v-if="isShowP"></auth-phone>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -63,6 +67,8 @@
|
|||
size:20,
|
||||
total:'',//总数
|
||||
isZanw:true,
|
||||
vision:false,
|
||||
isShowP:false,
|
||||
}
|
||||
},
|
||||
onPageScroll(e) {
|
||||
|
@ -80,7 +86,13 @@
|
|||
onShow() {
|
||||
this.$toolAll.tools.isLogin()
|
||||
},
|
||||
onLoad() {
|
||||
onLoad(options) {
|
||||
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
|
||||
if(options.invite_code!='' && options.invite_code!=undefined){
|
||||
this.loginEv(options.invite_code);
|
||||
} else if(options.source_code!='' && options.source_code!=undefined){
|
||||
this.loginEv('',options.source_code,options.channel);
|
||||
}
|
||||
if(uni.getStorageSync('navHeight')==''){
|
||||
const query = wx.createSelectorQuery()
|
||||
query.select('.navHeight').boundingClientRect((rect) => {
|
||||
|
@ -92,6 +104,34 @@
|
|||
this.checkPeople()//查询分享一二级列表人数
|
||||
},
|
||||
methods: {
|
||||
loginEv(invite_code='',source='',channel=''){
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (res)=> {
|
||||
if (res.code) {
|
||||
var params = {
|
||||
code:res.code,
|
||||
invite_code:invite_code,//用户邀请码
|
||||
source_code:source,
|
||||
channel:channel
|
||||
}
|
||||
this.$requst.post('user/login',params).then(res => {
|
||||
if(res.data.token!=''){
|
||||
if(res.data.is_active==0) {
|
||||
this.vision = true;
|
||||
}
|
||||
}
|
||||
},error => {})
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
buttonH(e){//授权成功
|
||||
if(e) {
|
||||
this.vision = false
|
||||
this.isShowP = true
|
||||
}
|
||||
},
|
||||
checkShare(){//查询一二级分享总人数
|
||||
this.$requst.post('user/share-count').then(res=>{
|
||||
// console.log('查询用户的分享统计记录:',res);
|
||||
|
|
|
@ -26,6 +26,10 @@
|
|||
<pu-po :isShowT="imgSrc==''" :contentVal="'立即生成创意海报'" :clearVal="'暂不生成'" :comfrimVal="'立即生成'" @comfirmev="comfirmev" @cancleev="cancleev"></pu-po>
|
||||
<!-- 底部客服 -->
|
||||
<public-customer :nbottom="100"></public-customer>
|
||||
<!-- 弹框授权 -->
|
||||
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
|
||||
<!-- 弹框 -->
|
||||
<auth-phone v-if="isShowP"></auth-phone>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -39,13 +43,21 @@
|
|||
isShowT:true,
|
||||
imgSrc:uni.getStorageSync('imgSrcP'),
|
||||
isHaib:false,
|
||||
showBtn:false
|
||||
showBtn:false,
|
||||
vision:false,
|
||||
isShowP:false,
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.$toolAll.tools.isLogin()
|
||||
},
|
||||
onLoad() {
|
||||
onLoad(options) {
|
||||
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
|
||||
if(options.invite_code!='' && options.invite_code!=undefined){
|
||||
this.loginEv(options.invite_code);
|
||||
} else if(options.source_code!='' && options.source_code!=undefined){
|
||||
this.loginEv('',options.source_code,options.channel);
|
||||
}
|
||||
//如果还没有生成海报
|
||||
this.imgSrc = uni.getStorageSync('imgSrcP')//弹框关闭
|
||||
if(this.imgSrc!='') {
|
||||
|
@ -55,6 +67,34 @@
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
loginEv(invite_code='',source='',channel=''){
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (res)=> {
|
||||
if (res.code) {
|
||||
var params = {
|
||||
code:res.code,
|
||||
invite_code:invite_code,//用户邀请码
|
||||
source_code:source,
|
||||
channel:channel
|
||||
}
|
||||
this.$requst.post('user/login',params).then(res => {
|
||||
if(res.data.token!=''){
|
||||
if(res.data.is_active==0) {
|
||||
this.vision = true;
|
||||
}
|
||||
}
|
||||
},error => {})
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
buttonH(e){//授权成功
|
||||
if(e) {
|
||||
this.vision = false
|
||||
this.isShowP = true
|
||||
}
|
||||
},
|
||||
shareEv(){
|
||||
wx.showShareImageMenu({
|
||||
path: this.imgSrc
|
||||
|
|
|
@ -3,16 +3,17 @@
|
|||
<!-- 状态栏 -->
|
||||
<status-nav v-if="invite_code==''" :titleVal="'分类'" :statusTitle="true"></status-nav>
|
||||
<view v-if="invite_code!=''" class="status-box statusHNH" style="background-color: #FFFFFF;">
|
||||
<view :style="{height:statusBarHeight+'px'}"></view>
|
||||
<view class="status-nav">
|
||||
<!-- 标题 -->
|
||||
<view :style="{height:statusBarHeight+'px'}"></view>
|
||||
<view class="status-nav">
|
||||
<!-- 标题 -->
|
||||
<view class="tab-title tcenter" style="color: #000000;">分类</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 列表 -->
|
||||
<view :style="{top: statusHNH+'px'}" class="posiszy" style="height: 50px;">
|
||||
<view class="bacf pad-zy32 pad-sx20">
|
||||
<cate-pu @choosecateEv="choosecateEv" :activeb="invite_code!=''?'#3875F6':publicColor" :newCurrent="cateCurrent*1" :newbmo="'#F2F2F2'" :isCenter="false" :newcateList="cateList"></cate-pu>
|
||||
<cate-pu @choosecateEv="choosecateEv" :activeb="invite_code!=''?'#3875F6':publicColor"
|
||||
:newCurrent="cateCurrent*1" :newbmo="'#F2F2F2'" :isCenter="false" :newcateList="cateList"></cate-pu>
|
||||
</view>
|
||||
</view>
|
||||
<view class="pad-x180" :style="{paddingTop: (statusHNH+50)+'px'}">
|
||||
|
@ -20,35 +21,45 @@
|
|||
<view v-show="cateCurrent==isNum">
|
||||
<view class="pad-zy32">
|
||||
<!-- 自定义轮播 -->
|
||||
<swiper-pu :browseP="true" :isplay="isAutoPlay" :bannerList="bannerList" :newHeight="'450'" :newRadius="'10'" :newBottom="'5'"></swiper-pu>
|
||||
<swiper-pu :browseP="true" :isplay="isAutoPlay" :bannerList="bannerList" :newHeight="'450'"
|
||||
:newRadius="'10'" :newBottom="'5'"></swiper-pu>
|
||||
<!-- 标题 -->
|
||||
<view class="fon36 col3 bold mar-sx20 clips2" style="line-height: 50rpx;">{{detailObj.title}}</view>
|
||||
<view class="fon36 col3 bold mar-sx20 clips2" style="line-height: 50rpx;">{{detailObj.title}}
|
||||
</view>
|
||||
<view class="disjbac">
|
||||
<view class="disac">
|
||||
<!-- 发布者头像 -->
|
||||
<image class="flexs" :src="fabImg || '/static/public/logo.png'" style="width: 60rpx;height: 60rpx;border-radius: 100%;" mode="aspectFill"></image>
|
||||
<image class="flexs" :src="fabImg || '/static/public/logo.png'"
|
||||
style="width: 60rpx;height: 60rpx;border-radius: 100%;" mode="aspectFill"></image>
|
||||
<view class="mar-z10">
|
||||
<!-- 发布者昵称 -->
|
||||
<view class="fon28 col3 clips1">{{detailObj.published_by || '恒美植发'}}</view>
|
||||
<!-- 发布时间 -->
|
||||
<view class="fon20 col9" style="margin-top: 6rpx;">{{detailObj.published_at}}发布</view>
|
||||
<view class="fon20 col9" style="margin-top: 6rpx;">{{detailObj.published_at}}发布
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="disac flexs">
|
||||
<view class="disac fc" @tap="tapLike" style="width: 60rpx;">
|
||||
<image v-if="isDetailLike" src="/static/public/detail-like.png" style="width: 42rpx;height: 42rpx;" mode=""></image>
|
||||
<image v-else src="/static/public/detail-nlike.png" style="width: 42rpx;height: 42rpx;" mode=""></image>
|
||||
<image v-if="isDetailLike" src="/static/public/detail-like.png"
|
||||
style="width: 42rpx;height: 42rpx;" mode=""></image>
|
||||
<image v-else src="/static/public/detail-nlike.png"
|
||||
style="width: 42rpx;height: 42rpx;" mode=""></image>
|
||||
<view class="fon24 col9 tc">{{likeCon}}</view>
|
||||
</view>
|
||||
<view @tap="shareEv" 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>
|
||||
<button class="posia" open-type="share" style="top: 0;right: 0;left: 0;bottom: 0;opacity: 0;">分享</button>
|
||||
<button class="posia" open-type="share"
|
||||
style="top: 0;right: 0;left: 0;bottom: 0;opacity: 0;">分享</button>
|
||||
<!-- <button v-if="haveImg" class="posia" open-type="share" style="top: 0;right: 0;left: 0;bottom: 0;opacity: 0;">分享</button> -->
|
||||
</view>
|
||||
<view class="disac fc" @tap="tapConllection">
|
||||
<image v-if="isDetailConllection" src="/static/public/yconllection.png" style="width: 44rpx;height: 44rpx;" mode=""></image>
|
||||
<image v-else src="/static/public/conllection.png" style="width: 44rpx;height: 44rpx;" mode=""></image>
|
||||
<image v-if="isDetailConllection" src="/static/public/yconllection.png"
|
||||
style="width: 44rpx;height: 44rpx;" mode=""></image>
|
||||
<image v-else src="/static/public/conllection.png"
|
||||
style="width: 44rpx;height: 44rpx;" mode=""></image>
|
||||
<view class="fon24 col9">收藏</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -73,40 +84,9 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 案例日记 -->
|
||||
<view v-show="cateCurrent==0 && isNum!=0" class="pad-zy20">
|
||||
<view v-if="listArrone.length!=0">
|
||||
<list-pu @chooseLike="chooseLike" @comfirmev="comfirmev" :list="listArrone"></list-pu>
|
||||
</view>
|
||||
<view v-else class="disjcac fc" style="margin-top: 40%;">
|
||||
<image class="zanw-img" src="/static/public/nothing.png" mode="aspectFill"></image>
|
||||
<view class="fon24 col3">暂无内容</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 案例日记 -->
|
||||
<view v-show="cateCurrent==1 && isNum!=1" class="pad-zy20">
|
||||
<view v-if="listArrtwo.length!=0">
|
||||
<list-pu @chooseLike="chooseLike" @comfirmev="comfirmev" :list="listArrtwo"></list-pu>
|
||||
</view>
|
||||
<view v-else class="disjcac fc" style="margin-top: 40%;">
|
||||
<image class="zanw-img" src="/static/public/nothing.png" mode="aspectFill"></image>
|
||||
<view class="fon24 col3">暂无内容</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 效果模拟 -->
|
||||
<view v-show="cateCurrent==2 && isNum!=2" class="pad-zy20">
|
||||
<view v-if="listArrthree.length!=0">
|
||||
<list-pu @chooseLike="chooseLike" @comfirmev="comfirmev" :list="listArrthree"></list-pu>
|
||||
</view>
|
||||
<view v-else class="disjcac fc" style="margin-top: 40%;">
|
||||
<image class="zanw-img" src="/static/public/nothing.png" mode="aspectFill"></image>
|
||||
<view class="fon24 col3">暂无内容</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 科普视频 -->
|
||||
<view v-show="cateCurrent==3 && isNum!=3" class="pad-zy20">
|
||||
<view v-if="listArrfour.length!=0">
|
||||
<list-pu @chooseLike="chooseLike" @comfirmev="comfirmev" :list="listArrfour"></list-pu>
|
||||
<view v-if="cateCurrent!=isNum">
|
||||
<view v-if="allList.length!=0" class="pad-zy20">
|
||||
<list-pu @chooseLike="chooseLike" @comfirmev="comfirmev" :list="allList"></list-pu>
|
||||
</view>
|
||||
<view v-else class="disjcac fc" style="margin-top: 40%;">
|
||||
<image class="zanw-img" src="/static/public/nothing.png" mode="aspectFill"></image>
|
||||
|
@ -116,18 +96,25 @@
|
|||
</view>
|
||||
<view class="posixzy disjbac bacf pad-zy32 btnBKS">
|
||||
<view class="posir">
|
||||
<image @tap="backHome" class="posia backH" src="/static/public/back-home.png" mode="aspectFill"></image>
|
||||
<image @tap="backHome" class="posia backH" src="/static/public/back-home-02.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="disac fon26 colf">
|
||||
<view @tap="lianK" class="disac posir lianShare" style="background-color: #3875F6; border-top-left-radius: 51rpx;border-bottom-left-radius: 51rpx;">
|
||||
<image src="/static/public/bottom-customer.png" class="mar-zy20" style="width: 47rpx;height: 47rpx;" mode="aspectFill"></image>
|
||||
<view @tap="lianK" class="disac posir lianShare"
|
||||
style="background-color: #3875F6; border-top-left-radius: 51rpx;border-bottom-left-radius: 51rpx;">
|
||||
<image src="/static/public/bottom-customer.png" class="mar-zy20"
|
||||
style="width: 47rpx;height: 47rpx;" mode="aspectFill"></image>
|
||||
<view>联系客服</view>
|
||||
<button v-if="haveImg" class="fon24 posia" style="opacity: 0;top: 0;left: 0;right: 0;bottom: 0;" open-type="contact">客服</button>
|
||||
<button v-if="haveImg" class="fon24 posia" style="opacity: 0;top: 0;left: 0;right: 0;bottom: 0;"
|
||||
open-type="contact">客服</button>
|
||||
</view>
|
||||
<view @tap="shareEv" class="disac posir lianShare" style="background-color: #38CE51;border-top-right-radius: 51rpx;border-bottom-right-radius: 51rpx;">
|
||||
<image src="/static/public/bottom-shear.png" style="width: 47rpx;height: 47rpx;margin-left: 15rpx;margin-right: 8rpx;" mode="aspectFill"></image>
|
||||
<view @tap="shareEv" class="disac posir lianShare"
|
||||
style="background-color: #38CE51;border-top-right-radius: 51rpx;border-bottom-right-radius: 51rpx;">
|
||||
<image src="/static/public/bottom-shear.png"
|
||||
style="width: 47rpx;height: 47rpx;margin-left: 15rpx;margin-right: 8rpx;" mode="aspectFill">
|
||||
</image>
|
||||
<view>分享给好友</view>
|
||||
<button v-if="haveImg" class="posia" open-type="share" style="top: 0;right: 0;left: 0;bottom: 0;opacity: 0;">分享</button>
|
||||
<button v-if="haveImg" class="posia" open-type="share"
|
||||
style="top: 0;right: 0;left: 0;bottom: 0;opacity: 0;">分享</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -136,18 +123,7 @@
|
|||
<!-- 弹框授权 -->
|
||||
<empower @buttonH="buttonH" :vision="vision" :isWhere="2" @cancleEv="cancleEv"></empower>
|
||||
<!-- 弹框 -->
|
||||
<view v-if="isShowP" @touchmove.stop.prevent="moveHandle" class="disjcac posAll">
|
||||
<view class="bacf radius20 width100 tank-box">
|
||||
<view class="tc tank-box-itemone">请授权绑定手机号</view>
|
||||
<view class="fon28 colf pad-x30 pad-zy30 tc disjb">
|
||||
<view @tap="isShowP=false" class="pad-sx10 radius10 tank-btn" style="background-color: rgba(230, 230, 230,1);color: #000000;">暂不绑定</view>
|
||||
<view class="pad-sx10 radius10 tank-btn posir pbackc">
|
||||
立即绑定
|
||||
<button open-type="getPhoneNumber" @getphonenumber="getphonenumber" class="posia syxzo">立即绑定</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<auth-phone v-if="isShowP"></auth-phone>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
@ -155,93 +131,98 @@
|
|||
<script>
|
||||
import listDoctor from '@/components/list-doctor.vue';
|
||||
import swiperPu from '@/components/swiper-pu.vue';
|
||||
import {collectionEV,cancleCollectionEV} from '@/jsFile/publicAPI.js';
|
||||
import empower from '@/components/empower.vue';
|
||||
import {
|
||||
collectionEV,
|
||||
cancleCollectionEV
|
||||
} from '@/jsFile/publicAPI.js';
|
||||
export default {
|
||||
components:{
|
||||
components: {
|
||||
listDoctor,
|
||||
swiperPu,
|
||||
empower
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
statusBarHeight:uni.getSystemInfoSync().statusBarHeight,
|
||||
isLoading:false,
|
||||
vision:false,
|
||||
statusHNH:uni.getStorageSync('statusHNH'),
|
||||
publicColor:uni.getStorageSync('publicColor') || '#3875F6',//主题颜色
|
||||
cateCurrent:0,
|
||||
haveImg:true,
|
||||
cateList:[],
|
||||
bannerList:[],//轮播
|
||||
xgList:[//相关推荐
|
||||
statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
|
||||
isLoading: false,
|
||||
vision: false,
|
||||
statusHNH: uni.getStorageSync('statusHNH'),
|
||||
publicColor: uni.getStorageSync('publicColor') || '#3875F6', //主题颜色
|
||||
cateCurrent: 0,
|
||||
haveImg: true,
|
||||
cateList: [],
|
||||
bannerList: [], //轮播
|
||||
xgList: [ //相关推荐
|
||||
],
|
||||
dataList:[//推荐医生
|
||||
dataList: [ //推荐医生
|
||||
],
|
||||
showTop:false,
|
||||
isDetailLike:false,//是否喜欢
|
||||
likeCon:'点赞',
|
||||
isDetailConllection:false,//是否已收藏
|
||||
isNum:0,
|
||||
listArrone:[],//问题
|
||||
listArrtwo:[//案例日记
|
||||
showTop: false,
|
||||
isDetailLike: false, //是否喜欢
|
||||
likeCon: '点赞',
|
||||
isDetailConllection: false, //是否已收藏
|
||||
isNum: 0,
|
||||
listArrone: [], //问题
|
||||
listArrtwo: [ //案例日记
|
||||
],
|
||||
listArrthree:[//效果模拟
|
||||
listArrthree: [ //效果模拟
|
||||
],
|
||||
listArrfour:[//科普视频
|
||||
listArrfour: [ //科普视频
|
||||
],
|
||||
detailObj:{},//详情
|
||||
detailInfo:'',//富文本
|
||||
category_id:'',//栏目ID
|
||||
active:'',//是否是详情页
|
||||
detailObj: {}, //详情
|
||||
detailInfo: '', //富文本
|
||||
category_id: '', //栏目ID
|
||||
active: '', //是否是详情页
|
||||
// jieDuan:false,
|
||||
share_id:0,
|
||||
invite_code:'',
|
||||
isShowP:false,
|
||||
bcurrent:0,
|
||||
isAutoPlay:false,
|
||||
fabImg:''//发布者头像
|
||||
share_id: 0,
|
||||
invite_code: '',
|
||||
isShowP: false,
|
||||
bcurrent: 0,
|
||||
isAutoPlay: false,
|
||||
fabImg: '' ,//发布者头像
|
||||
allArr:[],
|
||||
page:1,
|
||||
size:20,
|
||||
total:0,
|
||||
isZanw:true,
|
||||
allList:[]
|
||||
}
|
||||
},
|
||||
onPageScroll(e) {
|
||||
e.scrollTop > 360 ? this.showTop = true : this.showTop = false
|
||||
e.scrollTop > 360 ? this.showTop = true : this.showTop = false
|
||||
},
|
||||
onReachBottom() {//触底事件
|
||||
// for (let i = 0; i < 4; i++) {
|
||||
// if(this.cateCurrent==0) {
|
||||
// let obj = {status:false,main_img:'',title:'恒美小课堂',content:'饺子会吃肉?',head_img:'/static/public/like.png',name:'吃肉的饺子',isCate:0}
|
||||
// this.listArrone.push(obj)
|
||||
// }
|
||||
// if(this.cateCurrent==1) {
|
||||
// let obj = {status:false,main_img:'',title:'恒美小课堂',content:'饺子会吃肉?',head_img:'/static/public/like.png',name:'吃肉的饺子',isCate:1}
|
||||
// this.listArrtwo.push(obj)
|
||||
// }
|
||||
// if(this.cateCurrent==2) {
|
||||
// let obj = {status:false,main_img:'',title:'恒美小课堂',content:'饺子会吃肉?',head_img:'/static/public/like.png',name:'吃肉的饺子',isCate:2}
|
||||
// this.listArrthree.push(obj)
|
||||
// }
|
||||
// if(this.cateCurrent==3) {
|
||||
// let obj = {status:false,main_img:'',title:'恒美小课堂',content:'饺子会吃肉?',head_img:'/static/public/like.png',name:'吃肉的饺子',isCate:3}
|
||||
// this.listArrfour.push(obj)
|
||||
// }
|
||||
// }
|
||||
onReachBottom() { //触底事件
|
||||
if(this.cateCurrent!=this.isNum){
|
||||
if(this.total!=this.allList.length){
|
||||
this.page++
|
||||
this.checkList(this.cateCurrent)//调用自主预约列表事件
|
||||
} else {
|
||||
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多列表','none',1000)
|
||||
this.isZanw = false
|
||||
}
|
||||
}
|
||||
},
|
||||
onShareTimeline() {},
|
||||
onShareAppMessage(res) {
|
||||
var ya = this;
|
||||
this.$requst.post('user/record',{type:'content',action:'share',id:this.detailObj.id}).then(res=>{console.log('分享成功:',res);},error=>{})
|
||||
var ya = this;
|
||||
this.$requst.post('user/record', {
|
||||
type: 'content',
|
||||
action: 'share',
|
||||
id: this.detailObj.id
|
||||
}).then(res => {
|
||||
console.log('分享成功:', res);
|
||||
}, error => {})
|
||||
let maiOjb = {
|
||||
e:4,//内容分享
|
||||
c:this.detailObj.id*1,
|
||||
t:new Date().getTime()//当前时间戳
|
||||
e: 4, //内容分享
|
||||
c: this.detailObj.id * 1,
|
||||
t: new Date().getTime() //当前时间戳
|
||||
}
|
||||
this.$toolAll.tools.maiDian(maiOjb)
|
||||
var shareObj = {
|
||||
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')}`, // 默认是当前页面,必须是以‘/’开头的完整路径
|
||||
imageUrl: ya.$http + ya.detailObj.share_img//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
|
||||
};
|
||||
return shareObj;
|
||||
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')}`, // 默认是当前页面,必须是以‘/’开头的完整路径
|
||||
imageUrl: ya.$http + ya.detailObj
|
||||
.share_img //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
|
||||
};
|
||||
return shareObj;
|
||||
},
|
||||
onShow() {
|
||||
this.isAutoPlay = true;
|
||||
|
@ -253,186 +234,163 @@
|
|||
this.isAutoPlay = false;
|
||||
},
|
||||
onLoad(options) {
|
||||
if(options.category_id!=undefined) {
|
||||
if (options.category_id != undefined) {
|
||||
this.category_id = options.category_id
|
||||
this.conid = options.id
|
||||
this.invite_code = options.invite_code
|
||||
uni.setStorageSync('ninvite_code',this.invite_code)
|
||||
if(this.invite_code!='' && this.invite_code!=undefined){
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (res)=> {
|
||||
if (res.code) {
|
||||
var params = {
|
||||
code:res.code,
|
||||
invite_code:this.invite_code,//用户邀请码
|
||||
}
|
||||
this.$requst.post('user/login',params).then(res => {
|
||||
if(res.data.token!=''){
|
||||
if(res.data.is_active==0) {
|
||||
this.haveImg = false
|
||||
this.vision = true
|
||||
}
|
||||
}
|
||||
},error => {})
|
||||
}
|
||||
},
|
||||
});
|
||||
uni.setStorageSync('ninvite_code', this.invite_code)
|
||||
if (this.invite_code != '' && this.invite_code != undefined) {
|
||||
this.loginEv(this.invite_code);
|
||||
} else if (options.source_code != '' && options.source_code != undefined) {
|
||||
this.loginEv('', options.source_code, options.channel);
|
||||
} else {
|
||||
this.$toolAll.tools.overdue()
|
||||
this.$toolAll.tools.isLogin()
|
||||
}
|
||||
}
|
||||
this.checkDetail(this.conid)
|
||||
if(options.share_id!=undefined) this.share_id = options.share_id
|
||||
if (options.share_id != undefined) this.share_id = options.share_id
|
||||
let maiOjb = {
|
||||
e:4,//内容分享
|
||||
c:this.conid*1,
|
||||
t:new Date().getTime()//当前时间戳
|
||||
e: 4, //内容分享
|
||||
c: this.conid * 1,
|
||||
t: new Date().getTime() //当前时间戳
|
||||
}
|
||||
this.$toolAll.tools.maiDian(maiOjb)
|
||||
},
|
||||
methods: {
|
||||
moveHandle(){//禁止底层滑动
|
||||
return false
|
||||
},
|
||||
getphonenumber(e){//授权绑定手机号
|
||||
if(e.detail.errMsg=="getPhoneNumber:ok"){
|
||||
this.$requst.post('user/bind-phone',{iv:e.detail.iv,encryptedData:e.detail.encryptedData}).then(res=>{
|
||||
// console.log('手机号信息:',res);
|
||||
if(res.code==0){
|
||||
this.isShowP = false
|
||||
this.$toolAll.tools.showToast('手机号绑定成功','success')
|
||||
loginEv(invite_code = '', source = '', channel = '') {
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (res) => {
|
||||
if (res.code) {
|
||||
var params = {
|
||||
code: res.code,
|
||||
invite_code: invite_code, //用户邀请码
|
||||
source_code: source,
|
||||
channel: channel
|
||||
}
|
||||
this.$requst.post('user/login', params).then(res => {
|
||||
if (res.data.token != '') {
|
||||
if (res.data.is_active == 0) {
|
||||
this.haveImg = false;
|
||||
this.vision = true;
|
||||
}
|
||||
}
|
||||
}, error => {})
|
||||
}
|
||||
},error=>{})
|
||||
} else {
|
||||
this.isShowP = false
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
chooseLike(e){//收藏事件
|
||||
chooseLike(e) { //收藏事件
|
||||
// console.log(this.dataList[e].is_collected);
|
||||
let cateId = ''
|
||||
let newArr = []
|
||||
if(this.cateCurrent==0) {
|
||||
newArr = this.listArrone
|
||||
cateId = newArr[e].id
|
||||
}
|
||||
if(this.cateCurrent==1) {
|
||||
newArr = this.listArrtwo
|
||||
cateId = newArr[e].id
|
||||
}
|
||||
if(this.cateCurrent==2) {
|
||||
newArr = this.listArrthree
|
||||
cateId = newArr[e].id
|
||||
}
|
||||
if(this.cateCurrent==3) {
|
||||
newArr = this.listArrfour
|
||||
cateId = newArr[e].id
|
||||
}
|
||||
if(newArr[e].is_collected==0){
|
||||
newArr[e].is_collected = 1
|
||||
if (this.allList[e].is_collected == 0) {
|
||||
this.allList[e].is_collected = 1
|
||||
// 调用收藏事件
|
||||
collectionEV({action:'collect',archive_id:cateId})
|
||||
collectionEV({
|
||||
action: 'collect',
|
||||
archive_id: this.allList[e].id
|
||||
})
|
||||
}
|
||||
},
|
||||
comfirmev(e){//确认取消收藏事件
|
||||
let cateId = ''
|
||||
if(this.cateCurrent==0) {
|
||||
this.listArrone[e].is_collected = 0
|
||||
cateId = this.listArrone[e].id
|
||||
}
|
||||
if(this.cateCurrent==1) {
|
||||
this.listArrtwo[e].is_collected = 0
|
||||
cateId = this.listArrtwo[e].id
|
||||
}
|
||||
if(this.cateCurrent==2) {
|
||||
this.listArrthree[e].is_collected = 0
|
||||
cateId = this.listArrthree[e].id
|
||||
}
|
||||
if(this.cateCurrent==3) {
|
||||
this.listArrfour[e].is_collected = 0
|
||||
cateId = this.listArrfour[e].id
|
||||
}
|
||||
this.$toolAll.tools.showToast('正在取消...','loading')
|
||||
comfirmev(e) { //确认取消收藏事件
|
||||
this.allList[e].is_collected = 0;
|
||||
this.$toolAll.tools.showToast('正在取消...', 'loading')
|
||||
// 调用取消收藏事件
|
||||
cancleCollectionEV({action:'collect',archive_id:cateId})
|
||||
cancleCollectionEV({
|
||||
action: 'collect',
|
||||
archive_id: this.allList[e].id
|
||||
})
|
||||
},
|
||||
chooseLikex(e){//收藏事件
|
||||
if(this.xgList[e].is_collected==0){
|
||||
chooseLikex(e) { //收藏事件
|
||||
if (this.xgList[e].is_collected == 0) {
|
||||
this.xgList[e].is_collected = 1
|
||||
// 调用收藏事件
|
||||
collectionEV({action:'collect',archive_id:this.xgList[e].id})
|
||||
collectionEV({
|
||||
action: 'collect',
|
||||
archive_id: this.xgList[e].id
|
||||
})
|
||||
}
|
||||
},
|
||||
comfirmevx(e){//确认取消收藏事件
|
||||
comfirmevx(e) { //确认取消收藏事件
|
||||
this.xgList[e].is_collected = 0
|
||||
this.$toolAll.tools.showToast('正在取消...','loading')
|
||||
this.$toolAll.tools.showToast('正在取消...', 'loading')
|
||||
// 调用取消收藏事件
|
||||
cancleCollectionEV({action:'collect',archive_id:this.xgList[e].id})
|
||||
cancleCollectionEV({
|
||||
action: 'collect',
|
||||
archive_id: this.xgList[e].id
|
||||
})
|
||||
},
|
||||
buttonH(e){//授权成功
|
||||
buttonH(e) { //授权成功
|
||||
this.haveImg = e
|
||||
if(e) {
|
||||
if (e) {
|
||||
this.vision = false
|
||||
this.isShowP = true
|
||||
}
|
||||
},
|
||||
cancleEv(e){//取消授权
|
||||
if(e==0) this.vision = false
|
||||
cancleEv(e) { //取消授权
|
||||
if (e == 0) this.vision = false
|
||||
},
|
||||
backHome(){
|
||||
backHome() {
|
||||
uni.navigateTo({
|
||||
url:'/pages/tabbar/pagehome/pagehome'
|
||||
url: '/pages/tabbar/pagehome/pagehome'
|
||||
})
|
||||
},
|
||||
lianK(){//客服
|
||||
lianK() { //客服
|
||||
// if(!this.jieDuan){
|
||||
// let isAuth = this.$toolAll.tools.returnAuth()
|
||||
// if(!isAuth){
|
||||
if(this.haveImg == false) {
|
||||
this.vision = true
|
||||
} else {
|
||||
this.$requst.post('user/rand-bind-service').then(res=>{})
|
||||
this.$toolAll.tools.closeTimer()//清空埋点倒计时
|
||||
this.$requst.post('user/record',{type:'other',action:'ask',id:0}).then(res=>{},error=>{})
|
||||
let maiOjb = {
|
||||
e:5,//内容咨询
|
||||
t:new Date().getTime()//当前时间戳
|
||||
}
|
||||
this.$toolAll.tools.maiDian(maiOjb)
|
||||
if (this.haveImg == false) {
|
||||
this.vision = true
|
||||
} else {
|
||||
this.$requst.post('user/rand-bind-service').then(res => {})
|
||||
this.$toolAll.tools.closeTimer() //清空埋点倒计时
|
||||
this.$requst.post('user/record', {
|
||||
type: 'other',
|
||||
action: 'ask',
|
||||
id: 0
|
||||
}).then(res => {}, error => {})
|
||||
let maiOjb = {
|
||||
e: 5, //内容咨询
|
||||
t: new Date().getTime() //当前时间戳
|
||||
}
|
||||
this.$toolAll.tools.maiDian(maiOjb)
|
||||
}
|
||||
// } else this.jieDuan = true
|
||||
// }
|
||||
},
|
||||
shareEv(){
|
||||
if(this.haveImg == false) {
|
||||
shareEv() {
|
||||
if (this.haveImg == false) {
|
||||
this.vision = true
|
||||
}
|
||||
},
|
||||
checkDetail(newId){
|
||||
this.$requst.post('archives/detail',{id:newId,share_id:this.share_id}).then(res=>{
|
||||
checkDetail(newId) {
|
||||
this.$requst.post('archives/detail', {
|
||||
id: newId,
|
||||
share_id: this.share_id
|
||||
}).then(res => {
|
||||
// console.log('详情数据:',res);
|
||||
if(res.code==0){
|
||||
this.isLoading=true
|
||||
if (res.code == 0) {
|
||||
this.isLoading = true
|
||||
// 栏目类别
|
||||
if(res.data.category.length!=0){
|
||||
res.data.category.forEach((item,index)=>{
|
||||
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
|
||||
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)
|
||||
this.allArr.push([]);
|
||||
// 默认选中的栏目
|
||||
if(item.active==1) this.active = this.cateCurrent = index
|
||||
if (item.active == 1) this.active = this.cateCurrent = index
|
||||
// 默认展示栏目详情
|
||||
if(this.category_id==item.id) this.isNum = index
|
||||
if (this.category_id == item.id) this.isNum = index
|
||||
})
|
||||
}
|
||||
if(this.invite_code!='' && this.invite_code!=undefined){
|
||||
if (this.invite_code != '' && this.invite_code != undefined) {
|
||||
const query = wx.createSelectorQuery()
|
||||
query.select('.statusHNH').boundingClientRect((rect) => {
|
||||
// console.log('状态栏+标题栏:',rect);
|
||||
|
@ -442,175 +400,199 @@
|
|||
}
|
||||
// 详情
|
||||
this.detailObj = res.data.detail;
|
||||
if(this.detailObj.published_headimgurl!=''){
|
||||
if (this.detailObj.published_headimgurl != '') {
|
||||
this.fabImg = this.$http + this.detailObj.published_headimgurl;
|
||||
}
|
||||
let maiOjb = {
|
||||
e:1,//内容访问
|
||||
c:this.detailObj.id*1,
|
||||
t:new Date().getTime()//当前时间戳
|
||||
e: 1, //内容访问
|
||||
c: this.detailObj.id * 1,
|
||||
t: new Date().getTime() //当前时间戳
|
||||
}
|
||||
this.$toolAll.tools.maiDian(maiOjb)
|
||||
if(this.detailObj.is_liked==1) {
|
||||
if(this.detailObj.likes >= 1000) this.likeCon = '999+'
|
||||
if (this.detailObj.is_liked == 1) {
|
||||
if (this.detailObj.likes >= 1000) this.likeCon = '999+'
|
||||
else this.likeCon = this.detailObj.likes
|
||||
}
|
||||
// 轮播
|
||||
// 图片字符串转数组
|
||||
let arrImg = this.detailObj.images.split(',')
|
||||
arrImg.forEach(item=>{
|
||||
arrImg.forEach(item => {
|
||||
let newImgObj = {
|
||||
imgSrc:this.$http + item,
|
||||
url:'',
|
||||
isVideo:false,
|
||||
poster:'',
|
||||
imgSrc: this.$http + item,
|
||||
url: '',
|
||||
isVideo: false,
|
||||
poster: '',
|
||||
}
|
||||
// 存图片
|
||||
this.bannerList.push(newImgObj)
|
||||
})
|
||||
// 存视频
|
||||
if(this.detailObj.video!=''){
|
||||
if (this.detailObj.video != '') {
|
||||
this.bannerList[0] = {
|
||||
imgSrc:this.$http + arrImg[0],
|
||||
url:this.$http + this.detailObj.video,
|
||||
isVideo:true,
|
||||
poster:'',
|
||||
imgSrc: this.$http + arrImg[0],
|
||||
url: this.$http + this.detailObj.video,
|
||||
isVideo: true,
|
||||
poster: '',
|
||||
}
|
||||
}
|
||||
// 默认显示是否收藏
|
||||
if(this.detailObj.is_collected==0) this.isDetailConllection = false
|
||||
if(this.detailObj.is_collected==1) this.isDetailConllection = true
|
||||
if(this.detailObj.is_liked==0) this.isDetailLike = false
|
||||
if(this.detailObj.is_liked==1) this.isDetailLike = true
|
||||
if (this.detailObj.is_collected == 0) this.isDetailConllection = false
|
||||
if (this.detailObj.is_collected == 1) this.isDetailConllection = true
|
||||
if (this.detailObj.is_liked == 0) this.isDetailLike = false
|
||||
if (this.detailObj.is_liked == 1) this.isDetailLike = true
|
||||
// 富文本
|
||||
this.detailInfo = this.$toolAll.tools.escape2Html(this.detailObj.content)
|
||||
// 相关推荐xgList
|
||||
if(res.data.diary.length!=0){
|
||||
res.data.diary.forEach(item=>{
|
||||
if (res.data.diary.length != 0) {
|
||||
res.data.diary.forEach(item => {
|
||||
let fabImg = '';
|
||||
if(item.published_headimgurl!='' && item.published_headimgurl!=null) fabImg = this.$http + item.published_headimgurl
|
||||
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")//是否是视频
|
||||
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") //是否是视频
|
||||
}
|
||||
if(item.cover!='' && item.video==''){
|
||||
if (item.cover != '' && item.video == '') {
|
||||
this.xgList.push(tObj)
|
||||
}
|
||||
})
|
||||
}
|
||||
// 推荐医生
|
||||
if(res.data.doctor.length!=0){
|
||||
res.data.doctor.forEach(item=>{
|
||||
if (res.data.doctor.length != 0) {
|
||||
res.data.doctor.forEach(item => {
|
||||
let doObj = {
|
||||
id:item.id,
|
||||
imgSrc: item.headimg!=null ? item.headimg : '',
|
||||
name:item.name,
|
||||
cyear:parseFloat(item.work_time),
|
||||
bmen:item.dept_name,
|
||||
zcheng:'主任医师',
|
||||
goodAt:item.diseases,
|
||||
show_detail:item.show_detail
|
||||
id: item.id,
|
||||
imgSrc: item.headimg != null ? item.headimg : '',
|
||||
name: item.name,
|
||||
cyear: parseFloat(item.work_time),
|
||||
bmen: item.dept_name,
|
||||
zcheng: '主任医师',
|
||||
goodAt: item.diseases,
|
||||
show_detail: item.show_detail
|
||||
}
|
||||
this.dataList.push(doObj)
|
||||
})
|
||||
}
|
||||
this.choosecateEv(this.cateCurrent)
|
||||
}
|
||||
},error=>{})
|
||||
}, error => {})
|
||||
},
|
||||
choosecateEv(e){
|
||||
this.cateCurrent = e
|
||||
this.$requst.post('archives/category',{category_id:this.cateList[e].id,keyword:''}).then(res=>{
|
||||
choosecateEv(e) {
|
||||
this.page = 1;
|
||||
this.isZanw = true;
|
||||
this.checkList(e);
|
||||
},
|
||||
checkList(e){
|
||||
this.$requst.post('archives/category', {
|
||||
category_id: this.cateList[e].id,
|
||||
keyword: '',
|
||||
page:this.page,
|
||||
size:this.size
|
||||
}).then(res => {
|
||||
// console.log('该分类下的列表:',res);
|
||||
if(res.code==0){
|
||||
if(e==0 && this.active!=e) this.listArrone = []
|
||||
if(e==1 && this.active!=e) this.listArrtwo = []
|
||||
if(e==2 && this.active!=e) this.listArrthree = []
|
||||
if(e==3 && this.active!=e) this.listArrfour = []
|
||||
if(res.data.list.list.length!=0){
|
||||
res.data.list.list.forEach(item=>{
|
||||
if (res.code == 0) {
|
||||
if(this.page==1) {
|
||||
if(this.active != e) this.allList = [];
|
||||
uni.pageScrollTo({
|
||||
scrollTop:0,
|
||||
duration:0
|
||||
})
|
||||
}
|
||||
this.total = res.data.list.total;
|
||||
if (res.data.list.list.length != 0) {
|
||||
res.data.list.list.forEach(item => {
|
||||
let num = item.video.search(".mp4")
|
||||
let isVideo = false
|
||||
if(num!='-1') isVideo = true
|
||||
if (num != '-1') isVideo = true
|
||||
let arrObj = {
|
||||
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:'/static/public/logo.png',//发布者头像
|
||||
name:'恒美植发',//发布者昵称
|
||||
isVideo:isVideo//是否是视频
|
||||
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: '/static/public/logo.png', //发布者头像
|
||||
name: '恒美植发', //发布者昵称
|
||||
isVideo: isVideo //是否是视频
|
||||
}
|
||||
if(item.cover!=''){
|
||||
if(e==0 && this.active!=e) this.listArrone.push(arrObj)
|
||||
if(e==1 && this.active!=e) this.listArrtwo.push(arrObj)
|
||||
if(e==2 && this.active!=e) this.listArrthree.push(arrObj)
|
||||
if(e==3 && this.active!=e) this.listArrfour.push(arrObj)
|
||||
if (item.cover != '') {
|
||||
this.allList.push(arrObj);
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
},error=>{})
|
||||
this.cateCurrent = e;
|
||||
} else this.$toolAll.tools.showToast(res.msg);
|
||||
}, error => {})
|
||||
},
|
||||
tapLike(){//喜欢、不喜欢事件
|
||||
tapLike() { //喜欢、不喜欢事件
|
||||
// if(!this.jieDuan){
|
||||
// let isAuth = this.$toolAll.tools.returnAuth()
|
||||
// if(!isAuth){
|
||||
this.isDetailLike = !this.isDetailLike
|
||||
if(this.isDetailLike){
|
||||
this.detailObj.likes++
|
||||
this.likeCon = this.detailObj.likes
|
||||
if(this.likeCon >= 1000) this.likeCon = '999+'
|
||||
}else{
|
||||
this.detailObj.likes--
|
||||
this.likeCon = '喜欢'
|
||||
}
|
||||
let isLikeCon = 'like'
|
||||
//调用点赞事件
|
||||
if(this.isDetailLike) collectionEV({action:isLikeCon,archive_id:this.detailObj.id})
|
||||
//调用取消点赞事件
|
||||
else cancleCollectionEV({action:isLikeCon,archive_id:this.detailObj.id})
|
||||
this.isDetailLike = !this.isDetailLike
|
||||
if (this.isDetailLike) {
|
||||
this.detailObj.likes++
|
||||
this.likeCon = this.detailObj.likes
|
||||
if (this.likeCon >= 1000) this.likeCon = '999+'
|
||||
} else {
|
||||
this.detailObj.likes--
|
||||
this.likeCon = '喜欢'
|
||||
}
|
||||
let isLikeCon = 'like'
|
||||
//调用点赞事件
|
||||
if (this.isDetailLike) collectionEV({
|
||||
action: isLikeCon,
|
||||
archive_id: this.detailObj.id
|
||||
})
|
||||
//调用取消点赞事件
|
||||
else cancleCollectionEV({
|
||||
action: isLikeCon,
|
||||
archive_id: this.detailObj.id
|
||||
})
|
||||
// } else this.jieDuan = true
|
||||
// }
|
||||
},
|
||||
tapConllection(){//收藏、取消收藏事件
|
||||
tapConllection() { //收藏、取消收藏事件
|
||||
let isLikeCon = 'collect'
|
||||
// if(!this.jieDuan){
|
||||
// let isAuth = this.$toolAll.tools.returnAuth()
|
||||
// if(!isAuth){
|
||||
// 调用收藏事件
|
||||
if(!this.isDetailConllection) collectionEV({action:isLikeCon,archive_id:this.detailObj.id})
|
||||
// 调用取消收藏事件
|
||||
else cancleCollectionEV({action:isLikeCon,archive_id:this.detailObj.id})
|
||||
this.isDetailConllection = !this.isDetailConllection
|
||||
// 调用收藏事件
|
||||
if (!this.isDetailConllection) collectionEV({
|
||||
action: isLikeCon,
|
||||
archive_id: this.detailObj.id
|
||||
})
|
||||
// 调用取消收藏事件
|
||||
else cancleCollectionEV({
|
||||
action: isLikeCon,
|
||||
archive_id: this.detailObj.id
|
||||
})
|
||||
this.isDetailConllection = !this.isDetailConllection
|
||||
// } else this.jieDuan = true
|
||||
// }
|
||||
},
|
||||
backTop(){//回到顶部事件
|
||||
uni.pageScrollTo({
|
||||
scrollTop: 0,
|
||||
duration: 300
|
||||
});
|
||||
backTop() { //回到顶部事件
|
||||
uni.pageScrollTo({
|
||||
scrollTop: 0,
|
||||
duration: 300
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
|
||||
</style>
|
||||
|
|
|
@ -33,6 +33,10 @@
|
|||
<pu-po :isShowT="isShowT" @comfirmev="comfirmev" @cancleev="cancleev"></pu-po>
|
||||
<!-- 返回顶部 -->
|
||||
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
|
||||
<!-- 弹框授权 -->
|
||||
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
|
||||
<!-- 弹框 -->
|
||||
<auth-phone v-if="isShowP"></auth-phone>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -41,7 +45,7 @@
|
|||
import {collectionEV,cancleCollectionEV} from '@/jsFile/publicAPI.js';
|
||||
export default {
|
||||
components:{
|
||||
cateTu
|
||||
cateTu,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -80,7 +84,9 @@
|
|||
size:10,
|
||||
total:'',//总数
|
||||
isZanw:true,
|
||||
category_id:''//栏目ID
|
||||
category_id:'',//栏目ID
|
||||
vision:false,
|
||||
isShowP:false,
|
||||
}
|
||||
},
|
||||
onPageScroll(e) {
|
||||
|
@ -99,6 +105,12 @@
|
|||
uni.removeStorageSync('cateList')
|
||||
},
|
||||
onLoad(options) {
|
||||
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
|
||||
if(options.invite_code!='' && options.invite_code!=undefined){
|
||||
this.loginEv(options.invite_code);
|
||||
} else if(options.source_code!='' && options.source_code!=undefined){
|
||||
this.loginEv('',options.source_code,options.channel);
|
||||
}
|
||||
if(options.keyWorld!=undefined && options.keyWorld!='') {
|
||||
this.searchVal = options.keyWorld
|
||||
this.searchEv()
|
||||
|
@ -111,6 +123,34 @@
|
|||
if(this.searchVal!=undefined && this.searchVal!='') this.searchEv()
|
||||
},
|
||||
methods: {
|
||||
loginEv(invite_code='',source='',channel=''){
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (res)=> {
|
||||
if (res.code) {
|
||||
var params = {
|
||||
code:res.code,
|
||||
invite_code:invite_code,//用户邀请码
|
||||
source_code:source,
|
||||
channel:channel
|
||||
}
|
||||
this.$requst.post('user/login',params).then(res => {
|
||||
if(res.data.token!=''){
|
||||
if(res.data.is_active==0) {
|
||||
this.vision = true;
|
||||
}
|
||||
}
|
||||
},error => {})
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
buttonH(e){//授权成功
|
||||
if(e) {
|
||||
this.vision = false
|
||||
this.isShowP = true
|
||||
}
|
||||
},
|
||||
checkKey(){//查询热搜关键词事件
|
||||
this.$requst.get('index/hot-keywords').then(res=>{
|
||||
// console.log('关键词列表:',res);
|
||||
|
@ -186,7 +226,7 @@
|
|||
this.cateList = uni.getStorageSync('cateList')
|
||||
}
|
||||
// 获取列表
|
||||
if(this.page==1) this.dataList = []
|
||||
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=>{
|
||||
|
@ -206,10 +246,11 @@
|
|||
name:item.published_by || '恒美植发',//发布者昵称
|
||||
isVideo:item.video.includes(".mp4")//是否是视频
|
||||
}
|
||||
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)
|
||||
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 = {
|
||||
|
|
|
@ -28,6 +28,10 @@
|
|||
<pu-po :isShowT="isShowT" :contentVal="'暂未开放此功能,请耐心等候'" :isCenter="true" :comfrimVal="'好的'" @comfirmev="isShowT=false"></pu-po>
|
||||
<!-- 底部客服 -->
|
||||
<public-customer :nbottom="100"></public-customer>
|
||||
<!-- 弹框授权 -->
|
||||
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
|
||||
<!-- 弹框 -->
|
||||
<auth-phone v-if="isShowP"></auth-phone>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -44,7 +48,9 @@
|
|||
{num:'0',title:'分享人'},
|
||||
{num:'0',title:'分享订单'},
|
||||
],
|
||||
imgSrcP:uni.getStorageSync('imgSrcP')
|
||||
imgSrcP:uni.getStorageSync('imgSrcP'),
|
||||
vision:false,
|
||||
isShowP:false,
|
||||
}
|
||||
},
|
||||
onShareAppMessage(options) {
|
||||
|
@ -77,10 +83,45 @@
|
|||
onShow() {
|
||||
this.$toolAll.tools.isLogin()
|
||||
},
|
||||
onLoad() {
|
||||
onLoad(options) {
|
||||
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
|
||||
if(options.invite_code!='' && options.invite_code!=undefined){
|
||||
this.loginEv(options.invite_code);
|
||||
} else if(options.source_code!='' && options.source_code!=undefined){
|
||||
this.loginEv('',options.source_code,options.channel);
|
||||
}
|
||||
uni.getStorageSync('shareAll')!='' ? this.dataList[1].num = uni.getStorageSync('shareAll').share_users.total : this.dataList[1].num = 0
|
||||
|
||||
},
|
||||
methods: {
|
||||
loginEv(invite_code='',source='',channel=''){
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (res)=> {
|
||||
if (res.code) {
|
||||
var params = {
|
||||
code:res.code,
|
||||
invite_code:invite_code,//用户邀请码
|
||||
source_code:source,
|
||||
channel:channel
|
||||
}
|
||||
this.$requst.post('user/login',params).then(res => {
|
||||
if(res.data.token!=''){
|
||||
if(res.data.is_active==0) {
|
||||
this.vision = true;
|
||||
}
|
||||
}
|
||||
},error => {})
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
buttonH(e){//授权成功
|
||||
if(e) {
|
||||
this.vision = false
|
||||
this.isShowP = true
|
||||
}
|
||||
},
|
||||
shareEv(){//分享事件
|
||||
if(this.imgSrcP==''){
|
||||
this.$toolAll.tools.showToast('请先前往个人海报申请海报')
|
||||
|
|
|
@ -32,6 +32,10 @@
|
|||
</view>
|
||||
<!-- 底部客服 -->
|
||||
<public-customer :nbottom="100"></public-customer>
|
||||
<!-- 弹框授权 -->
|
||||
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
|
||||
<!-- 弹框 -->
|
||||
<auth-phone v-if="isShowP"></auth-phone>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -48,7 +52,9 @@
|
|||
page:1,
|
||||
size:10,
|
||||
total:'',//总数
|
||||
isZanw:true
|
||||
isZanw:true,
|
||||
vision:false,
|
||||
isShowP:false,
|
||||
}
|
||||
},
|
||||
onPageScroll(e) {
|
||||
|
@ -66,10 +72,44 @@
|
|||
onShow() {
|
||||
this.$toolAll.tools.isLogin()
|
||||
},
|
||||
onLoad() {
|
||||
onLoad(options) {
|
||||
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
|
||||
if(options.invite_code!='' && options.invite_code!=undefined){
|
||||
this.loginEv(options.invite_code);
|
||||
} else if(options.source_code!='' && options.source_code!=undefined){
|
||||
this.loginEv('',options.source_code,options.channel);
|
||||
}
|
||||
this.checkList()
|
||||
},
|
||||
methods: {
|
||||
loginEv(invite_code='',source='',channel=''){
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (res)=> {
|
||||
if (res.code) {
|
||||
var params = {
|
||||
code:res.code,
|
||||
invite_code:invite_code,//用户邀请码
|
||||
source_code:source,
|
||||
channel:channel
|
||||
}
|
||||
this.$requst.post('user/login',params).then(res => {
|
||||
if(res.data.token!=''){
|
||||
if(res.data.is_active==0) {
|
||||
this.vision = true;
|
||||
}
|
||||
}
|
||||
},error => {})
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
buttonH(e){//授权成功
|
||||
if(e) {
|
||||
this.vision = false
|
||||
this.isShowP = true
|
||||
}
|
||||
},
|
||||
chooseId(id){
|
||||
this.backTop()
|
||||
this.page = 1
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
Loading…
Reference in New Issue