Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
bff0bb5a
Commit
bff0bb5a
authored
Mar 14, 2019
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化 活动列表
parent
da46e192
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
3 deletions
+46
-3
redEnvelopeList.js
public/resource/js/redEnvelopeList.js
+46
-3
No files found.
public/resource/js/redEnvelopeList.js
View file @
bff0bb5a
...
@@ -72,6 +72,28 @@ define (['doT', 'text!temp/red_envelope_list_template_tpl.html', 'css!style/home
...
@@ -72,6 +72,28 @@ define (['doT', 'text!temp/red_envelope_list_template_tpl.html', 'css!style/home
$
(
'#activity-bag-num'
).
val
(
0
);
$
(
'#activity-bag-num'
).
val
(
0
);
}
}
});
});
//奖励有效期 input
$
(
"#activity-day"
).
change
(
function
(){
var
_this
=
$
(
this
);
if
(
_this
.
val
()
>
0
){
$
(
"input[name='award-period'][value='"
+
0
+
"']"
).
prop
(
"checked"
,
"checked"
);
}
});
//活动发放总次数 input
$
(
"#activity-total-num"
).
change
(
function
(){
var
_this
=
$
(
this
);
if
(
_this
.
val
()
>
0
){
$
(
"input[name='activity-total'][value='"
+
0
+
"']"
).
prop
(
"checked"
,
"checked"
);
}
});
//奖励有效期 input
$
(
"#activity-bag-num"
).
change
(
function
(){
var
_this
=
$
(
this
);
if
(
_this
.
val
()
>
0
){
$
(
"input[name='activity-total-bag'][value='"
+
0
+
"']"
).
prop
(
"checked"
,
"checked"
);
}
});
},
},
...
@@ -155,7 +177,6 @@ define (['doT', 'text!temp/red_envelope_list_template_tpl.html', 'css!style/home
...
@@ -155,7 +177,6 @@ define (['doT', 'text!temp/red_envelope_list_template_tpl.html', 'css!style/home
params
.
return_action
=
$
(
"input[name='return_action']:checked"
).
val
();
params
.
return_action
=
$
(
"input[name='return_action']:checked"
).
val
();
params
.
activity_start_time
=
(
new
Date
(
$
(
'#activity_start_date'
).
val
())).
getTime
()
*
0.001
;
params
.
activity_start_time
=
(
new
Date
(
$
(
'#activity_start_date'
).
val
())).
getTime
()
*
0.001
;
params
.
activity_end_time
=
(
new
Date
(
$
(
'#activity_end_date'
).
val
())).
getTime
()
*
0.001
;
params
.
activity_end_time
=
(
new
Date
(
$
(
'#activity_end_date'
).
val
())).
getTime
()
*
0.001
;
// params.use_period= $('#red-day').val();
//活动发放总次数
//活动发放总次数
if
(
$
(
"input[name='activity-total']:checked"
).
val
()
==
-
1
){
if
(
$
(
"input[name='activity-total']:checked"
).
val
()
==
-
1
){
params
.
total
=
-
1
;
params
.
total
=
-
1
;
...
@@ -177,9 +198,27 @@ define (['doT', 'text!temp/red_envelope_list_template_tpl.html', 'css!style/home
...
@@ -177,9 +198,27 @@ define (['doT', 'text!temp/red_envelope_list_template_tpl.html', 'css!style/home
params
.
available
=
$
(
'#activity-bag-num'
).
val
();
params
.
available
=
$
(
'#activity-bag-num'
).
val
();
}
}
params
.
activity_rule
=
$
(
'#activity-rule'
).
val
();
params
.
activity_rule
=
$
(
'#activity-rule'
).
val
();
//验证输入框大于等于0
if
(
!
(
params
.
money
>
0
)){
alert
(
'请输入金额大于0!'
);
return
;
};
if
(
!
(
params
.
use_period
>
0
)){
alert
(
'请输入奖励有效期大于0!'
);
return
;
};
if
(
!
(
params
.
total
>
0
)){
alert
(
'请输入活动发放总次数大于0!'
);
return
;
};
if
(
!
(
params
.
available
>
0
)){
alert
(
'用户可得红包数大于0!'
);
return
;
};
$
.
ajax
({
$
.
ajax
({
url
:
'/index/saveActivity'
,
//获取列表
url
:
'/index/saveActivity'
,
//获取列表
type
:
'POST'
,
type
:
'POST'
,
...
@@ -187,7 +226,11 @@ define (['doT', 'text!temp/red_envelope_list_template_tpl.html', 'css!style/home
...
@@ -187,7 +226,11 @@ define (['doT', 'text!temp/red_envelope_list_template_tpl.html', 'css!style/home
data
:
params
,
data
:
params
,
dataType
:
'json'
,
dataType
:
'json'
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
if
(
data
.
code
==
200
){
$
(
'#modal-add'
).
modal
(
'hide'
)
}
alert
(
data
.
msg
)
alert
(
data
.
msg
)
}
}
});
});
},
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment