Commit 4a0fba1a by 高淑倩

add:auth_state

parent 31604c3b
...@@ -68,7 +68,7 @@ module.exports = { ...@@ -68,7 +68,7 @@ module.exports = {
assetsSubDirectory: 'static', assetsSubDirectory: 'static',
// assetsPublicPath: '/minapro/vue/', // '/minapro/vue/' // assetsPublicPath: '/minapro/vue/', // '/minapro/vue/'
assetsPublicPath: '', assetsPublicPath: './',
/** /**
* Source Maps * Source Maps
......
...@@ -11,9 +11,12 @@ ...@@ -11,9 +11,12 @@
<span class="star-red">*</span> <span class="star-red">*</span>
<a href="#" class="gray">点击新建群发</a> <a href="#" class="gray">点击新建群发</a>
</div> </div>
<div class="left-title-message fr"> <div class="left-title-message fr" style="padding-right: 10px;">
<span> <span v-if="this.wechatAuth === 1">
<img src="@/assets/images/auth.png"> <img src="@/assets/images/auth-icon.png"> 已授权
</span>
<span v-if="this.wechatAuth === 0">
<img src="@/assets/images/unauth-icon.png"> 未授权
</span> </span>
</div> </div>
</div> </div>
...@@ -25,8 +28,8 @@ ...@@ -25,8 +28,8 @@
<p class="title-center icon-wechat-msg">图文素材消息</p> <p class="title-center icon-wechat-msg">图文素材消息</p>
</div> </div>
<div class="icon-right"> <div class="icon-right">
<span class="icon-wechat"> <span class="icon-wechat" @click="handleAddTemp">
<img src="@/assets/images/temp.png" @click="handleAddTemp"> <img src="@/assets/images/temp.png">
</span> </span>
<p class="icon-wechat-msg title-center">营销模板消息</p> <p class="icon-wechat-msg title-center">营销模板消息</p>
</div> </div>
...@@ -42,9 +45,12 @@ ...@@ -42,9 +45,12 @@
<span class="star-red">*</span> <span class="star-red">*</span>
<a href="#" class="gray">点击新建群发</a> <a href="#" class="gray">点击新建群发</a>
</div> </div>
<div class="left-title-message fr"> <div class="left-title-message fr" style="padding-right: 10px;">
<span> <span v-if="this.msgAuth === 0">
<img src="@/assets/images/unauth.png"> <img src="@/assets/images/unauth-icon.png"> 未开通
</span>
<span v-if="this.msgAuth === 1">
<img src="@/assets/images/auth-icon.png"> 已开通
</span> </span>
</div> </div>
</div> </div>
...@@ -63,16 +69,91 @@ ...@@ -63,16 +69,91 @@
<div class="marketing-white"></div> <div class="marketing-white"></div>
</el-col> </el-col>
</el-row> </el-row>
<el-dialog
title="短信未开通授权"
:visible.sync="dialogVisible"
width="30%"
:before-close="handleClose">
<img src="@/assets/images/auth-tip-icon.png" style="width:20px">
<span>短信未开通请先开通授权</span>
<span slot="footer" class="dialog-footer">
<el-button @click="handleToOpen">前往开通</el-button>
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
</span>
</el-dialog>
<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="width: 400px;float: left;">
<p>亲爱的舞象云用户,您好:</p>
<p style="text-indent:25px;margin-top: 20px;">近期,在使用微信营销推送功能时,有部分用户反馈出现推送失败的情况。在舞象云团队紧急分析原因后,暂时定位在调用微信推送接口时,微信反馈接口数量调用达到上限,也就是一次操作数量及频次不能过多。在后续使用时,建议每次推送会员限制在1万以内,并尽量分开时段,不同时发起多次推送。给您带来的困扰,深表抱歉,我们将尽快确定解决方案,完成功能优化。</p>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="dialogTemp = false" style="margin:15px 0">确 定</el-button>
<el-button @click="dialogTemp = false">取 消</el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import api from '@/tool/api'
const STATE_OK = 200
export default { export default {
data() {
return {
wechatAuth: '',
msgAuth:'',
dialogVisible:false,
dialogTemp:false
}
},
created() {
this.getAuth()
},
methods: { methods: {
handleToOpen(){
this.dialogVisible = false
},
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
}
})
},
handleAddMaterial() { handleAddMaterial() {
this.$router.push('addmarketing') if(this.wechatAuth===1){
this.$router.push('addmarketing')
}else{
console.log('未授权')
}
}, },
handleAddTemp() {}, handleAddTemp() {
handleAddMessage() {}, 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('未授权')
}
},
handleAddMessage() {
if(this.msgAuth===1){
// this.$router.push('addmarketing')
}else{
this.dialogVisible = true
}
},
handleClose(done) {
this.dialogVisible = false
}
}, },
} }
</script> </script>
......
...@@ -53,26 +53,6 @@ ...@@ -53,26 +53,6 @@
</div> </div>
</div> </div>
</template> </template>
<script>
import api from '@/tool/api'
const STATE_OK = 200
export default {
created() {
this.getAuth()
},
methods: {
async getAuth() {
await this.axios.get(api.getAuthState).then(res=> {
if(res&&res.status===STATE_OK){
console.log('auth', res.data)
}
})
}
}
}
</script>
<style lang='stylus' scoped> <style lang='stylus' scoped>
.marketing-title .marketing-title
height 177px height 177px
......
...@@ -12,8 +12,8 @@ export default new Router({ ...@@ -12,8 +12,8 @@ export default new Router({
component: () => import(/* webpackChunkName: 'wxlogin' */ '@/pages/login'), component: () => import(/* webpackChunkName: 'wxlogin' */ '@/pages/login'),
}, },
{ {
path: '/salesCenter/activity/lotteryActivity.do', // path: '/salesCenter/activity/lotteryActivity.do',
// path: '/', path: '/',
name: 'test', name: 'test',
component: () => import(/* web packChunkName: 'wxhome' */ '@/pages/home'), component: () => import(/* web packChunkName: 'wxhome' */ '@/pages/home'),
children: [ children: [
......
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