|
|
|
@ -71,9 +71,9 @@ |
|
|
|
|
<!-- --> |
|
|
|
|
<view class="invite-popup" v-if="isPopup"> |
|
|
|
|
<view class="popup"> |
|
|
|
|
<image class="bg" show-menu-by-longpress src="https://www.royaum.com.cn/static/3@2x.png"></image> |
|
|
|
|
<image class="code" show-menu-by-longpress :src="qrcode"></image> |
|
|
|
|
<view class="qrcode">{{userInfo.user_id}}</view> |
|
|
|
|
<image class="bg" show-menu-by-longpress :src="qrcode1"></image> |
|
|
|
|
<!-- <image class="code" show-menu-by-longpress :src="qrcode"></image> |
|
|
|
|
<view class="qrcode">{{userInfo.user_id}}</view> --> |
|
|
|
|
<view class="tips"> |
|
|
|
|
<view class="cancle" @click="download(1)">取消</view> |
|
|
|
|
<view class="sure" @click="download(2)">保存到相册</view> |
|
|
|
@ -95,6 +95,7 @@ |
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
qrcode1: "", |
|
|
|
|
qrcode: "", |
|
|
|
|
userInfo: {}, |
|
|
|
|
backgroundBg: { |
|
|
|
@ -161,21 +162,24 @@ |
|
|
|
|
success: function(res) { |
|
|
|
|
// 在H5平台下,tempFilePath 为 base64 |
|
|
|
|
console.log(res.tempFilePath) |
|
|
|
|
uni.saveImageToPhotosAlbum({ |
|
|
|
|
filePath: res.tempFilePath, |
|
|
|
|
success(data) { |
|
|
|
|
that.$success('保存成功') |
|
|
|
|
}, |
|
|
|
|
fail(err) { |
|
|
|
|
if (err.errMsg === |
|
|
|
|
'saveImageToPhotosAlbum:fail auth deny' |
|
|
|
|
) { |
|
|
|
|
that.$toast( |
|
|
|
|
'请允许访问相册后重试 (右上角菜单 - 设置 - 相册)', |
|
|
|
|
3000) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
that.qrcode1 = res.tempFilePath; |
|
|
|
|
that.isPopup = true; |
|
|
|
|
ctx.clearRect(0,0,702,1248); |
|
|
|
|
// uni.saveImageToPhotosAlbum({ |
|
|
|
|
// filePath: res.tempFilePath, |
|
|
|
|
// success(data) { |
|
|
|
|
// that.$success('保存成功') |
|
|
|
|
// }, |
|
|
|
|
// fail(err) { |
|
|
|
|
// if (err.errMsg === |
|
|
|
|
// 'saveImageToPhotosAlbum:fail auth deny' |
|
|
|
|
// ) { |
|
|
|
|
// that.$toast( |
|
|
|
|
// '请允许访问相册后重试 (右上角菜单 - 设置 - 相册)', |
|
|
|
|
// 3000) |
|
|
|
|
// } |
|
|
|
|
// } |
|
|
|
|
// }) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
@ -230,8 +234,8 @@ |
|
|
|
|
} = await newFunApi.InviteUserPoster({}); |
|
|
|
|
if (status == 200) { |
|
|
|
|
console.log(data) |
|
|
|
|
this.isPopup = true; |
|
|
|
|
this.qrcode = data.imageUrl |
|
|
|
|
this.qrcode = data.imageUrl; |
|
|
|
|
this.createImge(); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
download(type) { |
|
|
|
@ -243,7 +247,8 @@ |
|
|
|
|
uni.showLoading({ |
|
|
|
|
title: '加载中' |
|
|
|
|
}) |
|
|
|
|
this.createImge(); |
|
|
|
|
app.onSaveImage(app.qrcode1) |
|
|
|
|
// this.createImge(); |
|
|
|
|
} |
|
|
|
|
return; |
|
|
|
|
uni.showLoading({ |
|
|
|
@ -331,7 +336,12 @@ |
|
|
|
|
url: "/pages/news/user/withdrawal?balance=" + this.userInfo.withdrawal_money |
|
|
|
|
}) |
|
|
|
|
} else if (index == 3) { |
|
|
|
|
if(!this.qrcode1){ |
|
|
|
|
this.InviteUserPoster(); |
|
|
|
|
}else{ |
|
|
|
|
this.isPopup = true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} else if (index == 4) { |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: "/pages/invite/rule" |
|
|
|
|