|
|
|
@ -365,8 +365,8 @@ |
|
|
|
<view class="share_icon"> |
|
|
|
<view class="icon_item"><image src="../../static/img/facebook1.png" mode=""></image>Facebook</view> |
|
|
|
<view class="icon_item" @click="Copylink()"><image src="../../static/img/copyLink.png" mode="">Copy Link</view> |
|
|
|
<view class="icon_item"><image src="../../static/img/Mes.png" mode="">Send SMS</view> |
|
|
|
<view class="icon_item"><image src="../../static/img/down.png" mode="">Download</view> |
|
|
|
<view class="icon_item" @click="Sendmes()"><image src="../../static/img/Mes.png" mode="">Send SMS</view> |
|
|
|
<view class="icon_item" @click="downloadImg()"><image src="../../static/img/down.png" mode="">Download</view> |
|
|
|
<view class="icon_item"><image src="../../static/img/more1.png" mode="">More</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -748,7 +748,7 @@ |
|
|
|
getDate(){ |
|
|
|
defaultRequest(this.query).then(res=>{ |
|
|
|
if(res.error==0){ |
|
|
|
console.log(res.data.url) |
|
|
|
console.log(res.data) |
|
|
|
this.goodsDate=res.data |
|
|
|
this.goodsDate.gallery_list.map(item=>{ |
|
|
|
item.content='' |
|
|
|
@ -804,7 +804,7 @@ |
|
|
|
back(){ |
|
|
|
uni.navigateBack() |
|
|
|
}, |
|
|
|
// 分享 |
|
|
|
// 分享1复制 |
|
|
|
Copylink(){ |
|
|
|
uni.setClipboardData({ |
|
|
|
data:this.goodsDate.url,//要被复制的内容 |
|
|
|
@ -816,6 +816,35 @@ |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 2 下再图片 |
|
|
|
downloadImg(){ |
|
|
|
uni.downloadFile({ |
|
|
|
url:this.goodsDate.goods_thumb, |
|
|
|
success: (res) => { |
|
|
|
if (res.statusCode === 200) { |
|
|
|
console.log(res); |
|
|
|
uni.saveImageToPhotosAlbum({ |
|
|
|
filePath: res.tempFilePath, |
|
|
|
success: function() { |
|
|
|
uni.showToast({ |
|
|
|
title: 'saved!', |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
}, |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
//3 发送短信 |
|
|
|
Sendmes(){ |
|
|
|
console.log('发送短信') |
|
|
|
var msg = plus.messaging.createMessage(plus.messaging.TYPE_SMS); |
|
|
|
msg.to = []; |
|
|
|
msg.body = 'I discovered amazing products on DOPE PLUS.com, come check them out!'+ this.goodsDate.url; |
|
|
|
plus.messaging.sendMessage( msg ); |
|
|
|
|
|
|
|
}, |
|
|
|
Require(url){ |
|
|
|
return url |
|
|
|
} |
|
|
|
|