|
@@ -2,7 +2,7 @@
|
|
<view class="app-login-page">
|
|
<view class="app-login-page">
|
|
<view class="app-login">
|
|
<view class="app-login">
|
|
<view class="app-icon u-m-b-30 ">
|
|
<view class="app-icon u-m-b-30 ">
|
|
- <image src="http://www.gzrea.org.cn:8543/icon/wxmp/login-icon.png"
|
|
|
|
|
|
+ <image :src="`${FILE_URL}/login-icon.png`"
|
|
mode="aspectFit" style="height: 80rpx;"></image>
|
|
mode="aspectFit" style="height: 80rpx;"></image>
|
|
</view>
|
|
</view>
|
|
<view class="app-title u-m-b-60">
|
|
<view class="app-title u-m-b-60">
|
|
@@ -52,6 +52,10 @@
|
|
import {
|
|
import {
|
|
me
|
|
me
|
|
} from '@/api/user.js'
|
|
} from '@/api/user.js'
|
|
|
|
+
|
|
|
|
+ import configService from '@/utils/baseurl.js'
|
|
|
|
+ const FILE_URL = configService.FILE_URL;
|
|
|
|
+
|
|
const authStore = useAuthStore()
|
|
const authStore = useAuthStore()
|
|
const userBook = ref(true)
|
|
const userBook = ref(true)
|
|
const userBookModal = ref(false)
|
|
const userBookModal = ref(false)
|
|
@@ -61,23 +65,23 @@
|
|
})
|
|
})
|
|
}
|
|
}
|
|
async function wxlogin(){
|
|
async function wxlogin(){
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
const loginRes = await wx.login();
|
|
const loginRes = await wx.login();
|
|
const code = loginRes.code;
|
|
const code = loginRes.code;
|
|
wxLoginOpenid({code}).then(res=>{
|
|
wxLoginOpenid({code}).then(res=>{
|
|
if(res?.data){
|
|
if(res?.data){
|
|
const { openid, sessionKey } = res.data
|
|
const { openid, sessionKey } = res.data
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
function confirmModal() {
|
|
function confirmModal() {
|
|
userBook.value = true
|
|
userBook.value = true
|
|
// this.wxlogin()
|
|
// this.wxlogin()
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
function checkUserBook() {
|
|
function checkUserBook() {
|
|
if (!userBook.value) {
|
|
if (!userBook.value) {
|
|
userBookModal.value = true
|
|
userBookModal.value = true
|
|
@@ -85,11 +89,11 @@
|
|
}
|
|
}
|
|
return true
|
|
return true
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
function check(){
|
|
function check(){
|
|
if (!checkUserBook()) return;
|
|
if (!checkUserBook()) return;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
async function decryptPhoneNumber(e){
|
|
async function decryptPhoneNumber(e){
|
|
if (e.detail.encryptedData) {
|
|
if (e.detail.encryptedData) {
|
|
const {
|
|
const {
|
|
@@ -135,7 +139,7 @@
|
|
}catch(err){
|
|
}catch(err){
|
|
console.log("ee", err)
|
|
console.log("ee", err)
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
// 将 encryptedData 和 iv 发送到后端进行解密
|
|
// 将 encryptedData 和 iv 发送到后端进行解密
|
|
} else {
|
|
} else {
|
|
msg('取消授权手机号');
|
|
msg('取消授权手机号');
|
|
@@ -193,7 +197,7 @@
|
|
.mb-30 {
|
|
.mb-30 {
|
|
margin-bottom: 30rpx;
|
|
margin-bottom: 30rpx;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
.login-button {
|
|
.login-button {
|
|
background: linear-gradient(90deg, #006af5, #21b0fc);
|
|
background: linear-gradient(90deg, #006af5, #21b0fc);
|
|
border-radius: 20rpx;
|
|
border-radius: 20rpx;
|
|
@@ -210,12 +214,12 @@
|
|
color: #006af5;
|
|
color: #006af5;
|
|
background: #e5e5e5;
|
|
background: #e5e5e5;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
// 用户手册模拟态
|
|
// 用户手册模拟态
|
|
.modal {
|
|
.modal {
|
|
.modal-content {
|
|
.modal-content {
|
|
padding: 50rpx;
|
|
padding: 50rpx;
|
|
-
|
|
|
|
|
|
+
|
|
.content-a {
|
|
.content-a {
|
|
color: #2979ff;
|
|
color: #2979ff;
|
|
}
|
|
}
|