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
6d13163d
Commit
6d13163d
authored
Mar 19, 2021
by
leiqingsong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_lqs' into 'master'
Dev lqs See merge request
!115
parents
736b1261
8060b785
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
40 deletions
+49
-40
bridgeToAppFun.js
H5/src/utils/bridgeToAppFun.js
+11
-10
modefyAvatar.vue
H5/src/views/modefyAvatar.vue
+1
-1
settings.vue
H5/src/views/settings.vue
+37
-29
No files found.
H5/src/utils/bridgeToAppFun.js
View file @
6d13163d
...
...
@@ -62,17 +62,18 @@ class bridgeToAppFun {
}
navigateBack
()
{
console
.
log
(
"返回"
);
// if (this.userAgent === "android") {
// console.log("an");
try
{
const
home_url
=
"https://shop92680967.youzan.com/v2/showcase/homepage?alias=6aFsQ4vCp7"
;
location
.
href
=
home_url
;
}
catch
{
console
.
log
(
"返回调用失败,都不行"
);
if
(
this
.
userAgent
===
"android"
)
{
console
.
log
(
"an"
);
try
{
const
home_url
=
"https://shop92680967.youzan.com/v2/showcase/homepage?alias=6aFsQ4vCp7"
;
location
.
href
=
home_url
;
}
catch
{
console
.
log
(
"返回调用失败,都不行"
);
}
}
else
{
jsBridge
.
callhandler
(
"navigateBack"
);
}
// } else {
// jsBridge.callhandler("navigateBack");
// }
}
showBottomBar
(
params
)
{
console
.
log
(
"隐藏底部"
);
...
...
H5/src/views/modefyAvatar.vue
View file @
6d13163d
...
...
@@ -60,7 +60,7 @@ export default {
});
},
onRead
(
file
)
{
console
.
log
(
'读取到图片了'
,
file
);
console
.
log
(
"读取到图片了"
,
file
);
const
inviteCode
=
JSON
.
parse
(
localStorage
.
getItem
(
"user"
)).
inviteCode
;
if
(
!
inviteCode
)
{
this
.
$toast
.
fail
(
"当前用户没有邀请码"
);
...
...
H5/src/views/settings.vue
View file @
6d13163d
...
...
@@ -3,7 +3,7 @@
<van-cell-group
class=
"group-1"
>
<van-cell
title=
"用户名"
:value=
"userName"
/>
<van-cell
is-link
center
title=
"头像"
@
click=
"onModefy"
>
<img
class=
"avatar-img"
:src=
"avatar"
alt=
"头像"
/>
<img
class=
"avatar-img"
:src=
"
imageBaseUrl +
avatar"
alt=
"头像"
/>
</van-cell>
</van-cell-group>
<van-cell-group>
...
...
@@ -56,6 +56,7 @@ export default {
data
()
{
return
{
userName
:
""
,
imageBaseUrl
:
""
,
headImage
:
""
,
avatar
:
""
,
fileList
:
[],
...
...
@@ -65,6 +66,7 @@ export default {
};
},
created
()
{
this
.
imageBaseUrl
=
process
.
env
.
VUE_APP_BASE_URL
;
this
.
getUser
();
},
methods
:
{
...
...
@@ -73,23 +75,27 @@ export default {
userId
:
JSON
.
parse
(
localStorage
.
getItem
(
"user"
)).
userId
};
console
.
log
(
"setting-userId"
,
params
);
getUserInfo2
(
params
).
then
(
res
=>
{
if
(
res
.
userId
)
{
localStorage
.
setItem
(
"user"
,
JSON
.
stringify
(
res
));
this
.
$nextTick
(()
=>
{
this
.
userName
=
res
.
userId
;
this
.
inviteeCode
=
res
.
beInvitedCode
==
1
?
"请填写推荐人邀请码"
:
res
.
beInvitedCode
;
// this.avatar = process.env.VUE_APP_BASE_URL + res.headImage;
this
.
avatar
=
"http://8.131.244.76:81"
+
res
.
headImage
;
this
.
headImage
=
res
.
headImage
;
});
}
}).
catch
(
err
=>
{
if
(
err
.
response
.
status
===
502
)
{
this
.
$toast
(
'服务在升级,请稍后重试'
)
}
});
getUserInfo2
(
params
)
.
then
(
res
=>
{
if
(
res
.
userId
)
{
localStorage
.
setItem
(
"user"
,
JSON
.
stringify
(
res
));
this
.
$nextTick
(()
=>
{
this
.
userName
=
res
.
userId
;
this
.
inviteeCode
=
res
.
beInvitedCode
==
1
?
"请填写推荐人邀请码"
:
res
.
beInvitedCode
;
this
.
avatar
=
res
.
headImage
;
// this.avatar = "http://8.131.244.76:81" + res.headImage;
this
.
headImage
=
res
.
headImage
;
});
}
})
.
catch
(
err
=>
{
if
(
err
.
response
.
status
===
502
)
{
this
.
$toast
(
"服务在升级,请稍后重试"
);
}
});
},
logout
()
{
logout
()
...
...
@@ -131,17 +137,19 @@ export default {
inviteCode
:
this
.
fillCode
,
userId
:
JSON
.
parse
(
localStorage
.
getItem
(
"user"
)).
userId
};
fillInviteCode
(
params
).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
// console.log('成功');
this
.
inviteeCode
=
this
.
fillCode
;
}
else
{
this
.
$toast
.
fail
(
res
.
message
);
}
}).
catch
(
err
=>
{
console
.
log
(
err
);
this
.
$toast
.
fail
(
err
)
});
fillInviteCode
(
params
)
.
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
// console.log('成功');
this
.
inviteeCode
=
this
.
fillCode
;
}
else
{
this
.
$toast
.
fail
(
res
.
message
);
}
})
.
catch
(
err
=>
{
console
.
log
(
err
);
this
.
$toast
.
fail
(
err
);
});
},
fillInviterCode
()
{
if
(
...
...
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