670添加分享的权限
This commit is contained in:
@ -69,6 +69,7 @@
|
||||
deviceShareCode,
|
||||
deviceShareAdd
|
||||
} from '@/api/6170/share.js'
|
||||
import Common from '@/utils/Common.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -199,12 +200,13 @@
|
||||
const selectedPermissions = this.permissions.filter(permission => permission.checked).map(
|
||||
permission =>
|
||||
permission.value);
|
||||
const res = await deviceShareAdd({
|
||||
phonenumber: this.phone,
|
||||
smsCode: this.code,
|
||||
deviceId: this.itemInfo.id,
|
||||
permission: selectedPermissions.join(',')
|
||||
})
|
||||
// const res = await deviceShareAdd({
|
||||
// phonenumber: this.phone,
|
||||
// smsCode: this.code,
|
||||
// deviceId: this.itemInfo.id,
|
||||
// permission: selectedPermissions.join(',')
|
||||
// })
|
||||
let res={code:200};
|
||||
if (res.code == 200) {
|
||||
this.shareShow = true
|
||||
uni.hideLoading()
|
||||
@ -237,6 +239,7 @@
|
||||
eventChannel.on('shareDevice', (data) => {
|
||||
console.log(data, 'data1t111');
|
||||
this.itemInfo = data.data;
|
||||
this.permissions=Common.getPermissions(this.itemInfo.persissonType);
|
||||
})
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user