12345678910111213141516171819202122232425262728293031323334353637383940 |
- (function () {
- var page = {
- isScroll: true,
- init: function ($page) {
- $page.find('#saveuserinfo').on('tap', function () {
- if (!$('#registerform').lrformValid()) {
- return false;
- }
- var formdata = $('#registerform').lrformGet();
- if (formdata.password2 === formdata.password1) {
- var req = {
- FullName: formdata.username,
- Password: $.md5(formdata.password1),
- LicensePlate: formdata.licenseplate,
- IdCard: formdata.idcard,
- };
- renlian.layer.loading(true);
-
- // 访问后台修改密码
- //renlian.httppost(config.webapi + "renlian/adms/user/modifypw", req, function(data,info){
- renlian.http.post(config.webapi + '/?s=api/register', req, function(data,info){
- renlian.layer.loading(false);
- if (data.success === true) {// 表单数据保存成功,发起流程
- //renlian.layer.toast(info);
- //renlian.storage.set('logininfo', null);
- renlian.nav.go({ path: 'login', isBack: false, isHead: false });
- }else{
- renlian.layer.warning(data.message, function () { }, '提示', '关闭');
- }
- });
- }
- else {
- renlian.layer.toast('二次输入密码不同');
- }
- });
- }
- };
- return page;
- })();
|