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
fd813fc2
Commit
fd813fc2
authored
Sep 06, 2019
by
赵雅纹
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-zyw-sc' into 'dev_7.1.0'
Feature zyw sc See merge request
!114
parents
d2f7efdc
48276b9f
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
123 additions
and
25 deletions
+123
-25
index.js
src/config/index.js
+4
-4
inviteFriends.js
src/palette/inviteFriends.js
+25
-3
grassCommunity.js
src/subPackage/page/pages/grassCommunity/grassCommunity.js
+7
-1
share.js
src/subPackage/page/pages/share/share.js
+27
-4
share.wxml
src/subPackage/page/pages/share/share.wxml
+13
-3
share.wxss
src/subPackage/page/pages/share/share.wxss
+47
-10
No files found.
src/config/index.js
View file @
fd813fc2
...
@@ -15,10 +15,10 @@ const testCtx = 'https://crm-b.bigaka.net/api' // 发测试时解开此注释
...
@@ -15,10 +15,10 @@ const testCtx = 'https://crm-b.bigaka.net/api' // 发测试时解开此注释
const
preCtx
=
'https://crm-b.bigaka.com/api'
// 发预生产时解开此注释
const
preCtx
=
'https://crm-b.bigaka.com/api'
// 发预生产时解开此注释
const
prodCtx
=
'https://crm-b.bigaka.com/api'
// 发生产时解开此注释
const
prodCtx
=
'https://crm-b.bigaka.com/api'
// 发生产时解开此注释
const
devImgCtx
=
'http
://testimg3.bigaka.com
'
// 开发环境图片地址
const
devImgCtx
=
'http
s://img3.bigaka.com/test
'
// 开发环境图片地址
const
testImgCtx
=
'http
://testimg3.bigaka.com
'
// 测试环境图片地址
const
testImgCtx
=
'http
s://img3.bigaka.com/test
'
// 测试环境图片地址
const
preImgCtx
=
'http
://testimg3.bigaka.com
'
// 预生产环境图片地址
const
preImgCtx
=
'http
s://img3.bigaka.com/test
'
// 预生产环境图片地址
const
prodImgCtx
=
'http
://testimg3.bigaka.com
'
// 预生产环境图片地址
const
prodImgCtx
=
'http
s://img3.bigaka.com/prd
'
// 预生产环境图片地址
// const prodImgCtx = 'https://img3.bigaka.com' // 生产环境图片地址
// const prodImgCtx = 'https://img3.bigaka.com' // 生产环境图片地址
const
config
=
{
const
config
=
{
...
...
src/palette/inviteFriends.js
View file @
fd813fc2
export
default
class
InviteFriends
{
export
default
class
InviteFriends
{
palette
(
posterImg
,
qrcodeImg
)
{
palette
(
posterImg
,
qrcodeImg
,
userName
,
avatarUrl
)
{
return
({
return
({
width
:
'410rpx'
,
width
:
'410rpx'
,
height
:
'705rpx'
,
height
:
'705rpx'
,
background
:
'#
eee
'
,
background
:
'#
fff
'
,
views
:
[
views
:
[
{
{
type
:
'image'
,
type
:
'image'
,
url
:
posterImg
,
url
:
posterImg
,
css
:
{
css
:
{
width
:
'410rpx'
,
width
:
'410rpx'
,
height
:
'
705
rpx'
height
:
'
540
rpx'
}
}
},
},
{
{
...
@@ -23,6 +23,28 @@ export default class InviteFriends {
...
@@ -23,6 +23,28 @@ export default class InviteFriends {
bottom
:
'43rpx'
,
bottom
:
'43rpx'
,
}
}
},
},
{
type
:
'image'
,
url
:
avatarUrl
,
css
:
{
width
:
'50rpx'
,
height
:
'50rpx'
,
left
:
'23rpx'
,
bottom
:
'43rpx'
,
borderRadius
:
'25rpx'
}
},
{
type
:
'text'
,
text
:
userName
+
'邀请您一起成为会员,共享优惠,赶快扫码加入吧~。'
,
css
:
{
width
:
'180rpx'
,
left
:
'82rpx'
,
bottom
:
'43rpx'
,
fontSize
:
'18rpx'
,
color
:
'#333333'
},
},
],
],
});
});
}
}
...
...
src/subPackage/page/pages/grassCommunity/grassCommunity.js
View file @
fd813fc2
...
@@ -197,7 +197,7 @@ wxService.page({
...
@@ -197,7 +197,7 @@ wxService.page({
success
++
;
//图片上传成功,图片上传成功的变量+1
success
++
;
//图片上传成功,图片上传成功的变量+1
this
.
data
.
params
.
sspList
.
push
({
this
.
data
.
params
.
sspList
.
push
({
cover
:
0
,
cover
:
0
,
url
:
img
.
url
url
:
envInfo
.
imgCtx
+
img
.
url
});
});
that
.
setData
({
that
.
setData
({
'params.sspList'
:
this
.
data
.
params
.
sspList
'params.sspList'
:
this
.
data
.
params
.
sspList
...
@@ -265,6 +265,12 @@ wxService.page({
...
@@ -265,6 +265,12 @@ wxService.page({
'params.headline'
:
e
.
detail
.
value
.
headline
,
'params.headline'
:
e
.
detail
.
value
.
headline
,
'params.article'
:
e
.
detail
.
value
.
article
'params.article'
:
e
.
detail
.
value
.
article
})
})
this
.
data
.
params
.
sspList
.
forEach
((
item
,
index
)
=>
{
if
(
index
==
0
){
item
.
cover
=
1
;
}
});
wxService
.
post
(
`/merchant/contentMobileTerminal/contentSave`
,
this
.
data
.
params
).
then
(
res
=>
{
wxService
.
post
(
`/merchant/contentMobileTerminal/contentSave`
,
this
.
data
.
params
).
then
(
res
=>
{
const
{
result
,
data
}
=
res
.
data
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
if
(
result
==
0
)
{
...
...
src/subPackage/page/pages/share/share.js
View file @
fd813fc2
...
@@ -3,6 +3,9 @@ var app = getApp()
...
@@ -3,6 +3,9 @@ var app = getApp()
const
wxService
=
require
(
'../../../../utils/wxService'
)
const
wxService
=
require
(
'../../../../utils/wxService'
)
const
utils
=
require
(
'../../../../utils/util'
)
const
utils
=
require
(
'../../../../utils/util'
)
import
{
Integer
}
from
'../../../../utils/integerDigitalConvertion'
import
{
Integer
}
from
'../../../../utils/integerDigitalConvertion'
const
{
member
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
const
{
avatarUrl
}
=
wx
.
getStorageSync
(
'_userInfo'
)
// src/pages/xml2can/xml2can.js
// src/pages/xml2can/xml2can.js
...
@@ -23,15 +26,19 @@ wxService.page({
...
@@ -23,15 +26,19 @@ wxService.page({
posterImgData
:[],
posterImgData
:[],
currentPosterImg
:
''
,
currentPosterImg
:
''
,
codeImg
:
''
,
//二维码
codeImg
:
''
,
//二维码
template
:{}
,
template
:{}
},
},
/**
/**
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
onShow
:
function
()
{
onShow
:
function
()
{
this
.
getShareImg
()
},
onLoad
:
function
(){
this
.
getMiniCode
()
this
.
getMiniCode
()
this
.
getShareImg
()
wx
.
hideShareMenu
()
wx
.
hideShareMenu
()
},
},
...
@@ -60,7 +67,7 @@ wxService.page({
...
@@ -60,7 +67,7 @@ wxService.page({
//生成海报
//生成海报
generatePoster
(){
generatePoster
(){
this
.
setData
({
this
.
setData
({
template
:
new
Card
().
palette
(
this
.
data
.
currentPosterImg
,
this
.
data
.
codeImg
),
template
:
new
Card
().
palette
(
this
.
data
.
currentPosterImg
,
this
.
data
.
codeImg
,
member
.
memberWeixin
.
nickname
,
avatarUrl
),
});
});
},
},
...
@@ -98,7 +105,7 @@ wxService.page({
...
@@ -98,7 +105,7 @@ wxService.page({
codeImg
:
"https://hwimagecdn.ihotwind.cn/usr/201908/miniQrCode-f00c5051fef7479395efb193431762c4.jpg"
codeImg
:
"https://hwimagecdn.ihotwind.cn/usr/201908/miniQrCode-f00c5051fef7479395efb193431762c4.jpg"
},()
=>
{
},()
=>
{
this
.
setData
({
this
.
setData
({
template
:
new
Card
().
palette
(
this
.
data
.
posterImgData
[
0
],
this
.
data
.
codeImg
),
template
:
new
Card
().
palette
(
this
.
data
.
posterImgData
[
0
],
this
.
data
.
codeImg
,
member
.
memberWeixin
.
nickname
,
avatarUrl
),
});
});
})
})
}
}
...
@@ -107,6 +114,7 @@ wxService.page({
...
@@ -107,6 +114,7 @@ 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
,
//内容类型
...
@@ -115,16 +123,31 @@ wxService.page({
...
@@ -115,16 +123,31 @@ wxService.page({
}
}
wxService
.
getTentacleContent
(
tentacleInfo
).
then
(
res
=>
{
wxService
.
getTentacleContent
(
tentacleInfo
).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
&&
res
.
tentacleId
)
{
if
(
res
&&
res
.
tentacleId
)
{
wx
.
saveImageToPhotosAlbum
({
wx
.
saveImageToPhotosAlbum
({
filePath
:
this
.
imagePath
,
filePath
:
this
.
imagePath
,
success
(
res
)
{
success
(
res
)
{
console
.
log
(
'3333'
)
setTimeout
(()
=>
{
setTimeout
(()
=>
{
wx
.
showToast
({
wx
.
showToast
({
title
:
'保存成功,请前往相册查看~'
,
title
:
'保存成功,请前往相册查看~'
,
icon
:
'none'
icon
:
'none'
},
2000
)
},
2000
)
})
})
},
fail
(
err
){
console
.
log
(
err
)
let
txt
=
'保存失敗'
;
if
(
err
.
errMsg
==
'saveImageToPhotosAlbum:fail auth deny'
){
txt
=
'获取相册授权失败'
}
setTimeout
(()
=>
{
wx
.
showToast
({
title
:
txt
,
icon
:
'none'
},
2000
)
})
}
}
});
});
}
}
...
...
src/subPackage/page/pages/share/share.wxml
View file @
fd813fc2
...
@@ -9,8 +9,17 @@
...
@@ -9,8 +9,17 @@
<swiper-item class="swiper-item">
<swiper-item class="swiper-item">
<image class="slide-image {{swiperCurrent == index ? 'active' : ''}}" src="{{item}}"
<image class="slide-image {{swiperCurrent == index ? 'active' : ''}}" src="{{item}}"
id="{{index}}"></image>
id="{{index}}"></image>
<view class=""></view>
<view class="poster-bottom" wx:if="{{swiperCurrent == index}}">
<image wx:if="{{swiperCurrent == index}}" class="code-img" src="{{codeImg}}"></image>
<view class="avatar">
<open-data type="userAvatarUrl" />
</view>
<view class="poster-title">
<open-data type="userNickName"></open-data>
<text>邀请您一起成为会员,共享优惠,赶快扫码加入吧~。</text>
</view>
<image class="code-img" src="{{codeImg}}"></image>
</view>
</swiper-item>
</swiper-item>
</block>
</block>
</swiper>
</swiper>
...
@@ -53,7 +62,7 @@
...
@@ -53,7 +62,7 @@
<!-- 测试 -->
<!-- 测试 -->
<view class="test" >
<view class="test" >
<painter customStyle='margin-left:40rpx' palette="{{template}}" bind:imgOK="onImgOK" />
<painter customStyle='margin-left:40rpx
;z-index:-99999
' palette="{{template}}" bind:imgOK="onImgOK" />
</view>
</view>
<!--goHome-->
<!--goHome-->
<go-home />
<go-home />
\ No newline at end of file
src/subPackage/page/pages/share/share.wxss
View file @
fd813fc2
/* subPackage/page/pages/share/share.wxss */
/* subPackage/page/pages/share/share.wxss */
page{
page{
width: 100%;
width: 100%;
background-color: #f9f9f9;
overflow: hidden;
height: 100vh;
/* padding-top: 25rpx; */
}
}
.banner-swiper {
.banner-swiper {
width: 410rpx;
width: 410rpx;
height: 705rpx;
height: 705rpx;
overflow: hidden;
overflow: hidden;
}
}
.page-share{
background: #f9f9f9;
position: relative;
z-index: 9999;
}
swiper {
swiper {
display: block;
display: block;
height: 705rpx;
height: 705rpx;
position: relative;
position: relative;
margin
-top: 25rpx;
padding
-top: 25rpx;
}
}
swiper-item{
swiper-item{
width: 410rpx;
width: 410rpx;
position: relative;
}
}
.slide-image {
.slide-image {
...
@@ -24,21 +35,17 @@ swiper-item{
...
@@ -24,21 +35,17 @@ swiper-item{
margin: 37rpx auto 0;
margin: 37rpx auto 0;
height: 619rpx;
height: 619rpx;
box-shadow: 0px 4rpx 17rpx 0px rgba(0, 0, 0, 0.12);
box-shadow: 0px 4rpx 17rpx 0px rgba(0, 0, 0, 0.12);
}
.swiper-item{
position: relative;
}
}
.code-img{
.code-img{
position: absolute;
position: absolute;
width: 100rpx;
width: 100rpx;
height: 100rpx;
height: 100rpx;
bottom: 43rpx;
bottom: 43rpx;
right:
50
rpx;
right:
24
rpx;
}
}
.active{
.active{
margin-top:0rpx;
margin-top:0rpx;
height:
705
rpx !important;
height:
540
rpx !important;
}
}
.save-btn{
.save-btn{
width: 340rpx;
width: 340rpx;
...
@@ -108,13 +115,42 @@ swiper-item{
...
@@ -108,13 +115,42 @@ swiper-item{
line-height: 26rpx;
line-height: 26rpx;
text-align: center;
text-align: center;
}
}
.poster-bottom{
width: 410rpx;
margin: 0 auto ;
height: 165rpx;
position: relative;
background-color: #ffffff;
box-shadow: 0px 4rpx 17rpx 0px rgba(0, 0, 0, 0.12);
}
.avatar{
width: 50rpx;
height: 50rpx;
border-radius: 50%;
overflow: hidden;
display: inline-block;
position: absolute;
top: 72rpx;
left: 23rpx;
}
.poster-title{
width: 180rpx;
font-size: 18rpx;
color: #333333;
display: inline-block;
position: absolute;
top: 72rpx;
left: 82rpx;
}
/* 测试 */
/* 测试 */
.test{
.test{
position: absolute;
position: absolute;
top
: 0;
bottom
: 0;
transform: translate
X
(100%);
transform: translate
Y
(100%);
width: 100vw;
width: 100vw;
height: 100vh;
height: 100vh;
background: #ffffff;
/* background: #ffffff; */
z-index: -9999;
}
}
\ No newline at end of file
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