|
|
@@ -2,7 +2,7 @@
|
|
|
import { ref } from 'vue'
|
|
|
import { exchangeCode } from '@/services/user'
|
|
|
import { dict } from '@/.cool/store'
|
|
|
-import { user } from '@/.cool'
|
|
|
+import { user, router } from '@/.cool'
|
|
|
|
|
|
import { useUi } from "@/uni_modules/cool-ui";
|
|
|
|
|
|
@@ -10,6 +10,10 @@ const ui = useUi();
|
|
|
const code = ref<string>('')
|
|
|
|
|
|
async function handleExchange() {
|
|
|
+ if (user.token === 'Basic ZW5kOmVuZA==') {
|
|
|
+ router.push({ path: '/pages/user/login' })
|
|
|
+ return
|
|
|
+ }
|
|
|
if (!code.value) {
|
|
|
uni.showToast({
|
|
|
title: '请输入兑换码',
|