feat: 给艳姐增加外部链接

This commit is contained in:
kenny
2025-11-05 11:11:58 +08:00
parent d18c097f54
commit fb2e1794ca
7 changed files with 57 additions and 15 deletions
+12 -3
View File
@@ -1,5 +1,5 @@
<template>
<view class="index">
<view class="index" v-if="token">
<image
v-for="i in 30"
:key="i"
@@ -17,12 +17,21 @@
<script setup>
import sheep from '@/sheep';
import { ref } from 'vue';
import ReportApi from '@/sheep/api/report';
import { onLoad } from '@dcloudio/uni-app';
const { getToken } = ReportApi;
const token = ref('');
onLoad((e) => {
onLoad(async (e) => {
if (!e.token) {
const res = await getToken();
window.location.href =
window.location.href.replace(/\?.*$/g, '') + '?token=' + res.data.accessToken;
return;
}
token.value = e.token;
uni.setStorageSync('token', e.token);
});