Commit 85076827 by 梁建民

js

parent 9c58757a
......@@ -21,7 +21,7 @@
<span>如需更改手机账户,请联系在线客服。</span>
</div>
<div class="form_content clr">
<div class="form_left fl layui-form">
<div class="form_left fl layui-form" lay-filter="account">
<div class="xh input_div">
<span class="input_title lineBlock">手机号:</span>
<div class="input_parent">
......
......@@ -35,13 +35,39 @@
if (res.errcode == 0) {
//手机号
$("input[name='mobile']").val(res.data.mobile);
//消息通知
layui.form.val("userInfo", {
"sys_msg": Number(res.data.sys_msg),
"business_msg": Number(res.data.business_msg),
"activity_msg": Number(res.data.activity_msg)
})
});
//省
Observer.emit('region', {
type: 'province_id',
province_id: Number(res.data.province),
city_id: '',
district_id: Number(res.data.district),
detail_address: res.data.detail_address,
flag: true
});
//市
setTimeout(function () {
Observer.emit('region', {
type: 'city_id',
province_id: Number(res.data.province),
city_id: Number(res.data.city),
district_id: Number(res.data.district),
detail_address: res.data.detail_address,
flag: true
});
}, 200)
}
......@@ -116,9 +142,9 @@
if (res.errcode == 0) {
layer.msg(res.errmsg);
opt.isClick = false;
$(data.elem).removeClass("layui-btn-disabled");
} else {
......@@ -156,7 +182,6 @@
});
//监听省市区
Observer.on('region', function (e) {
......@@ -196,6 +221,17 @@
}
//获取默认省市区
if (e.args.flag) {
layui.form.val("account", {
"province_id": e.args.province_id,
"city_id": e.args.city_id,
"district_id": e.args.district_id,
"detail_address": e.args.detail_address
})
}
layui.form.render();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment