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
dd717bfa
Commit
dd717bfa
authored
Mar 30, 2021
by
leiqingsong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户信息获取时好时坏的bug
parent
6f1eaae3
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
19 deletions
+18
-19
.env.production
H5/.env.production
+2
-2
App.vue
H5/src/App.vue
+2
-2
base.js
H5/src/api/base.js
+5
-6
register.vue
H5/src/views/register.vue
+4
-4
settings.vue
H5/src/views/settings.vue
+4
-4
vue.config.js
H5/vue.config.js
+1
-1
No files found.
H5/.env.production
View file @
dd717bfa
# 生产环境 部署生产环境放开这个
#
VUE_APP_BASE_URL = "http://app.xitiansen.com"
VUE_APP_BASE_URL = "http://app.xitiansen.com"
# 测试环境 部署测试环境放开这个
VUE_APP_BASE_URL = "http://8.131.244.76:81"
\ No newline at end of file
# VUE_APP_BASE_URL = "http://8.131.244.76:81"
\ No newline at end of file
H5/src/App.vue
View file @
dd717bfa
...
...
@@ -36,9 +36,9 @@ export default {
});
},
methods
:
{
saveUser
(
data
)
{
async
saveUser
(
data
)
{
if
(
data
)
{
getUserInfo
().
then
(
res
=>
{
await
getUserInfo
().
then
(
res
=>
{
console
.
log
(
"存用户信息"
);
if
(
res
.
code
==
0
)
{
localStorage
.
setItem
(
"user"
,
JSON
.
stringify
(
res
.
data
));
...
...
H5/src/api/base.js
View file @
dd717bfa
...
...
@@ -38,7 +38,7 @@ export function uploadImage(params, file) {
*/
export
function
versionUpdate
(
params
)
{
return
request
({
url
:
'/account/version'
,
url
:
"/account/version"
,
method
:
"get"
,
params
});
...
...
@@ -46,12 +46,11 @@ export function versionUpdate(params) {
/**
* 获取App下载路径
* @returns
* @returns
*/
export
function
getAppDownUrl
()
{
return
request
({
url
:
'/account/download'
,
method
:
'get'
})
url
:
"/account/download"
,
method
:
"get"
})
;
}
H5/src/views/register.vue
View file @
dd717bfa
...
...
@@ -71,7 +71,7 @@
</div>
<div
v-if=
"title == '注册失败'"
class=
"tip"
>
{{
tip
}}
</div>
<div
v-else
class=
"tip"
>
<a
:href=
"androidUrl"
>
下载安卓版App
</a>
|
<a
:href=
"androidUrl"
>
下载安卓版App
</a>
|
<a
:href=
"iosUrl"
>
下载IOS版App
</a>
</div>
<van-button
@
click=
"show = false"
>
确定
</van-button>
...
...
@@ -86,8 +86,8 @@ export default {
name
:
"Register"
,
data
()
{
return
{
androidUrl
:
''
,
iosUrl
:
''
,
androidUrl
:
""
,
iosUrl
:
""
,
form
:
{
userId
:
""
,
sms
:
""
,
...
...
@@ -129,7 +129,7 @@ export default {
}
});
}
})
})
;
},
onClickHide
()
{
this
.
show
=
false
;
...
...
H5/src/views/settings.vue
View file @
dd717bfa
...
...
@@ -3,7 +3,7 @@
<van-cell-group
class=
"group-1"
>
<van-cell
title=
"用户名"
:value=
"userName"
/>
<!--is-link @click="onModefy" -->
<van-cell
center
title=
"头像"
is-link
@
click=
"onModefy"
>
<van-cell
center
title=
"头像"
>
<img
class=
"avatar-img"
:src=
"imageBaseUrl + avatar"
alt=
"头像"
/>
</van-cell>
</van-cell-group>
...
...
@@ -90,7 +90,7 @@ export default {
};
},
mounted
()
{
console
.
log
(
'读取用户信息'
);
console
.
log
(
"读取用户信息"
);
this
.
imageBaseUrl
=
process
.
env
.
VUE_APP_BASE_URL
;
this
.
getUser
();
this
.
getAppVersion
();
...
...
@@ -105,9 +105,9 @@ export default {
},
updateVersion
()
{
const
params
=
{
type
:
this
.
$bridgeToAppFun
.
userAgent
===
'ios'
?
1
:
2
,
type
:
this
.
$bridgeToAppFun
.
userAgent
===
"ios"
?
1
:
2
,
version
:
this
.
version
.
substr
(
2
)
}
}
;
versionUpdate
(
params
).
then
(
res
=>
{
this
.
versionShow
=
true
;
if
(
res
.
code
==
1
)
{
...
...
H5/vue.config.js
View file @
dd717bfa
...
...
@@ -4,7 +4,7 @@ const name = "西田森App";
module
.
exports
=
{
publicPath
:
"/front"
,
//
outputDir: "front",
outputDir
:
"front"
,
devServer
:
{
proxy
:
{
'/shop-mall'
:
{
...
...
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