fix(视频、登录): 视频webview地址改成动态、解决验证码显示bug、默认添加http://192.168.21.22地址(app环境),升级1.0.29

This commit is contained in:
风花一世月 2024-07-16 20:39:01 +08:00
parent 435267f34f
commit 1dac10fcb1
4 changed files with 17 additions and 5 deletions

View File

@ -13,6 +13,13 @@
protocol:'https://', protocol:'https://',
address:'cloud.iot-fast.com', address:'cloud.iot-fast.com',
}] }]
// #ifdef APP-PLUS
configList.push({
id:this.$u.guid(32),
protocol:'http://',
address:'192.168.21.22',
})
// #endif
uni.setStorageSync('configList',configList) uni.setStorageSync('configList',configList)
uni.setStorageSync('configIndex',0) uni.setStorageSync('configIndex',0)
} }

View File

@ -2,8 +2,8 @@
"name" : "物联网可视化", "name" : "物联网可视化",
"appid" : "__UNI__604B8F1", "appid" : "__UNI__604B8F1",
"description" : "", "description" : "",
"versionName" : "1.0.28", "versionName" : "1.0.29",
"versionCode" : 1028, "versionCode" : 1029,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {

View File

@ -217,7 +217,7 @@
getLoginConfig(){ getLoginConfig(){
this.$api.getLoginConfig({}).then(res => { this.$api.getLoginConfig({}).then(res => {
if(res.code == 0){ if(res.code == 0){
this.isImgCode = res.data.loginDemoSwitch===1?true:false; this.isImgCode = res.data.loginCaptchaSwitch===1?true:false;
}else{ }else{
this.$u.toast(res.message); this.$u.toast(res.message);
} }

View File

@ -15,10 +15,15 @@
isWebview:false, isWebview:false,
deviceObj:null, deviceObj:null,
channeList:[], channeList:[],
webviewUrl:'https://v2-test.gkiiot.com/video/web/h5/index.html' webviewHost:'',
webviewUrl:''
} }
}, },
onLoad(option) { onLoad(option) {
let configList = uni.getStorageSync('configList');
let configIndex = uni.getStorageSync('configIndex');
this.webviewHost = configList[configIndex].protocol + configList[configIndex].address;
this.webviewUrl = configList[configIndex].protocol + configList[configIndex].address + '/video/web/h5/index.html';
console.log("option",option) console.log("option",option)
let deviceObj = JSON.parse(decodeURIComponent(option.deviceObj)); let deviceObj = JSON.parse(decodeURIComponent(option.deviceObj));
this.deviceObj = deviceObj; this.deviceObj = deviceObj;
@ -40,7 +45,7 @@
// }) // })
this.$nextTick(()=>{ this.$nextTick(()=>{
this.$set(this,'channeList',res.data.list); this.$set(this,'channeList',res.data.list);
let url = 'https://v2-test.gkiiot.com/video/web/h5/index.html?deviceObj=' + encodeURIComponent(JSON.stringify(this.deviceObj)) + '&channeList='+encodeURIComponent(JSON.stringify(channeList)) let url = this.webviewHost + '/video/web/h5/index.html?deviceObj=' + encodeURIComponent(JSON.stringify(this.deviceObj)) + '&channeList='+encodeURIComponent(JSON.stringify(channeList))
this.$set(this,'webviewUrl',url); this.$set(this,'webviewUrl',url);
this.isWebview = true; this.isWebview = true;
}) })