|
|
|
@ -3,6 +3,11 @@ |
|
|
|
<button class='zfbtn m_l' @tap='formSubmit()'> |
|
|
|
分享 |
|
|
|
</button> |
|
|
|
<button class='zfbtn m_l' @tap='saveAvatar()'> |
|
|
|
保存头像 |
|
|
|
</button> |
|
|
|
|
|
|
|
|
|
|
|
<image :src="info.avatar" mode="aspectFill"></image> |
|
|
|
|
|
|
|
<tki-qrcode v-if="info.avatar" ref="qrcode" @result="qrR" :val="checkArea" :size="115" unit="px" background="#fff" |
|
|
|
@ -17,7 +22,7 @@ |
|
|
|
|
|
|
|
<view class='imagePathBox' v-if="maskHidden == true && imagePath" @click="maskHidden = false "> |
|
|
|
<image :src="imagePath" class='shengcheng' mode="aspectFill"></image> |
|
|
|
<button class='baocun' @click.stop="baocun()">保存相册,分享到朋友圈</button> |
|
|
|
<button class='baocun' @click.stop="saveBill()">保存相册,分享到朋友圈</button> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
@ -50,6 +55,33 @@ |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
saveAvatar() { |
|
|
|
var that = this |
|
|
|
wx.saveImageToPhotosAlbum({ |
|
|
|
filePath: that.info.avatar, |
|
|
|
success(res) { |
|
|
|
wx.showModal({ |
|
|
|
content: '图片已保存到相册,赶紧晒一下吧~', |
|
|
|
showCancel: false, |
|
|
|
confirmText: '好的', |
|
|
|
confirmColor: '#333', |
|
|
|
success: function(res) { |
|
|
|
if (res.confirm) { |
|
|
|
console.log('用户点击确定'); |
|
|
|
that.maskHidden = false |
|
|
|
} |
|
|
|
}, |
|
|
|
fail: function(res) { |
|
|
|
that.maskHidden = false |
|
|
|
console.log(res) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
fail(err) { |
|
|
|
console.log(err) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
qrR(data) { |
|
|
|
this.base64Img = data; |
|
|
|
console.log('base64',this.base64Img) |
|
|
|
@ -118,7 +150,7 @@ |
|
|
|
}); |
|
|
|
}, 200); |
|
|
|
}, |
|
|
|
baocun() { |
|
|
|
saveBill() { |
|
|
|
var that = this |
|
|
|
wx.saveImageToPhotosAlbum({ |
|
|
|
filePath: that.imagePath, |
|
|
|
|