Commit 34157f00ee7507e4f947ecde350a3f292638fc77

Authored by vking
1 parent 93dd231f

shareImg 调整

Showing 1 changed file with 16 additions and 2 deletions
... ... @@ -26,6 +26,7 @@ Page({
console.log('onLoad', options)
console.log('初次进入详情页---小米8测试',this.data.reserveDate ? this.data.reserveDate : '没有日期','openid:',getApp().openid)
this.options=options
this.downloadImages()
if(options.activeTab && options.activeTab!='detail'){
this.setData({
activeTab:options.activeTab||'detail',
... ... @@ -136,15 +137,28 @@ Page({
onReachBottom: function () {
},
shareImageTmp:'',
downloadImages(){
wx.downloadFile({
url:'https://xt04.colorcun.com/sellerShare/Share_'+this.options.id+'.png?'+Math.random(),
success:res=>{
this.shareImageTmp=res.tempFilePath
},
})
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
let path=util.http_build_query({id:this.data.seller.id,fromid:getApp().openid},'/pages/reserve/detail')
let imageUrl=this.shareImageTmp
if(!imageUrl){
imageUrl='https://xt04.colorcun.com/sellerShare/Share_'+this.options.id+'.png?'+Math.random()
}
console.log('imageUrl',imageUrl)
return {
title:'请客订包间,就上周到安排',
imageUrl:'https://xt04.colorcun.com/sellerShare/Share_'+this.options.id+'.png?'+Math.random(),
imageUrl:imageUrl,
path:path,
}
},
... ...