修改病种详情,商品详情分享,有分享图和分享标题时调用分享图和分 享标题,没有分享封面图和标题
parent
e7d2ed7fd6
commit
f500bd039f
|
@ -83,7 +83,7 @@
|
|||
console.log(currentPage.$page.fullPath,'获取当前页面完整路径带参数');
|
||||
// console.log(currentPage.options,'获取当前页面参数');
|
||||
uni.setStorageSync('urlparams',currentPage.$page.fullPath);
|
||||
if(uni.getStorageSync('token')==''){
|
||||
if(uni.getStorageSync('token')=='' || uni.getStorageSync('phone_active')==0 || uni.getStorageSync('is_active')==0){
|
||||
this.loginEv(currentPage.options);
|
||||
}
|
||||
let pagesArr = getCurrentPages();
|
||||
|
|
|
@ -381,6 +381,7 @@ const tools = {
|
|||
uni.setStorageSync('expire',res.data.data.expire); // 缓存失效时间(时间戳格式)
|
||||
uni.setStorageSync('phone_active',res.data.data.phone_active); // 是否绑定手机号
|
||||
uni.setStorageSync('is_active',res.data.data.is_active)//是否第一次授权
|
||||
uni.setStorageSync('invite_code',res.data.data.invite_code)//缓存用户邀请码
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
@ -337,7 +337,7 @@
|
|||
is_group_make:item.is_group_make,
|
||||
group_make_end_at:item.group_make_end_at,
|
||||
group_id:item.group_id,
|
||||
status_text: item.group!=null && item.status_text!='已完成' ? (item.group.surplus > 0 ? '待拼成' : item.status_text) : item.status_text,//订单状态文字描述
|
||||
status_text: item.group!=null && item.status_text!='已完成' && item.status_text!='待付款' ? (item.group.surplus > 0 ? '待拼成' : item.status_text) : item.status_text,//订单状态文字描述
|
||||
group:item.group//拼团商品信息
|
||||
}
|
||||
this.zanArr.push(obj);
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
page:1,
|
||||
total:'',//总数
|
||||
isZanw:true,
|
||||
shareImg:''//分享图
|
||||
// shareImg:''//分享图
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -103,7 +103,7 @@
|
|||
var shareObj = {
|
||||
title: `${ya.detailObj.title}`, // 默认是小程序的名称(可以写slogan等)
|
||||
path: `/pagesB/articleDetail/articleDetail?id=${this.detailId}&share_id=${uni.getStorageSync('userId')}&invite_code=${uni.getStorageSync('invite_code')}`, // 默认是当前页面,必须是以‘/’开头的完整路径
|
||||
imageUrl: this.shareImg//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
|
||||
imageUrl: `${this.$http}${this.detailObj.share_img || this.detailObj.cover}`//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
|
||||
};
|
||||
return shareObj;
|
||||
},
|
||||
|
@ -198,7 +198,7 @@
|
|||
// console.log('详情:',res);
|
||||
if(res.code==0){
|
||||
this.detailObj = res.data.detail;
|
||||
this.shareImg = this.$http + this.detailObj.share_img;
|
||||
// this.shareImg = this.$http + this.detailObj.share_img;
|
||||
this.content = this.$toolAll.tools.escape2Html(res.data.detail.content)
|
||||
uni.hideToast()
|
||||
this.isLoading = true
|
||||
|
|
|
@ -197,8 +197,7 @@
|
|||
var shareObj = {
|
||||
title: `${ya.detailObj.title}`, // 默认是小程序的名称(可以写slogan等)
|
||||
path: `/pagesB/problemDetail/problemDetail?id=${this.detailObj.id}&category_id=${this.category_id}&share_id=${uni.getStorageSync('userId')}&invite_code=${uni.getStorageSync('invite_code')}`, // 默认是当前页面,必须是以‘/’开头的完整路径
|
||||
imageUrl: ya.$http + ya.detailObj
|
||||
.share_img //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
|
||||
imageUrl: `${ya.$http}${ya.detailObj.share_img || ya.detailObj.cover}` //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
|
||||
};
|
||||
return shareObj;
|
||||
},
|
||||
|
|
|
@ -377,9 +377,9 @@
|
|||
this.$toolAll.tools.plantPoint(this.detailObj.is_activity==0 ? 10 : 11,this.detailObj.is_activity==0 ? this.detailObj.id*1 : this.detailObj.activity_id);
|
||||
if(ya.detailObj.share_img==null) ya.detailObj.share_img = ya.detailObj.cover;
|
||||
var shareObj = {
|
||||
title: `${ya.detailObj.name}`, // 默认是小程序的名称(可以写slogan等)
|
||||
title: `${ya.detailObj.subtitle || ya.detailObj.name}`, // 默认是小程序的名称(可以写slogan等)
|
||||
path: `/pagesB/shopDetail/shopDetail?id=${this.detailObj.is_activity==1?this.detailObj.activity_id:this.detailObj.id}&category_id=${this.category_id}&is_activity=${this.detailObj.is_activity==0 ? 0 : 1}&share_id=${uni.getStorageSync('userId')}&invite_code=${uni.getStorageSync('invite_code')}`, // 默认是当前页面,必须是以‘/’开头的完整路径
|
||||
imageUrl: ya.$http + ya.detailObj.share_img//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
|
||||
imageUrl: `${ya.$http}${ya.detailObj.share_img || ya.detailObj.cover}`//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
|
||||
};
|
||||
return shareObj;
|
||||
},
|
||||
|
|
|
@ -72,6 +72,9 @@
|
|||
this.isZanw = false
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.$toolAll.tools.isLogin()
|
||||
},
|
||||
onLoad(options) {
|
||||
if(uni.getStorageSync('token')!='') {
|
||||
this.checkList();
|
||||
|
|
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
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