diff --git a/src/views/activities/NewYearView.vue b/_deprecated/activities/NewYearView.vue similarity index 91% rename from src/views/activities/NewYearView.vue rename to _deprecated/activities/NewYearView.vue index 629bdd7..853e79f 100644 --- a/src/views/activities/NewYearView.vue +++ b/_deprecated/activities/NewYearView.vue @@ -34,10 +34,12 @@ diff --git a/src/components/sidebar/GuestSidebar.vue b/src/components/sidebar/GuestSidebar.vue index 956457f..ad2e504 100644 --- a/src/components/sidebar/GuestSidebar.vue +++ b/src/components/sidebar/GuestSidebar.vue @@ -66,7 +66,7 @@ const menuOptions = [ const active = ref('') -router.beforeEach((to, from, next) => { +router.beforeEach((to, _, next) => { computeActiveKey(menuOptions, to.path) next() }) @@ -84,7 +84,7 @@ const computeActiveKey = (menuOptions, path) => { const route = useRoute() computeActiveKey(menuOptions, route.path) -const handleUpdateValue = (key, item) => { +const handleUpdateValue = (_, item) => { router.push({ path: item.path }) } diff --git a/src/components/sidebar/MainSidebar.vue b/src/components/sidebar/MainSidebar.vue index 29a53d5..d4324fd 100644 --- a/src/components/sidebar/MainSidebar.vue +++ b/src/components/sidebar/MainSidebar.vue @@ -37,12 +37,11 @@ import { PaperPlane, PencilSharp, Person, - PlanetOutline, Key, CompassSharp, GameController } from '@vicons/ionicons5' -import { MoreCircle20Filled } from '@vicons/fluent' +import { MoreCircle20Filled, Box24Filled } from '@vicons/fluent' import { AttachMoneyFilled, AccountTreeOutlined } from '@vicons/material' import router from '@router' @@ -65,28 +64,28 @@ const menuOptions = [ key: 'dashboard', icon: renderIcon(CompassSharp) }, - { - label: '新春活动', - key: 'yearly', - show: false, - icon: renderIcon(PlanetOutline), - children: [ - { - path: '/hello2024', - label: '评价和祝福', - show: true, - key: 'new-year', - icon: renderIcon(PlanetOutline) - }, - { - path: '/prize', - label: '抽奖', - show: true, - key: 'prize', - icon: renderIcon(PlanetOutline) - } - ] - }, + // { + // label: '新春活动', + // key: 'yearly', + // show: false, + // icon: renderIcon(PlanetOutline), + // children: [ + // { + // path: '/hello2024', + // label: '评价和祝福', + // show: true, + // key: 'new-year', + // icon: renderIcon(PlanetOutline) + // }, + // { + // path: '/prize', + // label: '抽奖', + // show: true, + // key: 'prize', + // icon: renderIcon(PlanetOutline) + // } + // ] + // }, { path: '/verification', label: '身份认证', @@ -156,6 +155,12 @@ const menuOptions = [ } ] }, + { + path: '/app', + label: 'OAuth2.0 应用', + key: 'app', + icon: renderIcon(Box24Filled) + }, { key: 'status', icon: renderIcon(List), @@ -200,7 +205,7 @@ const menuOptions = [ const active = ref('') // const menuInstRef = ref(null) -router.beforeEach((to, from, next) => { +router.beforeEach((to, _, next) => { computeActiveKey(menuOptions, to.path) next() }) @@ -218,7 +223,7 @@ const computeActiveKey = (menuOptions, path) => { const route = useRoute() computeActiveKey(menuOptions, route.path) -const handleUpdateValue = (key, item) => { +const handleUpdateValue = (_, item) => { router.push({ path: item.path }) } diff --git a/src/main.js b/src/main.js index 0bff9be..5e865e6 100644 --- a/src/main.js +++ b/src/main.js @@ -10,10 +10,10 @@ import axios from 'axios' import VueAxios from 'vue-axios' import userData from '@/utils/stores/userData/store' import userDataLocal from '@/utils/stores/userData/local' -import { printTitle } from '@/utils/title' +import banner from '@/utils/title' import Clipboard from 'v-clipboard' -printTitle() +banner() const app = createApp(App) app.use(userData) diff --git a/src/router/index.js b/src/router/index.js index b2561b9..1942f0b 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -72,6 +72,21 @@ const routes = [ } }, component: () => import('@views/auth/ResetPasswordView.vue') + }, + { + path: 'oauth', + children: [ + { + path: 'authorize', + name: 'OAuthAuthorize', + meta: { + title: 'OAuth 授权界面', + needLogin: true, + noSidebar: true + }, + component: () => import('@views/auth/oauth/AppAuthView.vue') + } + ] } ] }, @@ -120,26 +135,26 @@ const routes = [ }, component: () => import('@views/VerificationView.vue') }, - { - path: '/hello2024', - name: 'NewYear', - meta: { - title: '留言', - keepAlive: true, - needLogin: true - }, - component: () => import('@views/activities/NewYearView.vue') - }, - { - path: '/prize', - name: 'Prize', - meta: { - title: '抽奖', - keepAlive: true, - needLogin: true - }, - component: () => import('@views/activities/PrizeView.vue') - }, + // { + // path: '/hello2024', + // name: 'NewYear', + // meta: { + // title: '留言', + // keepAlive: true, + // needLogin: true + // }, + // component: () => import('../../_deprecated/activities/NewYearView.vue') + // }, + // { + // path: '/prize', + // name: 'Prize', + // meta: { + // title: '抽奖', + // keepAlive: true, + // needLogin: true + // }, + // component: () => import('../../_deprecated/activities/PrizeView.vue') + // }, { path: '/donate', name: 'Donate', @@ -160,6 +175,16 @@ const routes = [ }, component: () => import('@views/IcpCheckView.vue') }, + { + path: '/app', + name: 'App', + meta: { + title: '应用', + keepAlive: true, + needLogin: true + }, + component: () => import('@views/AppView.vue') + }, { path: '/games', children: [ diff --git a/src/utils/dialog.js b/src/utils/dialog.js index c479ebe..0992e48 100644 --- a/src/utils/dialog.js +++ b/src/utils/dialog.js @@ -1,23 +1,58 @@ -export const sendSuccessDialog = (message) => { - window.$dialog.success({ - title: '厉害捏!', - content: message, - positiveText: '收到' - }) +class Dialog { + success( + message, + options = { + onPositiveClick: null, + onNegativeClick: null, + onMaskClick: null + } + ) { + window.$dialog.success({ + title: '厉害捏!', + content: message, + positiveText: '收到', + negativeText: '不要', + onPositiveClick: options.onPositiveClick, + onNegativeClick: options.onNegativeClick, + onMaskClick: options.onMaskClick + }) + } + warning( + message, + options = { + onPositiveClick: null, + onNegativeClick: null, + onMaskClick: null + } + ) { + window.$dialog.warning({ + title: '这只是个警告罢了~', + content: message, + positiveText: '收到', + negativeText: '不要', + onPositiveClick: options.onPositiveClick, + onNegativeClick: options.onNegativeClick, + onMaskClick: options.onMaskClick + }) + } + error( + message, + options = { + onPositiveClick: null, + onNegativeClick: null, + onMaskClick: null + } + ) { + window.$dialog.error({ + title: '发生了点小错误...', + content: message, + positiveText: '收到', + negativeText: '不要', + onPositiveClick: options.onPositiveClick, + onNegativeClick: options.onNegativeClick, + onMaskClick: options.onMaskClick + }) + } } -export const sendWarningDialog = (message) => { - window.$dialog.warning({ - title: '这只是个警告罢了~', - content: message, - positiveText: '收到' - }) -} - -export const sendErrorDialog = (message) => { - window.$dialog.error({ - title: '发生了点小错误...', - content: message, - positiveText: '收到' - }) -} +export default Dialog diff --git a/src/utils/message.js b/src/utils/message.js index 4c1298c..5ced20a 100644 --- a/src/utils/message.js +++ b/src/utils/message.js @@ -1,16 +1,14 @@ // 2024-09-06 Muska_Ami: 他妈的 为什么要再造轮子啊 - -export const sendSuccessMessage = (message) => { - // 需要确保已经在 setup 中执行了 window.$message = message - window.$message.success(message) -} - -export const sendWarningMessage = (message) => { - // 需要确保已经在 setup 中执行了 window.$message = message - window.$message.warning(message) +class Message { + success(message, options = {}) { + window.$message.success(message, options) + } + warning(message, options = {}) { + window.$message.warning(message, options) + } + error(message, options = {}) { + window.$message.error(message, options) + } } -export const sendErrorMessage = (message) => { - // 需要确保已经在 setup 中执行了 window.$message = message - window.$message.error(message) -} +export default Message diff --git a/src/utils/notice.js b/src/utils/notice.js index 52c04e7..f8b6502 100644 --- a/src/utils/notice.js +++ b/src/utils/notice.js @@ -1,8 +1,10 @@ import api from '@/api' import logger from '@/utils/logger' -import { sendErrorMessage } from '@/utils/message' +import Message from '@/utils/message' import { marked } from 'marked' +const message = new Message() + let notice = { getNotice: getNotice } @@ -14,7 +16,7 @@ async function getNotice() { res = await api.v2.notice.root.get() } catch (e) { logger.error(e) - sendErrorMessage('获取 Notice 失败: ' + e) + message.error('获取 Notice 失败: ' + e) } // console.log(res) if (!res) return diff --git a/src/utils/notification.js b/src/utils/notification.js index 431da16..bc48c9e 100644 --- a/src/utils/notification.js +++ b/src/utils/notification.js @@ -1,32 +1,36 @@ -export const sendSuccessNotification = (message) => { - window.notification['success']({ - content: '成功', - meta: message, - duration: 2500, - keepAliveOnHover: true - }) -} -export const sendWarningNotification = (message) => { - window.notification['warning']({ - content: '警告', - meta: message, - duration: 2500, - keepAliveOnHover: true - }) -} -export const sendErrorNotification = (message) => { - window.notification['error']({ - content: '错误', - meta: message, - duration: 2500, - keepAliveOnHover: true - }) -} -export const sendInfoNotification = (message) => { - window.notification['info']({ - content: '信息', - meta: message, - duration: 2500, - keepAliveOnHover: true - }) +class Notification { + info(title, message) { + window.notification['info']({ + content: title, + meta: message, + duration: 2500, + keepAliveOnHover: true + }) + } + success(title, message) { + window.notification['success']({ + content: title, + meta: message, + duration: 2500, + keepAliveOnHover: true + }) + } + warning(title, message) { + window.notification['warning']({ + content: title, + meta: message, + duration: 2500, + keepAliveOnHover: true + }) + } + error(title, message) { + window.notification['error']({ + content: title, + meta: message, + duration: 2500, + keepAliveOnHover: true + }) + } } + +export default Notification diff --git a/src/utils/profile.js b/src/utils/profile.js index 5f6265c..b5012f8 100644 --- a/src/utils/profile.js +++ b/src/utils/profile.js @@ -1,53 +1,4 @@ -import axios from 'axios' -import { ref } from 'vue' import userData from './stores/userData/store' -import router from '@router' -import { get } from './request' -import { sendWarningMessage } from './message' - -export function getNotice() { - const rs = ref('') - axios({ - method: 'get', - url: 'https://api.locyanfrp.cn/App' - }).then((res) => { - rs.value = res.data - }) - return rs -} - -export function getLoginStatus(username, token) { - const rs = get( - 'https://api.locyanfrp.cn/Account/info?username=' + username + '&token=' + token, - [] - ) - const return_res = ref('') - rs.then((res) => { - if (res.status !== 0) { - sendWarningMessage('登录过期或未登录,请使用 LCF 账户登录后台!') - logout() - } else { - return_res.value = res - return return_res - } - }) - return return_res -} - -export function getProxies(username, token) { - const rs = get( - 'https://api.locyanfrp.cn/Proxies/GetProxiesList?username=' + username + '&token=' + token, - [] - ) - rs.then((res) => { - if (res.status !== 0) { - return res - } else { - localStorage.setItem('proxies', res.count) - return res.proxies - } - }) -} export function logout() { userData.commit('delete_user_info') diff --git a/src/utils/request.js b/src/utils/request.js index e51bf41..d2f1046 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -6,9 +6,11 @@ import QS from 'qs' import userData from './stores/userData/store' import router from '@router' import Base64 from 'qs/lib/utils' -import { sendErrorMessage } from './message' +import Message from './message' import logger from '@/utils/logger' +const message = new Message() + //这一步的目的是判断出当前是开发环境还是生成环境,方法不止一种,达到目的就行 // if(process.env.NODE_ENV=="development"){ // baseURL='https://api.locyanfrp.cn' @@ -23,8 +25,6 @@ const instance = axios.create({ const tokenDomains = ['api.locyanfrp.cn', 'api-v2.locyanfrp.cn', 'localhost'] -// post请求的时候,我们需要加上一个请求头,所以可以在这里进行一个默认的设置,即设置post的请求头为 -axios.defaults.headers.post['Content-Type'] = 'multipart/form-data;charset=UTF-8' // 添加请求拦截器 instance.interceptors.request.use( async (config) => { @@ -68,7 +68,7 @@ instance.interceptors.response.use( }) break case 500: - sendErrorMessage('服务器响应时发生错误') + message.error('服务器响应时发生错误') // 403 token过期 // 登录过期对用户进行提示 // 清除本地token和清空vuex中token对象 @@ -119,7 +119,7 @@ export async function get(url, params) { * @param headers */ export async function post(url, params, headers = {}) { - return await instance.post(url, QS.stringify(params), { + return await instance.post(url, QS.stringify(params, { arrayFormat: 'repeat' }), { headers: { ...headers, 'Content-Type': 'application/x-www-form-urlencoded' } }) } diff --git a/src/utils/stores/userData/def.js b/src/utils/stores/userData/def.js index 67218ec..da69751 100644 --- a/src/utils/stores/userData/def.js +++ b/src/utils/stores/userData/def.js @@ -1,8 +1,9 @@ export default { token: '', username: '', + user_id: 0, email: '', - frptoken: '', + frp_token: '', inbound: 0, outbound: 0, avatar: '', diff --git a/src/utils/stores/userData/local.js b/src/utils/stores/userData/local.js index 6714109..2ce047d 100644 --- a/src/utils/stores/userData/local.js +++ b/src/utils/stores/userData/local.js @@ -4,8 +4,9 @@ import defStateData from './def' const loadFromLocal = () => { userData.commit('set_token', localStorage.getItem('token') ?? defStateData.token) userData.commit('set_username', localStorage.getItem('username') ?? defStateData.username) + userData.commit('set_user_id', localStorage.getItem('user_id') ?? defStateData.user_id) userData.commit('set_user_email', localStorage.getItem('email') ?? defStateData.email) - userData.commit('set_frp_token', localStorage.getItem('frptoken') ?? defStateData.frptoken) + userData.commit('set_frp_token', localStorage.getItem('frp_token') ?? defStateData.frp_token) userData.commit( 'set_user_inbound', Number(localStorage.getItem('inbound') ?? defStateData.inbound) diff --git a/src/utils/stores/userData/store.js b/src/utils/stores/userData/store.js index 636484b..9e4d0fd 100644 --- a/src/utils/stores/userData/store.js +++ b/src/utils/stores/userData/store.js @@ -4,8 +4,9 @@ import defStateData from './def' const stateData = { token: '', username: '', + user_id: 0, email: '', - frptoken: '', + frp_token: '', inbound: 0, outbound: 0, avatar: '', @@ -23,11 +24,14 @@ export default new vuex.Store({ get_username(state) { return state.username }, + get_user_id(state) { + return state.user_id + }, get_email(state) { return state.email }, get_frp_token(state) { - return state.frptoken + return state.frp_token }, get_user_inbound(state) { // 限速方面必须返回整数 @@ -65,14 +69,24 @@ export default new vuex.Store({ state.username = defStateData.username localStorage.removeItem('username') }, + // user id + set_user_id(state, user_id) { + console.log(user_id) + state.user_id = user_id + localStorage.setItem('user_id', user_id) + }, + remove_user_id(state) { + state.user_id = defStateData.user_id + localStorage.removeItem('user_id') + }, // frp token - set_frp_token(state, frptoken) { - state.frptoken = frptoken - localStorage.setItem('frptoken', frptoken) + set_frp_token(state, frp_token) { + state.frp_token = frp_token + localStorage.setItem('frp_token', frp_token) }, remove_frp_token(state) { - state.frptoken = defStateData.frptoken - localStorage.removeItem('frptoken') + state.frp_token = defStateData.frp_token + localStorage.removeItem('frp_token') }, // inbound set_user_inbound(state, inbound) { @@ -126,28 +140,31 @@ export default new vuex.Store({ localStorage.setItem('outbound', limit_info.outbound) }, // 可选 - set_user_info(state, userdata) { - // console.log(userdata) - state.username = userdata.username - state.email = userdata.email - state.frptoken = userdata.frp_token - state.inbound = userdata.inbound - state.outbound = userdata.outbound - state.avatar = userdata.avatar - state.traffic = userdata.traffic + set_user_info(state, userData) { + // console.log(userData) + state.username = userData.username + state.user_id = userData.id + state.email = userData.email + state.frptoken = userData.frp_token + state.inbound = userData.inbound + state.outbound = userData.outbound + state.avatar = userData.avatar + state.traffic = userData.traffic // state.proxies_num = userdata.proxies_num - localStorage.setItem('username', userdata.username) - localStorage.setItem('email', userdata.email) - localStorage.setItem('traffic', userdata.traffic) - localStorage.setItem('frptoken', userdata.frp_token) - localStorage.setItem('inbound', userdata.inbound) - localStorage.setItem('outbound', userdata.outbound) - localStorage.setItem('avatar', userdata.avatar) + localStorage.setItem('username', userData.username) + localStorage.setItem('user_id', userData.id) + localStorage.setItem('email', userData.email) + localStorage.setItem('traffic', userData.traffic) + localStorage.setItem('frp_token', userData.frp_token) + localStorage.setItem('inbound', userData.inbound) + localStorage.setItem('outbound', userData.outbound) + localStorage.setItem('avatar', userData.avatar) // localStorage.setItem('proxies_num', userdata.proxies_num) }, delete_user_info(state) { state.token = defStateData.token state.username = defStateData.username + state.user_id = defStateData.user_id state.email = defStateData.email state.frptoken = defStateData.frptoken state.inbound = defStateData.inbound @@ -156,14 +173,15 @@ export default new vuex.Store({ state.traffic = defStateData.traffic localStorage.removeItem('token') localStorage.removeItem('username') + localStorage.removeItem('user_id') localStorage.removeItem('email') localStorage.removeItem('avatar') localStorage.removeItem('traffic') - localStorage.removeItem('frptoken') + localStorage.removeItem('frp_token') localStorage.removeItem('inbound') localStorage.removeItem('outbound') localStorage.removeItem('proxies') - localStorage.removeItem('avator') + localStorage.removeItem('avatar') } }, diff --git a/src/utils/title.js b/src/utils/title.js index d1444c2..2071a98 100644 --- a/src/utils/title.js +++ b/src/utils/title.js @@ -7,7 +7,7 @@ const colorBadgeData = 'background-color: #606060; color: #fff;' const colorReset = 'background-color: none; color: none;' const colorCFU = 'wdith: 100%; background-color: #66ccff; color: #fff;' -export async function printTitle() { +export default () => { console.log( `%c _ ____ _____ diff --git a/src/views/AppView.vue b/src/views/AppView.vue new file mode 100644 index 0000000..6651a53 --- /dev/null +++ b/src/views/AppView.vue @@ -0,0 +1,282 @@ + + diff --git a/src/views/DashboardView.vue b/src/views/DashboardView.vue index 543820f..e24a1f1 100644 --- a/src/views/DashboardView.vue +++ b/src/views/DashboardView.vue @@ -38,8 +38,8 @@ style="margin-left: 10px; transform: translateY(-5px)" type="info" v-clipboard="() => frpToken" - v-clipboard:success="() => sendSuccessMessage('复制成功')" - v-clipboard:error="() => sendErrorMessage('复制失败')" + v-clipboard:success="() => message.success('复制成功')" + v-clipboard:error="() => message.error('复制失败')" > 复制 @@ -165,13 +165,16 @@ import { ref, onMounted } from 'vue' // import clipboard from '@/utils/clipboard' import { AngleRight, Key } from '@vicons/fa' import userData from '@/utils/stores/userData/store' -import { useDialog, useMessage } from 'naive-ui' import { startLoadingBar, finishLoadingBar, errorLoadingBar } from '@/utils/loadingbar' -import { sendSuccessMessage, sendErrorMessage } from '@/utils/message' +import Message from '@/utils/message' +import Dialog from '@/utils/dialog' import api from '@/api' import logger from '@/utils/logger' import notice from '@/utils/notice' +const message = new Message() +const dialog = new Dialog() + localStorage.setItem('ViewPage', 'personality') const username = userData.getters.get_username const email = userData.getters.get_email @@ -181,8 +184,6 @@ const outbound = ref(userData.getters.get_user_outbound + 'Mbps 上行') const outboundRef = ref(null) const frpToken = ref(userData.getters.get_frp_token) const notShowFrpToken = ref(true) -const dialog = useDialog() -const message = useMessage() const broadcastHtml = ref('') const broadcastLoading = ref(true) @@ -243,22 +244,18 @@ function helloMessage() { } async function resetTraffic() { - dialog.warning({ - title: '警告', - content: '确定要重置流量吗?这将将剩余流量设置为 10 GiB', - positiveText: '确定', - negativeText: '还是算了~', + dialog.warning('确定要重置流量吗?这将将剩余流量设置为 10 GiB', { onPositiveClick: async () => { startLoadingBar() const data = { - username: userData.getters.get_username + user_id: userData.getters.get_user_id } let rs try { - rs = await api.v2.user.traffic(data.username) + rs = await api.v2.user.traffic(data.user_id) } catch (e) { logger.error(e) - sendErrorMessage('请求重置流量失败: ' + e) + message.error('请求重置流量失败: ' + e) } if (!rs) { errorLoadingBar() diff --git a/src/views/DonateView.vue b/src/views/DonateView.vue index 25bfd9b..c40c612 100644 --- a/src/views/DonateView.vue +++ b/src/views/DonateView.vue @@ -62,13 +62,13 @@ - + 留言 - + + 已登记的域名 - + import { ref } from 'vue' import userData from '@/utils/stores/userData/store' -import { sendSuccessMessage, sendErrorMessage } from '@/utils/message' -import { sendErrorDialog, sendSuccessDialog } from '@/utils/dialog' -import { useDialog } from 'naive-ui' +import Message from '@/utils/message' +import Dialog from '@/utils/dialog' +import logger from '@/utils/logger' import api from '@/api' +const message = new Message() +const dialog = new Dialog() + const showList = ref(false) const formRef = ref(null) -const dialog = useDialog() const loading = ref(false) const icpListLoading = ref(true) const domainInput = ref({ @@ -78,54 +80,46 @@ async function submit() { } loading.value = true if (domainInput.value.domain === '' || domainInput.value.domain === null) { - sendErrorDialog('域名不得为空!') + message.error('域名不得为空!') loading.value = false return } let rs try { - rs = await api.v2.icp.post(userData.getters.get_username, domainInput.value.domain) + rs = await api.v2.icp.post(userData.getters.get_user_id, domainInput.value.domain) } catch (e) { - sendErrorMessage('请求审核失败: ' + e) + logger.error(e) + dialog.error('请求审核失败: ' + e) } loading.value = false if (!rs) return if (rs.status !== 200) { loading.value = false - sendErrorDialog('审核失败,可能是域名没有备案或格式错误!') + dialog.error('审核失败: ' + rs.message) } else { getList() loading.value = false - sendSuccessDialog('添加成功!') + dialog.success('添加成功!') } } async function removeICP(id) { - dialog.warning({ - title: '警告', - content: '你确定要删除这个域名吗?(域名 ID: ' + id + ')', - positiveText: '确定', - negativeText: '取消', + dialog.warning('你确定要删除这个域名吗?(域名 ID: ' + id + ')', { onPositiveClick: async () => { let rs try { - rs = await api.v2.icp.delete(userData.getters.get_username, id) + rs = await api.v2.icp.delete(userData.getters.get_user_id, id) } catch (e) { - sendErrorMessage('请求移除域名失败: ' + e) + logger.error(e) + message.error('请求移除域名失败: ' + e) } if (!rs) return if (rs.status === 200) { - sendSuccessDialog('删除成功!') + message.success('删除成功!') await getList() } else { - sendErrorDialog('删除失败,请联系管理员处理!') + message.error('删除失败,请联系管理员处理!') } - }, - onNegativeClick: () => { - sendSuccessMessage('你取消了操作!') - }, - onMaskClick: () => { - sendSuccessMessage('你取消了操作!') } }) } @@ -134,9 +128,10 @@ async function getList() { icpListLoading.value = true let rs try { - rs = await api.v2.icp.get(userData.getters.get_username) + rs = await api.v2.icp.get(userData.getters.get_user_id) } catch (e) { - sendErrorMessage('请求移除域名失败: ' + e) + logger.error(e) + message.error('请求移除域名失败: ' + e) } if (!rs) return if (rs.status === 200) { diff --git a/src/views/SignView.vue b/src/views/SignView.vue index 5352bd0..f2b5d7a 100644 --- a/src/views/SignView.vue +++ b/src/views/SignView.vue @@ -108,20 +108,23 @@ diff --git a/src/views/callback/auth/oauth/qq/BindView.vue b/src/views/callback/auth/oauth/qq/BindView.vue index c50ca12..291c833 100644 --- a/src/views/callback/auth/oauth/qq/BindView.vue +++ b/src/views/callback/auth/oauth/qq/BindView.vue @@ -13,18 +13,20 @@