28 lines
682 B
Vue
28 lines
682 B
Vue
<template>
|
|
<view class="wrap">货柜</view>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { onShow } from '@dcloudio/uni-app'
|
|
onShow(() => {
|
|
const token = uni.getStorageSync('token')
|
|
const phoneBound = !!uni.getStorageSync('phone_bound')
|
|
console.log('cabinet onShow token:', token, 'isLogin:', !!token, 'phoneBound:', phoneBound)
|
|
if (!token || !phoneBound) {
|
|
uni.showModal({
|
|
title: '提示',
|
|
content: '请先登录并绑定手机号',
|
|
confirmText: '去登录',
|
|
success: (res) => {
|
|
if (res.confirm) {
|
|
uni.navigateTo({ url: '/pages/login/index' })
|
|
}
|
|
}
|
|
})
|
|
}
|
|
})
|
|
</script>
|
|
|
|
<style scoped>
|
|
.wrap { padding: 40rpx }
|
|
</style> |