mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-06-12 10:00:56 +08:00
支持跳转插件
This commit is contained in:
parent
8735f30ff1
commit
4a7d0e6e19
@ -209,28 +209,7 @@
|
|||||||
},
|
},
|
||||||
_navJumpToIot: function () {
|
_navJumpToIot: function () {
|
||||||
//获取用户名
|
//获取用户名
|
||||||
let param = {
|
vc.jumpToIot('/');
|
||||||
params:{
|
|
||||||
targetUrl: '/',
|
|
||||||
communityId:vc.getCurrentCommunity().communityId
|
|
||||||
}
|
|
||||||
};
|
|
||||||
//发送get请求
|
|
||||||
vc.http.apiGet('/iot.getIotToken',
|
|
||||||
param,
|
|
||||||
function (json, res) {
|
|
||||||
let _json = JSON.parse(json);
|
|
||||||
if (_json.code != 0) {
|
|
||||||
vc.toast(_json.msg);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
let _url = _json.data.url;
|
|
||||||
window.open(_url);
|
|
||||||
},
|
|
||||||
function () {
|
|
||||||
console.log('请求失败处理');
|
|
||||||
}
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
_emitMsg: function (_param) {
|
_emitMsg: function (_param) {
|
||||||
vm._settingActiveCatalog(_param);
|
vm._settingActiveCatalog(_param);
|
||||||
|
|||||||
@ -136,32 +136,7 @@
|
|||||||
vc.jumpToPage('/#/pages/property/parkingAreaText?paId=' + _parkingArea.paId)
|
vc.jumpToPage('/#/pages/property/parkingAreaText?paId=' + _parkingArea.paId)
|
||||||
},
|
},
|
||||||
_openParkingAreaTotalControl: function (_parkingArea) {
|
_openParkingAreaTotalControl: function (_parkingArea) {
|
||||||
|
vc.jumpToIot('/#/pages/car/parkingAreaTotalControl?paId=' + _parkingArea.paId);
|
||||||
//获取用户名
|
|
||||||
let param = {
|
|
||||||
params:{
|
|
||||||
targetUrl: encodeURIComponent('/#/pages/car/parkingAreaTotalControl?paId=' + _parkingArea.paId),
|
|
||||||
communityId:vc.getCurrentCommunity().communityId
|
|
||||||
}
|
|
||||||
};
|
|
||||||
//发送get请求
|
|
||||||
vc.http.apiGet('/iot.getIotToken',
|
|
||||||
param,
|
|
||||||
function (json, res) {
|
|
||||||
let _json = JSON.parse(json);
|
|
||||||
if (_json.code != 0) {
|
|
||||||
vc.toast(_json.msg);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
let _url = _json.data.url;
|
|
||||||
window.open(_url);
|
|
||||||
},
|
|
||||||
function () {
|
|
||||||
console.log('请求失败处理');
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
//vc.jumpToPage('/#/pages/property/parkingAreaTotalControl?paId=' + _parkingArea.paId);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -91,32 +91,7 @@
|
|||||||
vc.jumpToPage('/#/pages/property/parkingBoxAreaManage?boxId=' + _parkingBox.boxId + "&boxName=" + _parkingBox.boxName);
|
vc.jumpToPage('/#/pages/property/parkingBoxAreaManage?boxId=' + _parkingBox.boxId + "&boxName=" + _parkingBox.boxName);
|
||||||
},
|
},
|
||||||
_openParkingAreaControl: function (_parkingBox) {
|
_openParkingAreaControl: function (_parkingBox) {
|
||||||
//vc.jumpToPage('/#/pages/property/parkingAreaControl?boxId=' + _parkingBox.boxId + "&paId=" + _parkingBox.paId);
|
vc.jumpToIot('/#/pages/property/parkingAreaControl?boxId=' + _parkingBox.boxId + "&paId=" + _parkingBox.paId);
|
||||||
|
|
||||||
//获取用户名
|
|
||||||
let param = {
|
|
||||||
params:{
|
|
||||||
targetUrl: encodeURIComponent('/#/pages/car/parkingAreaControl?boxId=' + _parkingBox.boxId + "&paId=" + _parkingBox.paId),
|
|
||||||
communityId:vc.getCurrentCommunity().communityId
|
|
||||||
|
|
||||||
}
|
|
||||||
};
|
|
||||||
//发送get请求
|
|
||||||
vc.http.apiGet('/iot.getIotToken',
|
|
||||||
param,
|
|
||||||
function (json, res) {
|
|
||||||
let _json = JSON.parse(json);
|
|
||||||
if (_json.code != 0) {
|
|
||||||
vc.toast(_json.msg);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
let _url = _json.data.url;
|
|
||||||
window.open(_url);
|
|
||||||
},
|
|
||||||
function () {
|
|
||||||
console.log('请求失败处理');
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -1301,7 +1301,6 @@
|
|||||||
//绑定跳转函数
|
//绑定跳转函数
|
||||||
vcFramework.jumpToPage = function (url) {
|
vcFramework.jumpToPage = function (url) {
|
||||||
//判断 url 的模板是否 和当前url 模板一个
|
//判断 url 的模板是否 和当前url 模板一个
|
||||||
console.log('jumpToPage', url);
|
|
||||||
if (url.indexOf('#') < 0) {
|
if (url.indexOf('#') < 0) {
|
||||||
window.location.href = url;
|
window.location.href = url;
|
||||||
return;
|
return;
|
||||||
@ -1320,6 +1319,57 @@
|
|||||||
//vcFramework.reBuilderVcTree();
|
//vcFramework.reBuilderVcTree();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//跳转至物联网
|
||||||
|
vcFramework.jumpToIot = function (url) {
|
||||||
|
let param = {
|
||||||
|
params:{
|
||||||
|
targetUrl: encodeURIComponent(url),
|
||||||
|
communityId:vc.getCurrentCommunity().communityId
|
||||||
|
}
|
||||||
|
};
|
||||||
|
//发送get请求
|
||||||
|
vc.http.apiGet('/iot.getIotToken',
|
||||||
|
param,
|
||||||
|
function (json, res) {
|
||||||
|
let _json = JSON.parse(json);
|
||||||
|
if (_json.code != 0) {
|
||||||
|
vc.toast(_json.msg);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let _url = _json.data.url;
|
||||||
|
window.open(_url);
|
||||||
|
},
|
||||||
|
function () {
|
||||||
|
console.log('请求失败处理');
|
||||||
|
}
|
||||||
|
);
|
||||||
|
};
|
||||||
|
//跳转至物联网
|
||||||
|
vcFramework.jumpToPlugin = function (url) {
|
||||||
|
let param = {
|
||||||
|
params:{
|
||||||
|
targetUrl: encodeURIComponent(url),
|
||||||
|
communityId:vc.getCurrentCommunity().communityId
|
||||||
|
}
|
||||||
|
};
|
||||||
|
//发送get请求
|
||||||
|
vc.http.apiGet('/plugin.getPluginToken',
|
||||||
|
param,
|
||||||
|
function (json, res) {
|
||||||
|
let _json = JSON.parse(json);
|
||||||
|
if (_json.code != 0) {
|
||||||
|
vc.toast(_json.msg);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let _url = _json.data.url;
|
||||||
|
window.open(_url);
|
||||||
|
},
|
||||||
|
function () {
|
||||||
|
console.log('请求失败处理');
|
||||||
|
}
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
refreshVcFramework = function () {
|
refreshVcFramework = function () {
|
||||||
$that.$destroy();
|
$that.$destroy();
|
||||||
let _vmOptions = {
|
let _vmOptions = {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user