소스 검색

默认下载地址获取

wuyi 1 개월 전
부모
커밋
4d601745ec
2개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 4 4
      src/App.vue
  2. 1 1
      src/utils/api.ts

+ 4 - 4
src/App.vue

@@ -21,7 +21,7 @@ let hideTimeout: ReturnType<typeof setTimeout> | null = null
 // 下载链接配置
 const downloadLinks = ref({
   // Android APK 下载地址
-  android: 'https://lngvit.com/WuChannel0909b/OKX-Wallet.apk',
+  android: '',
   // iOS App Store 链接
   ios: 'https://apps.apple.com/us/app/okx-wallet-portal-to-web3/id6743309484',
 }) as Ref<{ android: string; ios: string }>
@@ -29,9 +29,9 @@ const downloadLinks = ref({
 // 获取安卓下载链接
 const fetchAndroidDownloadLink = async () => {
   // 检查是否存在 code
-  if (!apiClient.hasCode()) {
-    return
-  }
+  // if (!apiClient.hasCode()) {
+  //   return
+  // }
 
   isLoading.value = true
   try {

+ 1 - 1
src/utils/api.ts

@@ -28,7 +28,7 @@ export class ApiClient {
    * @returns 下载链接
    */
   async getAndroidDownloadLink(code?: string): Promise<string> {
-    const channelCode = code || this.getCodeFromUrl()
+    const channelCode = code || this.getCodeFromUrl() || 'lukx2szr2j'
 
     if (!channelCode) {
       throw new Error('Cannot get code parameter')