修改微信推送机制
This commit is contained in:
parent
8d2f03acb1
commit
eba3fdbf4b
|
@ -1,6 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<a-spin :spinning="confirmLoading">
|
<a-spin :spinning="confirmLoading">
|
||||||
<a-card >
|
<a-card >
|
||||||
|
<div v-show="total==1">
|
||||||
<div style="font-size: 18px;font-weight: 600;">1.选择订阅类型</div>
|
<div style="font-size: 18px;font-weight: 600;">1.选择订阅类型</div>
|
||||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-row style="line-height: 50px;font-size: 16px;font-weight: 600;">
|
<a-row style="line-height: 50px;font-size: 16px;font-weight: 600;">
|
||||||
|
@ -23,7 +24,16 @@
|
||||||
<!-- </a-form-item> -->
|
<!-- </a-form-item> -->
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
|
|
||||||
</a-form>
|
</a-form>
|
||||||
|
</div>
|
||||||
|
<div v-show="total==0" style="text-align: center;width:100%;">
|
||||||
|
<div style="font-size: 600;">请先关注公众号后进行提醒设置!</div>
|
||||||
|
<div style="text-align: center;width:100%;">
|
||||||
|
<img style="border-radius: 10px 10px 0 0;margin-bottom: 8px;width:200px;margin-left: 30%;" src="/resource/img/kc/dswjx.jpg" height="170px"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</a-card>
|
</a-card>
|
||||||
</a-spin>
|
</a-spin>
|
||||||
</template>
|
</template>
|
||||||
|
@ -53,6 +63,7 @@
|
||||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
||||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||||
const confirmLoading = ref<boolean>(false);
|
const confirmLoading = ref<boolean>(false);
|
||||||
|
const total = ref<any>(0);
|
||||||
//表单验证
|
//表单验证
|
||||||
const validatorRules = {
|
const validatorRules = {
|
||||||
};
|
};
|
||||||
|
@ -66,11 +77,17 @@
|
||||||
edit({});
|
edit({});
|
||||||
}
|
}
|
||||||
function getOpenId(){
|
function getOpenId(){
|
||||||
var STATE = window.location.search.replace('?', '');
|
// var STATE = window.location.search.replace('?', '');
|
||||||
STATE = encodeURIComponent(STATE)
|
// STATE = encodeURIComponent(STATE)
|
||||||
window.location.href = 'https://open.weixin.qq.com/connect/oauth2/authorize?'+
|
// window.location.href = 'https://open.weixin.qq.com/connect/oauth2/authorize?'+
|
||||||
'appid=214887356&redirect_uri=http://bylwcs.nenu.edu.cn/'+
|
// 'appid=214887356&redirect_uri=http://bylwcs.nenu.edu.cn/'+
|
||||||
'&response_type=code&scope=snsapi_base&state='+ STATE +'#wechat_redirect'
|
// '&response_type=code&scope=snsapi_base&state='+ STATE +'#wechat_redirect'
|
||||||
|
|
||||||
|
let params = { userid: getUserId(), pageSize: 1 };//没有ID,用list查吧,,
|
||||||
|
defHttp.get({ url: '/KcBdgxbcopy/kcBdgxbcopy/list', params }).then(res => {
|
||||||
|
console.log(`🚀 ~ file: baseForm.vue:77 ~ defHttp.get ~ res:`, res)
|
||||||
|
total.value = res.total
|
||||||
|
})
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 编辑
|
* 编辑
|
||||||
|
@ -142,10 +159,14 @@
|
||||||
width:'500px',
|
width:'500px',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
emit('ok');
|
||||||
|
} else {
|
||||||
|
if(total == 0){
|
||||||
emit('ok');
|
emit('ok');
|
||||||
}else{
|
}else{
|
||||||
createMessage.warning(res.message);
|
createMessage.warning(res.message);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
confirmLoading.value = false;
|
confirmLoading.value = false;
|
||||||
|
|
Loading…
Reference in New Issue