优化岗亭跳转bug

This commit is contained in:
wuxw 2024-04-21 22:34:49 +08:00
parent f87301456c
commit 5f0b45ee8a
4 changed files with 39 additions and 8 deletions

View File

@ -7,7 +7,7 @@
},
_initEvent: function () {
vc.on('deleteMerchant', 'openDeleteMerchantModal', function (_params) {
vc.component.deleteMerchantInfo = _params;
$that.deleteMerchantInfo = _params;
$('#deleteMerchantModel').modal('show');
});
},
@ -15,7 +15,7 @@
deleteMerchant: function () {
vc.http.apiPost(
'/property.deleteProperty',
JSON.stringify(vc.component.deleteMerchantInfo), {
JSON.stringify($that.deleteMerchantInfo), {
emulateJSON: true
},
function (json, res) {
@ -41,4 +41,4 @@
}
}
});
})(window.vc, window.vc.component);
})(window.vc, window.$that);

View File

@ -253,6 +253,11 @@
vm._navJumpToIot();
return;
}
if (_catalog.url == 'MALL') {
//获取用户名
vc.jumpToMall('/');
return;
}
if (_catalog.url != '#') {
vm._settingActiveCatalog(_catalog);
vc.jumpToPage(_catalog.url);

View File

@ -91,7 +91,7 @@
vc.jumpToPage('/#/pages/property/parkingBoxAreaManage?boxId=' + _parkingBox.boxId + "&boxName=" + _parkingBox.boxName);
},
_openParkingAreaControl: function (_parkingBox) {
vc.jumpToIot('/#/pages/property/parkingAreaControl?boxId=' + _parkingBox.boxId + "&paId=" + _parkingBox.paId);
vc.jumpToIot('/#/pages/car/parkingAreaControl?boxId=' + _parkingBox.boxId + "&paId=" + _parkingBox.paId);
}
}
});

View File

@ -1319,6 +1319,32 @@
//vcFramework.reBuilderVcTree();
};
//跳转至商城
vcFramework.jumpToMall = function (url) {
let param = {
params: {
targetUrl: encodeURIComponent(url),
communityId: vc.getCurrentCommunity().communityId
}
};
//发送get请求
vc.http.apiGet('/mall.getMallToken',
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.jumpToIot = function (url) {
let param = {
@ -2102,7 +2128,7 @@
return _newDate.getFullYear() + '-' + add0(_newDate.getMonth() + 1) + '-' + add0(_newDate.getDate());
};
vcFramework.addPersonMonth = function(_date,_month){
vcFramework.addPersonMonth = function (_date, _month) {
// 设置日期为下个月
_date.setMonth(_date.getMonth() + 1);
// 如果日期是31号并且下个月没有31号例如2月则日期会自动调整为下个月的最后一天
@ -2111,10 +2137,10 @@
if (_date.getDate() > daysInNextMonth) {
_date.setDate(daysInNextMonth);
}
// 减去一天
_date.setDate(_date.getDate() - 1);
// 输出结果
console.log(_date);
return _date.getFullYear() + '-' + add0(_date.getMonth() + 1) + '-' + add0(_date.getDate());
@ -3246,7 +3272,7 @@
ret += (150.0 * Math.sin(lng / 12.0 * PI) + 300.0 * Math.sin(lng / 30.0 * PI)) * 2.0 / 3.0;
return ret
}
vcFramework.wgs84togcj02=function(lng, lat) {
vcFramework.wgs84togcj02 = function (lng, lat) {
var lat = +lat;
var lng = +lng;
if (out_of_china(lng, lat)) {