From 208b414e159e108040d2b9e0ea5096cc80e6b649 Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期五, 01 八月 2025 18:34:14 +0800
Subject: [PATCH] gx检验报告
---
src/views/login/index.vue | 64 +++++++++++++++++++------------
1 files changed, 39 insertions(+), 25 deletions(-)
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index f30bd9c..3e2a97c 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -11,7 +11,7 @@
const config={
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
- },
+ }
}
const userInfo = userInfoStore()
const route = useRoute()
@@ -44,14 +44,15 @@
const onSubmit = (values:any) => {
console.log('submit', values)
loadingBUt.value=true
- ajaxPost('/patient/info/wechatLogin2',`mobile=${username.value}&password=${password.value}`,config).then((re:any)=>{
+ const openid='odFja56xfwSZDHhAEMn-JotSzlRc'
+ ajaxPost('/patient/info/wechatLogin2',`mobile=${username.value}&password=${password.value}&openId=${openid}`,config).then((re:any)=>{
console.log(re)
if (re===''){
Toast('登录失败,请重新登录')
} else {
console.log('得到tokeng')
Session.set('token', re)
- Toast('登录成功。。。。。')
+ Toast('登录成功')
getUserinfo()
}
}).finally(()=>{
@@ -70,8 +71,9 @@
})
}
const onSubmit3=(values:any)=>{
+ userInfo.info.openid='odFja56xfwSZDHhAEMn-JotSzlRc'
if (userInfo.info.openid===''){
- Toast('没有获取到openid')
+ Toast('没有获取到openid33')
return
}
console.log('提交表单',ruleForm3.value,values)
@@ -81,7 +83,7 @@
Toast('登录失败,请重新登录')
} else {
Session.set('token', re)
- Toast('登录成功。。。。。')
+ Toast('登录成功')
getUserinfo()
}
})
@@ -122,6 +124,10 @@
return String(navigator.userAgent.toLowerCase().match(/MicroMessenger/i)) === 'micromessenger'
}
onMounted(()=>{
+ // userInfo.setInfo({openid:'odFja56xfwSZDHhAEMn-JotSzlRc',nickname:'大橙子',headimgurl:'https://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTJB…ibLYic7qC9cm0Yjia3VkHRPVa12N0OK6dgdz984biceWg/132'})
+ // Session.set('token', 'eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJQQVRfU0ZfUEFUOTE0MzE2NDAyMTk1N0pOcUMiLCJhdXRoIjpbeyJhdXRob3JpdHkiOiJhZG1pbiJ9XSwiaWF0IjoxNzUyMDU5ODk0LCJleHAiOjE3NTI0MTk4OTR9.a-Zw910bXendD9Oq7jxjDYfaWLf693maoh7MgAfqK9Y')
+ // getUserinfo()
+ Session.remove('token')
if (isWechat()){
console.log('初始化',route)
const queryInfo=route.query
@@ -136,10 +142,10 @@
ajaxPost('patient/info/wechatLogin','openId='+openId,config).then((re:any)=>{
console.log('openid换的accesstoken=',re)
if (re===''){
- Toast('请填写表单登录。。')
+ Toast('请填写表单登录')
} else {
Session.set('token', re)
- Toast('登录成功。。。。。')
+ Toast('登录成功')
getUserinfo()
}
})
@@ -164,7 +170,6 @@
title: '提示',
message: '请在微信中打开浏览',
}).then(() => {
- // on close
})
}
})
@@ -190,21 +195,22 @@
placeholder="请输入登录名"
:rules="[{ required: true, message: '请输入登录名' }]"
/>
+ <!-- :rules="[{ required: true, message: '请填写密码' }]" -->
<van-field
v-model="password"
type="password"
name="密 码"
label="密  码"
placeholder="6-16位数字或者字母组合"
- :rules="[{ required: true, message: '请填写密码' }]"
+
>
<template #button>
<van-button size="small" type="default" @click="wjmm">忘记密码</van-button>
</template>
</van-field>
</van-cell-group>
- <div style="margin: 16px;text-align:center;">
- <div class="tss"><van-icon name="circle" /> 登录即视为已经阅读并同意<b style="color: #769AFF;">网站服务条款、法律声明及隐私权政策</b></div>
+ <div style="margin: 16px;text-align: center;">
+ <div class="tss"><van-icon name="circle" /> 登录即视为已经阅读并同意<b style="color: #769aff;">网站服务条款、法律声明及隐私权政策</b></div>
<van-button :loading="loadingBUt" round block type="primary" native-type="submit">
登 录
</van-button>
@@ -231,14 +237,14 @@
</template>
</van-field>
</van-cell-group>
- <div style="margin: 16px;text-align:center;">
- <div class="tss"><van-icon name="circle" /> 登录即视为已经阅读并同意<b style="color: #769AFF;">网站服务条款、法律声明及隐私权政策</b></div>
+ <div style="margin: 16px;text-align: center;">
+ <div class="tss"><van-icon name="circle" /> 登录即视为已经阅读并同意<b style="color: #769aff;">网站服务条款、法律声明及隐私权政策</b></div>
<van-button :loading="loadingBUt" round block type="primary" native-type="submit">
登 录
</van-button>
</div>
</van-form>
- <van-row class="loginType">
+ <van-row class="logintype">
<div class="toptype">
<van-divider
:style="{ color: '#1989fa', borderColor: '#1989fa', padding: '0 16px' }"
@@ -324,43 +330,51 @@
</div>
</template>
<style lang="scss">
-.login{
+.login {
width: 100%;
min-height: 900px;
}
-.logintt{
+
+.logintt {
text-align: center;
}
-.loginwenz{
+
+.loginwenz {
font-size: 12px;
font-weight: 400;
- color: #AAAAAA;
+ color: #aaa;
}
-.loginType{
+
+.logintype {
width: 100%;
margin-top: 120px;
text-align: center;
font-size: 11px;
font-weight: 400;
- color: #AAAAAA;
+ color: #aaa;
+
// background: black;
- .toptype{
+ .toptype {
width: 100%;
}
}
-.titlebiaoti{
+
+.titlebiaoti {
padding-top: 70px;
- text-align:center;
+ text-align: center;
padding-left: 30px;
+
// border: 1px solid black;
font-size: 15px;
padding-bottom: 70px;
}
-.tss{
+
+.tss {
font-size: 10px;
font-weight: 400;
- color: #AAAAAA;
+ color: #aaa;
height: 50px;
+
// line-height: 50px;
}
</style>
\ No newline at end of file
--
Gitblit v1.8.0