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
0192353a
Commit
0192353a
authored
Aug 31, 2020
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
9ab00e09
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
32 deletions
+21
-32
index.vue
pages/live/index.vue
+5
-4
share.vue
pages/live/share.vue
+16
-28
No files found.
pages/live/index.vue
View file @
0192353a
...
...
@@ -23,7 +23,9 @@
<u-row
gutter=
"20"
>
<u-col
span=
"6"
v-for=
"(cx, ci) in g"
:key=
"ci"
>
<view
class=
"good"
@
click=
"clickHandler(cx)"
>
<view
class=
"sharebox"
v-if=
"cx.ExtensionImg&&cx.ExtensionImg!=''"
@
click
.
native
.
stop=
"goshare(cx.ExtensionImg)"
>
<!--
<view
class=
"sharebox"
v-if=
"cx.ExtensionImg&&cx.ExtensionImg!=''"
@
click
.
native
.
stop=
"goshare(cx.ExtensionImg)"
>
-->
<view
class=
"sharebox"
v-if=
"cx.ExtensionImg&&cx.ExtensionImg!=''"
@
click
.
native
.
stop=
"goshare(cx.ExtensionImg,
cx.LiveQrCodePaddingTop,cx.LiveQrCodePaddingLeft,cx.LiveQrCodeSize,cx.LiveQrCodeType)"
>
<image
src=
"../../static/images/share.png"
mode=
"widthFix"
class=
"share"
/>
</view>
<!--
<view
class=
"good-img"
:style=
"
{ 'background-image': 'url(' + (cx.cover_img ? cx.cover_img : '') + ')', backgroundSize: '100% 100%' }"> -->
...
...
@@ -170,9 +172,8 @@ export default {
}
},
methods
:
{
goshare
(
img
){
console
.
log
(
img
)
uni
.
navigateTo
({
url
:
'/pages/live/share?pic='
+
img
});
goshare
(
img
,
top
,
left
,
size
,
type
){
uni
.
navigateTo
({
url
:
'/pages/live/share?pic='
+
img
+
'&top='
+
top
+
'&left='
+
left
+
'&size='
+
size
+
'&type='
+
type
});
},
initPage
()
{
let
currentPages
=
getCurrentPages
();
...
...
pages/live/share.vue
View file @
0192353a
...
...
@@ -26,7 +26,8 @@ export default {
qrCodeSize
:
126
,
//二维码宽高
qrCodeLeft
:
595
,
//二维码左边距
qrCodeTop
:
1200
,
//二维码上边距
halfCode
:
63
//二维码一半高度
halfCode
:
63
,
//二维码一半高度
type
:
0
,
//二维码形状(0-圆形,1-方形)
};
},
created
()
{
...
...
@@ -36,25 +37,24 @@ export default {
this
.
UserInfo
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
)
:
{};
this
.
qrCodeConfig
=
uni
.
getStorageSync
(
'basedata'
)
?
uni
.
getStorageSync
(
'basedata'
).
liveConfig
:
{};
if
(
this
.
qrCodeConfig
){
if
(
this
.
qrCodeConfig
.
LiveQrCodePaddingLeft
){
this
.
qrCodeLeft
=
this
.
qrCodeConfig
.
LiveQrCodePaddingLeft
;
}
if
(
this
.
qrCodeConfig
.
LiveQrCodePaddingTop
){
this
.
qrCodeTop
=
this
.
qrCodeConfig
.
LiveQrCodePaddingTop
;
}
if
(
this
.
qrCodeConfig
.
LiveQrCodeSize
){
this
.
qrCodeSize
=
this
.
qrCodeConfig
.
LiveQrCodeSize
;
this
.
halfCode
=
parseInt
(
this
.
qrCodeConfig
.
LiveQrCodeSize
/
2
);
}
}
},
onLoad
(
option
)
{
this
.
bgPic
=
option
.
pic
??
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1597312414000_253.jpg"
;
if
(
option
.
left
){
this
.
qrCodeLeft
=
parseInt
(
option
.
left
);
}
if
(
option
.
top
){
this
.
qrCodeTop
=
parseInt
(
option
.
top
);
}
if
(
option
.
size
){
this
.
qrCodeSize
=
parseInt
(
option
.
size
);
this
.
halfCode
=
parseInt
(
option
.
size
/
2
);
}
if
(
option
.
type
){
this
.
type
=
parseInt
(
option
.
type
);
}
},
onReady
()
{
this
.
init
();
...
...
@@ -66,24 +66,11 @@ export default {
},
methods
:
{
init
()
{
// uni.showNavigationBarLoading();
// this.request2(
// {
// url: "/api/AppletUser/GetFenXiaoPoster",
// data: {},
// },
// (res) => {
// uni.hideNavigationBarLoading();
// this.qrcode = res.data;
// this.getWeiXinQRCode();
// }
// );
this
.
getWeiXinQRCode
();
},
getWeiXinQRCode
()
{
let
that
=
this
;
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
;
...
...
@@ -126,6 +113,7 @@ export default {
ctx
.
save
();
ctx
.
beginPath
();
// ctx.arc(595 + 63, 1200 + 63, 63, 0, Math.PI * 2);
ctx
.
arc
(
that
.
qrCodeLeft
+
that
.
halfCode
,
that
.
qrCodeTop
+
that
.
halfCode
,
that
.
halfCode
,
0
,
Math
.
PI
*
2
);
ctx
.
setFillStyle
(
"#ffffff"
);
ctx
.
fill
();
...
...
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