修改病种title

master
chen 2021-12-20 16:03:34 +08:00
parent 7d8d4e26b1
commit 664ddebb63
24 changed files with 1108 additions and 589 deletions

View File

@ -16,6 +16,7 @@
setTimeout(()=>{ setTimeout(()=>{
toolAll.tools.overdue()// toolAll.tools.overdue()//
},3000) },3000)
toolAll.tools.isVedio();
// checkSwip()// // checkSwip()//
}, },
onHide: function() { onHide: function() {

View File

@ -20,7 +20,7 @@
.list-box{width: 48.4%;} .list-box{width: 48.4%;}
.list-like-box{top: 18rpx;right: 18rpx;z-index: 1;} .list-like-box{top: 18rpx;right: 18rpx;z-index: 1;}
.list-like-box>image{width: 69rpx;height: 69rpx;} .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-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%;} .list-headimg{width: 28rpx;height: 28rpx;margin-right: 6rpx;border-radius: 100%;}
/* 分类 */ /* 分类 */

48
components/auth-phone.vue Normal file
View File

@ -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>

View File

@ -16,7 +16,8 @@
<!-- 视频标题 --> <!-- 视频标题 -->
<view class="fon30 bold mar-x10 disac" :style="{fontSize:nFon+'px'}"> <view class="fon30 bold mar-x10 disac" :style="{fontSize:nFon+'px'}">
<view class="clips1">{{item.title}}</view> <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="mar-x10 clips1 opc">{{item.content}}</view>
<view class="disac"> <view class="disac">
@ -26,7 +27,7 @@
<view class="clips1 opc">{{item.name}}</view> <view class="clips1 opc">{{item.name}}</view>
</view> </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> </view>
<!-- 右侧列表 --> <!-- 右侧列表 -->
@ -44,7 +45,7 @@
<!-- 视频标题 --> <!-- 视频标题 -->
<view class="fon30 bold mar-x10 disac" :style="{fontSize:nFon+'px'}"> <view class="fon30 bold mar-x10 disac" :style="{fontSize:nFon+'px'}">
<view class="clips1">{{item.title}}</view> <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>
<!-- 视频描述 --> <!-- 视频描述 -->
<view class="mar-x10 clips1 opc">{{item.content}}</view> <view class="mar-x10 clips1 opc">{{item.content}}</view>
@ -55,7 +56,7 @@
<view class="clips1 opc">{{item.name}}</view> <view class="clips1 opc">{{item.name}}</view>
</view> </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> </view>
</view> </view>
@ -111,7 +112,7 @@
isShowT:false, isShowT:false,
pu_content:'是否需要取消收藏?', pu_content:'是否需要取消收藏?',
current:'-1', current:'-1',
jieDuan:false isVedio:uni.getStorageSync('isVedio')
}; };
}, },
methods:{ methods:{
@ -119,24 +120,14 @@
if(e==0) this.vision = false if(e==0) this.vision = false
}, },
goDetail(index){// goDetail(index){//
if(this.jieDuan==false){
let isAuth = this.$toolAll.tools.returnAuth()
if(!isAuth){
uni.navigateTo({ 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 url:'/pagesB/problemDetail/problemDetail?id='+this.list[index].id+'&category_id='+this.list[index].category_id
}) })
} else this.jieDuan = true
}
}, },
chooseLike(index){// chooseLike(index){//
// console.log('',index); // console.log('',index);
if(this.jieDuan==false){ this.$emit('chooseLike',index);
let isAuth = this.$toolAll.tools.returnAuth() this.current = index;
if(!isAuth){
// this.$emit('chooseLike',this.list[index].id)
this.$emit('chooseLike',index)
this.current = index
if(this.list[index].is_collected==1) { if(this.list[index].is_collected==1) {
this.isShowT = true this.isShowT = true
} else { } else {
@ -147,8 +138,6 @@
} }
this.$toolAll.tools.maiDian(maiOjb) this.$toolAll.tools.maiDian(maiOjb)
} }
} else this.jieDuan = true
}
}, },
comfirmev(){ comfirmev(){
// console.log(''); // console.log('');

View File

@ -5,7 +5,7 @@
<swiper-item v-for="(item,index) in bannerList" :key="index"> <swiper-item v-for="(item,index) in bannerList" :key="index">
<view @tap="chooseImg(index)" class="posir"> <view @tap="chooseImg(index)" class="posir">
<image :style="{borderRadius:newRadius+'px',height:newHeight+'px'}" class="img" :src="item.imgSrc" mode="aspectFill"></image> <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> </view>
</swiper-item> </swiper-item>
</swiper> </swiper>
@ -64,6 +64,7 @@
bcurrent:0, bcurrent:0,
isShowVideo:false, isShowVideo:false,
autoplay:false, autoplay:false,
isVedio:uni.getStorageSync('isVedio')
}; };
}, },
methods:{ methods:{
@ -73,13 +74,23 @@
if(this.browseP){ if(this.browseP){
let imgList = [] let imgList = []
this.bannerList.forEach(item=>{ this.bannerList.forEach(item=>{
let nurl = '' let nurl = '';
let obj = {}
if(this.isVedio) {
item.url=='' ? nurl = item.imgSrc : nurl = item.url item.url=='' ? nurl = item.imgSrc : nurl = item.url
let obj = { obj = {
url:nurl, url:nurl,
type:item.isVideo?'video':'image', type:item.isVideo?'video':'image',
poster:item.poster poster:item.poster
} }
} else {
nurl = item.imgSrc
obj = {
url:nurl,
type:'image',
poster:item.poster
}
}
imgList.push(obj) imgList.push(obj)
}) })
uni.previewMedia({ uni.previewMedia({

View File

@ -6,13 +6,13 @@ const tools = {
daoTime(){ daoTime(){
let daoTime = uni.getStorageSync('daoTime') let daoTime = uni.getStorageSync('daoTime')
if(daoTime==''){//初次判断倒计时是否为空 if(daoTime==''){//初次判断倒计时是否为空
uni.setStorageSync('daoTime',600)//设置倒计时 uni.setStorageSync('daoTime',60)//设置倒计时
daoTime = uni.getStorageSync('daoTime') daoTime = uni.getStorageSync('daoTime')
this.timer = setInterval(()=>{ this.timer = setInterval(()=>{
uni.setStorageSync('daoTime',daoTime--)//设置倒计时 uni.setStorageSync('daoTime',daoTime--)//设置倒计时
// console.log('埋点倒计时初次:',daoTime); // console.log('埋点倒计时初次:',daoTime);
// console.log('埋点长度初次:',uni.getStorageSync('maiList').length); // 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')//清空倒计时 uni.removeStorageSync('daoTime')//清空倒计时
clearInterval(this.timer)//关闭倒计时 clearInterval(this.timer)//关闭倒计时
// console.log('上/报,埋点'); // console.log('上/报,埋点');
@ -26,7 +26,7 @@ const tools = {
uni.setStorageSync('daoTime',daoTime--)//设置倒计时 uni.setStorageSync('daoTime',daoTime--)//设置倒计时
// console.log('埋点倒计时:',daoTime); // console.log('埋点倒计时:',daoTime);
// console.log('埋点长度:',uni.getStorageSync('maiList').length); // 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')//清空倒计时 uni.removeStorageSync('daoTime')//清空倒计时
clearInterval(this.timer)//关闭倒计时 clearInterval(this.timer)//关闭倒计时
// console.log('上报,埋点'); // console.log('上报,埋点');
@ -322,6 +322,28 @@ const tools = {
if(uni.getStorageSync('is_active')!='' && uni.getStorageSync('is_active') !=0){ if(uni.getStorageSync('is_active')!='' && uni.getStorageSync('is_active') !=0){
this.overdue() 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/'));
}
}
})
} }
} }

View File

@ -16,7 +16,10 @@ import nothingPage from './components/nothing-page.vue'//引入无内容组件
Vue.component('nothing-page',nothingPage)//全局注册无内容组件 Vue.component('nothing-page',nothingPage)//全局注册无内容组件
import publicCustomer from './components/public-customer.vue'//引入客服组件 import publicCustomer from './components/public-customer.vue'//引入客服组件
Vue.component('public-customer',publicCustomer)//全局注册客服组件 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)//全局注册用户授权组件
// 常用工具 // 常用工具

View File

@ -47,6 +47,10 @@
<foot-tab :titleList="titleList" :imgList="imgList" :newcurrent='1'></foot-tab> <foot-tab :titleList="titleList" :imgList="imgList" :newcurrent='1'></foot-tab>
<!-- 返回顶部 --> <!-- 返回顶部 -->
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> --> <!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view> </view>
</template> </template>
@ -85,7 +89,9 @@
bannerList:[], bannerList:[],
titleList:[], titleList:[],
imgList:[], imgList:[],
isAutoPlay:false isAutoPlay:false,
vision:false,
isShowP:false,
} }
}, },
onPageScroll(e) { onPageScroll(e) {
@ -106,7 +112,13 @@
onUnload() { onUnload() {
this.isAutoPlay = false; 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()// this.checkBZ()//
let maiOjb = { let maiOjb = {
e:7,// e:7,//
@ -124,6 +136,34 @@
this.isAutoPlay = true; this.isAutoPlay = true;
}, },
methods: { 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(){ checkSwi(){
checkBanner({position:'category-hot-banner'}).then(res=>{ checkBanner({position:'category-hot-banner'}).then(res=>{
if(res.code==0){ if(res.code==0){
@ -236,10 +276,11 @@
name:item.published_by || '恒美植发',// name:item.published_by || '恒美植发',//
isVideo:item.video.includes(".mp4")// isVideo:item.video.includes(".mp4")//
} }
if(this.newCurrent==0 && item.category_id==32) this.dataList.push(tObj) this.dataList.push(tObj);
if(this.newCurrent==1 && item.category_id==33) this.dataList.push(tObj) // if(this.newCurrent==0 && item.category_id==32) this.dataList.push(tObj)
if(this.newCurrent==2 && item.category_id==34) this.dataList.push(tObj) // if(this.newCurrent==1 && item.category_id==33) this.dataList.push(tObj)
if(this.newCurrent==3 && item.category_id==38) 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)
}) })
} }
} }

View File

@ -83,23 +83,22 @@
</view> </view>
<!-- 底部tab --> <!-- 底部tab -->
<foot-tab :titleList="titleList" :imgList="imgList" :newcurrent='4'></foot-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 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 style="padding: 20rpx 40rpx;background-color: rgba(0,0,0,.6);color: #FFFFFF;border-radius: 6rpx;">签到成功</view>
</view> </view>
<!-- 弹框授权 -->
<empower :vision="vision"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view> </view>
</template> </template>
<script> <script>
import {base64ToPath} from '@/jsFile/base64-src.js'; import {base64ToPath} from '@/jsFile/base64-src.js';
import empower from '@/components/empower.vue';
import {checkBanner} from '@/jsFile/publicAPI.js'; import {checkBanner} from '@/jsFile/publicAPI.js';
export default { export default {
components:{empower},
data() { data() {
return { return {
vision:false,
statusHNH:uni.getStorageSync('statusHNH'), statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'), publicColor:uni.getStorageSync('publicColor'),
tongList:[ tongList:[
@ -139,7 +138,9 @@
isAuth:'', isAuth:'',
guanggao:'', guanggao:'',
timer:null, timer:null,
nonce_str:'' nonce_str:'',
vision:false,
isShowP:false,
} }
}, },
onUnload: function() { onUnload: function() {
@ -193,7 +194,13 @@
} }
},error=>{}) },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')==''){ if(uni.getStorageSync('gao')==''){
const query = wx.createSelectorQuery() const query = wx.createSelectorQuery()
query.select('.gao').boundingClientRect((rect) => { query.select('.gao').boundingClientRect((rect) => {
@ -204,6 +211,34 @@
this.checkSwi() this.checkSwi()
}, },
methods: { 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(){// tuneUpqr(){//
this.isQrcode = true; this.isQrcode = true;
this.checkGM(); this.checkGM();
@ -250,9 +285,6 @@
} }
}) })
}, },
cancleEv(e){
if(e==0) this.vision = false
},
checkGM(){// checkGM(){//
this.$requst.post('user/personal-qr').then(res=>{ this.$requst.post('user/personal-qr').then(res=>{
// console.log('',res); // console.log('',res);

View File

@ -175,7 +175,6 @@
var ya = this; var ya = this;
let maiOjb = { let maiOjb = {
e:6,// e:6,//
c:this.detailObj.id*1,
t:new Date().getTime()// t:new Date().getTime()//
} }
this.$toolAll.tools.maiDian(maiOjb) this.$toolAll.tools.maiDian(maiOjb)
@ -186,39 +185,11 @@
  return shareObj;   return shareObj;
}, },
onLoad(options) { onLoad(options) {
if (options.invite_code!=undefined) { if(options.source_code!='' && options.source_code!=undefined){
uni.login({ this.loginEv(options);
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 => {})
},
});
}
console.log(options.invite_code);
if(options.invite_code!='' && options.invite_code!=undefined){ if(options.invite_code!='' && options.invite_code!=undefined){
uni.login({ this.loginEv(options);
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 => {})
}
},
});
} }
const query = wx.createSelectorQuery() const query = wx.createSelectorQuery()
query.select('.statusHNH').boundingClientRect((rect) => { query.select('.statusHNH').boundingClientRect((rect) => {
@ -226,14 +197,28 @@
uni.setStorageSync('statusHNH',rect.height) uni.setStorageSync('statusHNH',rect.height)
this.statusHNH = rect.height this.statusHNH = rect.height
}).exec() }).exec()
this.checkBCate() this.checkBCate();
this.checkKey() this.checkKey();
this.checkSwi()// this.checkSwi();//
// this.checkBanner()// // this.checkBanner()//
this.$toolAll.tools.buriedPointAll()//id this.$toolAll.tools.buriedPointAll()//id
this.checkUserInfo(); this.checkUserInfo();
}, },
methods: { 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(){ checkUserInfo(){
this.$requst.post('user/info').then(res=>{ this.$requst.post('user/info').then(res=>{
if(res.code==0){ if(res.code==0){
@ -454,32 +439,6 @@
// //
cancleCollectionEV({action:'collect',archive_id:this.dataList[e].id}) 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){// chooseGon(index){//
if(!this.jieDuan){ if(!this.jieDuan){
let isAuth = this.$toolAll.tools.returnAuth() let isAuth = this.$toolAll.tools.returnAuth()

View File

@ -30,6 +30,10 @@
<public-customer :nbottom="100"></public-customer> <public-customer :nbottom="100"></public-customer>
<!-- 返回顶部 --> <!-- 返回顶部 -->
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> --> <!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view> </view>
</template> </template>
@ -38,7 +42,7 @@
import {checkBanner} from '@/jsFile/publicAPI.js'; import {checkBanner} from '@/jsFile/publicAPI.js';
export default { export default {
components:{ components:{
swiperPu swiperPu,
}, },
data() { data() {
return { return {
@ -67,7 +71,9 @@
total:'',// total:'',//
isZanw:true, isZanw:true,
bannerList:[], bannerList:[],
isAutoPlay:false isAutoPlay:false,
vision:false,
isShowP:false,
} }
}, },
onPageScroll(e) { onPageScroll(e) {
@ -92,11 +98,45 @@
onUnload() { onUnload() {
this.isAutoPlay = false; 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.checkAbout(this.category_id)
this.checkSwi() this.checkSwi()
}, },
methods: { 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(){ checkSwi(){
checkBanner({position:'about-banner'}).then(res=>{ checkBanner({position:'about-banner'}).then(res=>{
if(res.code==0){ if(res.code==0){

View File

@ -57,31 +57,17 @@
</view> </view>
</view> </view>
</view> </view>
<empower @buttonH="buttonH" :vision="vision" :isWhere="2" @cancleEv="cancleEv"></empower>
<!-- 底部客服 --> <!-- 底部客服 -->
<public-customer :nbottom="140"></public-customer> <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"> <auth-phone v-if="isShowP"></auth-phone>
<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>
</view> </view>
</template> </template>
<script> <script>
import empower from '@/components/empower.vue';
export default { export default {
components:{
empower
},
data() { data() {
return { return {
statusHNH:uni.getStorageSync('statusHNH'), statusHNH:uni.getStorageSync('statusHNH'),
@ -96,8 +82,6 @@
haveImg:true, haveImg:true,
detailId:'',//ID detailId:'',//ID
invite_code:'', invite_code:'',
vision:false,
isShowP:false,
newCurrent:0, newCurrent:0,
cateListTwo:[], cateListTwo:[],
dataList:[], dataList:[],
@ -106,6 +90,8 @@
page:1, page:1,
total:'',// total:'',//
isZanw:true, isZanw:true,
vision:false,
isShowP:false,
} }
}, },
onShareAppMessage(res) { onShareAppMessage(res) {
@ -130,27 +116,13 @@
onLoad(options) { onLoad(options) {
this.checkDetail(options.id) this.checkDetail(options.id)
this.detailId = 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){ if(options.invite_code!='' && options.invite_code!=undefined){
uni.login({ this.loginEv(options.invite_code);
provider: 'weixin', } else if(options.source_code!='' && options.source_code!=undefined){
success: (res)=> { this.loginEv('',options.source_code,options.channel);
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.checkAbout(this.category_id) this.checkAbout(this.category_id)
}, },
@ -164,6 +136,36 @@
} }
}, },
methods: { 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){ checkAbout(category_id){
let params = { let params = {
category_id:category_id, category_id:category_id,
@ -218,32 +220,6 @@
url:'/pagesB/articleDetail/articleDetail?id='+this.dataList[index].id +"&category_id="+this.category_id 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(){ backHome(){
uni.navigateTo({ uni.navigateTo({
url:'/pages/tabbar/pagehome/pagehome' url:'/pages/tabbar/pagehome/pagehome'

View File

@ -39,6 +39,10 @@
</view> </view>
<!-- 底部客服 --> <!-- 底部客服 -->
<public-customer :nbottom="100"></public-customer> <public-customer :nbottom="100"></public-customer>
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view> </view>
</template> </template>
@ -55,7 +59,9 @@
size:10, size:10,
total:'',// total:'',//
isZanw:true, isZanw:true,
ntype:''// mine= ntype:'',// mine=
vision:false,
isShowP:false,
} }
}, },
onPageScroll(e) { onPageScroll(e) {
@ -73,10 +79,44 @@
onShow() { onShow() {
this.$toolAll.tools.isLogin() 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() this.checkList()
}, },
methods: { 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(){// searchEv(){//
if(this.keyword!='') this.ntype = '' if(this.keyword!='') this.ntype = ''
this.page = 1 this.page = 1

View File

@ -51,6 +51,10 @@
</view> </view>
<!-- 底部客服 --> <!-- 底部客服 -->
<public-customer :nbottom="100"></public-customer> <public-customer :nbottom="100"></public-customer>
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view> </view>
</template> </template>
@ -76,7 +80,9 @@
total:'', total:'',
isZanw:true, isZanw:true,
ntype:'', ntype:'',
isAllot:uni.getStorageSync('customer-allot') isAllot:uni.getStorageSync('customer-allot'),
vision:false,
isShowP:false,
} }
}, },
onPageScroll(e) { onPageScroll(e) {
@ -98,12 +104,46 @@
onShow() { onShow() {
this.$toolAll.tools.isLogin() 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.checkKF()//
this.checkCL()// this.checkCL()//
this.checkLY()// this.checkLY()//
}, },
methods: { 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(){// checkKF(){//
this.$requst.post('user/servicer-list').then(res=>{ this.$requst.post('user/servicer-list').then(res=>{
// console.log('',res); // console.log('',res);

View File

@ -31,6 +31,10 @@
</view> </view>
<!-- 底部客服 --> <!-- 底部客服 -->
<public-customer :nbottom="100"></public-customer> <public-customer :nbottom="100"></public-customer>
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view> </view>
</template> </template>
@ -38,7 +42,7 @@
import listDoctor from '@/components/list-doctor.vue'; import listDoctor from '@/components/list-doctor.vue';
export default { export default {
components:{ components:{
listDoctor listDoctor,
}, },
data() { data() {
return { return {
@ -56,7 +60,9 @@
size:20, size:20,
total:'',// total:'',//
isZanw:true, isZanw:true,
keyword:'' keyword:'',
vision:false,
isShowP:false,
} }
}, },
onPageScroll(e) { onPageScroll(e) {
@ -74,10 +80,44 @@
onShow() { onShow() {
this.$toolAll.tools.isLogin() 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() this.checkDor()
}, },
methods: { 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(){// checkDor(){//
this.$requst.post('user/doctor-list',{page:this.page,size:this.size,keyword:this.keyword}).then(res=>{ this.$requst.post('user/doctor-list',{page:this.page,size:this.size,keyword:this.keyword}).then(res=>{
// console.log('',res); // console.log('',res);

View File

@ -7,7 +7,8 @@
<view :style="{paddingTop: statusHNH+'px'}"> <view :style="{paddingTop: statusHNH+'px'}">
<view v-if="isLoading" class="bacf mar-s20 pad-s20 pad-y32 pad-x40"> <view v-if="isLoading" class="bacf mar-s20 pad-s20 pad-y32 pad-x40">
<view class="disjb"> <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="fon28 bold col3">{{doctorObj.doctor_extra.name}}</view>
<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>
@ -25,12 +26,16 @@
</view> </view>
</view> </view>
</view> </view>
<image class="radius10 flexs" :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.doctor_extra.summary}}</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> </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'}">
@ -47,6 +52,10 @@
</view> </view>
<!-- 底部客服 --> <!-- 底部客服 -->
<public-customer :nbottom="100"></public-customer> <public-customer :nbottom="100"></public-customer>
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view> </view>
</template> </template>
@ -77,7 +86,11 @@
isZanw:true, isZanw:true,
chuTop:'', chuTop:'',
isTop:false, isTop:false,
isLoading:false isLoading:false,
detailInfo:'',
peopleJian:'',
vision:false,
isShowP:false,
} }
}, },
onPageScroll(e) { onPageScroll(e) {
@ -102,13 +115,46 @@
}, },
onLoad(options) { onLoad(options) {
this.checkDoD(options.doctor_id) 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() const query = wx.createSelectorQuery()
query.select('#daoh').boundingClientRect((rect) => { query.select('#daoh').boundingClientRect((rect) => {
this.chuTop = rect.top this.chuTop = rect.top
}).exec() }).exec()
}, },
methods: { 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){// 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){
@ -127,8 +173,11 @@
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);
if(res.code==0){ if(res.code==0){
this.doctorObj = res.data this.doctorObj = res.data;
this.isLoading = true //
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=>{}) },error=>{})
}, },
@ -182,10 +231,11 @@
name:item.published_by || '恒美植发',// name:item.published_by || '恒美植发',//
isVideo:item.video.includes(".mp4")// isVideo:item.video.includes(".mp4")//
} }
if(this.newCurrent==0 && item.category_id==32) this.dataList.push(tObj) this.dataList.push(tObj);
if(this.newCurrent==1 && item.category_id==33) this.dataList.push(tObj) // if(this.newCurrent==0 && item.category_id==32) this.dataList.push(tObj)
if(this.newCurrent==2 && item.category_id==34) this.dataList.push(tObj) // if(this.newCurrent==1 && item.category_id==33) this.dataList.push(tObj)
if(this.newCurrent==3 && item.category_id==38) 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)
}) })
} }
} }

View File

@ -22,6 +22,10 @@
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> --> <!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
<!-- 底部客服 --> <!-- 底部客服 -->
<public-customer :nbottom="100"></public-customer> <public-customer :nbottom="100"></public-customer>
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view> </view>
</template> </template>
@ -44,6 +48,8 @@
isZanw:true, isZanw:true,
category_id:0,//ID category_id:0,//ID
chuTop:'', chuTop:'',
vision:false,
isShowP:false,
} }
}, },
onPageScroll(e) { onPageScroll(e) {
@ -65,7 +71,13 @@
this.$toolAll.tools.isLogin() this.$toolAll.tools.isLogin()
this.checkConList(this.category_id) 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() const query = wx.createSelectorQuery()
query.select('#daoh').boundingClientRect((rect) => { query.select('#daoh').boundingClientRect((rect) => {
// console.log('+',rect); // console.log('+',rect);
@ -73,6 +85,34 @@
}).exec() }).exec()
}, },
methods: { 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){// checkConList(category_id){//
// this.$toolAll.tools.showToast('...') // this.$toolAll.tools.showToast('...')
let params = { let params = {
@ -105,7 +145,13 @@
this.cateList = uni.getStorageSync('cateList') 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 this.total = res.data.list.total
if(res.data.list.list.length!=0){ if(res.data.list.list.length!=0){
uni.hideToast() uni.hideToast()
@ -126,10 +172,7 @@
name:item.published_by || '恒美植发',// name:item.published_by || '恒美植发',//
isVideo:item.video.includes(".mp4")// isVideo:item.video.includes(".mp4")//
} }
if(this.newCurrent==0 && item.category_id==32) this.dataList.push(tObj) 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)
}) })
} }
} }

View File

@ -39,6 +39,10 @@
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> --> <!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
<!-- 底部客服 --> <!-- 底部客服 -->
<public-customer :nbottom="100"></public-customer> <public-customer :nbottom="100"></public-customer>
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view> </view>
</template> </template>
@ -63,6 +67,8 @@
size:20, size:20,
total:'',// total:'',//
isZanw:true, isZanw:true,
vision:false,
isShowP:false,
} }
}, },
onPageScroll(e) { onPageScroll(e) {
@ -80,7 +86,13 @@
onShow() { onShow() {
this.$toolAll.tools.isLogin() 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')==''){ if(uni.getStorageSync('navHeight')==''){
const query = wx.createSelectorQuery() const query = wx.createSelectorQuery()
query.select('.navHeight').boundingClientRect((rect) => { query.select('.navHeight').boundingClientRect((rect) => {
@ -92,6 +104,34 @@
this.checkPeople()// this.checkPeople()//
}, },
methods: { 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(){// checkShare(){//
this.$requst.post('user/share-count').then(res=>{ this.$requst.post('user/share-count').then(res=>{
// console.log('',res); // console.log('',res);

View File

@ -26,6 +26,10 @@
<pu-po :isShowT="imgSrc==''" :contentVal="'立即生成创意海报'" :clearVal="'暂不生成'" :comfrimVal="'立即生成'" @comfirmev="comfirmev" @cancleev="cancleev"></pu-po> <pu-po :isShowT="imgSrc==''" :contentVal="'立即生成创意海报'" :clearVal="'暂不生成'" :comfrimVal="'立即生成'" @comfirmev="comfirmev" @cancleev="cancleev"></pu-po>
<!-- 底部客服 --> <!-- 底部客服 -->
<public-customer :nbottom="100"></public-customer> <public-customer :nbottom="100"></public-customer>
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view> </view>
</template> </template>
@ -39,13 +43,21 @@
isShowT:true, isShowT:true,
imgSrc:uni.getStorageSync('imgSrcP'), imgSrc:uni.getStorageSync('imgSrcP'),
isHaib:false, isHaib:false,
showBtn:false showBtn:false,
vision:false,
isShowP:false,
} }
}, },
onShow() { onShow() {
this.$toolAll.tools.isLogin() 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')// this.imgSrc = uni.getStorageSync('imgSrcP')//
if(this.imgSrc!='') { if(this.imgSrc!='') {
@ -55,6 +67,34 @@
} }
}, },
methods: { 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(){ shareEv(){
wx.showShareImageMenu({ wx.showShareImageMenu({
path: this.imgSrc path: this.imgSrc

View File

@ -12,7 +12,8 @@
<!-- 列表 --> <!-- 列表 -->
<view :style="{top: statusHNH+'px'}" class="posiszy" style="height: 50px;"> <view :style="{top: statusHNH+'px'}" class="posiszy" style="height: 50px;">
<view class="bacf pad-zy32 pad-sx20"> <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> </view>
<view class="pad-x180" :style="{paddingTop: (statusHNH+50)+'px'}"> <view class="pad-x180" :style="{paddingTop: (statusHNH+50)+'px'}">
@ -20,35 +21,45 @@
<view v-show="cateCurrent==isNum"> <view v-show="cateCurrent==isNum">
<view class="pad-zy32"> <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="disjbac">
<view class="disac"> <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="mar-z10">
<!-- 发布者昵称 --> <!-- 发布者昵称 -->
<view class="fon28 col3 clips1">{{detailObj.published_by || '恒美植发'}}</view> <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> </view>
<view class="disac flexs"> <view class="disac flexs">
<view class="disac fc" @tap="tapLike" style="width: 60rpx;"> <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-if="isDetailLike" src="/static/public/detail-like.png"
<image v-else src="/static/public/detail-nlike.png" style="width: 42rpx;height: 42rpx;" mode=""></image> 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 class="fon24 col9 tc">{{likeCon}}</view>
</view> </view>
<view @tap="shareEv" class="disac fc mar-zy36 posir"> <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> <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> --> <!-- <button v-if="haveImg" class="posia" open-type="share" style="top: 0;right: 0;left: 0;bottom: 0;opacity: 0;"></button> -->
</view> </view>
<view class="disac fc" @tap="tapConllection"> <view class="disac fc" @tap="tapConllection">
<image v-if="isDetailConllection" src="/static/public/yconllection.png" style="width: 44rpx;height: 44rpx;" mode=""></image> <image v-if="isDetailConllection" src="/static/public/yconllection.png"
<image v-else src="/static/public/conllection.png" style="width: 44rpx;height: 44rpx;" mode=""></image> 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 class="fon24 col9">收藏</view>
</view> </view>
</view> </view>
@ -73,40 +84,9 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 案例日记 --> <view v-if="cateCurrent!=isNum">
<view v-show="cateCurrent==0 && isNum!=0" class="pad-zy20"> <view v-if="allList.length!=0" class="pad-zy20">
<view v-if="listArrone.length!=0"> <list-pu @chooseLike="chooseLike" @comfirmev="comfirmev" :list="allList"></list-pu>
<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> </view>
<view v-else class="disjcac fc" style="margin-top: 40%;"> <view v-else class="disjcac fc" style="margin-top: 40%;">
<image class="zanw-img" src="/static/public/nothing.png" mode="aspectFill"></image> <image class="zanw-img" src="/static/public/nothing.png" mode="aspectFill"></image>
@ -116,18 +96,25 @@
</view> </view>
<view class="posixzy disjbac bacf pad-zy32 btnBKS"> <view class="posixzy disjbac bacf pad-zy32 btnBKS">
<view class="posir"> <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>
<view class="disac fon26 colf"> <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;"> <view @tap="lianK" class="disac posir lianShare"
<image src="/static/public/bottom-customer.png" class="mar-zy20" style="width: 47rpx;height: 47rpx;" mode="aspectFill"></image> 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> <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>
<view @tap="shareEv" class="disac posir lianShare" style="background-color: #38CE51;border-top-right-radius: 51rpx;border-bottom-right-radius: 51rpx;"> <view @tap="shareEv" class="disac posir lianShare"
<image src="/static/public/bottom-shear.png" style="width: 47rpx;height: 47rpx;margin-left: 15rpx;margin-right: 8rpx;" mode="aspectFill"></image> 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> <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> </view>
</view> </view>
@ -136,18 +123,7 @@
<!-- 弹框授权 --> <!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2" @cancleEv="cancleEv"></empower> <empower @buttonH="buttonH" :vision="vision" :isWhere="2" @cancleEv="cancleEv"></empower>
<!-- 弹框 --> <!-- 弹框 -->
<view v-if="isShowP" @touchmove.stop.prevent="moveHandle" class="disjcac posAll"> <auth-phone v-if="isShowP"></auth-phone>
<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>
</view> </view>
</view> </view>
</template> </template>
@ -155,13 +131,14 @@
<script> <script>
import listDoctor from '@/components/list-doctor.vue'; import listDoctor from '@/components/list-doctor.vue';
import swiperPu from '@/components/swiper-pu.vue'; import swiperPu from '@/components/swiper-pu.vue';
import {collectionEV,cancleCollectionEV} from '@/jsFile/publicAPI.js'; import {
import empower from '@/components/empower.vue'; collectionEV,
cancleCollectionEV
} from '@/jsFile/publicAPI.js';
export default { export default {
components: { components: {
listDoctor, listDoctor,
swiperPu, swiperPu,
empower
}, },
data() { data() {
return { return {
@ -200,36 +177,39 @@
isShowP: false, isShowP: false,
bcurrent: 0, bcurrent: 0,
isAutoPlay: false, isAutoPlay: false,
fabImg:''// fabImg: '' ,//
allArr:[],
page:1,
size:20,
total:0,
isZanw:true,
allList:[]
} }
}, },
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++) { if(this.cateCurrent!=this.isNum){
// if(this.cateCurrent==0) { if(this.total!=this.allList.length){
// let obj = {status:false,main_img:'',title:'',content:'',head_img:'/static/public/like.png',name:'',isCate:0} this.page++
// this.listArrone.push(obj) this.checkList(this.cateCurrent)//
// } } else {
// if(this.cateCurrent==1) { if(this.isZanw) this.$toolAll.tools.showToast('暂无更多列表','none',1000)
// let obj = {status:false,main_img:'',title:'',content:'',head_img:'/static/public/like.png',name:'',isCate:1} this.isZanw = false
// 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)
// }
// }
}, },
onShareTimeline() {}, onShareTimeline() {},
onShareAppMessage(res) { onShareAppMessage(res) {
var ya = this; var ya = this;
this.$requst.post('user/record',{type:'content',action:'share',id:this.detailObj.id}).then(res=>{console.log('分享成功:',res);},error=>{}) this.$requst.post('user/record', {
type: 'content',
action: 'share',
id: this.detailObj.id
}).then(res => {
console.log('分享成功:', res);
}, error => {})
let maiOjb = { let maiOjb = {
e: 4, // e: 4, //
c: this.detailObj.id * 1, c: this.detailObj.id * 1,
@ -237,11 +217,12 @@
} }
this.$toolAll.tools.maiDian(maiOjb) this.$toolAll.tools.maiDian(maiOjb)
var shareObj = { var shareObj = {
     title: `${ya.detailObj.title}`, // (slogan) title: `${ya.detailObj.title}`, // (slogan)
     path: `/pagesB/problemDetail/problemDetail?id=${this.detailObj.id}&category_id=${this.category_id}&share_id=${uni.getStorageSync('userId')}&invite_code=${uni.getStorageSync('invite_code')}`, // / path: `/pagesB/problemDetail/problemDetail?id=${this.detailObj.id}&category_id=${this.category_id}&share_id=${uni.getStorageSync('userId')}&invite_code=${uni.getStorageSync('invite_code')}`, // /
     imageUrl: ya.$http + ya.detailObj.share_img//PNGJPG imageUrl 使 5:4 imageUrl: ya.$http + ya.detailObj
  }; .share_img //PNGJPG imageUrl 使 5:4
  return shareObj; };
return shareObj;
}, },
onShow() { onShow() {
this.isAutoPlay = true; this.isAutoPlay = true;
@ -259,25 +240,9 @@
this.invite_code = options.invite_code this.invite_code = options.invite_code
uni.setStorageSync('ninvite_code', this.invite_code) uni.setStorageSync('ninvite_code', this.invite_code)
if (this.invite_code != '' && this.invite_code != undefined) { if (this.invite_code != '' && this.invite_code != undefined) {
uni.login({ this.loginEv(this.invite_code);
provider: 'weixin', } else if (options.source_code != '' && options.source_code != undefined) {
success: (res)=> { this.loginEv('', options.source_code, options.channel);
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 => {})
}
},
});
} else { } else {
this.$toolAll.tools.overdue() this.$toolAll.tools.overdue()
this.$toolAll.tools.isLogin() this.$toolAll.tools.isLogin()
@ -293,82 +258,67 @@
this.$toolAll.tools.maiDian(maiOjb) this.$toolAll.tools.maiDian(maiOjb)
}, },
methods: { methods: {
moveHandle(){// loginEv(invite_code = '', source = '', channel = '') {
return false uni.login({
}, provider: 'weixin',
getphonenumber(e){// success: (res) => {
if(e.detail.errMsg=="getPhoneNumber:ok"){ if (res.code) {
this.$requst.post('user/bind-phone',{iv:e.detail.iv,encryptedData:e.detail.encryptedData}).then(res=>{ var params = {
// console.log('',res); code: res.code,
if(res.code==0){ invite_code: invite_code, //
this.isShowP = false source_code: source,
this.$toolAll.tools.showToast('手机号绑定成功','success') 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); // console.log(this.dataList[e].is_collected);
let cateId = '' if (this.allList[e].is_collected == 0) {
let newArr = [] this.allList[e].is_collected = 1
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
// //
collectionEV({action:'collect',archive_id:cateId}) collectionEV({
action: 'collect',
archive_id: this.allList[e].id
})
} }
}, },
comfirmev(e) { // comfirmev(e) { //
let cateId = '' this.allList[e].is_collected = 0;
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') this.$toolAll.tools.showToast('正在取消...', 'loading')
// //
cancleCollectionEV({action:'collect',archive_id:cateId}) cancleCollectionEV({
action: 'collect',
archive_id: this.allList[e].id
})
}, },
chooseLikex(e) { // chooseLikex(e) { //
if (this.xgList[e].is_collected == 0) { if (this.xgList[e].is_collected == 0) {
this.xgList[e].is_collected = 1 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.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 this.haveImg = e
@ -394,7 +344,11 @@
} else { } else {
this.$requst.post('user/rand-bind-service').then(res => {}) this.$requst.post('user/rand-bind-service').then(res => {})
this.$toolAll.tools.closeTimer() // this.$toolAll.tools.closeTimer() //
this.$requst.post('user/record',{type:'other',action:'ask',id:0}).then(res=>{},error=>{}) this.$requst.post('user/record', {
type: 'other',
action: 'ask',
id: 0
}).then(res => {}, error => {})
let maiOjb = { let maiOjb = {
e: 5, // e: 5, //
t: new Date().getTime() // t: new Date().getTime() //
@ -410,7 +364,10 @@
} }
}, },
checkDetail(newId) { checkDetail(newId) {
this.$requst.post('archives/detail',{id:newId,share_id:this.share_id}).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
@ -426,6 +383,7 @@
sort: item.sort sort: item.sort
} }
this.cateList.push(cateObj) 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
// //
@ -488,7 +446,8 @@
if (res.data.diary.length != 0) { if (res.data.diary.length != 0) {
res.data.diary.forEach(item => { res.data.diary.forEach(item => {
let fabImg = ''; 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 = { let tObj = {
category_id: item.category_id, //ID category_id: item.category_id, //ID
id: item.id, id: item.id,
@ -529,14 +488,27 @@
}, error => {}) }, error => {})
}, },
choosecateEv(e) { choosecateEv(e) {
this.cateCurrent = e this.page = 1;
this.$requst.post('archives/category',{category_id:this.cateList[e].id,keyword:''}).then(res=>{ 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); // console.log('',res);
if (res.code == 0) { if (res.code == 0) {
if(e==0 && this.active!=e) this.listArrone = [] if(this.page==1) {
if(e==1 && this.active!=e) this.listArrtwo = [] if(this.active != e) this.allList = [];
if(e==2 && this.active!=e) this.listArrthree = [] uni.pageScrollTo({
if(e==3 && this.active!=e) this.listArrfour = [] scrollTop:0,
duration:0
})
}
this.total = res.data.list.total;
if (res.data.list.list.length != 0) { if (res.data.list.list.length != 0) {
res.data.list.list.forEach(item => { res.data.list.list.forEach(item => {
let num = item.video.search(".mp4") let num = item.video.search(".mp4")
@ -557,14 +529,12 @@
isVideo: isVideo // isVideo: isVideo //
} }
if (item.cover != '') { if (item.cover != '') {
if(e==0 && this.active!=e) this.listArrone.push(arrObj) this.allList.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)
} }
}) })
} }
} this.cateCurrent = e;
} else this.$toolAll.tools.showToast(res.msg);
}, error => {}) }, error => {})
}, },
tapLike() { // tapLike() { //
@ -582,9 +552,15 @@
} }
let isLikeCon = 'like' let isLikeCon = 'like'
// //
if(this.isDetailLike) collectionEV({action:isLikeCon,archive_id:this.detailObj.id}) if (this.isDetailLike) collectionEV({
action: isLikeCon,
archive_id: this.detailObj.id
})
// //
else cancleCollectionEV({action:isLikeCon,archive_id:this.detailObj.id}) else cancleCollectionEV({
action: isLikeCon,
archive_id: this.detailObj.id
})
// } else this.jieDuan = true // } else this.jieDuan = true
// } // }
}, },
@ -594,9 +570,15 @@
// let isAuth = this.$toolAll.tools.returnAuth() // let isAuth = this.$toolAll.tools.returnAuth()
// if(!isAuth){ // if(!isAuth){
// //
if(!this.isDetailConllection) collectionEV({action:isLikeCon,archive_id:this.detailObj.id}) if (!this.isDetailConllection) collectionEV({
action: isLikeCon,
archive_id: this.detailObj.id
})
// //
else cancleCollectionEV({action:isLikeCon,archive_id:this.detailObj.id}) else cancleCollectionEV({
action: isLikeCon,
archive_id: this.detailObj.id
})
this.isDetailConllection = !this.isDetailConllection this.isDetailConllection = !this.isDetailConllection
// } else this.jieDuan = true // } else this.jieDuan = true
// } // }

View File

@ -33,6 +33,10 @@
<pu-po :isShowT="isShowT" @comfirmev="comfirmev" @cancleev="cancleev"></pu-po> <pu-po :isShowT="isShowT" @comfirmev="comfirmev" @cancleev="cancleev"></pu-po>
<!-- 返回顶部 --> <!-- 返回顶部 -->
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> --> <!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view> </view>
</template> </template>
@ -41,7 +45,7 @@
import {collectionEV,cancleCollectionEV} from '@/jsFile/publicAPI.js'; import {collectionEV,cancleCollectionEV} from '@/jsFile/publicAPI.js';
export default { export default {
components:{ components:{
cateTu cateTu,
}, },
data() { data() {
return { return {
@ -80,7 +84,9 @@
size:10, size:10,
total:'',// total:'',//
isZanw:true, isZanw:true,
category_id:''//ID category_id:'',//ID
vision:false,
isShowP:false,
} }
}, },
onPageScroll(e) { onPageScroll(e) {
@ -99,6 +105,12 @@
uni.removeStorageSync('cateList') uni.removeStorageSync('cateList')
}, },
onLoad(options) { 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!='') { if(options.keyWorld!=undefined && options.keyWorld!='') {
this.searchVal = options.keyWorld this.searchVal = options.keyWorld
this.searchEv() this.searchEv()
@ -111,6 +123,34 @@
if(this.searchVal!=undefined && this.searchVal!='') this.searchEv() if(this.searchVal!=undefined && this.searchVal!='') this.searchEv()
}, },
methods: { 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(){// checkKey(){//
this.$requst.get('index/hot-keywords').then(res=>{ this.$requst.get('index/hot-keywords').then(res=>{
// console.log('',res); // console.log('',res);
@ -186,7 +226,7 @@
this.cateList = uni.getStorageSync('cateList') this.cateList = uni.getStorageSync('cateList')
} }
// //
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){
res.data.list.list.forEach(item=>{ res.data.list.list.forEach(item=>{
@ -206,10 +246,11 @@
name:item.published_by || '恒美植发',// name:item.published_by || '恒美植发',//
isVideo:item.video.includes(".mp4")// isVideo:item.video.includes(".mp4")//
} }
if(this.newCurrent==0 && item.category_id==32) this.dataList.push(tObj) this.dataList.push(tObj);
if(this.newCurrent==1 && item.category_id==33) this.dataList.push(tObj) // if(this.newCurrent==0 && item.category_id==32) this.dataList.push(tObj)
if(this.newCurrent==2 && item.category_id==34) this.dataList.push(tObj) // if(this.newCurrent==1 && item.category_id==33) this.dataList.push(tObj)
if(this.newCurrent==3 && item.category_id==38) 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 = { let obj = {

View File

@ -28,6 +28,10 @@
<pu-po :isShowT="isShowT" :contentVal="'暂未开放此功能,请耐心等候'" :isCenter="true" :comfrimVal="'好的'" @comfirmev="isShowT=false"></pu-po> <pu-po :isShowT="isShowT" :contentVal="'暂未开放此功能,请耐心等候'" :isCenter="true" :comfrimVal="'好的'" @comfirmev="isShowT=false"></pu-po>
<!-- 底部客服 --> <!-- 底部客服 -->
<public-customer :nbottom="100"></public-customer> <public-customer :nbottom="100"></public-customer>
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view> </view>
</template> </template>
@ -44,7 +48,9 @@
{num:'0',title:'分享人'}, {num:'0',title:'分享人'},
{num:'0',title:'分享订单'}, {num:'0',title:'分享订单'},
], ],
imgSrcP:uni.getStorageSync('imgSrcP') imgSrcP:uni.getStorageSync('imgSrcP'),
vision:false,
isShowP:false,
} }
}, },
onShareAppMessage(options) { onShareAppMessage(options) {
@ -77,10 +83,45 @@
onShow() { onShow() {
this.$toolAll.tools.isLogin() 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 uni.getStorageSync('shareAll')!='' ? this.dataList[1].num = uni.getStorageSync('shareAll').share_users.total : this.dataList[1].num = 0
}, },
methods: { 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(){// shareEv(){//
if(this.imgSrcP==''){ if(this.imgSrcP==''){
this.$toolAll.tools.showToast('请先前往个人海报申请海报') this.$toolAll.tools.showToast('请先前往个人海报申请海报')

View File

@ -32,6 +32,10 @@
</view> </view>
<!-- 底部客服 --> <!-- 底部客服 -->
<public-customer :nbottom="100"></public-customer> <public-customer :nbottom="100"></public-customer>
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view> </view>
</template> </template>
@ -48,7 +52,9 @@
page:1, page:1,
size:10, size:10,
total:'',// total:'',//
isZanw:true isZanw:true,
vision:false,
isShowP:false,
} }
}, },
onPageScroll(e) { onPageScroll(e) {
@ -66,10 +72,44 @@
onShow() { onShow() {
this.$toolAll.tools.isLogin() 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() this.checkList()
}, },
methods: { 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){ chooseId(id){
this.backTop() this.backTop()
this.page = 1 this.page = 1

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB