Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fns_front_app_page
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenqikuai
fns_front_app_page
Commits
cbccda07
Commit
cbccda07
authored
Nov 04, 2021
by
chenqikuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取url
parent
79e7337a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
8 deletions
+37
-8
App.vue
src/App.vue
+18
-8
index.ts
src/service/index.ts
+11
-0
vite.config.ts
vite.config.ts
+8
-0
No files found.
src/App.vue
View file @
cbccda07
...
@@ -10,9 +10,7 @@
...
@@ -10,9 +10,7 @@
<div
class=
"line"
></div>
<div
class=
"line"
></div>
</div>
</div>
<div
class=
"txtContainer2"
>
<div
class=
"txtContainer2"
>
<a
<a
:href=
"androidUrl"
>
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"
>
<div
class=
"btn btnTxt andriod"
>
<div
class=
"btn btnTxt andriod"
>
<svg
class=
"iconfont icon"
aria-hidden=
"true"
style=
"color: #3F7EC7; font-size: 28px;"
>
<svg
class=
"iconfont icon"
aria-hidden=
"true"
style=
"color: #3F7EC7; font-size: 28px;"
>
<use
xlink:href=
"#icon-anzhuo"
/>
<use
xlink:href=
"#icon-anzhuo"
/>
...
@@ -50,9 +48,7 @@
...
@@ -50,9 +48,7 @@
</div>
</div>
</div>
</div>
<div
style=
"display: flex; justify-content: center"
class=
"ig-btns-container"
>
<div
style=
"display: flex; justify-content: center"
class=
"ig-btns-container"
>
<a
<a
:href=
"androidUrl"
>
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"
>
<div
class=
"ig-btn"
style=
"margin-right: 34px;"
>
<div
class=
"ig-btn"
style=
"margin-right: 34px;"
>
<svg
<svg
class=
"iconfont icon"
class=
"iconfont icon"
...
@@ -86,19 +82,33 @@
...
@@ -86,19 +82,33 @@
</
template
>
</
template
>
<
script
setup
lang=
'ts'
>
<
script
setup
lang=
'ts'
>
import
{
ref
}
from
'@vue/reactivity'
;
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
QrCode
from
'./components/qrCode.vue'
;
import
{
getLatestedIosVersion
,
getLatestedAndroidVersion
}
from
'./service'
;
import
{
notifyStr
,
notifyStr2
}
from
'./store'
;
import
{
notifyStr
,
notifyStr2
}
from
'./store'
;
import
{
isWeChat
}
from
'./utils'
;
import
{
isWeChat
}
from
'./utils'
;
let
timeoutid
=
NaN
;
let
timeoutid
=
NaN
;
const
isInWeChat
=
ref
(
true
)
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
(()
=>
{
onBeforeMount
(()
=>
{
isInWeChat
.
value
=
isWeChat
();
isInWeChat
.
value
=
isWeChat
();
})
})
const
iosUrl
=
'https://testflight.apple.com/join/QGlUXSr0'
const
notify
=
(
str
:
string
)
=>
{
const
notify
=
(
str
:
string
)
=>
{
notifyStr
.
value
=
str
notifyStr
.
value
=
str
...
...
src/service/index.ts
0 → 100644
View file @
cbccda07
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
())
}
vite.config.ts
View file @
cbccda07
...
@@ -8,6 +8,14 @@ export default defineConfig({
...
@@ -8,6 +8,14 @@ export default defineConfig({
build
:
{
build
:
{
outDir
:
'fns_front_download'
,
outDir
:
'fns_front_download'
,
},
},
server
:
{
proxy
:
{
'/proxyApi'
:
{
target
:
'http://172.16.102.150:8091/api/v1/'
,
rewrite
:
(
path
)
=>
path
.
replace
(
/^
\/
proxyApi/
,
''
),
},
},
},
resolve
:
{
resolve
:
{
alias
:
{
alias
:
{
'@'
:
path
.
resolve
(
__dirname
,
'/src'
),
'@'
:
path
.
resolve
(
__dirname
,
'/src'
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment