Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
7
7-Eleven
Overview
Overview
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
高淑倩
7-Eleven
Commits
be8bdd6f
Commit
be8bdd6f
authored
Oct 11, 2019
by
赵雅纹
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fixbug-ZYW' into 'dev_7.1.0'
Fixbug zyw See merge request
!167
parents
a87f27d0
60a3f423
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
22 deletions
+64
-22
inviteFriends.js
src/palette/inviteFriends.js
+5
-2
share.js
src/subPackage/page/pages/share/share.js
+47
-20
util.js
src/utils/util.js
+12
-0
No files found.
src/palette/inviteFriends.js
View file @
be8bdd6f
...
@@ -3,7 +3,6 @@
...
@@ -3,7 +3,6 @@
export
default
class
InviteFriends
{
export
default
class
InviteFriends
{
palette
(
posterImg
,
qrcodeImg
,
userName
,
avatarUrl
,
options
)
{
palette
(
posterImg
,
qrcodeImg
,
userName
,
avatarUrl
,
options
)
{
//获取图片的长宽
//获取图片的长宽
console
.
log
(
options
)
let
posterImgWidth
=
0
,
posterImgHeight
=
280
;
let
posterImgWidth
=
0
,
posterImgHeight
=
280
;
if
(
options
){
if
(
options
){
posterImgWidth
=
options
.
posterImgWidth
?
options
.
posterImgWidth
:
0
;
posterImgWidth
=
options
.
posterImgWidth
?
options
.
posterImgWidth
:
0
;
...
@@ -13,6 +12,10 @@ export default class InviteFriends {
...
@@ -13,6 +12,10 @@ export default class InviteFriends {
}
}
}
}
console
.
log
(
avatarUrl
)
let
windowWidth
=
options
.
windowWidth
;
return
({
return
({
width
:
'750rpx'
,
width
:
'750rpx'
,
height
:
'705rpx'
,
height
:
'705rpx'
,
...
@@ -22,7 +25,7 @@ export default class InviteFriends {
...
@@ -22,7 +25,7 @@ export default class InviteFriends {
type
:
'image'
,
type
:
'image'
,
url
:
posterImg
,
url
:
posterImg
,
css
:
{
css
:
{
width
:
'375
px'
,
width
:
windowWidth
+
'
px'
,
height
:
posterImgHeight
+
'px'
height
:
posterImgHeight
+
'px'
}
}
},
},
...
...
src/subPackage/page/pages/share/share.js
View file @
be8bdd6f
...
@@ -66,21 +66,30 @@ wxService.page({
...
@@ -66,21 +66,30 @@ wxService.page({
//生成海报
//生成海报
generatePoster
(){
generatePoster
(){
console
.
log
(
this
.
data
.
currentPosterImg
)
let
_this
=
this
;
let
_this
=
this
;
wx
.
getImageInfo
({
wx
.
getSystemInfo
({
src
:
this
.
data
.
currentPosterImg
,
success
:
function
(
system
)
{
success
:
function
(
res
)
{
wx
.
getImageInfo
({
let
posterImgWidth
=
res
.
width
,
src
:
this
.
data
.
currentPosterImg
,
posterImgHeight
=
res
.
height
;
success
:
function
(
res
)
{
_this
.
setData
({
let
posterImgWidth
=
res
.
width
,
template
:
new
Card
().
palette
(
_this
.
data
.
currentPosterImg
,
posterImgHeight
=
res
.
height
;
_this
.
data
.
codeImg
,
_this
.
setData
({
member
.
memberWeixin
.
nickname
,
template
:
new
Card
().
palette
(
_this
.
data
.
currentPosterImg
,
avatarUrl
,
{
posterImgWidth
:
posterImgWidth
,
posterImgHeight
:
posterImgHeight
}),
_this
.
data
.
codeImg
,
});
member
.
memberWeixin
.
nickname
,
avatarUrl
,
{
posterImgWidth
:
posterImgWidth
,
posterImgHeight
:
posterImgHeight
,
windowWidth
:
system
.
windowWidth
,
windowHeight
:
system
.
windowHeight
}),
});
}
})
}
}
})
});
},
},
...
@@ -104,7 +113,7 @@ wxService.page({
...
@@ -104,7 +113,7 @@ wxService.page({
//获取二维码
//获取二维码
getMiniCode
()
{
getMiniCode
()
{
const
urls
=
utils
.
getCurrentPageUrlWithArgs
()
const
urls
=
utils
.
getCurrentPageUrlWithArgs
()
let
_this
=
this
;
let
data
=
{
let
data
=
{
"autoColor"
:
true
,
"autoColor"
:
true
,
"page"
:
'pages/userCenter/userCenter'
,
"page"
:
'pages/userCenter/userCenter'
,
...
@@ -113,15 +122,35 @@ wxService.page({
...
@@ -113,15 +122,35 @@ wxService.page({
}
}
wxService
.
post
(
`/marketing/quickMark/getAppQrCodePicture`
,
data
).
then
(
res
=>
{
wxService
.
post
(
`/marketing/quickMark/getAppQrCodePicture`
,
data
).
then
(
res
=>
{
const
{
result
,
data
}
=
res
.
data
const
{
result
,
data
}
=
res
.
data
console
.
log
(
app
.
globalData
.
imageUrl
+
data
)
if
(
result
==
0
)
{
if
(
result
==
0
)
{
this
.
setData
({
this
.
setData
({
codeImg
:
app
.
globalData
.
imageUrl
+
data
codeImg
:
app
.
globalData
.
imageUrl
+
data
// codeImg: "https://hwimagecdn.ihotwind.cn/usr/201908/miniQrCode-f00c5051fef7479395efb193431762c4.jpg"
// codeImg: "https://hwimagecdn.ihotwind.cn/usr/201908/miniQrCode-f00c5051fef7479395efb193431762c4.jpg"
},()
=>
{
},()
=>
{
this
.
setData
({
template
:
new
Card
().
palette
(
this
.
data
.
posterImgData
[
0
],
this
.
data
.
codeImg
,
member
.
memberWeixin
.
nickname
,
avatarUrl
,
wx
),
wx
.
getSystemInfo
({
});
success
:
function
(
system
)
{
wx
.
getImageInfo
({
src
:
_this
.
data
.
posterImgData
[
0
],
success
:
function
(
res
)
{
let
posterImgWidth
=
res
.
width
,
posterImgHeight
=
res
.
height
;
_this
.
setData
({
template
:
new
Card
().
palette
(
_this
.
data
.
posterImgData
[
0
],
_this
.
data
.
codeImg
,
member
.
memberWeixin
.
nickname
,
avatarUrl
,
{
posterImgWidth
:
posterImgWidth
,
posterImgHeight
:
posterImgHeight
,
windowWidth
:
system
.
windowWidth
,
windowHeight
:
system
.
windowHeight
}),
});
}
})
}
})
})
})
}
}
})
})
...
@@ -129,7 +158,6 @@ wxService.page({
...
@@ -129,7 +158,6 @@ wxService.page({
// 保存海报
// 保存海报
savePoster
(){
savePoster
(){
console
.
log
(
'111'
)
let
tentacleInfo
=
{
let
tentacleInfo
=
{
content
:
"我的邀请页面"
,
content
:
"我的邀请页面"
,
contentType
:
app
.
globalData
.
contants
.
SHARE_TYPE
.
INVITE_FRIENDS
,
//内容类型
contentType
:
app
.
globalData
.
contants
.
SHARE_TYPE
.
INVITE_FRIENDS
,
//内容类型
...
@@ -138,7 +166,6 @@ wxService.page({
...
@@ -138,7 +166,6 @@ wxService.page({
}
}
wxService
.
getTentacleContent
(
tentacleInfo
).
then
(
res
=>
{
wxService
.
getTentacleContent
(
tentacleInfo
).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
&&
res
.
id
)
{
if
(
res
&&
res
.
id
)
{
wx
.
saveImageToPhotosAlbum
({
wx
.
saveImageToPhotosAlbum
({
filePath
:
this
.
imagePath
,
filePath
:
this
.
imagePath
,
...
...
src/utils/util.js
View file @
be8bdd6f
...
@@ -58,6 +58,18 @@ function getAccountInfo() {
...
@@ -58,6 +58,18 @@ function getAccountInfo() {
return
accountInfo
return
accountInfo
}
}
// 获取系统屏幕信息
// function getSystemInfo(){
// wx.getSystemInfo({
// success: function (res) {
// return {
// windowWidth: res.windowWidth,
// windowHeight: res.windowHeight
// }
// }
// })
// }
/**
/**
* 图片宽高比
* 图片宽高比
*/
*/
...
...
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