Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
X
XiTianSenMall
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
leiqingsong
XiTianSenMall
Commits
66ef9fa2
Commit
66ef9fa2
authored
3 years ago
by
leiqingsong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改app下载
parent
c3f64ecc
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
7 deletions
+41
-7
base.js
H5/src/api/base.js
+16
-3
register.vue
H5/src/views/register.vue
+19
-3
settings.vue
H5/src/views/settings.vue
+6
-1
No files found.
H5/src/api/base.js
View file @
66ef9fa2
...
@@ -36,9 +36,22 @@ export function uploadImage(params, file) {
...
@@ -36,9 +36,22 @@ export function uploadImage(params, file) {
* @param {*} version
* @param {*} version
* @returns
* @returns
*/
*/
export
function
versionUpdate
(
version
)
{
export
function
versionUpdate
(
params
)
{
return
request
({
return
request
({
url
:
`/account/version?version=
${
version
}
`
,
url
:
'/account/version'
,
method
:
"get"
method
:
"get"
,
params
});
});
}
}
/**
* 获取App下载路径
* @returns
*/
export
function
getAppDownUrl
()
{
return
request
({
url
:
'/account/download'
,
method
:
'get'
})
}
This diff is collapsed.
Click to expand it.
H5/src/views/register.vue
View file @
66ef9fa2
...
@@ -71,7 +71,8 @@
...
@@ -71,7 +71,8 @@
</div>
</div>
<div
v-if=
"title == '注册失败'"
class=
"tip"
>
{{
tip
}}
</div>
<div
v-if=
"title == '注册失败'"
class=
"tip"
>
{{
tip
}}
</div>
<div
v-else
class=
"tip"
>
<div
v-else
class=
"tip"
>
<a
:href=
"tip"
>
请点击下载App
</a>
<a
:href=
"androidUrl"
>
下载安卓版App
</a>
|
<a
:href=
"iosUrl"
>
下载IOS版App
</a>
</div>
</div>
<van-button
@
click=
"show = false"
>
确定
</van-button>
<van-button
@
click=
"show = false"
>
确定
</van-button>
</div>
</div>
...
@@ -79,12 +80,14 @@
...
@@ -79,12 +80,14 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
smsCode
}
from
"@/api/base"
;
import
{
smsCode
,
getAppDownUrl
}
from
"@/api/base"
;
import
{
register
}
from
"@/api/user"
;
import
{
register
}
from
"@/api/user"
;
export
default
{
export
default
{
name
:
"Register"
,
name
:
"Register"
,
data
()
{
data
()
{
return
{
return
{
androidUrl
:
''
,
iosUrl
:
''
,
form
:
{
form
:
{
userId
:
""
,
userId
:
""
,
sms
:
""
,
sms
:
""
,
...
@@ -115,6 +118,19 @@ export default {
...
@@ -115,6 +118,19 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
getDownUrl
()
{
getAppDownUrl
().
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
res
.
data
.
forEach
(
item
=>
{
if
(
item
.
type
==
1
)
{
this
.
iosUrl
=
item
.
url
;
}
else
if
(
item
.
type
==
2
)
{
this
.
androidUrl
=
item
.
url
;
}
});
}
})
},
onClickHide
()
{
onClickHide
()
{
this
.
show
=
false
;
this
.
show
=
false
;
},
},
...
@@ -177,7 +193,7 @@ export default {
...
@@ -177,7 +193,7 @@ export default {
this
.
$toast
.
success
(
"注册成功"
);
this
.
$toast
.
success
(
"注册成功"
);
_this
.
show
=
true
;
_this
.
show
=
true
;
_this
.
title
=
"注册成功"
;
_this
.
title
=
"注册成功"
;
_this
.
tip
=
"http://app.xitiansen.com/upload/xitiansen.apk"
;
this
.
getDownUrl
()
;
}
else
{
}
else
{
_this
.
title
=
"注册失败"
;
_this
.
title
=
"注册失败"
;
_this
.
show
=
true
;
_this
.
show
=
true
;
...
...
This diff is collapsed.
Click to expand it.
H5/src/views/settings.vue
View file @
66ef9fa2
...
@@ -90,6 +90,7 @@ export default {
...
@@ -90,6 +90,7 @@ export default {
};
};
},
},
mounted
()
{
mounted
()
{
console
.
log
(
'读取用户信息'
);
this
.
imageBaseUrl
=
process
.
env
.
VUE_APP_BASE_URL
;
this
.
imageBaseUrl
=
process
.
env
.
VUE_APP_BASE_URL
;
this
.
getUser
();
this
.
getUser
();
this
.
getAppVersion
();
this
.
getAppVersion
();
...
@@ -103,7 +104,11 @@ export default {
...
@@ -103,7 +104,11 @@ export default {
}
}
},
},
updateVersion
()
{
updateVersion
()
{
versionUpdate
(
this
.
version
.
substr
(
2
)).
then
(
res
=>
{
const
params
=
{
type
:
this
.
$bridgeToAppFun
.
userAgent
===
'ios'
?
1
:
2
,
version
:
this
.
version
.
substr
(
2
)
}
versionUpdate
(
params
).
then
(
res
=>
{
this
.
versionShow
=
true
;
this
.
versionShow
=
true
;
if
(
res
.
code
==
1
)
{
if
(
res
.
code
==
1
)
{
this
.
updateResult
=
res
.
message
;
this
.
updateResult
=
res
.
message
;
...
...
This diff is collapsed.
Click to expand it.
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