页面
Some checks are pending
Auto Merge Main to Other Branches / Merge main into i18n (push) Waiting to run
Auto Merge Main to Other Branches / Merge main into base-sard-ui (push) Waiting to run

This commit is contained in:
sjeam 2025-09-06 16:22:11 +08:00
parent d519f01637
commit db69406150
4 changed files with 25 additions and 21 deletions

View File

@ -480,7 +480,9 @@ export default defineComponent({
more(item) {
const islogin = hasLogin()
if (islogin === false) {
this.show = true
uni.navigateTo({
url: '/pages/login/login',
})
return
}
if (islogin === true) {

View File

@ -31,7 +31,6 @@ async function decryptPhoneNumber(e) {
if (res.code === 1) {
toast.success('登录成功')
setTimeout(() => {
userStore.clearLastPage()
if (lastPage.value) {
let method
const indexPat = [

View File

@ -19,7 +19,7 @@
style="backdrop-filter: blur(2rpx); border-radius: 10rpx"
>
<view class="p-4">
<view class="flex items-center leading-6" v-if="islogin">
<view class="flex items-center leading-6" v-if="userIsLogin">
<image class="w-18 h-18 rounded-full" :src="userStore.userInfo?.avatar"></image>
<view class="ml-2 flex-content-column">
@ -31,13 +31,10 @@
</view>
</view>
</view>
<view class="flex items-center leading-6" v-else @click="show = true">
<view class="flex items-center leading-6" v-else @click="toLogin">
<image class="w-18 h-18 rounded-full" :src="userStore.userInfo?.avatar"></image>
<view class="ml-2 font-size-4">去登录</view>
</view>
<!-- <fly-content :line="10" /> -->
<!-- <button v-if="hasLogin" class="mt-2" @click="logout">退出登录</button> -->
</view>
</view>
</view>
@ -129,32 +126,35 @@
import { useUserStore } from '@/store'
import { getUrl, getWebUrl, getShopWebUrl, hasLogin } from '@/utils'
// const userStore = useUserStore()
const userIsLogin = computed(() => userStore.userInfo?.id)
import { defineComponent } from 'vue'
export default defineComponent({
data() {
return {
islogin: false,
isLogin: false,
// userIsLogin: false,
show: false,
userStore: useUserStore(),
userStore: {},
}
},
onLoad(option) {},
onLoad(option) {
this.userStore = useUserStore()
// this.userIsLogin = useUserStore().userInfo.id ? true : false
},
methods: {
// logout() {
// uni.showModal({
// title: '退',
// success: (res) => {
// if (res.confirm) {
// userStore.logout()
// }
// },
// })
// },
toLogin() {
uni.navigateTo({
url: '/pages/login/login',
})
},
more(item) {
this.islogin = hasLogin()
if (this.islogin === false) {
this.show = true
uni.navigateTo({
url: '/pages/login/login',
})
return
}
if (this.islogin === true) {

View File

@ -226,6 +226,9 @@ export default defineComponent({
if (this.type === 1) {
//
this.show = true
// uni.navigateTo({
// url: '/pages/login/login',
// })
} else {
//
this.show = false