Commit d579d4e1 by liuying

微信短信授权

parent 606a0bd9
......@@ -4,7 +4,9 @@ const prodEnv = require('./prod.env')
module.exports = merge(prodEnv, {
'NODE_ENV': "'development'",
'host': "'//localhost'",
// 'host': "'//localhost'",
'host': "'http://testcenter.bigaka.net/crm'",
'project': "'crm/vue'",
'requestUrl': "'crm'"
'requestUrl': "'crm'",
'reqUrl': "'/wxcrm-web/'"
})
......@@ -13,15 +13,12 @@ module.exports = {
`,
css:`
<%@ include file="/WEB-INF/include/css.jsp"%>
<link rel="stylesheet" href="\${ctx }/vendors/bootstrap-multiselect-master/dist/css/bootstrap-multiselect.css">
<link rel="stylesheet" href="\${ctx}/css/apps/auto-marketing/filter.css?v=\${v}" />
`,
menu:`
<%@ include file="/WEB-INF/include/menu.jsp"%>
`,
footer:`
<%@ include file="/WEB-INF/include/js.jsp"%>
<script type="text/javascript" src="\${ctx}/vendors/bootstrap-multiselect-master/dist/js/bootstrap-multiselect.js"></script>
`
},
dev: {
......@@ -30,7 +27,7 @@ module.exports = {
assetsPublicPath: '/',
proxyTable: {
'/api': {
target: 'http://wxapp.hotwind.net', // 接口的域名
target: 'http://testcenter.bigaka.net/crm', // 接口的域名
// secure: false, // 如果是https接口,需要配置这个参数
changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
pathRewrite: {
......
module.exports = {
"host": "'//wxapp.hotwind.net'",
"host": "'//testcenter.bigaka.net/crm'",
'project': "'wxcrm-web/vue'",
'requestUrl': "'crm'"
}
......@@ -81,16 +81,16 @@
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
</span>
</el-dialog>
<el-dialog
title="系统提示"
:visible.sync="dialogTemp"
width="500px"
:before-close="handleClose">
<el-dialog title="系统提示" :visible.sync="dialogTemp" width="500px" :before-close="handleClose">
<div>
<div style="float: left; width: 30px;"><i class="el-icon-warning" style="font-size:20px"></i></div>
<div style="float: left; width: 30px;">
<i class="el-icon-warning" style="font-size:20px"></i>
</div>
<div style="width: 400px;float: left;">
<p>亲爱的舞象云用户,您好:</p>
<p style="text-indent:25px;margin-top: 20px;">近期,在使用微信营销推送功能时,有部分用户反馈出现推送失败的情况。在舞象云团队紧急分析原因后,暂时定位在调用微信推送接口时,微信反馈接口数量调用达到上限,也就是一次操作数量及频次不能过多。在后续使用时,建议每次推送会员限制在1万以内,并尽量分开时段,不同时发起多次推送。给您带来的困扰,深表抱歉,我们将尽快确定解决方案,完成功能优化。</p>
<p
style="text-indent:25px;margin-top: 20px;"
>近期,在使用微信营销推送功能时,有部分用户反馈出现推送失败的情况。在舞象云团队紧急分析原因后,暂时定位在调用微信推送接口时,微信反馈接口数量调用达到上限,也就是一次操作数量及频次不能过多。在后续使用时,建议每次推送会员限制在1万以内,并尽量分开时段,不同时发起多次推送。给您带来的困扰,深表抱歉,我们将尽快确定解决方案,完成功能优化。</p>
</div>
</div>
<span slot="footer" class="dialog-footer">
......@@ -101,104 +101,136 @@
</div>
</template>
<script>
import api from '@/tool/api'
const STATE_OK = 200
import api from "@/tool/api";
import config from "@/config";
const STATE_OK = 200;
export default {
data() {
return {
wechatAuth: '',
msgAuth:'',
dialogVisible:false,
dialogTemp:false
}
wechatAuth: "",
msgAuth: "",
dialogVisible: false,
dialogTemp: false
};
},
created() {
this.getAuth()
this.getAuth();
},
methods: {
handleToOpen(){
this.dialogVisible = false
handleToOpen() {
// this.dialogVisible = false;
window.open(platformCtx + '/message/marketingSms/list.do')
},
async getAuth() {
await this.axios.get(api.getAuthState).then(res=> {
if(res&&res.status===STATE_OK){
this.wechatAuth = res.data.authState
this.msgAuth = res.data.msgAuthState
await this.axios.get(api.getAuthState).then(res => {
const { data } = res;
if (data) {
this.wechatAuth = data.authState;
this.msgAuth = data.msgAuthState;
}
})
});
},
handleAddMaterial() {
if(this.wechatAuth===1){
this.$router.push('addmarketing')
}else{
console.log('未授权')
if (this.wechatAuth === 1) {
this.$router.push("addmarketing");
} else {
console.log("未授权");
}
},
handleAddTemp() {
if(this.wechatAuth===1){
this.dialogTemp = true
window.location.href = `http://testcenter.bigaka.net/crm/back/wechat/msg-mass/create?type=3`
}else{
console.log('未授权')
window.open( ctx + '/back/wechat/go-author');
if (this.wechatAuth === 1) {
this.dialogTemp = true;
window.location.href = `http://testcenter.bigaka.net/crm/back/wechat/msg-mass/create?type=3`;
} else {
console.log("未授权");
window.open(ctx + "/back/wechat/go-author");
}
},
handleAddMessage() {
if(this.msgAuth===1){
if (this.msgAuth === 1) {
// this.$router.push('addmarketing')
}else{
this.dialogVisible = true
} else {
this.dialogVisible = true;
}
},
handleClose(done) {
this.dialogVisible = false
this.dialogVisible = false;
}
},
}
}
};
</script>
<style lang='stylus' scoped>
.marketing-button
margin 8px 0
height 182px
.button-left, .button-right
padding-left 5px
background-color #fff
height 180px
.left-title
height 50px
line-height 50px
.left-title-name
img
width 30px
height 30px
.left-icon
height 140px
.icon-left
width 20%
.icon-right, .icon-left
padding 20px 0
text-align center
.icon-wechat
font-size 40px
.icon-wechat-msg
font-size 14px
padding-top 10px
.button-right
margin-left 10px
.right-marketing
padding 20px 0
text-align center
img
width 64px
height 64px
.icon-wechat
font-size 40px
.icon-wechat-msg
font-size 14px
padding-top 10px
.marketing-white
background-color #fff
height 27px
.marketing-button {
margin: 8px 0;
height: 182px;
.button-left, .button-right {
padding-left: 5px;
background-color: #fff;
height: 180px;
.left-title {
height: 50px;
line-height: 50px;
.left-title-name {
img {
width: 30px;
height: 30px;
}
}
}
.left-icon {
height: 140px;
.icon-left {
width: 20%;
}
.icon-right, .icon-left {
padding: 20px 0;
text-align: center;
.icon-wechat {
font-size: 40px;
}
.icon-wechat-msg {
font-size: 14px;
padding-top: 10px;
}
}
}
}
.button-right {
margin-left: 10px;
.right-marketing {
padding: 20px 0;
text-align: center;
img {
width: 64px;
height: 64px;
}
.icon-wechat {
font-size: 40px;
}
.icon-wechat-msg {
font-size: 14px;
padding-top: 10px;
}
}
}
}
.marketing-white {
background-color: #fff;
height: 27px;
}
</style>
......@@ -32,7 +32,7 @@
</span>
<span>微信触达域-公众号</span>
<span>
<a href="#">
<a :href = "this.authUrl">
立即授权</a>
</span>
</el-col>
......@@ -42,7 +42,7 @@
</span>
<span>移动触达域-短信</span>
<span>
<a href="#">
<a :href="this.msgUrl">
前往开通</a>
</span>
</el-col>
......@@ -53,6 +53,23 @@
</div>
</div>
</template>
<script>
import config from "@/config";
export default {
data() {
return {
authUrl: "",
msgUrl: ""
}
},
created() {
this.authUrl = ctx + "/back/wechat/auth"
this.msgUrl = platformCtx + '/message/marketingSms/list.do'
}
}
</script>
<style lang='stylus' scoped>
.marketing-title
height 177px
......
......@@ -2,7 +2,7 @@ import config from '@/config'
export default {
getMenu: `${config.host}/crm/back/menu/getMenu`,
getAuthState: 'http://testcenter.bigaka.net/crm/back/wechat/msg-mass/marketingPushAuthState',
getAuthState: `${config.host}/back/marketing/push/auth-state`,
// 营销中心
getMaterialsList: 'http://testcenter.bigaka.net/crm/back/wechat/msg-mass/materials-list', // 获取图文素材列表
getPushList: 'http://testcenter.bigaka.net/crm/back/wechat/msg-mass/medialist', // 获取图文推送列表
......
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