Commit 7c6131ce authored by 黄奎's avatar 黄奎

页面修改

parent 2e4dbdd7
......@@ -737,10 +737,12 @@
var cmdStr = "";
//cmdStr = "/api/test/get";
cmdStr="/api/Mall/GetHome";
// this.apipost(cmdStr, {
// }, res => {
// console.log("Test", res.data);
// })
//cmdStr = "/api/Mall/GetMessageTemplate";
// cmdStr = "/api/Mall/GetWeChatOpenId";
var postData = {};
this.apipost(cmdStr, postData, res => {
console.log("Test", res.data);
})
},
},
mounted() {
......
<style>
.weixinappmsg{
position: relative;
.weixinappmsg {
position: relative;
}
.weixinappmsg .mimitBody {
padding: 20px;
background-color: #fff;
......@@ -24,20 +25,23 @@
.weixinappmsg .el-button--small {
padding: 9px 15px;
}
.wexin_Header{
.wexin_Header {
padding: 0 20px;
height: 56px;
line-height: 56px;
background-color: #fff;
margin-bottom: 10px;
}
.weixinTopBtn{
.weixinTopBtn {
position: absolute;
top: 10px;
right: 10px;
z-index: 2;
}
.weixin_warmTips{
.weixin_warmTips {
margin: 0px 20px 20px;
background-color: rgb(244, 244, 245);
padding: 10px 15px;
......@@ -45,27 +49,31 @@
display: inline-block;
font-size: 15px;
}
</style>
<template>
<div class="weixinappmsg">
<!--<el-button class="weixinTopBtn" type="primary" size="small">一键添加订阅信息</el-button>-->
<el-button class="weixinTopBtn" type="primary" size="small" @click="getWeChatMessageTemplate">一键添加订阅信息</el-button>
<div class="wexin_Header">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="微信小程序" name="1"></el-tab-pane>
</el-tabs>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="微信小程序" name="1"></el-tab-pane>
</el-tabs>
</div>
<template v-if="checkIndex==1">
<div class="mimitBody">
<div class="el-col el-col-24">
<div class="weixin_warmTips">温馨提示:获取前请先确认您已获得订阅消息的使用权限,并且订阅消息中没有任何数据。获取后请不要到小程序后台 删除相应的订阅消息,否则会影响订阅消息正常使用。</div>
<div class="weixin_warmTips">温馨提示:获取前请先确认您已获得订阅消息的使用权限,并且订阅消息中没有任何数据。获取后请不要到小程序后台 删除相应的订阅消息,否则会影响订阅消息正常使用。
</div>
<el-form label-width="300px">
<el-form-item label="拼团成功通知(类目: 服装/鞋/箱包 )">
<el-input type="text" style="width:30%" size="small" maxlength="200" v-model="wechatMsg.sucMsg">
<el-input type="text" style="width:30%" size="small" maxlength="200"
v-model="wechatMsg.WeChat_pintuan_success_notice">
</el-input>
<el-button plain size="small">查看订阅消息示例</el-button>
</el-form-item>
<el-form-item label="拼团失败通知(类目: 服装/鞋/箱包 )">
<el-input type="text" style="width:30%" size="small" maxlength="200" v-model="wechatMsg.falMsg">
<el-input type="text" style="width:30%" size="small" maxlength="200"
v-model="wechatMsg.WeChat_pintuan_fail_notice">
</el-input>
<el-button plain size="small">查看订阅消息示例</el-button>
</el-form-item>
......@@ -82,11 +90,12 @@
data() {
return {
//商城订阅消息
activeName:'1',
checkIndex:1,
wechatMsg:{
sucMsg:'',
falMsg:''
activeName: '1',
checkIndex: 1,
wechatMsg: {
GroupByConfigId: 0,
WeChat_pintuan_success_notice: '',
WeChat_pintuan_fail_notice: ''
},
};
},
......@@ -95,15 +104,57 @@
},
methods: {
//切换
handleClick(tab){
handleClick(tab) {
this.checkIndex = tab.name;
},
getWeChatMessageTemplate() {
this.apipost("/api/Mall/GetMessageTemplate", {}, res => {
if (res.data.resultCode == 1) {
var dataArray = res.data.data;
if (dataArray && dataArray.length > 0) {
dataArray.forEach(item => {
if (item.Tid == "1953") {
//拼团失败模板
this.wechatMsg.WeChat_pintuan_fail_notice = item.MessageTemplateId;
} else if (item.Tid == "980") {
//拼团成功模板
this.wechatMsg.WeChat_pintuan_success_notice = item.MessageTemplateId;
}
});
}
} else {
this.Info(res.data.message);
}
})
},
//保存信息
saveMsg(){
saveMsg() {
this.apipost("/api/GroupBuy/SetGroupBuyConfigMessage", this.wechatMsg, res => {
if (res.data.resultCode == 1) {
this.getGroupBuyConfig();
this.Success(res.data.message);
} else {
this.Info(res.data.message);
}
})
},
//获取拼团配置
getGroupBuyConfig() {
this.apipost("/api/GroupBuy/GetGroupBuyConfigModule", {}, res => {
if (res.data.resultCode == 1) {
var dataObj = res.data.data;
if (dataObj) {
this.wechatMsg.WeChat_pintuan_success_notice = dataObj.WeChat_pintuan_success_notice;
this.wechatMsg.WeChat_pintuan_fail_notice = dataObj.WeChat_pintuan_fail_notice;
}
} else {
this.Info(res.data.message);
}
})
}
},
mounted() {
this.getGroupBuyConfig();
}
};
......
......@@ -297,7 +297,6 @@
this.Info(res.data.message);
}
})
}
},
mounted() {
......
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