From a866e581db6a24e9aa4b2145d3e4c2256cfc07cd Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期五, 21 十月 2022 12:00:35 +0800
Subject: [PATCH] 34
---
src/views/login/index.vue | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index 0e1073e..f258920 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -63,8 +63,12 @@
})
}
const onSubmit3=(values:any)=>{
+ if (userInfo.info.openid===''){
+ Toast('没有获取到openid')
+ return
+ }
console.log('提交表单',ruleForm3.value,values)
- ajaxPost('patient/info/isValidCodeOK',`phoneNo=${ruleForm3.value.userPhone}&validCode=${ruleForm3.value.validateCode}`,config).then((re:any)=>{
+ ajaxPost('patient/info/isValidCodeOK',`phoneNo=${ruleForm3.value.userPhone}&validCode=${ruleForm3.value.validateCode}&openId=${userInfo.info.openid}`,config).then((re:any)=>{
console.log(re)
if (re===false){
Toast('登录失败,请重新登录')
@@ -115,9 +119,9 @@
ajaxGet('wechat/code',{code}).then((re:any)=>{
console.log(re)
userInfo.setUserInfo({openid:re.openid,nickname:re.nickname,headimgurl:re.headimgurl})
- const openid = re.openid
- if (openid) { // 检查登录
- ajaxPost('patient/info/wechatLogin',{openid},config).then((re:any)=>{
+ const openId = re.openid
+ if (openId) { // 检查登录
+ ajaxPost('patient/info/wechatLogin','openId='+openId,config).then((re:any)=>{
console.log('openid换的accesstoken=',re)
if (re===''){
Toast('请填写表单登录。。')
--
Gitblit v1.8.0