页面
This commit is contained in:
parent
d519f01637
commit
db69406150
@ -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) {
|
||||
|
@ -31,7 +31,6 @@ async function decryptPhoneNumber(e) {
|
||||
if (res.code === 1) {
|
||||
toast.success('登录成功')
|
||||
setTimeout(() => {
|
||||
userStore.clearLastPage()
|
||||
if (lastPage.value) {
|
||||
let method
|
||||
const indexPat = [
|
||||
|
@ -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) {
|
||||
|
@ -226,6 +226,9 @@ export default defineComponent({
|
||||
if (this.type === 1) {
|
||||
//跳转登录
|
||||
this.show = true
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/login/login',
|
||||
// })
|
||||
} else {
|
||||
//点击进入
|
||||
this.show = false
|
||||
|
Loading…
x
Reference in New Issue
Block a user