Authored by huangyi

领券

... ... @@ -38,8 +38,6 @@ const couponController = {
let data = await loadExcel(file.path);
console.log(data);
if (!data.length) {
return res.json({
code: 201,
... ...
... ... @@ -29,7 +29,7 @@
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="actName">
商家名称<span class="required">*</span>
商家名称<span class="required">(选填)</span>
</label>
<div class="col-md-6 col-sm-6 col-xs-12">
<input class="form-control col-md-7 col-xs-12 form-imput"
... ...
... ... @@ -48,6 +48,7 @@ const couponController = {
},
async couponGet(req, res, next) {
console.log(req.body);
if (!req.body.params.userId) {
return res.json({
code: 200,
... ...
... ... @@ -49,7 +49,6 @@ class CouponModel extends global.yoho.BaseModel {
let noId = couponNolist[0].id;
// 如果type=2(一人一码) 则修改第一张待用券码的send状态
if (obj.type === 2) {
await mysqlCli.update(`UPDATE ${TABLE_COUPON_NO} SET send_flag = 1 where id = :id`, {id: noId});
... ...
... ... @@ -77,7 +77,7 @@ function bindEditPageEvent() {
let val = $this.val();
let data = $this.data();
if (!val && !error && data.type !== 'id' && data.type !== 'couponNo') {
if (!val && !error && data.type !== 'id' && data.type !== 'couponNo' && data.type !== 'shopName') {
error = data.empty || `请填写${data.type}`;
}
if (data.type === 'couponDesc') {
... ...
... ... @@ -115,7 +115,6 @@ function bind_table_pagination() {
$('.btn-delete').click(function() {
let id = $(this).attr('data-id');
console.log(id);
$.ajax({
url: '/admin/api/coupon/delete?id=' + id,
method: 'get',
... ...