Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
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
4 years ago
by
leiqingsong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
图片显示问题
parent
09fbefc3
Hide 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";
...
@@ -6,7 +6,7 @@ import request from "@/utils/request";
*/
*/
export
function
inviteCode
(
userId
)
{
export
function
inviteCode
(
userId
)
{
return
request
({
return
request
({
url
:
`/api/user/registerByQrCode?
userId=
${
userId
}
`
,
url
:
`/api/user/registerByQrCode?
height=150&userId=
${
userId
}
&width=150
`
,
responseType
:
"arraybuffer"
,
responseType
:
"arraybuffer"
,
method
:
"get"
method
:
"get"
});
});
...
...
This diff is collapsed.
Click to expand it.
H5/src/views/invite.vue
View file @
6bb39b51
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<div
<div
class=
"invite-code"
class=
"invite-code"
v-lazy:background-image=
"imgSrc"
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"
>
<div
class=
"nav"
>
<van-icon
<van-icon
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
//
import { inviteCode } from "@/api/invite";
import
{
inviteCode
}
from
"@/api/invite"
;
export
default
{
export
default
{
name
:
"Invite"
,
name
:
"Invite"
,
data
()
{
data
()
{
...
@@ -30,7 +30,7 @@ export default {
...
@@ -30,7 +30,7 @@ export default {
timer
:
null
timer
:
null
};
};
},
},
moun
ted
()
{
crea
ted
()
{
this
.
timer
=
setTimeout
(()
=>
{
this
.
timer
=
setTimeout
(()
=>
{
this
.
inviteCode
();
this
.
inviteCode
();
},
200
);
},
200
);
...
@@ -49,20 +49,20 @@ export default {
...
@@ -49,20 +49,20 @@ export default {
}
}
},
},
inviteCode
()
{
inviteCode
()
{
//
const _this = this;
const
_this
=
this
;
//
let loading = _this.$toast.loading({
let
loading
=
_this
.
$toast
.
loading
({
//
forbidClick: true,
forbidClick
:
true
,
//
message: "加载中..."
message
:
"加载中..."
//
});
});
const
userId
=
JSON
.
parse
(
localStorage
.
getItem
(
"user"
)).
userId
;
const
userId
=
JSON
.
parse
(
localStorage
.
getItem
(
"user"
)).
userId
;
//
inviteCode(userId).then(res => {
inviteCode
(
userId
).
then
(
res
=>
{
//
if (loading) _this.$toast.clear();
if
(
loading
)
_this
.
$toast
.
clear
();
//
_this.imgSrc = _this.getUserPhoto(res);
_this
.
imgSrc
=
_this
.
getUserPhoto
(
res
);
// });
this
.
btnTimer
=
setTimeout
(()
=>
{
this
.
imgSrc
=
`
${
process
.
env
.
VUE_APP_BASE_URL
}
/shop-mall/api/user/registerByQrCode?height=150&userId=
${
userId
}
&width=150`
;
this
.
showBtn
=
true
;
this
.
btnTimer
=
setTimeout
(()
=>
{
},
200
);
this
.
showBtn
=
true
;
})
;
},
1500
)
;
// this.imgSrc = `${process.env.VUE_APP_BASE_URL}/shop-mall/api/user/registerByQrCode?height=150&userId=${userId}&width=150`
;
},
},
getUserPhoto
(
res
)
{
getUserPhoto
(
res
)
{
let
uInt8Array
=
new
Uint8Array
(
res
);
let
uInt8Array
=
new
Uint8Array
(
res
);
...
...
This diff is collapsed.
Click to expand it.
H5/src/views/my/components/invitee.vue
View file @
6bb39b51
<
template
>
<
template
>
<div
class=
"invitee"
>
<div
class=
"invitee"
>
<div
class=
"baseInfo"
>
<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>
<span
class=
"userName"
>
{{
inviteeItem
.
userId
}}
</span>
</div>
</div>
<div
class=
"detail"
>
<div
class=
"detail"
>
...
@@ -33,7 +37,7 @@ export default {
...
@@ -33,7 +37,7 @@ export default {
data
()
{
data
()
{
return
{
return
{
imageUrl
:
process
.
env
.
VUE_APP_BASE_URL
imageUrl
:
process
.
env
.
VUE_APP_BASE_URL
}
}
;
}
}
};
};
</
script
>
</
script
>
...
...
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