diff --git a/js/joinous.js b/js/joinous.js index b6facd2..29e253d 100644 --- a/js/joinous.js +++ b/js/joinous.js @@ -48,21 +48,29 @@ $('#write-submit').on('click', function () { $('#write_rule').addClass('display-none').text(''); //ajax var req = { + sysCode:sysComm.sysCode, plApplyName:personNames, plApplyTel:userTel, - deivceType:3 + deivceType:3, + plType:3, + deviceNo:0, + } $.ajax({ - //几个参数需要注意一下 - data: JSON.stringify(req), - method: "POST", - async: false, + method: 'post', url: dataUrl.util.saveParkLotApply(), + data: JSON.stringify(req), + contentType: 'application/json; charset=utf-8', + dataType: 'json', success: function (res) { console.log(res) if (res.code == '8888') { - console.log(res.data) - $('#openmodel').modal('hide'); + $('#write_rule').removeClass('display-none').text('添加数据成功,3s后自动关闭此弹窗'); + setTimeout(function () { + $('#write_rule').addClass('display-none').text(''); + $('#openmodel').modal('hide'); + },3000); + } }, diff --git a/js/unit.js b/js/unit.js index 1b82494..6029cf8 100644 --- a/js/unit.js +++ b/js/unit.js @@ -1,3 +1,10 @@ + +sysComm = { + sysCode: '1001',//企业云系统编码 + gvnSysCode: '1002',//政府系统编码 + grantType: 'PASSWORD',//授权模式 + clientType: 'WEB'//客户端类型 +} //阿里云测试环境,别删 var parkcloudbaseUrl = 'http://39.98.54.240:8093/';// url公用地址 var authUrl = 'http://39.98.54.240:8088/';// 鉴权URL公用地址