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
6bb39b51
Commit
6bb39b51
authored
Apr 02, 2021
by
leiqingsong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
图片显示问题
parent
09fbefc3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
19 deletions
+23
-19
invite.js
H5/src/api/invite.js
+1
-1
invite.vue
H5/src/views/invite.vue
+16
-16
invitee.vue
H5/src/views/my/components/invitee.vue
+6
-2
No files found.
H5/src/api/invite.js
View file @
6bb39b51
...
...
@@ -6,7 +6,7 @@ import request from "@/utils/request";
*/
export
function
inviteCode
(
userId
)
{
return
request
({
url
:
`/api/user/registerByQrCode?
userId=
${
userId
}
`
,
url
:
`/api/user/registerByQrCode?
height=150&userId=
${
userId
}
&width=150
`
,
responseType
:
"arraybuffer"
,
method
:
"get"
});
...
...
H5/src/views/invite.vue
View file @
6bb39b51
...
...
@@ -3,7 +3,7 @@
<div
class=
"invite-code"
v-lazy:background-image=
"imgSrc"
:style=
"`;background-size: 100% 100%;background-repeat: no-repeat;`
"
style=
"background-size: 100% 100%; background-repeat: no-repeat
"
>
<div
class=
"nav"
>
<van-icon
...
...
@@ -19,7 +19,7 @@
</div>
</
template
>
<
script
>
//
import { inviteCode } from "@/api/invite";
import
{
inviteCode
}
from
"@/api/invite"
;
export
default
{
name
:
"Invite"
,
data
()
{
...
...
@@ -30,7 +30,7 @@ export default {
timer
:
null
};
},
moun
ted
()
{
crea
ted
()
{
this
.
timer
=
setTimeout
(()
=>
{
this
.
inviteCode
();
},
200
);
...
...
@@ -49,20 +49,20 @@ export default {
}
},
inviteCode
()
{
//
const _this = this;
//
let loading = _this.$toast.loading({
//
forbidClick: true,
//
message: "加载中..."
//
});
const
_this
=
this
;
let
loading
=
_this
.
$toast
.
loading
({
forbidClick
:
true
,
message
:
"加载中..."
});
const
userId
=
JSON
.
parse
(
localStorage
.
getItem
(
"user"
)).
userId
;
// inviteCode(userId).then(res => {
// if (loading) _this.$toast.clear();
// _this.imgSrc = _this.getUserPhoto(res);
// });
this
.
imgSrc
=
`
${
process
.
env
.
VUE_APP_BASE_URL
}
/shop-mall/api/user/registerByQrCode?height=150&userId=
${
userId
}
&width=150`
;
inviteCode
(
userId
).
then
(
res
=>
{
if
(
loading
)
_this
.
$toast
.
clear
();
_this
.
imgSrc
=
_this
.
getUserPhoto
(
res
);
this
.
btnTimer
=
setTimeout
(()
=>
{
this
.
showBtn
=
true
;
},
1500
);
},
200
);
});
// this.imgSrc = `${process.env.VUE_APP_BASE_URL}/shop-mall/api/user/registerByQrCode?height=150&userId=${userId}&width=150`;
},
getUserPhoto
(
res
)
{
let
uInt8Array
=
new
Uint8Array
(
res
);
...
...
H5/src/views/my/components/invitee.vue
View file @
6bb39b51
<
template
>
<div
class=
"invitee"
>
<div
class=
"baseInfo"
>
<img
class=
"avatar"
:src=
"imageUrl + inviteeItem.headImage"
alt=
"用户头像"
/>
<img
class=
"avatar"
:src=
"imageUrl + inviteeItem.headImage"
alt=
"用户头像"
/>
<span
class=
"userName"
>
{{
inviteeItem
.
userId
}}
</span>
</div>
<div
class=
"detail"
>
...
...
@@ -33,7 +37,7 @@ export default {
data
()
{
return
{
imageUrl
:
process
.
env
.
VUE_APP_BASE_URL
}
}
;
}
};
</
script
>
...
...
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