修改病种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(()=>{
toolAll.tools.overdue()//
},3000)
toolAll.tools.isVedio();
// checkSwip()//
},
onHide: function() {

View File

@ -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%;}
/* 分类 */

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="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,24 +120,14 @@
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
}
},
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
chooseLike(index){//
// console.log('',index);
this.$emit('chooseLike',index);
this.current = index;
if(this.list[index].is_collected==1) {
this.isShowT = true
} else {
@ -147,8 +138,6 @@
}
this.$toolAll.tools.maiDian(maiOjb)
}
} else this.jieDuan = true
}
},
comfirmev(){
// console.log('');

View File

@ -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,13 +74,23 @@
if(this.browseP){
let imgList = []
this.bannerList.forEach(item=>{
let nurl = ''
let nurl = '';
let obj = {}
if(this.isVedio) {
item.url=='' ? nurl = item.imgSrc : nurl = item.url
let obj = {
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)
})
uni.previewMedia({

View File

@ -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/'));
}
}
})
}
}

View File

@ -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)//全局注册用户授权组件
// 常用工具

View File

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

View File

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

View File

@ -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,//
if(options.source_code!='' && options.source_code!=undefined){
this.loginEv(options);
}
this.$requst.post('user/login',params).then(res => {console.log('调用成功');},error => {})
},
});
}
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()

View File

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

View File

@ -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,27 +116,13 @@
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)
},
@ -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'

View File

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

View File

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

View File

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

View File

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

View File

@ -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);
})
}
}

View File

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

View File

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

View File

@ -12,7 +12,8 @@
<!-- 列表 -->
<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,13 +131,14 @@
<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: {
listDoctor,
swiperPu,
empower
},
data() {
return {
@ -200,36 +177,39 @@
isShowP: false,
bcurrent: 0,
isAutoPlay: false,
fabImg:''//
fabImg: '' ,//
allArr:[],
page:1,
size:20,
total:0,
isZanw:true,
allList:[]
}
},
onPageScroll(e) {
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)
// }
// }
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=>{})
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,
@ -237,11 +217,12 @@
}
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//PNGJPG 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 //PNGJPG imageUrl 使 5:4
};
return shareObj;
},
onShow() {
this.isAutoPlay = true;
@ -259,25 +240,9 @@
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 => {})
}
},
});
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()
@ -293,82 +258,67 @@
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 => {})
} else {
this.isShowP = false
}
},
});
},
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.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) {
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) { //
this.xgList[e].is_collected = 0
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) { //
this.haveImg = e
@ -394,7 +344,11 @@
} 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=>{})
this.$requst.post('user/record', {
type: 'other',
action: 'ask',
id: 0
}).then(res => {}, error => {})
let maiOjb = {
e: 5, //
t: new Date().getTime() //
@ -410,7 +364,10 @@
}
},
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);
if (res.code == 0) {
this.isLoading = true
@ -426,6 +383,7 @@
sort: item.sort
}
this.cateList.push(cateObj)
this.allArr.push([]);
//
if (item.active == 1) this.active = this.cateCurrent = index
//
@ -488,7 +446,8 @@
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,
@ -529,14 +488,27 @@
}, error => {})
},
choosecateEv(e) {
this.cateCurrent = e
this.$requst.post('archives/category',{category_id:this.cateList[e].id,keyword:''}).then(res=>{
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(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")
@ -557,14 +529,12 @@
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)
this.allList.push(arrObj);
}
})
}
}
this.cateCurrent = e;
} else this.$toolAll.tools.showToast(res.msg);
}, error => {})
},
tapLike() { //
@ -582,9 +552,15 @@
}
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
// }
},
@ -594,9 +570,15 @@
// let isAuth = this.$toolAll.tools.returnAuth()
// 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
// } else this.jieDuan = true
// }

View File

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

View File

@ -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('请先前往个人海报申请海报')

View File

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