mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-06-12 10:00:56 +08:00
优化 代码
This commit is contained in:
parent
198649e568
commit
c2840f5a96
@ -14,8 +14,7 @@
|
|||||||
remark: ''
|
remark: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
_initMethod: function () {
|
_initMethod: function() {},
|
||||||
},
|
|
||||||
_initEvent: function() {
|
_initEvent: function() {
|
||||||
vc.on('addApp', 'openAddAppModal', function() {
|
vc.on('addApp', 'openAddAppModal', function() {
|
||||||
$('#addAppModel').modal('show');
|
$('#addAppModel').modal('show');
|
||||||
@ -26,8 +25,7 @@
|
|||||||
return vc.validate.validate({
|
return vc.validate.validate({
|
||||||
addAppInfo: vc.component.addAppInfo
|
addAppInfo: vc.component.addAppInfo
|
||||||
}, {
|
}, {
|
||||||
'addAppInfo.name': [
|
'addAppInfo.name': [{
|
||||||
{
|
|
||||||
limit: "required",
|
limit: "required",
|
||||||
param: "",
|
param: "",
|
||||||
errInfo: "应用名称不能为空"
|
errInfo: "应用名称不能为空"
|
||||||
@ -38,34 +36,26 @@
|
|||||||
errInfo: "应用名称必须在2至50字符之间"
|
errInfo: "应用名称必须在2至50字符之间"
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
'addAppInfo.securityCode': [
|
'addAppInfo.securityCode': [{
|
||||||
{
|
|
||||||
limit: "maxLength",
|
limit: "maxLength",
|
||||||
param: "64",
|
param: "64",
|
||||||
errInfo: "秘钥太长超过64位"
|
errInfo: "秘钥太长超过64位"
|
||||||
},
|
}, ],
|
||||||
],
|
'addAppInfo.whileListIp': [{
|
||||||
'addAppInfo.whileListIp': [
|
|
||||||
{
|
|
||||||
limit: "maxLength",
|
limit: "maxLength",
|
||||||
param: "200",
|
param: "200",
|
||||||
errInfo: "白名单内容不能超过200"
|
errInfo: "白名单内容不能超过200"
|
||||||
},
|
}, ],
|
||||||
],
|
'addAppInfo.blackListIp': [{
|
||||||
'addAppInfo.blackListIp': [
|
|
||||||
{
|
|
||||||
limit: "maxLength",
|
limit: "maxLength",
|
||||||
param: "200",
|
param: "200",
|
||||||
errInfo: "黑名单内容不能超过200"
|
errInfo: "黑名单内容不能超过200"
|
||||||
},
|
}, ],
|
||||||
],
|
'addAppInfo.remark': [{
|
||||||
'addAppInfo.remark': [
|
|
||||||
{
|
|
||||||
limit: "maxLength",
|
limit: "maxLength",
|
||||||
param: "200",
|
param: "200",
|
||||||
errInfo: "备注内容不能超过200"
|
errInfo: "备注内容不能超过200"
|
||||||
},
|
}, ]
|
||||||
]
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
saveAppInfo: function() {
|
saveAppInfo: function() {
|
||||||
@ -82,8 +72,7 @@
|
|||||||
}
|
}
|
||||||
vc.http.apiPost(
|
vc.http.apiPost(
|
||||||
'/app.saveApp',
|
'/app.saveApp',
|
||||||
JSON.stringify(vc.component.addAppInfo),
|
JSON.stringify(vc.component.addAppInfo), {
|
||||||
{
|
|
||||||
emulateJSON: true
|
emulateJSON: true
|
||||||
},
|
},
|
||||||
function(json, res) {
|
function(json, res) {
|
||||||
|
|||||||
@ -39,9 +39,10 @@
|
|||||||
$that.parkingAreaControlFeeInfo.feeCarNum = _data.carNum;
|
$that.parkingAreaControlFeeInfo.feeCarNum = _data.carNum;
|
||||||
$that.parkingAreaControlFeeInfo.costMin = _data.hours + "小时" + _data.min + "分钟"
|
$that.parkingAreaControlFeeInfo.costMin = _data.hours + "小时" + _data.min + "分钟"
|
||||||
$that.parkingAreaControlFeeInfo.pay = _data.payCharge;
|
$that.parkingAreaControlFeeInfo.pay = _data.payCharge;
|
||||||
|
$that.parkingAreaControlFeeInfo.payCharge = _data.payCharge;
|
||||||
$that.parkingAreaControlFeeInfo.remark = '';
|
$that.parkingAreaControlFeeInfo.remark = '';
|
||||||
} else {
|
} else {
|
||||||
$that.parkingAreaControlFeeInfo.pay = _oldPayCharge;
|
$that.parkingAreaControlFeeInfo.payCharge = _oldPayCharge;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user