Commit 04bc3ea1 by 梁建民

js

parent 1729f808
......@@ -51,7 +51,7 @@
</div>
<div class="layui-form-style fr">
<span class="lineBlock">状态:</span>
<select name="status">
<select name="status/eq">
<option value=""></option>
<option value="1">上架</option>
<option value="2">下架</option>
......@@ -62,7 +62,7 @@
<div class="input_div boxsiz">
<span class="lineBlock">商品型号:</span>
<div class="boxsiz">
<input type="text" placeholder="请输入型号" class="boxsiz" name="goods_name">
<input type="text" placeholder="请输入型号" class="boxsiz" name="goods_name/like">
</div>
</div>
</div>
......
......@@ -836,3 +836,4 @@ body {
color: #ADB6BF;
cursor: pointer;
}
/*# sourceMappingURL=base.css.map */
\ No newline at end of file
!function () {
window.GoodManageController = {
token: Util.getCookie('token') || '',
init: function () {
this.created(this).mounted(this).render(this, {offset: 10, p: 1, token: Util.getCookie('token') || ''}, 1).handleBind(this);
this.created(this).mounted(this).render(this, {offset: 2, p: 1, token: this.token}, 1).handleBind(this);
},
created: function (opt) {
......@@ -21,7 +22,7 @@
mounted: function (opt) {
//商品数量获取
IcController.getData(apis.goodsCount, 'GET', {token: Util.getCookie('token') || ''}, function (res) {
IcController.getData(apis.goodsCount, 'GET', {token: opt.token}, function (res) {
if (res.errcode == 0) {
......@@ -57,7 +58,7 @@
elem: 'pagination',
theme: '#1080d0',
count: res.total,
limit: 10,
limit: 2,
curr: curr,
jump: function (obj, first) {
......@@ -70,21 +71,21 @@
var param = $.extend({}, params, json);
opt.render(opt, param, obj.curr);
GoodManageController.render(opt, param, obj.curr);
}
}
});
});
} else if(res.errcode === 501){
} else if (res.errcode === 501) {
layer.msg(res.errmsg,function () {
layer.msg(res.errmsg, function () {
window.location.href = home_url + '/login';
});
}else if (res.errcode == 110001) {
} else if (res.errcode == 110001 || res.errcode == 103001) {
layui.laytpl(getTpl).render([], function (html) {
......@@ -100,12 +101,20 @@
},
handleBind: function (opt) {
//搜索
layui.form.on('submit(search)', function (data) {
IcController.getData(apis.goodsSearch, 'POST', data.field, function (res) {
var param = {
token: opt.token,
offset: 2,
p: 1
};
var params = $.extend({}, data.field, param);
opt.render(this,params,1)
});
});
......
!function () {
window.UploadSingleController = {
isClick: false,
token: Util.getCookie('token') || '',
init: function () {
this.created(this).mounted(this).handleBind(this);
},
......@@ -20,7 +21,7 @@
var str = '期货';
data.value == '现货' ? str='现货':str='期货';
data.value == '现货' ? str = '现货' : str = '期货';
var getTpl = deliveryHtml.innerHTML;
......@@ -51,7 +52,9 @@
opt.isClick = true;
IcController.getData(apis.goodsAdd, 'POST', data.field, function (res) {
var params = $.extend({}, data.field, {token: opt.token});
IcController.getData(apis.goodsAdd, 'POST', params, function (res) {
if (res.errcode == 0) {
......
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