Commit 9c58757a by 梁建民

账户设置

parent ccdefd46
...@@ -2,19 +2,19 @@ ...@@ -2,19 +2,19 @@
<html lang="zh-CN"> <html lang="zh-CN">
<head> <head>
<include file="public/header" /> <include file="public/header"/>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/account.css"> <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/account.css">
</head> </head>
<body> <body>
<div class="wrapper"> <div class="wrapper">
<include file="public/navleft" /> <include file="public/navleft"/>
<div class="wrapper_right"> <div class="wrapper_right">
<include file="public/top" /> <include file="public/top"/>
<div class="right_content release_inquiry_content"> <div class="right_content release_inquiry_content">
<div class="content layui-form"> <div class="content">
<div class="nav_title">账户设置 > 基本设置</div> <div class="nav_title">账户设置 > 基本设置</div>
<div class="inquiry_form"> <div class="inquiry_form layui-form">
<h3 class="bold">基本设置</h3> <h3 class="bold">基本设置</h3>
<div class="gb"> <div class="gb">
<span class="icon iconfont iconjuxing19 va-m"></span> <span class="icon iconfont iconjuxing19 va-m"></span>
...@@ -25,52 +25,31 @@ ...@@ -25,52 +25,31 @@
<div class="xh input_div"> <div class="xh input_div">
<span class="input_title lineBlock">手机号:</span> <span class="input_title lineBlock">手机号:</span>
<div class="input_parent"> <div class="input_parent">
<input type="text" placeholder="请输入手机号" class="input boxsiz" disabled="disabled" value="18589050841"> <input type="text" placeholder="请输入手机号" class="input boxsiz" disabled="disabled" value="" name="mobile">
</div> </div>
</div> </div>
<div class="xh input_div"> <div class="xh input_div">
<span class="input_title lineBlock">所在地区:</span> <span class="input_title lineBlock">所在地区:</span>
<div class="input_parent"> <div class="input_parent">
<div class="layui-input-inline auto-area" style="width: 170px;margin-left: 0;margin-right: 20px;"> <div class="layui-input-inline auto-area" style="width: 170px;margin-left: 0;margin-right: 20px;" id="province_id">
<select name="city" lay-verify="required"> <select name="province_id" lay-verify="required"></select>
<option value=""></option>
<option value="0">北京</option>
<option value="1">上海</option>
<option value="2">广州</option>
<option value="3">深圳</option>
<option value="4">杭州</option>
</select>
</div> </div>
<div class="layui-input-inline auto-area" style="width: 170px;margin-left: 0;margin-right: 20px;"> <div class="layui-input-inline auto-area" style="width: 170px;margin-left: 0;margin-right: 20px;" id="city_id">
<select name="city" lay-verify="required"> <select name="city_id" lay-verify="required"></select>
<option value=""></option>
<option value="0">北京</option>
<option value="1">上海</option>
<option value="2">广州</option>
<option value="3">深圳</option>
<option value="4">杭州</option>
</select>
</div> </div>
<div class="layui-input-inline auto-area" style="width: 170px;margin-left: 0;"> <div class="layui-input-inline auto-area" style="width: 170px;margin-left: 0;" id="district_id">
<select name="city" lay-verify="required"> <select name="district_id" lay-verify="required"></select>
<option value=""></option>
<option value="0">北京</option>
<option value="1">上海</option>
<option value="2">广州</option>
<option value="3">深圳</option>
<option value="4">杭州</option>
</select>
</div> </div>
</div> </div>
</div> </div>
<div class="brand input_div"> <div class="brand input_div">
<span class="input_title lineBlock">详细地址:</span> <span class="input_title lineBlock">详细地址:</span>
<div class="input_parent"> <div class="input_parent">
<input type="text" placeholder="请输入详细地址" class="input boxsiz"> <input type="text" placeholder="请输入详细地址" class="input boxsiz" name="detail_address" lay-verify="required">
</div> </div>
</div> </div>
<div class="btn_div"> <div class="btn_div">
<span class="lineBlock fb boxsiz">保存</span> <span class="lineBlock fb boxsiz" lay-submit lay-filter="account">保存</span>
</div> </div>
</div> </div>
<div class="form_right fl "> <div class="form_right fl ">
...@@ -103,7 +82,7 @@ ...@@ -103,7 +82,7 @@
</div>--> </div>-->
<div class="tod-bar"> <div class="tod-bar">
<h3 class="bold">消息通知</h3> <h3 class="bold">消息通知</h3>
<ul class="list-box clr"> <ul class="list-box clr layui-form" lay-filter="userInfo">
<li class="clr"> <li class="clr">
<div class="fl l"> <div class="fl l">
<i class="lineBlock iconfont iconjuxing1 va-m"></i> <i class="lineBlock iconfont iconjuxing1 va-m"></i>
...@@ -114,7 +93,7 @@ ...@@ -114,7 +93,7 @@
</div> </div>
<div class="fr r "> <div class="fr r ">
<div class="sw"> <div class="sw">
<input type="checkbox" name="xxx" lay-skin="switch" checked> <input type="checkbox" name="sys_msg" lay-skin="switch" lay-filter="sys_msg">
</div> </div>
</div> </div>
</li> </li>
...@@ -128,7 +107,7 @@ ...@@ -128,7 +107,7 @@
</div> </div>
<div class="fr r "> <div class="fr r ">
<div class="sw"> <div class="sw">
<input type="checkbox" name="xxx" lay-skin="switch" checked> <input type="checkbox" name="business_msg" lay-skin="switch" lay-filter="business_msg">
</div> </div>
</div> </div>
</li> </li>
...@@ -142,7 +121,7 @@ ...@@ -142,7 +121,7 @@
</div> </div>
<div class="fr r "> <div class="fr r ">
<div class="sw"> <div class="sw">
<input type="checkbox" name="xxx" lay-skin="switch"> <input type="checkbox" name="activity_msg" lay-skin="switch" lay-filter="activity_msg">
</div> </div>
</div> </div>
</li> </li>
...@@ -152,7 +131,35 @@ ...@@ -152,7 +131,35 @@
</div> </div>
</div> </div>
</div> </div>
<include file="public/foot" /> <include file="public/foot"/>
<script src="__PUBLIC__/js/global/observer.js"></script>
<script src="__PUBLIC__/js/account/index.js"></script>
<!--省-->
<script type="text/html" id="provinceHtml">
<select name="province_id" lay-verify="required" lay-filter="province_id">
<option value=""></option>
{{# layui.each(d, function(index, item){ }}
<option value="{{item.region_id}}">{{item.region_name}}</option>
{{# }); }}
</select>
</script>
<!--市-->
<script type="text/html" id="cityHtml">
<select name="city_id" lay-verify="required" lay-filter="city_id">
<option value=""></option>
{{# layui.each(d, function(index, item){ }}
<option value="{{item.region_id}}">{{item.region_name}}</option>
{{# }); }}
</select>
</script>
<!--区-->
<script type="text/html" id="districtHtml">
<select name="district_id" lay-verify="required" lay-filter="district_id">
{{# layui.each(d, function(index, item){ }}
<option value="{{item.region_id}}">{{item.region_name}}</option>
{{# }); }}
</select>
</script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -840,3 +840,4 @@ body { ...@@ -840,3 +840,4 @@ body {
color: #ADB6BF; color: #ADB6BF;
cursor: pointer; cursor: pointer;
} }
/*# sourceMappingURL=base.css.map */
\ No newline at end of file
...@@ -256,3 +256,4 @@ ...@@ -256,3 +256,4 @@
.home_content .new_xj .new_xj_list .new_xj_item:hover { .home_content .new_xj .new_xj_list .new_xj_item:hover {
box-shadow: 0px 5px 10px 0px rgba(216, 223, 230, 0.5); box-shadow: 0px 5px 10px 0px rgba(216, 223, 230, 0.5);
} }
/*# sourceMappingURL=home.css.map */
\ No newline at end of file
{"version":3,"sources":["home.less"],"names":[],"mappings":"AAAA,aACI;EACI,aAAA;EACA,sBAAA;EACA,6BAAA;EACA,eAAA;;AALR,aACI,WAMI;EACI,gBAAA;EACA,OAAO,kBAAP;EACA,mBAAA;;AAVZ,aACI,WAMI,aAKI;EACI,aAAA;EACA,YAAA;EACA,sBAAA;EACA,kBAAA;;AAhBhB,aACI,WAMI,aAYI;EACI,cAAA;EACA,OAAO,kBAAP;;AArBhB,aACI,WAMI,aAYI,WAII;EACI,eAAA;;AAxBpB,aACI,WAMI,aAYI,WASI;EACI,gBAAA;EACA,eAAA;EACA,mBAAA;;AA/BpB,aACI,WAMI,aAYI,WAeI;EACI,cAAA;EACA,eAAA;EACA,gBAAA;;AArCpB,aACI,WAMI,aAYI,WAeI,YAKI;EACI,kBAAA;;AAxCxB,aACI,WAMI,aAYI,WAeI,YAKI,OAGI;EACI,cAAA;;AA3C5B,aACI,WAiDI;EACI,gBAAA;EACA,kBAAA;EACA,YAAA;;AArDZ,aACI,WAiDI,YAKI;EACI,cAAA;;AAxDhB,aACI,WAiDI,YASI;EACI,eAAA;;AAEA,aA7DZ,WAiDI,YASI,KAGK;EACG,cAAA;;AAGJ,aAjEZ,WAiDI,YASI,KAOK;EACG,cAAA;;AAGJ,aArEZ,WAiDI,YASI,KAWK;EACG,cAAA;;AAvEpB,aACI,WAiDI,YAyBI;EACI,eAAA;EACA,cAAA;;AA7EhB,aAkFI;EACI,YAAA;EACA,mBAAA;;AApFR,aAkFI,gBAII;EACI,YAAA;EACA,sBAAA;EACA,qDAAA;EACA,YAAA;;AA1FZ,aAkF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Z,aAgNI,QAGI,cAGI;EACI,eAAA;EACA,eAAA;EACA,cAAA;EACA,kBAAA;EACA,WAAA;EACA,UAAA;;AA5NhB,aAgNI,QAgBI;EACI,eAAA;EACA,gBAAA;;AAlOZ,aAgNI,QAgBI,aAII;EACI,YAAA;EACA,sBAAA;EACA,gBAAA;EACA,eAAA;EACA,cAAA;EACA,eAAA;EACA,iBAAA;EACA,gCAAA;;AAEA,aA9BZ,QAgBI,aAII,aAUK;EACG,mBAAA;;AA/OpB,aAgNI,QAgBI,aAII,aAcI;EACI,cAAA;EACA,eAAA;EACA,UAAA;;AArPpB,aAgNI,QAgBI,aAII,aAoBI;EACI,UAAA;;AAzPpB,aAgNI,QAgBI,aAII,aAoBI,OAGI;EACI,cAAA;;AA5PxB,aAgNI,QAgBI,aAII,aA4BI;EACI,UAAA;;AAjQpB,aAgNI,QAgBI,aAII,aA4BI,KAGI;EACI,cAAA;;AApQxB,aAgNI,QAgBI,aAII,aAoCI;EACI,UAAA;;AAzQpB,aAgNI,QAgBI,aAII,aAoCI,SAGI;EACI,eAAA;EACA,cAAA;EACA,yCAAA;EACA,8BAAA;EACA,gBAAA;EACA,kBAAA;;AAEA,aAnEpB,QAgBI,aAII,aAoCI,SAGI,MAQK;EACG,yCAAA;EACA,cAAA;;AArR5B,aAgNI,QAgBI,aAII,aAoCI,SAiBI;EACI,cAAA;;AA1RxB,aAgNI,QAgBI,aAII,aA0DI;EACI,UAAA;;AA/RpB,aAgNI,QAgBI,aAII,aA+DI;EACI,WAAA;EACA,cAAA;EACA,SAAA;EACA,eAAA;;AAGJ,aA1FZ,QAgBI,aAII,aAsEK;EACG,qDAAA","file":"home.css"} {"version":3,"sources":["home.less"],"names":[],"mappings":"AAAA,aACI;EACI,aAAA;EACA,sBAAA;EACA,6BAAA;EACA,eAAA;;AALR,aACI,WAMI;EACI,gBAAA;EACA,OAAO,kBAAP;EACA,mBAAA;;AAVZ,aACI,WAMI,aAKI;EACI,aAAA;EACA,YAAA;EACA,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A,iBAAA;EACA,gCAAA;;AAEA,aA9BZ,QAgBI,aAII,aAUK;EACG,mBAAA;;AAjQpB,aAkOI,QAgBI,aAII,aAcI;EACI,cAAA;EACA,eAAA;EACA,UAAA;;AAvQpB,aAkOI,QAgBI,aAII,aAoBI;EACI,UAAA;;AA3QpB,aAkOI,QAgBI,aAII,aAoBI,OAGI;EACI,cAAA;;AA9QxB,aAkOI,QAgBI,aAII,aA4BI;EACI,UAAA;;AAnRpB,aAkOI,QAgBI,aAII,aA4BI,KAGI;EACI,cAAA;;AAtRxB,aAkOI,QAgBI,aAII,aAoCI;EACI,UAAA;;AA3RpB,aAkOI,QAgBI,aAII,aAoCI,SAGI;EACI,eAAA;EACA,cAAA;EACA,yCAAA;EACA,8BAAA;EACA,gBAAA;EACA,kBAAA;;AAEA,aAnEpB,QAgBI,aAII,aAoCI,SAGI,MAQK;EACG,yCAAA;EACA,cAAA;;AAvS5B,aAkOI,QAgBI,aAII,aAoCI,SAiBI;EACI,cAAA;;AA5SxB,aAkOI,QAgBI,aAII,aA0DI;EACI,UAAA;;AAjTpB,aAkOI,QAgBI,aAII,aA+DI;EACI,WAAA;EACA,cAAA;EACA,SAAA;EACA,eAAA;;AAGJ,aA1FZ,QAgBI,aAII,aAsEK;EACG,qDAAA","file":"home.css"}
\ No newline at end of file \ No newline at end of file
!function () {
window.AccountController = {
isClick: false,
token: Util.getCookie('token') || '',
init: function () {
this.created(this).mounted(this).handleBind(this);
},
created: function (opt) {
//默认获取省
IcController.getData(apis.regionPcd, 'POST', {token: opt.token}, function (res) {
if (res.errcode == 0) {
var getTpl = provinceHtml.innerHTML;
layui.laytpl(getTpl).render(res.data, function (html) {
$("#province_id").empty().html(html);
layui.form.render();
});
}
});
return this;
},
mounted: function (opt) {
//获取会员信息
IcController.getData(apis.userInfo, 'GET', {token: opt.token}, function (res) {
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)
})
}
});
return this;
},
handleBind: function (opt) {
//系统消息通知
layui.form.on('switch(sys_msg)', function (data) {
Observer.emit('switch', {
type: 1,
data: data.elem.checked ? 1 : 0
});
});
//业务通知
layui.form.on('switch(business_msg)', function (data) {
Observer.emit('switch', {
type: 2,
data: data.elem.checked ? 1 : 0
});
});
//活动通知
layui.form.on('switch(activity_msg)', function (data) {
Observer.emit('switch', {
type: 3,
data: data.elem.checked ? 1 : 0
});
});
//监听消息推送
Observer.on('switch', function (e) {
IcController.getData(apis.userSetmsg, 'POST', {token: opt.token, type: e.args.type, is_open: e.args.data}, function (res) {
if (res.errcode == 0) {
layer.msg('设置成功');
} else {
layer.msg(res.msg);
}
})
});
//账户设置
layui.form.on('submit(account)', function (data) {
$(data.elem).addClass("layui-btn-disabled");
if (!opt.isClick) {
opt.isClick = true;
var params = $.extend({}, data.field, {token: opt.token});
IcController.getData(apis.userAccount, 'POST', params, function (res) {
if (res.errcode == 0) {
layer.msg(res.errmsg);
opt.isClick = false;
$(data.elem).removeClass("layui-btn-disabled");
} else {
layer.msg(res.errmsg);
opt.isClick = false;
$(data.elem).removeClass("layui-btn-disabled");
}
});
}
});
//省
layui.form.on('select(province_id)', function (data) {
Observer.emit('region', {
type: 'province_id',
province_id: data.value,
city_id: ''
});
});
//市
layui.form.on('select(city_id)', function (data) {
Observer.emit('region', {
type: 'city_id',
province_id: $('select[name="province_id"]').val(),
city_id: data.value
});
});
//监听省市区
Observer.on('region', function (e) {
var getTpl = cityHtml.innerHTML,
getTpl1 = districtHtml.innerHTML,
tpl = '';
e.args.type == 'province_id' ? tpl = getTpl : tpl = getTpl1;
var params = {
token: opt.token,
province_id: e.args.province_id,
city_id: e.args.city_id
};
IcController.getData(apis.regionPcd, 'POST', params, function (res) {
if (res.errcode == 0) {
layui.laytpl(tpl).render(res.data, function (html) {
if (e.args.type == 'province_id') {
//省联动市
$("#city_id").empty().html(html);
$("#district_id").empty().html('<select name="district_id" lay-verify="required" lay-filter="district_id">' +
' <option value=""></option>' +
'</select>');
} else if (e.args.type == 'city_id') {
//市联动区
$("#district_id").empty().html(html);
}
layui.form.render();
});
}
}, false);
});
return this;
},
}, $(function () {
AccountController.init();
})
}();
\ No newline at end of file
...@@ -119,6 +119,22 @@ ...@@ -119,6 +119,22 @@
* 我的报价单列表 * 我的报价单列表
*/ */
offerinfo: offer_url + "/offer/info", offerinfo: offer_url + "/offer/info",
/***
* 获取会员信息
*/
userInfo: user_url + "/user/info",
/***
* 账户消息通知设置
*/
userSetmsg: user_url + "/user/setmsg",
/***
* 账户设置
*/
userAccount: user_url + "/user/account",
/***
* 获取省市区
*/
regionPcd: user_url + "/region/pcd"
}; };
if (typeof define === "function" && define.amd) { if (typeof define === "function" && define.amd) {
......
var Observer = (function () {
//防止消息队列暴漏而被篡改故将消息容器作为静态私有变量保存
var __message = {}
return {
// 订阅事件
on: function (type, fn) {
if (typeof __message[type] === 'undefined') {
__message[type] = [fn]
} else {
__message[type].push(fn)
}
},
// 触发事件(发布事件)
emit: function (type, args) {
//如果该消息没有注册,则返回
if (!__message[type]) return;
//定义消息信息
var events = {
type: type, //消息类型
args: args //消息携带数据
}
i = 0; //消息动作循环变量
len = __message[type].length;
//循环消息动作
for (; i < len; i++) {
//依次执行注册的消息对应的动作系列
__message[type][i].call(this, events)
}
},
//删除订阅事件
remove: function (type, fn) {
//如果消息动作队列存在
if (__message[type] instanceof Array) {
//从最后一个消息动作遍历
var i = __message[type].length - 1;
for (; i >= 0; i--) {
//如果存在该动作则在消息动作序列中移除相应动作
__message[type][i] === fn && __message[type].splice(i, 1)
}
}
}
}
})()
...@@ -42,8 +42,10 @@ ...@@ -42,8 +42,10 @@
$("#daytext").val(val + '天'); $("#daytext").val(val + '天');
}); });
//上传商品发布 //上传商品发布
layui.form.on('submit(add)', function (data) { layui.form.on('submit(add)', function (data) {
$(data.elem).addClass("layui-btn-disabled"); $(data.elem).addClass("layui-btn-disabled");
if (!opt.isClick) { if (!opt.isClick) {
...@@ -74,6 +76,7 @@ ...@@ -74,6 +76,7 @@
}); });
} }
}); });
return this; return this;
}, },
}, $(function () { }, $(function () {
......
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