新增病种详情分享图片生成、修改优惠券组的样式
parent
c1a53d9540
commit
b255ef510d
|
@ -4,7 +4,10 @@
|
||||||
<status-nav :titleVal="title" :statusTitle="true"></status-nav>
|
<status-nav :titleVal="title" :statusTitle="true"></status-nav>
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<view :style="{paddingTop: (statusHeight+15)+'px'}" class="pad-zy32">
|
<view :style="{paddingTop: (statusHeight+15)+'px'}" class="pad-zy32">
|
||||||
<view class="pad-x30">
|
<view class="fon28" style="color: #1A1A1A; line-height: 40rpx;">
|
||||||
|
<rich-text :nodes="richText"></rich-text>
|
||||||
|
</view>
|
||||||
|
<!-- <view class="pad-x30">
|
||||||
<view v-if="dataList.length!=0" class="mar-x20 animated fadeInLeft" v-for="(item,index) in dataList" :key="index">
|
<view v-if="dataList.length!=0" class="mar-x20 animated fadeInLeft" v-for="(item,index) in dataList" :key="index">
|
||||||
<view style="height: 200rpx;" class="disjbac posir">
|
<view style="height: 200rpx;" class="disjbac posir">
|
||||||
<view class="disjcac fc recerve-left" style="width: 218rpx;height: 200rpx;flex-shrink: 0;text-align: center;color: #FFFFFF;">
|
<view class="disjcac fc recerve-left" style="width: 218rpx;height: 200rpx;flex-shrink: 0;text-align: center;color: #FFFFFF;">
|
||||||
|
@ -22,13 +25,15 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="tcenter bold fon36 pad-x20">详情</view>
|
|
||||||
<view class="fon28" style="color: #1A1A1A; line-height: 40rpx;">
|
|
||||||
<rich-text :nodes="richText"></rich-text>
|
|
||||||
</view>
|
|
||||||
<view class="posixzy bacf pad-sx25">
|
<view class="posixzy bacf pad-sx25">
|
||||||
<view @tap="allReceive" class="fon30 radius20 tc colf bold" style="margin: 0 83rpx;height: 90rpx;line-height: 90rpx;" :style="{background:publicColor}">一键领取</view>
|
<view @tap="allReceive" class="fon30 radius20 tc colf bold" style="margin: 0 83rpx;height: 90rpx;line-height: 90rpx;" :style="{background:publicColor}">{{['一键领取','立即使用'][dataList[0].get]}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="disjcac" v-if="ifLing" style="position: fixed;top: 0;left: 0;bottom: 0;right: 0;background-color: rgba(0, 0, 0, .7);z-index: 2;padding: 0 100rpx;">
|
||||||
|
<view class="tcenter radius30 bacf width100 pad-sx50">
|
||||||
|
<view class="bold pad-s30" style="font-size: 48rpx;">恭喜您领取成功</view>
|
||||||
|
<view @tap="allReceive" class="disjcac fon38" style="width: 426rpx;height: 80rpx;border-radius: 20rpx;color: #FFFFFF;margin: 0 auto;margin-top: 100rpx;margin-bottom: 10rpx;" :style="{backgroundColor:publicColor}">立即使用</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 用户信息授权,手机号授权 -->
|
<!-- 用户信息授权,手机号授权 -->
|
||||||
|
@ -47,7 +52,8 @@
|
||||||
sizeq: 162,
|
sizeq: 162,
|
||||||
title:'优惠券组',
|
title:'优惠券组',
|
||||||
richText:'',
|
richText:'',
|
||||||
groupId:''
|
groupId:'',
|
||||||
|
ifLing:false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed:{
|
computed:{
|
||||||
|
@ -59,6 +65,13 @@
|
||||||
return this.$store.state.statusHeight
|
return this.$store.state.statusHeight
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onShareAppMessage() {
|
||||||
|
var shareObj = {
|
||||||
|
title: `${ya.detailObj.title}`, // 默认是小程序的名称(可以写slogan等)
|
||||||
|
path: `/pagesB/couponGroup/couponGroup?group_id=${this.groupId}&share_id=${uni.getStorageSync('userId')}&invite_code=${uni.getStorageSync('invite_code')}`, // 默认是当前页面,必须是以‘/’开头的完整路径
|
||||||
|
imageUrl: `` //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
|
||||||
|
};
|
||||||
|
},
|
||||||
onLoad(op) {
|
onLoad(op) {
|
||||||
if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
|
if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
|
||||||
this.checkAllList(op.group_id);
|
this.checkAllList(op.group_id);
|
||||||
|
@ -69,15 +82,21 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
allReceive(){
|
allReceive(){
|
||||||
console.log(this.groupId);
|
if(this.dataList[0].get) {
|
||||||
|
uni.reLaunch({
|
||||||
|
url:'/pages/tabbar/pagehome/pagehome'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
this.$requst.post('user/get-coupon-group',{group_id:this.groupId}).then(res=>{
|
this.$requst.post('user/get-coupon-group',{group_id:this.groupId}).then(res=>{
|
||||||
if(res.code==0){
|
if(res.code==0){
|
||||||
this.$toolAll.tools.showToast('领取成功(*^▽^*)');
|
// this.$toolAll.tools.showToast('领取成功(*^▽^*)');
|
||||||
|
this.ifLing = true;
|
||||||
this.checkAllList(this.groupId);
|
this.checkAllList(this.groupId);
|
||||||
} else {
|
} else {
|
||||||
this.$toolAll.tools.showToast(res.msg);
|
this.$toolAll.tools.showToast(res.msg);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
checkAllList(group_id){//查询所有优惠券列表
|
checkAllList(group_id){//查询所有优惠券列表
|
||||||
this.$requst.post('user/get-coupon-group-info',{group_id}).then(res=>{
|
this.$requst.post('user/get-coupon-group-info',{group_id}).then(res=>{
|
||||||
|
|
|
@ -91,6 +91,10 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</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: rgba(0,0,0,.5);bottom: 160rpx;color: #FFFFFF;">
|
||||||
|
分享
|
||||||
|
</view>
|
||||||
<!-- 返回顶部 -->
|
<!-- 返回顶部 -->
|
||||||
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
|
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
|
||||||
<!-- 用户信息授权,手机号授权 -->
|
<!-- 用户信息授权,手机号授权 -->
|
||||||
|
@ -111,6 +115,7 @@
|
||||||
collectionEV,
|
collectionEV,
|
||||||
cancleCollectionEV
|
cancleCollectionEV
|
||||||
} from '@/jsFile/publicAPI.js';
|
} from '@/jsFile/publicAPI.js';
|
||||||
|
import { base64ToPath } from '@/jsFile/base64-src.js';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
listDoctor,
|
listDoctor,
|
||||||
|
@ -157,6 +162,7 @@
|
||||||
contentVal:'',
|
contentVal:'',
|
||||||
newHeight:'450',
|
newHeight:'450',
|
||||||
ifSwiper:0,//是否显示swiper
|
ifSwiper:0,//是否显示swiper
|
||||||
|
shareFlag:true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -223,6 +229,37 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 分享图分享
|
||||||
|
shareImgEv(){
|
||||||
|
this.$toolAll.tools.showToast('分享图生成中...','none',10000);
|
||||||
|
if(this.shareFlag){
|
||||||
|
this.shareFlag = false;
|
||||||
|
this.$requst.post('archives/share',{id:this.detailObj.id}).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: 'content',
|
||||||
|
action: 'share',
|
||||||
|
id: this.detailObj.id
|
||||||
|
}).then(res => {
|
||||||
|
console.log('分享成功:', res);
|
||||||
|
}, error => {})
|
||||||
|
// 调用tools.js中的种植埋点事件
|
||||||
|
this.$toolAll.tools.plantPoint(4);
|
||||||
|
}),
|
||||||
|
fail:(err=>{
|
||||||
|
this.shareFlag = true;
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
} else {this.$toolAll.tools.showToast('请勿重复点击');}
|
||||||
|
},
|
||||||
// 去更多列表页
|
// 去更多列表页
|
||||||
gopage(index){
|
gopage(index){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
|
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
Loading…
Reference in New Issue