Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
soss
Overview
Overview
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
hooloo
web
soss
Commits
5198c247
Commit
5198c247
authored
Jul 29, 2022
by
lixiaomin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优惠券短信通知
parent
5d3532aa
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
6 deletions
+37
-6
src/api/coupon/coupon.js
+8
-0
src/views/coupon/coupon/index.vue
+27
-5
vue.config.js
+2
-1
No files found.
src/api/coupon/coupon.js
View file @
5198c247
...
@@ -77,4 +77,12 @@ export function getCouponDetail(id) {
...
@@ -77,4 +77,12 @@ export function getCouponDetail(id) {
});
});
}
}
// 获取短信模板
export
function
getMessageMoudle
()
{
return
request
({
url
:
"/v1/message/moudle"
,
method
:
"get"
,
});
}
src/views/coupon/coupon/index.vue
View file @
5198c247
...
@@ -183,7 +183,12 @@
...
@@ -183,7 +183,12 @@
</div>
</div>
<div
style=
"margin-left: 75px;"
>
<div
style=
"margin-left: 75px;"
>
<el-select
v-model=
"form.msgId"
style=
"width: 1000px;"
:disabled=
"selectMess"
>
<el-select
v-model=
"form.msgId"
style=
"width: 1000px;"
:disabled=
"selectMess"
>
<el-option
value=
"1"
label=
"模板1"
></el-option>
<el-option
v-for=
"item in messageMoudleList"
:key=
"item.id"
:label=
"item.message"
:value=
"item.id"
>
</el-option>
</el-select>
</el-select>
</div>
</div>
</div>
</div>
...
@@ -199,7 +204,7 @@
...
@@ -199,7 +204,7 @@
</template>
</template>
<
script
>
<
script
>
import
{
addCoupon
,
updateCoupon
,
listCoupon
,
offlineCoupon
,
onlineCoupon
,
delCoupon
,
getCouponDetail
}
from
"@/api/coupon/coupon"
;
import
{
addCoupon
,
updateCoupon
,
listCoupon
,
offlineCoupon
,
onlineCoupon
,
delCoupon
,
getCouponDetail
,
getMessageMoudle
}
from
"@/api/coupon/coupon"
;
import
{
getCouCategoryList
}
from
"@/api/coupon/couponType"
;
import
{
getCouCategoryList
}
from
"@/api/coupon/couponType"
;
import
GiveCoupon
from
'./giveCoupon.vue'
;
import
GiveCoupon
from
'./giveCoupon.vue'
;
import
{
listClass
}
from
"@/api/system/category"
;
import
{
listClass
}
from
"@/api/system/category"
;
...
@@ -293,7 +298,8 @@ export default {
...
@@ -293,7 +298,8 @@ export default {
cityList
:[],
cityList
:[],
storesRange
:[],
storesRange
:[],
selectMess
:
true
,
selectMess
:
true
,
shopAreaTreeList
:[]
shopAreaTreeList
:[],
messageMoudleList
:[]
};
};
},
},
created
()
{
created
()
{
...
@@ -371,9 +377,10 @@ export default {
...
@@ -371,9 +377,10 @@ export default {
return
list
;
return
list
;
},
},
changeMsg
(
val
){
changeMsg
(
val
){
this
.
selectMess
=
false
;
if
(
val
==
1
){
this
.
selectMess
=
true
;
this
.
selectMess
=
true
;
if
(
val
==
1
){
this
.
selectMess
=
false
;
}
else
{
this
.
form
.
msgId
=
""
;
this
.
form
.
msgId
=
""
;
}
}
},
},
...
@@ -438,6 +445,7 @@ export default {
...
@@ -438,6 +445,7 @@ export default {
this
.
title
=
"新增优惠券"
;
this
.
title
=
"新增优惠券"
;
this
.
getShopRangeList
();
this
.
getShopRangeList
();
this
.
getShopAreaTree
();
this
.
getShopAreaTree
();
this
.
getMessageMoudle
();
},
},
/** 上线、下线按钮操作 */
/** 上线、下线按钮操作 */
handleStatus
(
row
,
tag
)
{
handleStatus
(
row
,
tag
)
{
...
@@ -471,6 +479,7 @@ export default {
...
@@ -471,6 +479,7 @@ export default {
this
.
title
=
"修改优惠券"
;
this
.
title
=
"修改优惠券"
;
this
.
getShopRangeList
();
this
.
getShopRangeList
();
this
.
getShopAreaTree
();
this
.
getShopAreaTree
();
this
.
getMessageMoudle
();
getCouponDetail
(
row
.
id
).
then
((
response
)
=>
{
getCouponDetail
(
row
.
id
).
then
((
response
)
=>
{
console
.
log
(
"response"
,
response
.
data
);
console
.
log
(
"response"
,
response
.
data
);
if
(
response
.
code
==
200
){
if
(
response
.
code
==
200
){
...
@@ -513,6 +522,12 @@ export default {
...
@@ -513,6 +522,12 @@ export default {
this
.
form
.
relativeTime
=
response
.
data
.
relativeTime
;
this
.
form
.
relativeTime
=
response
.
data
.
relativeTime
;
this
.
form
.
receivableTime
=
response
.
data
.
receivableTime
;
this
.
form
.
receivableTime
=
response
.
data
.
receivableTime
;
this
.
form
.
weekLimit
=
response
.
data
.
weekLimit
;
this
.
form
.
weekLimit
=
response
.
data
.
weekLimit
;
//短信通知
if
(
response
.
data
.
sendMsg
){
this
.
form
.
sendMsgTag
=
1
}
else
{
this
.
form
.
sendMsgTag
=
2
}
//适用范围分品类
//适用范围分品类
if
(
response
.
data
.
categoryIds
.
length
>
0
){
if
(
response
.
data
.
categoryIds
.
length
>
0
){
if
(
response
.
data
.
categoryIds
[
0
]
==
'0'
){
if
(
response
.
data
.
categoryIds
[
0
]
==
'0'
){
...
@@ -720,6 +735,13 @@ export default {
...
@@ -720,6 +735,13 @@ export default {
this
.
form
.
daysLimit
=
null
;
this
.
form
.
daysLimit
=
null
;
this
.
form
.
userLimit
=
null
;
this
.
form
.
userLimit
=
null
;
this
.
priceLimit
=
""
;
this
.
priceLimit
=
""
;
},
getMessageMoudle
(){
getMessageMoudle
().
then
((
response
)
=>
{
if
(
response
.
code
==
0
){
this
.
messageMoudleList
=
response
.
data
;
}
})
}
}
},
},
};
};
...
...
vue.config.js
View file @
5198c247
...
@@ -35,7 +35,8 @@ module.exports = {
...
@@ -35,7 +35,8 @@ module.exports = {
proxy
:
{
proxy
:
{
// detail: https://cli.vuejs.org/config/#devserver-proxy
// detail: https://cli.vuejs.org/config/#devserver-proxy
[
process
.
env
.
VUE_APP_BASE_API
]:
{
[
process
.
env
.
VUE_APP_BASE_API
]:
{
target
:
`http://140.143.224.240:8091`
,
//target: `http://140.143.224.240:8091`,
target
:
`https://hooloo-dev-api.gdatac.com`
,
changeOrigin
:
true
,
changeOrigin
:
true
,
pathRewrite
:
{
pathRewrite
:
{
[
"^"
+
process
.
env
.
VUE_APP_BASE_API
]:
""
,
[
"^"
+
process
.
env
.
VUE_APP_BASE_API
]:
""
,
...
...
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