Commit cbccda07 authored by chenqikuai's avatar chenqikuai

获取url

parent 79e7337a
......@@ -10,9 +10,7 @@
<div class="line"></div>
</div>
<div class="txtContainer2">
<a
href="https://phjr.obs.cn-east-3.myhuaweicloud.com/%E5%8D%8F%E4%BC%9A%E6%9C%8D%E5%8A%A1%E5%B9%B3%E5%8F%B0.apk"
>
<a :href="androidUrl">
<div class="btn btnTxt andriod">
<svg class="iconfont icon" aria-hidden="true" style="color: #3F7EC7; font-size: 28px;">
<use xlink:href="#icon-anzhuo" />
......@@ -50,9 +48,7 @@
</div>
</div>
<div style="display: flex; justify-content: center" class="ig-btns-container">
<a
href="https://phjr.obs.cn-east-3.myhuaweicloud.com/%E5%8D%8F%E4%BC%9A%E6%9C%8D%E5%8A%A1%E5%B9%B3%E5%8F%B0.apk"
>
<a :href="androidUrl">
<div class="ig-btn" style="margin-right: 34px;">
<svg
class="iconfont icon"
......@@ -86,19 +82,33 @@
</template>
<script setup lang='ts'>
import { ref } from '@vue/reactivity';
import { onBeforeMount } from '@vue/runtime-core';
import { onBeforeMount, onMounted } from '@vue/runtime-core';
import QrCode from './components/qrCode.vue';
import { getLatestedIosVersion, getLatestedAndroidVersion } from './service';
import { notifyStr, notifyStr2 } from './store';
import { isWeChat } from './utils';
let timeoutid = NaN;
const isInWeChat = ref(true)
const iosUrl = ref('');
const androidUrl = ref('');
onMounted(async () => {
const ios = await getLatestedIosVersion()
const android = await getLatestedAndroidVersion()
if (ios.code === 200) {
iosUrl.value = ios.data.url
}
if (android.code === 200) {
androidUrl.value = android.data.url;
}
})
onBeforeMount(() => {
isInWeChat.value = isWeChat();
})
const iosUrl = 'https://testflight.apple.com/join/QGlUXSr0'
const notify = (str: string) => {
notifyStr.value = str
......
export function getLatestedIosVersion() {
return fetch('/proxyApi/version/latest?os=ios', {
method: 'get',
}).then((ret) => ret.json())
}
export function getLatestedAndroidVersion() {
return fetch('/proxyApi/version/latest?os=android', {
method: 'get',
}).then((ret) => ret.json())
}
......@@ -8,6 +8,14 @@ export default defineConfig({
build: {
outDir: 'fns_front_download',
},
server: {
proxy: {
'/proxyApi': {
target: 'http://172.16.102.150:8091/api/v1/',
rewrite: (path) => path.replace(/^\/proxyApi/, ''),
},
},
},
resolve: {
alias: {
'@': path.resolve(__dirname, '/src'),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment