修改病种详情,商品详情分享,有分享图和分享标题时调用分享图和分 享标题,没有分享封面图和标题

master
chen 2022-04-15 18:36:21 +08:00
parent e7d2ed7fd6
commit f500bd039f
27 changed files with 34 additions and 31 deletions

View File

@ -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();
@ -108,7 +108,7 @@
url: `${uni.getStorageSync('hostapi')}user/login`,
method: 'GET',
data: params,
success: res => {
success: res => {
if(res.data.data.token!=''){
uni.setStorageSync('token',res.data.data.token); // token
uni.setStorageSync('openid',res.data.data.openid)//openid

View File

@ -365,7 +365,7 @@ const tools = {
},600000*9)
},
// 登录事件
loginEv(){
loginEv(){
uni.login({
provider: 'weixin',
success: (res)=> {
@ -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)//缓存用户邀请码
}
}
})

View File

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

View File

@ -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//PNGJPG imageUrl 使 5:4
     imageUrl: `${this.$http}${this.detailObj.share_img || this.detailObj.cover}`//PNGJPG 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

View File

@ -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 //PNGJPG imageUrl 使 5:4
imageUrl: `${ya.$http}${ya.detailObj.share_img || ya.detailObj.cover}` //PNGJPG imageUrl 使 5:4
};
return shareObj;
},

View File

@ -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//PNGJPG imageUrl 使 5:4
     imageUrl: `${ya.$http}${ya.detailObj.share_img || ya.detailObj.cover}`//PNGJPG imageUrl 使 5:4
  };
  return shareObj;
},

View File

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