|
@@ -79,23 +79,22 @@ layui.define('view', function(exports){
|
|
|
var success = options.ajax.success;
|
|
|
delete options.ajax.success;
|
|
|
}
|
|
|
-
|
|
|
- admin.req($.extend(true, {
|
|
|
- url: '/auth/code'
|
|
|
- ,type: 'get'
|
|
|
- ,data: {
|
|
|
- phone: value
|
|
|
- }
|
|
|
- ,success: function(res){
|
|
|
- layer.msg('验证码已发送至你的手机,请注意查收', {
|
|
|
- icon: 1
|
|
|
- ,shade: 0
|
|
|
- });
|
|
|
- options.elemVercode.focus();
|
|
|
- countDown();
|
|
|
- success && success(res);
|
|
|
- }
|
|
|
- }, options.ajax));
|
|
|
+
|
|
|
+ var url = $(this).attr('url');
|
|
|
+
|
|
|
+ $.getJSON(url, {mobile:value}, function(t) {
|
|
|
+ if (t.code == 1) {
|
|
|
+ layer.msg(t.msg);
|
|
|
+ } else {
|
|
|
+ layer.msg(t.data, {
|
|
|
+ icon: 1
|
|
|
+ ,shade: 0
|
|
|
+ });
|
|
|
+ options.elemVercode.focus();
|
|
|
+ countDown();
|
|
|
+ success && success(res);
|
|
|
+ }
|
|
|
+ })
|
|
|
});
|
|
|
}
|
|
|
|