diff --git a/backend/__debug_bin3572908368 b/backend/__debug_bin2026651329 similarity index 99% rename from backend/__debug_bin3572908368 rename to backend/__debug_bin2026651329 index f194b0a..a16257a 100755 Binary files a/backend/__debug_bin3572908368 and b/backend/__debug_bin2026651329 differ diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 102c248..c96ff0c 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -9,6 +9,7 @@ "version": "0.0.0", "dependencies": { "axios": "^1.7.9", + "hls.js": "^0.8.5", "pinia": "^2.2.6", "vant": "^4.9.9", "vue": "^3.5.12", @@ -1371,6 +1372,15 @@ "node": ">= 0.4" } }, + "node_modules/hls.js": { + "version": "0.8.5", + "resolved": "https://npm.hub.ipao.vip/repository/npm/hls.js/-/hls.js-0.8.5.tgz", + "integrity": "sha512-hJBxUAsJInjXNqDPPA6646h/IulN2OUAK9OT6/0gO1oygQ4ZF3pB3j/Uyk2UWO0cDKyAs/SDTclVWMGurt4glw==", + "license": "Apache-2.0", + "dependencies": { + "url-toolkit": "^2.0.1" + } + }, "node_modules/hookable": { "version": "5.5.3", "dev": true, @@ -2485,6 +2495,12 @@ "browserslist": ">= 4.21.0" } }, + "node_modules/url-toolkit": { + "version": "2.2.5", + "resolved": "https://npm.hub.ipao.vip/repository/npm/url-toolkit/-/url-toolkit-2.2.5.tgz", + "integrity": "sha512-mtN6xk+Nac+oyJ/PrI7tzfmomRVNFIWKUbG8jdYFt52hxbiReFAXIjYskvu64/dvuW71IcB7lV8l0HvZMac6Jg==", + "license": "Apache-2.0" + }, "node_modules/vant": { "version": "4.9.9", "license": "MIT", diff --git a/frontend/package.json b/frontend/package.json index 87ebe8a..cf65019 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -10,6 +10,7 @@ }, "dependencies": { "axios": "^1.7.9", + "hls.js": "^0.8.5", "pinia": "^2.2.6", "vant": "^4.9.9", "vue": "^3.5.12", diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 7c2aa3f..d55e6c6 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -1,3 +1,7 @@ diff --git a/frontend/src/router/index.js b/frontend/src/router/index.js index e659147..fe8ad50 100644 --- a/frontend/src/router/index.js +++ b/frontend/src/router/index.js @@ -1,3 +1,4 @@ +import NotFound from '@/views/NotFound.vue' import { createRouter, createWebHistory } from 'vue-router' import HomeView from '../views/tabs/HomeView.vue' import TabView from '../views/TabView.vue' @@ -5,13 +6,14 @@ import TabView from '../views/TabView.vue' const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), routes: [ + { path: '/:pathMatch(.*)*', name: 'NotFound', component: NotFound }, { - path: '/tab', + path: '/t/:tenant', name: 'tab', component: TabView, children: [ { - path: 'home', + path: '', name: 'tab.home', component: HomeView, }, @@ -21,8 +23,8 @@ const router = createRouter({ component: () => import('../views/tabs/BoughtView.vue'), }, { - path: 'me', - name: 'tab.me', + path: 'user', + name: 'tab.user', // route level code-splitting // this generates a separate chunk (About.[hash].js) for this route // which is lazy-loaded when the route is visited. @@ -31,7 +33,7 @@ const router = createRouter({ ] }, { - path: '/play/{:id}', + path: '/t/:tenant/play/:hash', name: 'play', component: () => import('../views/PlayView.vue'), }, @@ -40,12 +42,6 @@ const router = createRouter({ router.beforeEach((to, from) => { console.log("from", from, "goto: ", to) - - if (to.path === "/" && from.path === "/") { - console.log("redirecting to tab.home") - return { name: "tab.home" } - } - }) export default router diff --git a/frontend/src/utils/request.js b/frontend/src/utils/request.js index 960fd1f..f779997 100644 --- a/frontend/src/utils/request.js +++ b/frontend/src/utils/request.js @@ -1,9 +1,8 @@ import axios from 'axios'; // 引入axios -console.log("__GA: ", __GA) const service = axios.create({ baseURL: "/v1", - timeout: 30, + timeout: 30 * 1000, headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer ' + __GA, @@ -16,15 +15,18 @@ service.interceptors.request.use( return config }, (error) => { + return Promise.reject(error); } ) // http response 拦截器 service.interceptors.response.use( (response) => { + console.log(response) return response }, (error) => { + return Promise.reject(error); } ) export default service \ No newline at end of file diff --git a/frontend/src/views/NotFound.vue b/frontend/src/views/NotFound.vue new file mode 100644 index 0000000..fc3ae41 --- /dev/null +++ b/frontend/src/views/NotFound.vue @@ -0,0 +1,3 @@ + diff --git a/frontend/src/views/PlayView.vue b/frontend/src/views/PlayView.vue index ac42ff8..cdf30f8 100644 --- a/frontend/src/views/PlayView.vue +++ b/frontend/src/views/PlayView.vue @@ -1,3 +1,143 @@ + + + + \ No newline at end of file diff --git a/frontend/src/views/TabView.vue b/frontend/src/views/TabView.vue index 9067720..e15792a 100644 --- a/frontend/src/views/TabView.vue +++ b/frontend/src/views/TabView.vue @@ -2,16 +2,14 @@ - 主页 + 主页 - 已购 + 已购 diff --git a/frontend/src/views/tabs/HomeView.vue b/frontend/src/views/tabs/HomeView.vue index 3035ffd..f853759 100644 --- a/frontend/src/views/tabs/HomeView.vue +++ b/frontend/src/views/tabs/HomeView.vue @@ -3,6 +3,8 @@ + 主要按钮 +