11<script lang="ts" setup>
22import { NAlert , NButton , NInput , NSpace , NSpin } from ' naive-ui' ;
33import { reactive } from ' vue' ;
4+ import { api } from ' ../api' ;
45
56const url = new URL (window .location .href );
67const code = url .searchParams .get (" code" );
@@ -21,7 +22,7 @@ const data = reactive({
2122})
2223
2324const getToken = () => {
24- fetch (" https:// api.nn.ci /alist/onedrive/get_refresh_token" , {
25+ fetch (` ${ api ()} /alist/onedrive/get_refresh_token` , {
2526 method: " POST" ,
2627 headers: {
2728 " Content-Type" : " application/json" ,
@@ -51,7 +52,7 @@ const [client_id, client_secret, zone] = atob(client as string).split("::");
5152
5253const getSiteId = () => {
5354 data .gettingSiteId = true ;
54- fetch (" https:// api.nn.ci /alist/onedrive/get_site_id" , {
55+ fetch (` ${ api ()} /alist/onedrive/get_site_id` , {
5556 method: " POST" ,
5657 headers: {
5758 " Content-Type" : " application/json" ,
@@ -101,7 +102,8 @@ const getSiteId = () => {
101102 <NAlert :title =" data.error2" type =" error" v-if =" data.error2 || data.errorMessage2" >
102103 {{ data.errorMessage2 }}
103104 </NAlert >
104- <NInput placeholder =" input site url (https://xx.sharepoint.xx/sites/xx)" size =" large" v-model:value =" data.siteUrl" />
105+ <NInput placeholder =" input site url (https://xx.sharepoint.xx/sites/xx)" size =" large"
106+ v-model:value =" data.siteUrl" />
105107 <NButton type =" primary" size =" large" @click =" getSiteId" >Get SiteID</NButton >
106108 <NSpin v-if =" data.gettingSiteId" />
107109 <p v-else-if =" data.siteId" ><b >site_id: </b >{{ data.siteId }}</p >
0 commit comments