Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-activity-platform
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
huangyi
7 years ago
Commit
77cb3682af9e4be1fccf140c217f6330f6002ead
1 parent
4be88693
领券
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
3 additions
and
6 deletions
apps/admin/controllers/coupon.js
apps/admin/views/action/coupon/coupon-option.hbs
apps/api/controllers/coupon.js
apps/api/models/coupon.js
public/js/admin/coupon-option.page.js
public/js/admin/coupon.page.js
apps/admin/controllers/coupon.js
View file @
77cb368
...
...
@@ -38,8 +38,6 @@ const couponController = {
let
data
=
await
loadExcel
(
file
.
path
);
console
.
log
(
data
);
if
(
!
data
.
length
)
{
return
res
.
json
({
code
:
201
,
...
...
apps/admin/views/action/coupon/coupon-option.hbs
View file @
77cb368
...
...
@@ -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"
...
...
apps/api/controllers/coupon.js
View file @
77cb368
...
...
@@ -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
,
...
...
apps/api/models/coupon.js
View file @
77cb368
...
...
@@ -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
});
...
...
public/js/admin/coupon-option.page.js
View file @
77cb368
...
...
@@ -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'
)
{
...
...
public/js/admin/coupon.page.js
View file @
77cb368
...
...
@@ -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'
,
...
...
Please
register
or
login
to post a comment