Skip to content

Commit

Permalink
Merge branch 'mumuchenchen-main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaokaixuan committed May 17, 2022
2 parents fdf11d8 + 3ab1aa3 commit 77c682b
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="https://www.mypikpak.com/logo.png" />
<link rel="icon" href="https://mypikpak.com/apple-touch-icon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>PikPak</title>
</head>
Expand Down
12 changes: 6 additions & 6 deletions src/config/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export const proxy = [
'https://cors.z13.workers.dev',
'https://cors.z14.workers.dev',
'https://cors.z15.workers.dev',
'https://cors.z16.workers.dev',
'https://cors.z17.workers.dev',
'https://cors.z18.workers.dev',
'https://api.13pikpak.cf',
'https://api.14pikpak.cf',
'https://api.15pikpak.cf',
'https://api.16pikpak.cf',
'https://api.17pikpak.cf',
'https://api.18pikpak.cf',
]

export const version = '1.0.0'
2 changes: 1 addition & 1 deletion src/router/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
import Layout from '../views/layout/index.vue'
const routes: Array<RouteRecordRaw> = [
const routes: RouteRecordRaw[] = [
{
path: '/',
name: 'home',
Expand Down
2 changes: 1 addition & 1 deletion src/utils/axios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ instance.interceptors.response.use(response => {
})
} else {
router.push('/login')
return false
return Promise.reject(error)
}

break;
Expand Down
7 changes: 4 additions & 3 deletions src/views/layout/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
bordered
>
<a href="https://mypikpak.com/" target="_blank" class="logo-box">
<img src="https://www.mypikpak.com/logo.png" class="logo-box__icon" alt="">
<img src="https://mypikpak.com/apple-touch-icon.png" class="logo-box__icon" alt="">
<div class="logo-box__text">PikPak</div>
</a>
<n-menu :options="menuOptions" :value="String(route.name)" @update:value="goRoute"></n-menu>
Expand Down Expand Up @@ -177,8 +177,9 @@ import { useRoute, useRouter } from 'vue-router'
const code = ref()
const showCode = ref(false)
const postCode = () => {
http.post('https://api-drive.mypikpak.com/vip/v1/order/free', {
activation_code: code.value
http.post('https://api-drive.mypikpak.com/vip/v1/order/activation-code', {
activation_code: code.value,
data: {}
})
.then(res => {
window.$message.success('兑换成功')
Expand Down
5 changes: 3 additions & 2 deletions src/views/login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,13 @@
import { ref } from '@vue/reactivity';
import { NForm, NFormItem, NInput, NButton, useMessage, NCheckbox, useDialog, NTooltip, NIcon, NSpace } from 'naive-ui'
import http from '../utils/axios'
import { useRouter } from 'vue-router'
import { useRoute, useRouter } from 'vue-router'
import { BrandGoogle, Phone } from '@vicons/tabler'
const loginData = ref({
username: '',
password: ''
})
const route = useRoute()
const loading = ref(false)
const router = useRouter()
const message = useMessage()
Expand All @@ -88,7 +89,7 @@ const loginPost = () => {
window.localStorage.removeItem('pikpakLoginData')
}
message.success('登录成功')
router.push('/')
router.push((route.query.redirect || '/') + '')
}
})
.catch(() => {
Expand Down

0 comments on commit 77c682b

Please sign in to comment.