Commit 5198c247 by lixiaomin

优惠券短信通知

parent 5d3532aa
...@@ -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",
});
}
...@@ -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; this.selectMess=true;
if(val==1){ if(val==1){
this.selectMess=true; 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;
}
})
} }
}, },
}; };
......
...@@ -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]: "",
......
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