个人中心的静态页面完成,登录逻辑完成

首页的登录逻辑判断
This commit is contained in:
wangzimeng 2025-07-21 18:24:42 +08:00
parent 1ad9951258
commit 4fe9dfa923
14 changed files with 663 additions and 282 deletions

View File

@ -20,6 +20,17 @@
"group": "商城"
}
},
{
"path": "pages/index/fabu",
"style": {
"navigationBarTitleText": "发布"
},
"meta": {
"sync": true,
"title": "发布",
"group": "商城"
}
},
{
"path": "pages/index/user",
"style": {
@ -46,18 +57,7 @@
{
"path": "pages/index/cart",
"style": {
"navigationBarTitleText": "发布"
},
"meta": {
"sync": true,
"title": "购物车",
"group": "商城"
}
},
{
"path": "pages/index/fabu",
"style": {
"navigationBarTitleText": "发布"
"navigationBarTitleText": "购物车"
},
"meta": {
"sync": true,
@ -759,7 +759,7 @@
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "星品购",
"navigationBarTitleText": "酱小仙",
"navigationBarBackgroundColor": "#FFFFFF",
"backgroundColor": "#FFFFFF",
"navigationStyle": "custom"
@ -769,7 +769,7 @@
"pagePath": "pages/index/index"
},
{
"pagePath": "pages/index/cart"
"pagePath": "pages/index/fabu"
},
{
"pagePath": "pages/index/user"

View File

@ -1,5 +1,6 @@
<template>
<s-layout title="购物车" tabbar="/pages/index/cart" :bgStyle="{ color: '#fff' }">
<!-- tabbar="/pages/index/cart" -->
<s-layout title="购物车" :bgStyle="{ color: '#fff' }">
<s-empty
v-if="state.list.length === 0"
text="购物车空空如也,快去逛逛吧~"

View File

@ -1,5 +1,9 @@
<template>
<view> 发布 </view>
<!-- <view> 发布 </view> -->
<s-layout title="发布" tabbar="/pages/index/fabu" :bgStyle="{ color: '#fff' }">
</s-layout>
</template>
<script>

View File

@ -16,7 +16,7 @@
<view class="locTop-right">
<uni-section style="border-radius: 192rpx;padding: 0;" type="line">
<uni-search-bar style="border-radius: 192rpx;" radius="23" placeholder="搜索您需要的信息"
bgColor="#EEEEEE" clearButton="none" cancelButton="none" @confirm="search" @focus="toPage()"/>
bgColor="#EEEEEE" clearButton="none" cancelButton="none" @confirm="search" @focus="toPage('/packageA/search/index')"/>
</uni-section>
<!-- <uni-search-bar></uni-search-bar> @confirm="search"-->
</view>
@ -118,7 +118,8 @@
<script setup>
import {
computed
computed,
ref
} from 'vue';
import {
onLoad,
@ -134,6 +135,8 @@
});
const template = computed(() => sheep.$store('app').template?.home);
const isLogin = computed(() => sheep.$store('user').isLogin);
const qualification = ref(false)
onLoad((options) => {
// #ifdef MP
@ -171,11 +174,41 @@
onPageScroll(() => {});
function toPage() {
const toPage = (e) => {
if(isLogin.value == true) {
uni.navigateTo({
url:'/packageA/search/index'
url: e
})
qualification.value = true;
}else{
uni.showToast({
title: '请先登录',
icon: 'none',
duration: 2000
})
setTimeout(function() {
uni.switchTab({
url: '/pages/index/user'
})
}, 2000);
}
// uni.navigateTo({
// url:'/packageA/search/index'
// })
}
function haveQualification() {
console.log('qualification',isLogin.value);
if(isLogin.value == true) {
qualification.value = true;
}else{
qualification.value = true;
}
}
</script>
<style lang="scss" scoped>

View File

@ -8,18 +8,29 @@
<view class="header">
<!-- 用户信息 -->
<view class="hea-left flex">
<view class="head-avatar" @click="toLogin">
<image style="width: 130rpx;height: 130rpx;border-radius: 152rpx;"
src="/static/wechat.png"></image>
<view class="head-avatar" v-if="isLogin == true" @click="sheep.$router.go('/pages/user/info')">
<image style="width: 130rpx;height: 130rpx;border-radius: 152rpx;" :src="baseUrl + userInfo.avatar"></image>
</view>
<view class="head-avatar" v-else @click="toLogin">
<image style="width: 130rpx;height: 130rpx;border-radius: 152rpx;" src="/static/wechat.png">
</image>
</view>
<view class="headAvatar-info justify-start">
<view class="info-name fs-36 weight8 flexD">会飞的蜗牛
<view class="authenticationBox weight8 fs-20">已认证</view>
<view class="info-name fs-36 weight8 flexD" v-if="isLogin == true">
<view style="font-weight: 800;" @click="toLogin">{{ userInfo.nickname}} </view>
<view class="UnAuthenBox weight8 fs-20" v-if="authenInfo.status == -1 ">未认证</view>
<view class="authenticationBox weight8 fs-20" v-if="authenInfo.status == 1 ">已认证</view>
</view>
<view class="fs-28 weight4" style="margin-top: 30rpx;">剩余拨打次数 10</view>
<view class="info-name fs-36 weight8 flexD" v-else>
<view style="font-weight: 800;" @click="toLogin">登录/注册</view>
<!-- <view class="UnAuthenBox weight8 fs-20" v-if="authenInfo.status == -1 && isLogin == true">未认证</view>
<view class="authenticationBox weight8 fs-20" v-if="authenInfo.status == 1 && isLogin == true">已认证</view> -->
</view>
<view class="fs-28 weight4" style="margin-top: 30rpx;">剩余拨打次数 {{ userInfo.mobile_num ? userInfo.mobile_num : 0 }}</view>
</view>
<view class="head-signInBox">
<image style="width: 46rpx;height: 44rpx;" src="https://jiangxiaoxian.0rui.cn/signIn.png" mode=""></image>
<image style="width: 46rpx;height: 44rpx;" src="https://jiangxiaoxian.0rui.cn/signIn.png"
mode=""></image>
<view class="signInText" style="margin-left: 10rpx;">签到</view>
</view>
@ -36,7 +47,7 @@
<view class="feetPrint-text">足迹</view>
</view>
<view class="feetPrint">
<view class="feetPrint-num">14</view>
<view class="feetPrint-num">{{ userInfo.score ? userInfo.score : 0 }}</view>
<view class="feetPrint-text">积分</view>
</view>
<view class="collect">
@ -51,8 +62,10 @@
<view class="myOrder-first">
<view style="font-weight: 800;font-size: 34rpx;line-height: 28rpx;color: #3d3d3d;">我的订单</view>
<view style="display: flex;align-items: center;justify-content: center;">
<view style="font-size: 26rpx;line-height: 26rpx;font-weight: 400;color: #999999;">全部订单</view>
<image style="width: 28rpx;height: 28rpx;margin-left: 10rpx;" src="https://jiangxiaoxian.0rui.cn/rightMore.png" mode=""></image>
<view style="font-size: 26rpx;line-height: 26rpx;font-weight: 400;color: #999999;">全部订单
</view>
<image style="width: 28rpx;height: 28rpx;margin-left: 10rpx;"
src="https://jiangxiaoxian.0rui.cn/rightMore.png" mode=""></image>
<!-- <uni-icons type="arrowthinright" color="#999" style="line-height: 40px;"></uni-icons> -->
</view>
</view>
@ -76,8 +89,82 @@
</view>
</view>
<!-- 发布分享等 -->
<view class="sixBox">
<view class="fabuBox">
<view class="flex align-items">
<image style="width: 36rpx;height: 36rpx;margin-right: 20rpx;"
src="https://jiangxiaoxian.0rui.cn/myRelease.png"></image>
<view style="font-size: 30rpx;font-weight: 800;line-height: 28rpx;color: #333333;">我的发布
</view>
</view>
<image style="width: 28rpx;height: 28rpx;margin-left: 10rpx;"
src="https://jiangxiaoxian.0rui.cn/rightMore.png" mode=""></image>
</view>
<view class="line-row" style="margin: 30rpx 0;"></view>
<view style="height: 80rpx;width: 100%;"></view>
<view class="fabuBox">
<view class="flex align-items">
<image style="width: 36rpx;height: 36rpx;margin-right: 20rpx;"
src="https://jiangxiaoxian.0rui.cn/points.png"></image>
<view style="font-size: 30rpx;font-weight: 800;line-height: 28rpx;color: #333333;">积分商城
</view>
</view>
<image style="width: 28rpx;height: 28rpx;margin-left: 10rpx;"
src="https://jiangxiaoxian.0rui.cn/rightMore.png" mode=""></image>
</view>
<view class="line-row" style="margin: 30rpx 0;"></view>
<view class="fabuBox">
<view class="flex align-items">
<image style="width: 36rpx;height: 36rpx;margin-right: 20rpx;"
src="https://jiangxiaoxian.0rui.cn/share.png"></image>
<view style="font-size: 30rpx;font-weight: 800;line-height: 28rpx;color: #333333;">分享好友
</view>
</view>
<image style="width: 28rpx;height: 28rpx;margin-left: 10rpx;"
src="https://jiangxiaoxian.0rui.cn/rightMore.png" mode=""></image>
</view>
<view class="line-row" style="margin: 30rpx 0;"></view>
<view class="fabuBox">
<view class="flex align-items">
<image style="width: 36rpx;height: 36rpx;margin-right: 20rpx;"
src="https://jiangxiaoxian.0rui.cn/service.png"></image>
<view style="font-size: 30rpx;font-weight: 800;line-height: 28rpx;color: #333333;">官方客服
</view>
</view>
<image style="width: 28rpx;height: 28rpx;margin-left: 10rpx;"
src="https://jiangxiaoxian.0rui.cn/rightMore.png" mode=""></image>
</view>
<view class="line-row" style="margin: 30rpx 0;"></view>
<view class="fabuBox">
<view class="flex align-items">
<image style="width: 36rpx;height: 36rpx;margin-right: 20rpx;"
src="https://jiangxiaoxian.0rui.cn/feedBack.png"></image>
<view style="font-size: 30rpx;font-weight: 800;line-height: 28rpx;color: #333333;">意见反馈
</view>
</view>
<image style="width: 28rpx;height: 28rpx;margin-left: 10rpx;"
src="https://jiangxiaoxian.0rui.cn/rightMore.png" mode=""></image>
</view>
<view class="line-row" style="margin: 30rpx 0;"></view>
<view class="fabuBox" @click="toSetting">
<view class="flex align-items">
<image style="width: 36rpx;height: 36rpx;margin-right: 20rpx;"
src="https://jiangxiaoxian.0rui.cn/setUp.png"></image>
<view style="font-size: 30rpx;font-weight: 800;line-height: 28rpx;color: #333333;" >设置</view>
</view>
<image style="width: 28rpx;height: 28rpx;margin-left: 10rpx;"
src="https://jiangxiaoxian.0rui.cn/rightMore.png" mode=""></image>
</view>
</view>
<view style="height: 180rpx;width: 100%;"></view>
</view>
@ -114,7 +201,8 @@
<script setup>
import {
computed,
ref
ref,
reactive
} from 'vue';
import {
onShow,
@ -122,9 +210,16 @@
onPullDownRefresh
} from '@dcloudio/uni-app';
import sheep from '@/sheep';
import userApi from '@/sheep/api/user';
import third from '@/sheep/api/third';
import {
baseUrl,
} from '@/sheep/config';
const showLogin = ref(false);
const iv = ref('');
const wxCode = ref('');
const encryptedData = ref('');
// tabBar
uni.hideTabBar({
@ -133,6 +228,8 @@
const template = computed(() => sheep.$store('app').template.user);
const isLogin = computed(() => sheep.$store('user').isLogin);
const userInfo = computed(() => sheep.$store('user').userInfo);
const authenInfo = computed(() => sheep.$store('user').authenInfo);
onShow(() => {
sheep.$store('user').updateUserData();
@ -146,21 +243,90 @@
});
onPageScroll(() => {});
//
function toLogin() {
console.log('toLogin',showLogin.value);
console.log('toLogin', showLogin.value);
showLogin.value = true;
console.log('showLogin',showLogin.value);
console.log('showLogin', showLogin.value);
}
//
function closeLogin() {
console.log('closeLogin');
showLogin.value = false;
}
//
function openLogin() {
console.log('openLogin');
showLogin.value = true;
}
// 使
async function getPhoneNumber(e) {
console.log('获取手机号', e, e.detail.errMsg);
if (e.detail.errMsg !== 'getPhoneNumber:ok') {} else {
encryptedData.value = e.detail.encryptedData //
iv.value = e.detail.iv //
getCode()
// let result = await sheep.$platform.useProvider().bindUserPhoneNumber(e.detail);
// console.log('result', result);
// if (result) {
// sheep.$store('user').getInfo();
// // closeAuthModal();
// closeLogin();
// }
}
}
// codesessionId
function getCode() {
uni.login({
provider: 'weixin',
success: (res) => {
wxCode.value = res.code
// loginResult.value = res
// getSessionId();
Login();
}
})
}
//
function Login() {
const session_id = uni.getStorageSync('sessionId')
console.log('session_id', session_id);
return new Promise(async (resolve, reject) => {
const {
code
} = await third.wechat.wxLogin({
platform: 'miniProgram',
payload: encodeURIComponent(
JSON.stringify({
sessionId: session_id,
iv: iv.value,
encryptedData: encryptedData.value,
code: wxCode.code,
}),
),
});
if (code === 1) {
resolve(true);
showLogin.value = false;
}
resolve(false);
});
}
//
function toSetting() {
console.log('isLogin',isLogin.value);
if(isLogin.value == true){
uni.navigateTo({
url:'/pages/user/info'
})
}else {
uni.showToast({
title: '请先登录',
icon: 'none'
})
}
}
</script>
<style lang="scss" scoped>
@ -238,13 +404,15 @@
}
.con-center {
height: 1314rpx;
// padding: 0 30rpx;
min-height: 80vh;
padding: 30 30rpx;
.header {
width: 93%;
height: 620rpx;
height: 580rpx;
padding: 0 30rpx;
position: relative;
// top: 100rpx;
justify-content: space-between;
align-items: center;
// margin: 0 auto;
@ -282,6 +450,19 @@
font-weight: 900rpx;
align-items: center;
.UnAuthenBox {
margin-left: 10rpx;
background-color: #EBECEE;
border-radius: 8rpx;
width: 80rpx;
height: 30rpx;
color: #8D93B3;
display: flex;
padding: 5rpx 10rpx 9rpx 10rpx;
align-items: center;
justify-content: center;
}
.authenticationBox {
margin-left: 10rpx;
@ -404,7 +585,7 @@
height: 206rpx;
margin: 0 auto;
position: relative;
bottom: 108rpx;
bottom: 90rpx;
background-color: #ffffff;
border-radius: 18rpx;
display: block;
@ -432,6 +613,33 @@
}
}
.sixBox {
width: 630rpx;
// height: 637rpx;
display: block;
background-color: #ffffff;
border-radius: 18rpx;
padding: 30rpx;
margin: 0 auto;
position: relative;
bottom: 50rpx;
.fabuBox {
display: flex;
align-items: center;
justify-content: space-between;
}
.line-row {
width: 630rpx;
height: 1rpx;
background: #EEEEEE;
border-radius: 0rpx 0rpx 0rpx 0rpx;
margin: 30rpx 0;
}
}
}
@ -483,8 +691,4 @@
}
</style>

View File

@ -104,7 +104,7 @@
</uni-easyinput>
</uni-forms-item>
<uni-forms-item name="password" label="登录密码" @tap="onSetPassword">
<!-- <uni-forms-item name="password" label="登录密码" @tap="onSetPassword">
<uni-easyinput
v-model="userInfo.password"
:placeholder="userInfo.verification?.password ? '修改登录密码' : '点击设置登录密码'"
@ -128,7 +128,7 @@
</view>
</template>
</uni-easyinput>
</uni-forms-item>
</uni-forms-item> -->
</view>
<view class="bg-white ss-m-t-14">
@ -153,7 +153,7 @@
</view>
</uni-forms>
<view v-if="sheep.$platform.name !== 'H5'">
<!-- <view v-if="sheep.$platform.name !== 'H5'">
<view class="title-box ss-p-l-30">第三方账号绑定</view>
<view class="account-list ss-flex ss-row-between">
@ -204,11 +204,12 @@
</view>
</view>
</view>
</view>
</view> -->
<su-fixed bottom placeholder bg="none">
<view class="footer-box ss-p-20">
<button class="ss-rest-button logout-btn ui-Shadow-Main" @tap="onSubmit">保存</button>
<button class="ss-rest-button logout-btn " @click="onSubmit">保存</button>
<button class="ss-rest-button exit-btn " @click="onLogout">退出登录</button>
</view>
</su-fixed>
</s-layout>
@ -339,6 +340,23 @@ const getUserInfo = async () => {
}
};
//退
function onLogout() {
uni.showModal({
title: '提示',
content: '确认退出账号?',
success: async function (res) {
if (res.confirm) {
const result = await sheep.$store('user').logout();
if (result) {
sheep.$router.go('/pages/index/user');
}
}
},
});
}
onBeforeMount(async () => {
getUserInfo();
});
@ -394,13 +412,25 @@ onBeforeMount(async () => {
.logout-btn {
width: 710rpx;
height: 80rpx;
background: linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));
background: linear-gradient(90deg,#FCCA58, #FFBD25);
border-radius: 40rpx;
font-size: 30rpx;
font-weight: 500;
color: $white;
}
.exit-btn {
width: 710rpx;
height: 80rpx;
background: #ffffff;
border-radius: 40rpx;
border: 2rpx solid #999999;
font-size: 30rpx;
font-weight: 800;
color: #999999;
margin-top: 30rpx;
}
.radio-dark {
filter: grayscale(100%);
filter: gray;

13
sheep/api/login.js Normal file
View File

@ -0,0 +1,13 @@
import request from '@/sheep/request';
import $platform from '@/sheep/platform';
export default {
wxLogin: (path) =>
`${baseUrl}${apiPath}third.wechat/loginByMobile?platform=miniProgram&payload=${encodeURIComponent(
JSON.stringify({
path,
}),
)}`,
};

View File

@ -1,5 +1,8 @@
import request from '@/sheep/request';
import { baseUrl, apiPath } from '@/sheep/config';
import {
baseUrl,
apiPath
} from '@/sheep/config';
export default {
// 微信相关
@ -110,6 +113,19 @@ export default {
path,
}),
)}`,
//自定义的登录接口
wxLogin: (data) =>
request({
url: 'third.wechat/loginByMobile',
method: 'POST',
data,
custom: {
showSuccess: true,
loadingMsg: '登录中',
},
}),
},
// 苹果相关
@ -126,4 +142,8 @@ export default {
},
}),
},
};

View File

@ -11,6 +11,15 @@ export default {
auth: true,
},
}),
authen: () =>
request({
url: 'meal.auth/info',
method: 'GET',
custom: {
showLoading: false,
auth: true,
},
}),
update: (data) =>
request({
url: 'user.user/update',
@ -337,4 +346,6 @@ export default {
auth: true,
},
}),
};

View File

@ -1,15 +1,15 @@
<!-- 绑定/更换手机号 changeMobile -->
<template>
<view>
<!-- 标题栏 -->
<!-- 标题栏
<view class="head-box ss-m-b-60">
<view class="head-title ss-m-b-20">
{{ userInfo.verification.mobile ? '更换手机号' : '绑定手机号' }}
</view>
<view class="head-subtitle">为了您的账号安全请使用本人手机号码</view>
</view>
</view>-->
<!-- 表单项 -->
<!-- 表单项
<uni-forms
ref="changeMobileRef"
v-model="state.model"
@ -54,14 +54,15 @@
</uni-easyinput>
</uni-forms-item>
</uni-forms>
<button
-->
<!-- <button
v-if="'WechatMiniProgram' === sheep.$platform.name"
class="ss-reset-button type-btn"
open-type="getPhoneNumber"
@getphonenumber="getPhoneNumber"
>
使用微信手机号
</button>
</button> -->
</view>
</template>

View File

@ -2,12 +2,12 @@
<template>
<view>
<!-- 标题栏 -->
<view class="head-box ss-m-b-60">
<!-- <view class="head-box ss-m-b-60">
<view class="head-title ss-m-b-20">重置密码</view>
<view class="head-subtitle">为了您的账号安全设置密码前请先进行安全验证</view>
</view>
</view> -->
<!-- 表单项 -->
<!-- 表单项
<uni-forms
ref="resetPasswordRef"
v-model="state.model"
@ -61,10 +61,10 @@
</uni-easyinput>
</uni-forms-item>
</uni-forms>
<button v-if="!isLogin" class="ss-reset-button type-btn" @tap="showAuthModal('accountLogin')">
-->
<!-- <button v-if="!isLogin" class="ss-reset-button type-btn" @tap="showAuthModal('accountLogin')">
返回登录
</button>
</button> -->
</view>
</template>

View File

@ -1,49 +1,58 @@
<template>
<!-- 规格弹窗 -->
<su-popup :show="authType !== ''" round="10" :showClose="true" @close="closeAuthModal">
<su-popup :show="showLogin == true" type="center" round="10" :isMaskClick="false">
<view class="popup">
<button class="texbut" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
授权登录
</button>
</view>
</su-popup>
<!-- <su-popup :show="authType !== ''" round="10" :showClose="true" @close="closeAuthModal">
<view class="login-wrap">
<!-- 1. 账号密码登录 accountLogin -->
1. 账号密码登录 accountLogin
<account-login
v-if="authType === 'accountLogin'"
:agreeStatus="state.protocol"
@onConfirm="onConfirm"
/>
<!-- 2.短信登录 smsLogin -->
2.短信登录 smsLogin
<sms-login
v-if="authType === 'smsLogin'"
:agreeStatus="state.protocol"
@onConfirm="onConfirm"
/>
<!-- 3.短信注册 smsRegister-->
3.短信注册 smsRegister
<sms-register
v-if="authType === 'smsRegister'"
:agreeStatus="state.protocol"
@onConfirm="onConfirm"
/>
<!-- 4.忘记密码 resetPassword-->
4.忘记密码 resetPassword
<reset-password v-if="authType === 'resetPassword'" />
<!-- 5.绑定手机号 changeMobile -->
5.绑定手机号 changeMobile
<change-mobile v-if="authType === 'changeMobile'" />
<!-- 6.修改密码 changePassword-->
6.修改密码 changePassword
<change-password v-if="authType === 'changePassword'" />
<!-- 7.修改用户名 changeUsername-->
7.修改用户名 changeUsername
<change-username v-if="authType === 'changeUsername'" />
<!-- 8.微信小程序授权 mpAuthorization-->
8.微信小程序授权 mpAuthorization
<mp-authorization v-if="authType === 'mpAuthorization'" />
<!-- 第三方登录+注册 -->
第三方登录+注册
<view
v-if="['accountLogin', 'smsLogin'].includes(authType)"
class="auto-login-box ss-flex ss-flex-col ss-row-center ss-col-center"
>
<!-- 立即注册&快捷登录 TextButton -->
立即注册&快捷登录 TextButton
<view v-if="sheep.$platform.name === 'WechatMiniProgram'" class="ss-flex register-box">
<view class="register-title">还没有账号?</view>
<button class="ss-reset-button register-btn" @tap="showAuthModal('smsRegister')"
@ -62,7 +71,7 @@
立即注册
</button>
<!-- 公众号|App微信登录 -->
公众号|App微信登录
<button
v-if="
['WechatOfficialAccount', 'App'].includes(sheep.$platform.name) &&
@ -77,7 +86,7 @@
></image>
</button>
<!-- iOS登录 -->
iOS登录
<button
v-if="sheep.$platform.os === 'ios' && sheep.$platform.name === 'App'"
@tap="thirdLogin('apple')"
@ -122,7 +131,7 @@
</view>
<view class="safe-box"></view>
</view>
</su-popup>
</su-popup> -->
</template>
<script setup>
@ -265,4 +274,50 @@
.agreement-text {
color: $dark-9;
}
.popup {
background-image: url('https://jiangxiaoxian.0rui.cn/showLogin.png');
background-size: 100%;
width: 600rpx;
height: 640rpx;
display: flex;
padding-bottom: 44rpx;
flex-direction: column;
align-items: baseline;
justify-content: flex-end;
padding-left: 73rpx;
padding-right: 73rpx;
.img_shouquan {
position: absolute;
width: 680rpx;
height: 857rpx;
left: -25rpx;
top: -390rpx;
}
#txt2 {
text-align: center;
margin-top: 200rpx;
font-size: 28rpx;
color: #525252;
margin-bottom: 60rpx;
position: relative;
font-weight: 500;
}
.texbut {
width: 507rpx;
height: 90rpx;
border-radius: 45rpx;
background: #ffbd25;
font-size: 34rpx;
color: #3d3d3d;
font-weight: bold;
display: flex;
justify-content: center;
align-items: center;
}
}
</style>

View File

@ -50,7 +50,7 @@
<view class="page-modal">
<!-- 全局授权弹窗 -->
<s-auth-modal />
<!-- <s-auth-modal /> -->
<!-- 全局分享弹窗 -->
<s-share-modal :shareInfo="shareInfo" />
<!-- 全局快捷入口 -->

View File

@ -63,7 +63,16 @@ const user = defineStore({
const { code, data } = await userApi.profile();
if (code !== 1) return;
this.userInfo = data;
this.getAuthenInfo();
return Promise.resolve(data);
},
// 获取个人认证信息
async getAuthenInfo() {
const { code, data } = await userApi.authen();
if (code !== 1) return;
this.authenInfo = data;
// this.authenInfo();
return Promise.resolve(data);
},