医生分享功能完善-0712

master
chen 2022-07-12 15:17:50 +08:00
parent 6a099093c8
commit 0a5480d745
24 changed files with 128 additions and 27 deletions

View File

@ -527,6 +527,7 @@ button:after{content: none!important;}
.mar-s50{margin-top: 50rpx;}
/* 下---外边距 */
.mar-x10{margin-bottom: 10rpx;}
.mar-x15{margin-bottom: 15rpx;}
.mar-x20{margin-bottom: 20rpx;}
.mar-x25{margin-bottom: 25rpx;}
.mar-x30{margin-bottom: 30rpx;}

View File

@ -3,7 +3,7 @@
<view class="disjb fw" v-if="list.length!=0">
<!-- 左侧列表 -->
<view class="list-box">
<view @tap="goDetail(index)" v-if="index%2==0" :class="radiu?'radius15 mar-x10':'radius30 mar-x30'" class="posir colf zou" v-for="(item,index) in list" :key="index">
<view @tap="goDetail(index)" v-if="index%2==0" :class="radiu?'radius15 mar-x10':'radius30 mar-x15'" class="posir colf zou" v-for="(item,index) in list" :key="index">
<!-- 背景图 -->
<image lazy-load :class="radiu?'radius15':'radius30'" class=" width100 list-min" :src="item.main_img" mode="widthFix"></image>
<view class="posia fon24 colf" style="right: 10rpx;bottom: 160rpx;z-index: 1;">
@ -45,7 +45,7 @@
</view>
<!-- 右侧列表 -->
<view class="list-box">
<view @tap="goDetail(index)" v-if="index%2!=0" :class="radiu?'radius15 mar-x10':'radius30 mar-x30'" class="posir colf zou" v-for="(item,index) in list" :key="index">
<view @tap="goDetail(index)" v-if="index%2!=0" :class="radiu?'radius15 mar-x10':'radius30 mar-x15'" class="posir colf zou" v-for="(item,index) in list" :key="index">
<!-- 背景图 -->
<image lazy-load :class="radiu?'radius15':'radius30'" class="width100 list-min" :src="item.main_img" mode="widthFix"></image>
<view class="posia fon24 colf" style="right: 10rpx;bottom: 160rpx;z-index: 1;">

View File

@ -5,7 +5,15 @@
<!-- 自定义二级分类 -->
<!-- 列表 -->
<view :style="{paddingTop: statusHeight+'px'}" class=" pad-x180">
<view v-if="isLoading" class="bacf mar-s20 pad-s20 pad-x40">
<!-- 新闻视频 -->
<view class="news-video-img" v-if="video!=''">
<image :src="videoImg" mode="widthFix"></image>
<view class="news-video-btn" @tap.stop="playEv(video)">
<image src="/static/public/video.png" mode="widthFix"></image>
</view>
</view>
<view v-if="isLoading" class="bacf mar-s20 pad-s20 pad-x40" :style="{'margin-top':video==''?'20rpx':0}">
<view class=""></view>
<view class="pad-zy20">
<rich-text class="fon26 col3" :nodes="detailInfo"></rich-text>
</view>
@ -18,6 +26,10 @@
<view class="mar-zy32 mar-s20" v-if="dataList.length!=0"><list-pu @chooseLike="chooseLike" @praise="praiseEv" @comfirmev="comfirmev" :list="dataList"></list-pu></view>
<view style="margin-top: 8%;" v-if="dataList.length==0"><list-pu :list="dataList" @praise="praiseEv"></list-pu></view>
</view>
<!-- 分享 -->
<view @tap="shareImgEv" class="detail-cart-box" style="display: flex;justify-content: center;align-items: center;width: 112rpx;height: 112rpx;border-radius: 100%;background-color: #0fac29;bottom: 160rpx;color: #FFFFFF;">
<image class="zanw-img" src="/static/public/share-pyq.png" mode="aspectFill" style="width: 64rpx;height: 81rpx;"></image>
</view>
<!-- 底部客服 -->
<!-- <public-customer :nbottom="100"></public-customer> -->
<!-- 用户信息授权手机号授权 -->
@ -32,6 +44,7 @@
<script>
import {collectionEV,cancleCollectionEV} from '@/jsFile/publicAPI.js';
import bottomTab from '@/components/bottom-tab.vue';
import { base64ToPath } from '@/jsFile/base64-src.js';
export default {
components:{
bottomTab
@ -53,7 +66,11 @@
isLoading:false,
detailInfo:'',
peopleJian:'',
doctorId:''//id
doctorId:'',//id
video:'', //
videoImg:'', //
videoPlay:'', //
shareFlag:true, //
}
},
computed: {
@ -102,6 +119,43 @@
}
},
methods: {
//
playEv(url){
uni.navigateTo({
url: '/pagesB/video/playVideo?src='+ this.$hostApi + url
})
},
//
shareImgEv(){
this.$toolAll.tools.showToast('分享图生成中...','none',10000);
if(this.shareFlag){
this.shareFlag = false;
this.$requst.post('staff/doctor-share',{id:this.doctorId}).then(res=>{
base64ToPath(res.data.share_img).then(path=>{
uni.hideToast();
this.$toolAll.tools.showToast('正在调起分享...');
wx.showShareImageMenu({
path: path,
success:(res=>{
this.shareFlag = true;
this.$requst.post('user/record', {
type: 'doctor',
action: 'share',
id: this.doctorId
}).then(res => {
console.log('分享成功:', res);
}, error => {})
// tools.js
this.$toolAll.tools.plantPoint(4);
}),
fail:(err=>{
this.shareFlag = true;
})
})
})
})
} else {this.$toolAll.tools.showToast('请勿重复点击');}
},
chooseLike(e){//
// console.log(this.dataList[e].is_collected);
if(this.dataList[e].is_collected==0){
@ -130,12 +184,15 @@
},
checkDoD(doctor_id){
this.$requst.post('user/doctor-info',{doctor_id:doctor_id}).then(res=>{
// console.log('',res);
console.log('医生详情:',res);
if(res.code==0){
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.video = this.doctorObj.doctor_extra.video;
this.videoImg = this.doctorObj.doctor_extra.headimg;
// console.log('',this.video,this.videoImg)
this.isLoading = true;
}
},error=>{})
@ -210,5 +267,46 @@
}
</script>
<style>
<style scoped>
.news-video-img{
height: 500rpx;
position: relative;
overflow: hidden;
}
.news-video-img>image{
width: 100%;
min-height: 500rpx;
}
.news-video-btn{
width: 118rpx;
height: 118rpx;
border-radius: 100%;
overflow: hidden;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
}
.news-video-btn image{
width: 100%;
height: 100%;
}
.news-video-content{
width: 100vw;
height: 100vh;
background-color: rgba(0,0,0,.5);
position: fixed;
left: 0;
top: 0;
z-index: 9;
}
video#my-video{
width: 100vw;
min-height: 400rpx;
position: fixed;
left: 0;
top: 50%;
transform: translateY(-50%);
z-index: 999;
}
</style>

View File

@ -67,8 +67,9 @@
</view>
</view>
<view class="pad-zy20">
<view class="fon30 bold tc mar-sx40" :style="{color:publicColor}">相关推荐</view>
<!-- 相关推荐列表 -->
<view class="fon30 bold tc mar-sx40" :style="{color:publicColor}" v-if="detailObj.diary_id>0"></view>
<view class="fon30 bold tc mar-sx40" :style="{color:publicColor}" v-else></view>
<!-- 相关推荐||日记合集列表 -->
<list-pu @chooseLike="chooseLikex" @praise="praisexgEv" @comfirmev="comfirmevx" :list="xgList"></list-pu>
</view>
<view class="tc fon28 bold" style="color: #fff;background-color: #3875f6;padding: 20rpx;" @tap="gopage(cateCurrent)">{{contentVal}}>></view>
@ -197,6 +198,7 @@
}).then(res => {
console.log('分享成功:', res);
}, error => {})
// tools.js
this.$toolAll.tools.plantPoint(4,this.detailObj.id);
console.log(`/pagesB/problemDetail/problemDetail?id=${this.detailObj.id}&category_id=${this.category_id}&share_id=${uni.getStorageSync('userId')}&invite_code=${uni.getStorageSync('invite_code')}`);
@ -322,7 +324,7 @@
active: item.active, //
model_id: item.model_id, //ID
model_name: item.model_name, //
sort: item.sort
sort: item.sort,
}
this.cateList.push(cateObj)
this.allArr.push([]);

BIN
static/public/icon-play.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long