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
0abfa790
Commit
0abfa790
authored
Mar 30, 2021
by
leiqingsong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_lqs' into 'master'
Dev lqs See merge request
!151
parents
291aaa2b
6f1eaae3
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 @
0abfa790
...
...
@@ -36,9 +36,22 @@ export function uploadImage(params, file) {
* @param {*} version
* @returns
*/
export
function
versionUpdate
(
version
)
{
export
function
versionUpdate
(
params
)
{
return
request
({
url
:
`/account/version?version=
${
version
}
`
,
method
:
"get"
url
:
'/account/version'
,
method
:
"get"
,
params
});
}
/**
* 获取App下载路径
* @returns
*/
export
function
getAppDownUrl
()
{
return
request
({
url
:
'/account/download'
,
method
:
'get'
})
}
H5/src/views/register.vue
View file @
0abfa790
...
...
@@ -71,7 +71,8 @@
</div>
<div
v-if=
"title == '注册失败'"
class=
"tip"
>
{{
tip
}}
</div>
<div
v-else
class=
"tip"
>
<a
:href=
"tip"
>
请点击下载App
</a>
<a
:href=
"androidUrl"
>
下载安卓版App
</a>
|
<a
:href=
"iosUrl"
>
下载IOS版App
</a>
</div>
<van-button
@
click=
"show = false"
>
确定
</van-button>
</div>
...
...
@@ -79,12 +80,14 @@
</div>
</
template
>
<
script
>
import
{
smsCode
}
from
"@/api/base"
;
import
{
smsCode
,
getAppDownUrl
}
from
"@/api/base"
;
import
{
register
}
from
"@/api/user"
;
export
default
{
name
:
"Register"
,
data
()
{
return
{
androidUrl
:
''
,
iosUrl
:
''
,
form
:
{
userId
:
""
,
sms
:
""
,
...
...
@@ -115,6 +118,19 @@ export default {
}
},
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
()
{
this
.
show
=
false
;
},
...
...
@@ -177,7 +193,7 @@ export default {
this
.
$toast
.
success
(
"注册成功"
);
_this
.
show
=
true
;
_this
.
title
=
"注册成功"
;
_this
.
tip
=
"http://app.xitiansen.com/upload/xitiansen.apk"
;
this
.
getDownUrl
()
;
}
else
{
_this
.
title
=
"注册失败"
;
_this
.
show
=
true
;
...
...
H5/src/views/settings.vue
View file @
0abfa790
...
...
@@ -90,6 +90,7 @@ export default {
};
},
mounted
()
{
console
.
log
(
'读取用户信息'
);
this
.
imageBaseUrl
=
process
.
env
.
VUE_APP_BASE_URL
;
this
.
getUser
();
this
.
getAppVersion
();
...
...
@@ -103,7 +104,11 @@ export default {
}
},
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
;
if
(
res
.
code
==
1
)
{
this
.
updateResult
=
res
.
message
;
...
...
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