fix
This commit is contained in:
parent
75004eb17c
commit
2e3f80110a
|
|
@ -31,11 +31,24 @@ OakPage({
|
|||
},
|
||||
},
|
||||
isList: false,
|
||||
formData: async ([userEntityGrant]) => ({
|
||||
relation: userEntityGrant && userEntityGrant.relation,
|
||||
qrcodeUrl: userEntityGrant && userEntityGrant.wechatQrCode$entity[0]
|
||||
&& userEntityGrant.wechatQrCode$entity[0].url || 'data:image/jpeg;base64,' + wx.arrayBufferToBase64(userEntityGrant.wechatQrCode$entity[0].buffer)
|
||||
}),
|
||||
formData: async ([userEntityGrant]) => {
|
||||
let qrcodeUrl;
|
||||
const str = userEntityGrant?.wechatQrCode$entity[0]?.buffer;
|
||||
console.log('str', str);
|
||||
if (str) {
|
||||
const buf = new ArrayBuffer(str.length * 2);
|
||||
const buf2 = new Uint16Array(buf);
|
||||
for (let i = 0; i < str.length; i++) {
|
||||
buf2[i] = str.charCodeAt(i);
|
||||
}
|
||||
qrcodeUrl = 'data:image/jpeg;base64,' + wx.arrayBufferToBase64(buf2);
|
||||
console.log('url', qrcodeUrl);
|
||||
}
|
||||
return {
|
||||
relation: userEntityGrant?.relation,
|
||||
url: qrcodeUrl || userEntityGrant?.wechatQrCode$entity[0]?.url
|
||||
}
|
||||
},
|
||||
}, {
|
||||
data: {
|
||||
},
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@
|
|||
<view class="page-body">
|
||||
<view class="qrcode_view">
|
||||
<view class="row">
|
||||
<text class="text">邀请权限</text>
|
||||
<text class="text">赋予权限</text>
|
||||
<view class="icon-view">
|
||||
<g-icon name="person_add" size="30" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="col">
|
||||
<text class="relation">{{relation || '-'}}</text>
|
||||
<image src="{{qrcodeUrl}}" mode="aspectFit" class="image" />
|
||||
<image src="{{url}}" mode="aspectFit" class="image" />
|
||||
<text class="text">微信扫一扫 添加用户权限</text>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
|||
Loading…
Reference in New Issue