From c851a2b17339183abe677a1b26c66e75f852cf50 Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Sun, 8 Sep 2019 18:16:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E9=94=80=E8=B4=A6=E5=8F=B7=E7=AD=89?= =?UTF-8?q?=E5=BE=85=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/cancellation.js | 86 ++++++++++++++++++++++++++++++++++++++ templete/cancellation.html | 35 ++++++++++++++-- 2 files changed, 118 insertions(+), 3 deletions(-) create mode 100644 js/cancellation.js diff --git a/js/cancellation.js b/js/cancellation.js new file mode 100644 index 0000000..99215b4 --- /dev/null +++ b/js/cancellation.js @@ -0,0 +1,86 @@ +mui.plusReady(function(){ + var wait = 120; + + function time() { + + if(wait == 0) { + $('#mobileCode').removeAttr("disabled"); + $('#mobileCode').val("重新发送"); + wait = 120; + } else { + $('#mobileCode').attr("disabled", true); + $('#mobileCode').val("重新发送(" + wait + ")"); + wait--; + setTimeout(function() { + time(); + }, + 1000) + } + + } + $(".photos").on("tap", 'img', function() { + var _input = $(this).parent().parent().parent().prev()[0]; + UP.init(_input.id, "test", this.id) + openCamera() + }) + var token = localStorage.getItem('token'); + mui.ajax(qlgUrl('app/users/editPhone'), { + headers: { + "HYH-Token": token + }, + data: {}, + dataType: 'json', //服务器返回json格式数据 + type: 'post', //HTTP请求类型 + timeout: 10000, //超时时间设置为10秒; + success: function(data) { //服务器返回响应,根据响应结果,分析是否登录成功; + var data = toJson(data); + if (data.status == 1) { + data = data.data; + if (data.userPhone) { + $('#userPhone').val(data.userPhone); + } + } + }, + }) + mui('.row').on('tap', '#mobileCode', function() { + var that = $(this); + + that.attr("disabled", true); + alert('功能开发中'); + // mui.ajax(hyhUrl('app/users/backpayCode'), {  + // + // data: {}, + // dataType: 'json', //服务器返回json格式数据 + // type: 'post', //HTTP请求类型 + // timeout: 10000, //超时时间设置为10秒 + // success: function(data) { + // var data = toJson(data); + // //服务器返回响应,根据响应结果,分析是否登录成功; + // if(data.status == 1) { + // time(); + // } else { + // alert(data.msg) + // } + // that.removeAttr('disabled'); + // }, + // + // error: function(xhr, type, errorThrown) { + // //异常处理; + // // alert(type) + // // alert(type);       + // } + // });  + }) + mui('.down').on('tap', '#true', function() { + var phoneCode = $('#phoneCode').val(); + var that = $(this); + if(phoneCode == '') { + alert('验证码不能为空!'); + return; + } else if(phoneCode.length < 4) { + alert('验证码格式不正确!'); + return; + } + alert('功能开发中'); + }) +}) \ No newline at end of file diff --git a/templete/cancellation.html b/templete/cancellation.html index d176332..283d458 100644 --- a/templete/cancellation.html +++ b/templete/cancellation.html @@ -24,7 +24,36 @@
三、请您更深入了解避免以后后悔莫及!
- +
+ + +
+ +
+
+ + +
+
+
+
+
+ + 操作人: + +
+
+ + 手机号: + +
+
+ + 验证码: + + + +
确定
@@ -41,9 +70,9 @@ parent.appendChild(element); element.onload = function() { - var style = [JZL.getCssUrl('setting_recive.css'), JZL.getCssUrl('login.css'), JZL.getCssUrl('sha.css'), JZL.getCssUrl('setting.css'), JZL.getCssUrl("global.css"), JZL.getCssUrl("header.css")]; + var style = [JZL.getCssUrl('login.css'), JZL.getCssUrl('sha.css'), JZL.getCssUrl('setting.css'), JZL.getCssUrl("global.css"), JZL.getCssUrl("header.css")]; JZL.css_init(style); - var script = [JZL.getJsUrl('setting_recive.js'), JZL.getJsUrl('common.js')]; + var script = [JZL.getJsUrl('cancellation.js'), JZL.getJsUrl('common.js')]; JZL.js_init(script); setTimeout(function() { parent.style.visibility = "visible";