670控制页加入从分享进入时的权限控制

This commit is contained in:
liub
2025-09-23 11:56:35 +08:00
parent 50373f407d
commit f8f199ad32
8 changed files with 1165 additions and 196 deletions

View File

@ -404,7 +404,8 @@
},
rgb565Data: [],
videoHexArray: [],
picPath: ""
picPath: "",
permissions:[]//权限列表
}
},
created() {
@ -436,7 +437,15 @@
var device = data.data;
these.Status.apiType = data.apiType;
these.device = device;
if(data.apiType!=='listA'){
Comment.getdeviceShareId(data.data.id).then(res=>{
if(res.code==200){
if(res.data.permission){
these.permissions=res.data.permission.split(',');
}
}
});
}
if (these.device.deviceImei) {
these.initMQ();
}
@ -595,13 +604,16 @@
} else if (s === 1) {
console.log("分享");
uni.navigateTo({
url: '/pages/6170/share/index',
url: '/pages/common/Share/shareIndex',
events: {
ack: function(data) {}
},
success: (res) => {
debugger;
let json={persissonType:'670'};
Object.assign(json,this.device);
res.eventChannel.emit('share', {
data: this.device,
data:json
});
}
})
@ -1188,8 +1200,12 @@
setTimeout(task, 0);
},
GearSetting: function(type) { //档位设置
if(!this.permissions.includes('41') && this.Status.apiType!=='listA'){
console.log("无操作权限");
return;
}
if (this.formData.modeCurr == type) {
type = "close";
return;
}
showLoading(this, {
text: "请稍候..."