完善功能

This commit is contained in:
wangxiaowei
2026-04-13 14:17:04 +08:00
parent 6262eb10a2
commit ee209bdb7b
10 changed files with 212 additions and 31 deletions

View File

@ -48,7 +48,7 @@
<view class="fixed left-0 right-0 bottom-0 z-2 bg-[#fff] flex items-center justify-center"
:style="{ height: '140rpx' }">
<view class="text-32rpx flex items-center justify-center leading-90rpx text-center w-full px-60rpx">
<view class="flex-1 w-full h-90rpx bg-[#4C9F44] rounded-8rpx text-[#fff]" @click="ClaimCoupon.handleSubmit">提交</view>
<view class="flex-1 w-full h-90rpx bg-[#4C9F44] rounded-8rpx text-[#fff]" @click="hasToken ? ClaimCoupon.handleSubmit() : router.navigateTo('/pages/login/login')">{{ hasToken ? '提交' : '去登录' }}</view>
</view>
</view>
</view>
@ -69,6 +69,7 @@ const form = reactive({
})
const id = ref<number>(0)
const hasToken = ref<boolean>(false)
onLoad((args) => {
const scene = args?.scene
@ -80,9 +81,7 @@ onLoad((args) => {
onShow(() => {
const token = uni.getStorageSync('token')
if (!token) {
router.navigateTo('/pages/login/login')
}
hasToken.value = !!token
})
const ClaimCoupon = {