Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mallapp
Project
Project
Details
Activity
Releases
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
viitto
mallapp
Commits
19e3acd9
Commit
19e3acd9
authored
Aug 21, 2020
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二维码的修改
parent
0a23c64b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
6 deletions
+18
-6
index.vue
pages/live/index.vue
+1
-0
share.vue
pages/live/share.vue
+6
-1
share-qrcode.vue
pages/share-qrcode/share-qrcode.vue
+11
-5
No files found.
pages/live/index.vue
View file @
19e3acd9
...
@@ -145,6 +145,7 @@ export default {
...
@@ -145,6 +145,7 @@ export default {
};
};
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
console
.
log
(
option
,
'option'
)
this
.
mc
=
this
.
$uiConfig
.
mainColor
;
this
.
mc
=
this
.
$uiConfig
.
mainColor
;
this
.
secondary
=
this
.
$uiConfig
.
secondary
;
this
.
secondary
=
this
.
$uiConfig
.
secondary
;
let
c
=
this
.
$uiConfig
.
is_bang
?
80
:
52
;
let
c
=
this
.
$uiConfig
.
is_bang
?
80
:
52
;
...
...
pages/live/share.vue
View file @
19e3acd9
...
@@ -64,11 +64,16 @@ export default {
...
@@ -64,11 +64,16 @@ export default {
getWeiXinQRCode
()
{
getWeiXinQRCode
()
{
let
that
=
this
;
let
that
=
this
;
uni
.
showNavigationBarLoading
();
uni
.
showNavigationBarLoading
();
console
.
log
(
that
.
UserInfo
,
'that.UserInfo'
)
let
SmallShopId
=
that
.
UserInfo
.
SmallShopId
?
that
.
UserInfo
.
SmallShopId
:
0
;
if
(
SmallShopId
==
0
){
SmallShopId
=
that
.
UserInfo
.
UserSmallShopId
?
that
.
UserInfo
.
UserSmallShopId
:
0
;
}
that
.
request2
(
that
.
request2
(
{
{
url
:
"/api/AppletUser/GetWeiXinQRCodeForApplet"
,
url
:
"/api/AppletUser/GetWeiXinQRCodeForApplet"
,
data
:
{
data
:
{
Path
:
"pages/live/index?user_id="
+
that
.
UserInfo
.
UserId
,
Path
:
"pages/live/index?user_id="
+
that
.
UserInfo
.
UserId
+
'&SmallShopId='
+
SmallShopId
,
With
:
that
.
qrcode
.
QrCodeSize
,
With
:
that
.
qrcode
.
QrCodeSize
,
},
},
},
},
...
...
pages/share-qrcode/share-qrcode.vue
View file @
19e3acd9
...
@@ -121,9 +121,12 @@
...
@@ -121,9 +121,12 @@
// src: that.UserInfo.Photo,
// src: that.UserInfo.Photo,
src
:
that
.
fenxqrcode
,
src
:
that
.
fenxqrcode
,
success
:
function
(
image
)
{
success
:
function
(
image
)
{
if
(
that
.
qrcode
.
QrCodeType
==
0
){
ctx
.
drawImage
(
image
.
path
,
that
.
qrcode
.
QrCodePaddingLeft
,
that
.
qrcode
.
QrCodePaddingTop
,
that
.
qrcode
.
QrCodeSize
,
that
.
qrcode
.
QrCodeSize
);
//绘制头像
ctx
.
arc
(
that
.
qrcode
.
QrCodeSize
/
2
+
that
.
qrcode
.
QrCodePaddingLeft
,
that
.
qrcode
.
QrCodeSize
/
2
+
that
.
qrcode
.
QrCodePaddingTop
,
that
.
qrcode
.
QrCodeSize
/
2
,
0
,
Math
.
PI
*
2
,
false
);
that
.
drawQrCode
(
ctx
)
ctx
.
clip
();
//画了圆 再剪切 原始画布中剪切任意形状和尺寸。一旦剪切了某个区域,则所有之后的绘图都会被限制在被剪切的区域内
}
ctx
.
drawImage
(
image
.
path
,
that
.
qrcode
.
QrCodePaddingLeft
,
that
.
qrcode
.
QrCodePaddingTop
,
that
.
qrcode
.
QrCodeSize
,
that
.
qrcode
.
QrCodeSize
);
//绘制二维码
that
.
drawQrCode
(
ctx
)
},
},
});
});
}
else
{
}
else
{
...
@@ -138,8 +141,11 @@
...
@@ -138,8 +141,11 @@
uni
.
getImageInfo
({
//头像
uni
.
getImageInfo
({
//头像
src
:
that
.
fenxqrcode
,
src
:
that
.
fenxqrcode
,
success
:
function
(
image
)
{
success
:
function
(
image
)
{
if
(
that
.
qrcode
.
QrCodeType
==
0
){
ctx
.
drawImage
(
image
.
path
,
that
.
qrcode
.
QrCodePaddingLeft
,
that
.
qrcode
.
QrCodePaddingTop
,
that
.
qrcode
.
QrCodeSize
,
that
.
qrcode
.
QrCodeSize
);
//绘制头像
ctx
.
arc
(
that
.
qrcode
.
QrCodeSize
/
2
+
that
.
qrcode
.
QrCodePaddingLeft
,
that
.
qrcode
.
QrCodeSize
/
2
+
that
.
qrcode
.
QrCodePaddingTop
,
that
.
qrcode
.
QrCodeSize
/
2
,
0
,
Math
.
PI
*
2
,
false
);
ctx
.
clip
();
//画了圆 再剪切 原始画布中剪切任意形状和尺寸。一旦剪切了某个区域,则所有之后的绘图都会被限制在被剪切的区域内
}
ctx
.
drawImage
(
image
.
path
,
that
.
qrcode
.
QrCodePaddingLeft
,
that
.
qrcode
.
QrCodePaddingTop
,
that
.
qrcode
.
QrCodeSize
,
that
.
qrcode
.
QrCodeSize
);
//绘制二维码
that
.
drawQrCode
(
ctx
)
that
.
drawQrCode
(
ctx
)
},
},
});
});
...
...
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