Commit 5198c247 by lixiaomin

优惠券短信通知

parent 5d3532aa
......@@ -77,4 +77,12 @@ export function getCouponDetail(id) {
});
}
// 获取短信模板
export function getMessageMoudle() {
return request({
url: "/v1/message/moudle",
method: "get",
});
}
......@@ -183,7 +183,12 @@
</div>
<div style="margin-left: 75px;">
<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>
</div>
</div>
......@@ -199,7 +204,7 @@
</template>
<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 GiveCoupon from './giveCoupon.vue';
import {listClass} from "@/api/system/category";
......@@ -293,7 +298,8 @@ export default {
cityList:[],
storesRange:[],
selectMess:true,
shopAreaTreeList:[]
shopAreaTreeList:[],
messageMoudleList:[]
};
},
created() {
......@@ -371,9 +377,10 @@ export default {
return list;
},
changeMsg(val){
this.selectMess=false;
if(val==1){
this.selectMess=true;
if(val==1){
this.selectMess=false;
}else{
this.form.msgId="";
}
},
......@@ -438,6 +445,7 @@ export default {
this.title = "新增优惠券";
this.getShopRangeList();
this.getShopAreaTree();
this.getMessageMoudle();
},
/** 上线、下线按钮操作 */
handleStatus(row,tag) {
......@@ -471,6 +479,7 @@ export default {
this.title = "修改优惠券";
this.getShopRangeList();
this.getShopAreaTree();
this.getMessageMoudle();
getCouponDetail(row.id).then((response) => {
console.log("response",response.data);
if(response.code==200){
......@@ -513,6 +522,12 @@ export default {
this.form.relativeTime=response.data.relativeTime;
this.form.receivableTime=response.data.receivableTime;
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[0]=='0'){
......@@ -720,6 +735,13 @@ export default {
this.form.daysLimit=null;
this.form.userLimit=null;
this.priceLimit="";
},
getMessageMoudle(){
getMessageMoudle().then((response) => {
if(response.code==0){
this.messageMoudleList=response.data;
}
})
}
},
};
......
......@@ -35,7 +35,8 @@ module.exports = {
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[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,
pathRewrite: {
["^" + process.env.VUE_APP_BASE_API]: "",
......
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 to comment