Commit 98094069 by 施宇

Merge branch 'master' of http://119.23.72.7/shiyu/icsales

# Conflicts:
#	dist/js/goodmanage/index.js
#	dist/js/goodmanage/uploadsingle.js
11
parents c1edea95 676b5c8b
......@@ -8,6 +8,7 @@ class BaseController extends Controller
{
$datas['logo'] = $this->apiBaseCache('pc_logo_set'); // logo
$datas['bottom_qrcode'] = $this->apiBaseCache('pc_bottom_qrcode'); // 底部二维码
$datas['hot_goods'] = $this->apiBaseCache('pc_hot_goods', '', 5); // 热门商品
foreach ($datas as $k => $v) {
$this->assign($k, $v['data']);
......
......@@ -72,7 +72,7 @@
上传商品
</div>
<div class="xz fr boxsiz btn btn_border">
下载商品模板
<a href="__PUBLIC__/ic_templet.xls">下载商品模板</a>
</div>
<div class="plsc fr btn btn_green">
<span class="icon iconfont iconjuxing16 "></span>
......@@ -166,7 +166,7 @@
{{# if(item['audit_status'] == 1){ }}
<a class="edit fr" href="/uploadsingle?id={{item.goods_id}}">编辑</a>
{{# } else { }}
<a class="edit fr disabled" href="/uploadsingle?id={{item.goods_id}}">编辑</a>
<a class="edit fr disabled">编辑</a>
{{# } }}
</div>
{{# }); }}
......
......@@ -39,7 +39,7 @@
<script type="text/html" id="msgHtml">
<div class="notice_list">
{{# layui.each(d, function(index, item){ }}
<div class="notice_item clr" data-status="{{item.status}}">
<div class="notice_item clr" data-id="{{item.log_id}}" data-type="{{item.msg_type}}">
<div class="item_right fr">
<p>{{item.create_time}}</p>
</div>
......
......@@ -229,6 +229,7 @@
}
.good_manage_content .good_data .data_list .data_item .edit.disabled {
cursor: not-allowed;
opacity: 0.5;
}
.good_manage_content .good_data .data_list .data_item .xj_status {
color: #686E73;
......@@ -237,6 +238,7 @@
}
.good_manage_content .good_data .data_list .data_item .xj_status.disabled {
cursor: not-allowed;
opacity: 0.5;
}
.good_manage_content .good_data .data_list .data_item .xj_status.fb {
color: #0D84D1;
......
{"version":3,"sources":["goodmanage.less"],"names":[],"mappings":"AAAA;EACI,eAAA;;AADJ,oBAG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BAlEhB,WACI,WAGI,WAoDI,aAUK,GACG;EACI,yBAAA;;AAIR,oBAxEhB,WACI,WAGI,WAoDI,aAgBK,GACG;EACI,yBAAA;;AAGR,oBA7EhB,WACI,WAGI,WAoDI,aAqBK,GACG;EACI,yBAAA;;AAhQ5B,oBAiLI,WACI,WAGI,WAoDI,aA2BI;EACI,cAAA;;AArQxB,oBAiLI,WACI,WAGI,WAoFI;EACI,UAAA;;AA1QpB,oBAiLI,WACI,WAGI,WAyFI;EACI,cAAA;EACA,UAAA;;AAGJ,mBAAqC;EAArC,oBAlGZ,WACI,WAGI,WAiGQ;IACI,UAAA;;EAJR,oBAlGZ,WACI,WAGI,WAqGQ;IACI,UAAA;;EARR,oBAlGZ,WACI,WAGI,WAyGQ;IACI,UAAA;;EAZR,oBAlGZ,WACI,WAGI,WA6GQ;IACI,aAAA;;;AAnSxB,oBAiLI,WACI,WAGI,WAkHI;EACI,cAAA;EACA,eAAA;;AACA,oBAzHhB,WACI,WAGI,WAkHI,MAGK;EACG,mBAAA;;AA3SxB,oBAiLI,WACI,WAGI,WA0HI;EACI,cAAA;EACA,eAAA;EACA,iBAAA;;AACA,oBAlIhB,WACI,WAGI,WA0HI,WAIK;EACG,mBAAA;;AAEJ,oBArIhB,WACI,WAGI,WA0HI,WAOK;EACG,cAAA","file":"goodmanage.css"}
\ No newline at end of file
{"version":3,"sources":["goodmanage.less"],"names":[],"mappings":"AAAA;EACI,eAAA;;AADJ,oBAGI;EACI,eAAA;;AAJR,oBAOI;EACI,sBAAA;EACA,aAAA;EACA,kBAAA;;AAVR,oBAOI,YAKI;EACI,aAAA;EACA,kBAAA;;AAdZ,oBAOI,YAKI,IAII;EACI,eAAA;EACA,gBAAA;;AAlBhB,oBAOI,YAKI,IASI;EACI,eAAA;EACA,cAAA;;AAGJ,oBAnBR,YAKI,IAcK,QACG;EACI,cAAA;;AAIR,oBAzBR,YAKI,IAoBK,UACG;EACI,cAAA;;AAIR,oBA/BR,YAKI,IA0BK,QACG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;AAGJ,mBAAqC;EAArC,oBAlGZ,WACI,WAGI,WAiGQ;IACI,UAAA;;EAJR,oBAlGZ,WACI,WAGI,WAqGQ;IACI,UAAA;;EARR,oBAlGZ,WACI,WAGI,WAyGQ;IACI,UAAA;;EAZR,oBAlGZ,WACI,WAGI,WA6GQ;IACI,aAAA;;;AAnSxB,oBAiLI,WACI,WAGI,WAkHI;EACI,cAAA;EACA,eAAA;;AACA,oBAzHhB,WACI,WAGI,WAkHI,MAGK;EACG,mBAAA;EACA,YAAA;;AA5SxB,oBAiLI,WACI,WAGI,WA2HI;EACI,cAAA;EACA,eAAA;EACA,iBAAA;;AACA,oBAnIhB,WACI,WAGI,WA2HI,WAIK;EACG,mBAAA;EACA,YAAA;;AAEJ,oBAvIhB,WACI,WAGI,WA2HI,WAQK;EACG,cAAA","file":"goodmanage.css"}
\ No newline at end of file
......@@ -298,6 +298,7 @@
cursor: pointer;
&.disabled{
cursor: not-allowed;
opacity: 0.5;
}
}
......@@ -307,6 +308,7 @@
margin-left: 20px;
&.disabled{
cursor: not-allowed;
opacity: 0.5;
}
&.fb {
color: #0D84D1;
......
......@@ -177,7 +177,11 @@
/**
* 获取会员活动通知
*/
userActmsg: user_url + '/user/actmsg'
userActmsg: user_url + '/user/actmsg',
/**
* 标记会员通知(已读)
*/
userMarkmsg: user_url + '/user/markmsg'
};
if (typeof define === "function" && define.amd) {
return apis;
......
! function () {
!function () {
window.GoodManageController = {
token: Util.getCookie('token') || '',
init: function () {
......@@ -139,35 +139,62 @@
//上架
$('#listData').on('click', '.fb', function (e) {
e.stopPropagation();
var goodId = $(this).parent('.data_item').attr('goodid');
if ($(this).hasClass('disabled')) {
return
return;
} else {
opt.sxj(goodId, 1)
opt.sxj(goodId, 1);
}
});
//下架
$('#listData').on('click', '.xj', function (e) {
e.stopPropagation();
var goodId = $(this).parent('.data_item').attr('goodid');
if ($(this).hasClass('disabled')) {
return
return;
} else {
opt.sxj(goodId, 2)
}
});
$('.xz').on('click',function(){
window.location.href="http://icsales-files-2019.oss-cn-shenzhen.aliyuncs.com/files/templates/ic_templet.xls"
})
$('#listData').on('click', '.data_item', function (e) {
//进入详情
$(document).on('click', '#listData .data_item', function (e) {
e.stopPropagation();
var goodId = $(this).attr('goodid');
window.location.href="/gooddetail?type=1&id="+goodId
});
//阻止默认事件
$(document).on('click','.data_list .disabled',function (e) {
e.stopPropagation();
});
return this;
},
}, $(function () {
......
......@@ -26,11 +26,7 @@
//编辑
if (id) {
IcController.getData(apis.goodsInfo, 'GET', {
token: opt.token,
'goods_id/eq': id
}, function (res) {
IcController.getData(apis.goodsInfo, 'GET', {token: opt.token, 'goods_id/eq': id}, function (res) {
if (res.errcode === 0) {
......@@ -40,7 +36,6 @@
"encap": res['goods_list'][id].encap,
"stock": res['goods_list'][id].stock,
"price": res['goods_list'][id].price,
"day": res['goods_list'][id].delivery_time,
"currency": res['goods_list'][id].currency,
"delivery_time": res['goods_list'][id].delivery_time
});
......@@ -51,11 +46,26 @@
$('.upload_result').show();
$('.upload_result img').attr('src',res['goods_list'][id].goods_images)
}
setTimeout(function () {
$('.hq').find('.layui-form-radioed').trigger('click');
}, 500)
}, 500);
setTimeout(function () {
layui.form.val("goodsave", {
"day": res['goods_list'][id].delivery_time
});
}, 1000);
layui.form.render();
}
......
......@@ -13,7 +13,7 @@
return this;
},
render: function (opt, params, curr, url) {
render: function (opt, params, curr, url, flag) {
var getTpl = msgHtml.innerHTML;
......@@ -40,6 +40,7 @@
}
if (flag == undefined) {
layui.laytpl(getTpl).render(data.data, function (html) {
......@@ -70,6 +71,8 @@
});
}
} else {
layer.msg(res.msg);
......@@ -101,6 +104,44 @@
}
});
//活动标记
$(document).on('click', '.notice_list .notice_item', function () {
var id = $(this).attr('data-id');
var type = $(this).attr('data-type');
IcController.getData(apis.userMarkmsg, 'GET', {token: opt.token, log_id: id}, function (res) {
if (res.errcode === 0) {
if (type === 2) {
opt.render(opt, {token: opt.token, page: 1, limit: 10}, 1, apis.userActmsg, false);
} else {
opt.render(opt, {token: opt.token, page: 1, limit: 10}, 1, apis.userSysmsg, false);
}
//顶部信息数量恭喜
IcController.getData(apis.userInfo, 'GET', {token: opt.token}, function (res) {
if (res.errcode === 0) {
//消息数量
$("#count_num").empty().html(res.data['msg_notification']);
}
});
}
});
});
return this;
},
......
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