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
f71194d8
Commit
f71194d8
authored
Mar 13, 2020
by
谢中龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
种草海报
parent
65262373
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
262 additions
and
30 deletions
+262
-30
app.json
src/app.json
+2
-1
cardModal.js
src/component/cardModal/cardModal.js
+27
-11
waterFlowLayout.wxml
src/component/waterFlowLayout/waterFlowLayout.wxml
+1
-1
extendProduct.js
src/pages/extendProduct/extendProduct.js
+2
-2
myShare.js
src/pages/myShare/myShare.js
+2
-3
myShare.wxml
src/pages/myShare/myShare.wxml
+1
-1
myShare.wxss
src/pages/myShare/myShare.wxss
+1
-1
wantToBuyDetail.wxml
src/pages/wantToBuyDetail/wantToBuyDetail.wxml
+2
-2
project.config.json
src/project.config.json
+9
-2
myValueCard.js
src/subPackage/page/pages/myValueCard/myValueCard.js
+3
-0
myValueCard.wxml
src/subPackage/page/pages/myValueCard/myValueCard.wxml
+1
-1
myValueCardInfo.js
src/subPackage/page/pages/myValueCardInfo/myValueCardInfo.js
+19
-3
shareConfig.js
src/subPackage/page/pages/shareConfig/shareConfig.js
+7
-2
shareArticle.js
src/subPackageA/page/pages/shareArticle/shareArticle.js
+0
-0
shareArticle.json
src/subPackageA/page/pages/shareArticle/shareArticle.json
+5
-0
shareArticle.wxml
src/subPackageA/page/pages/shareArticle/shareArticle.wxml
+29
-0
shareArticle.wxss
src/subPackageA/page/pages/shareArticle/shareArticle.wxss
+151
-0
No files found.
src/app.json
View file @
f71194d8
...
@@ -100,7 +100,8 @@
...
@@ -100,7 +100,8 @@
{
{
"root"
:
"subPackageA/page"
,
"root"
:
"subPackageA/page"
,
"pages"
:
[
"pages"
:
[
"pages/deliveryCode/deliveryCode"
"pages/deliveryCode/deliveryCode"
,
"pages/shareArticle/shareArticle"
]
]
}
}
],
],
...
...
src/component/cardModal/cardModal.js
View file @
f71194d8
...
@@ -57,6 +57,7 @@ Component({
...
@@ -57,6 +57,7 @@ Component({
* 组件的方法列表
* 组件的方法列表
*/
*/
methods
:
{
methods
:
{
//跳转到海报页面
gotoPoster
(){
gotoPoster
(){
// this.setData({
// this.setData({
// showCardModal:false
// showCardModal:false
...
@@ -78,7 +79,7 @@ Component({
...
@@ -78,7 +79,7 @@ Component({
"scene"
:
this
.
data
.
scene
,
"scene"
:
this
.
data
.
scene
,
"width"
:
100
"width"
:
100
}
}
console
.
log
(
this
.
data
.
pagePath
)
wxService
.
post
(
`/marketing/quickMark/getAppQrCodePicture`
,
data
).
then
(
res
=>
{
wxService
.
post
(
`/marketing/quickMark/getAppQrCodePicture`
,
data
).
then
(
res
=>
{
wx
.
hideLoading
();
wx
.
hideLoading
();
const
{
result
,
data
}
=
res
.
data
const
{
result
,
data
}
=
res
.
data
...
@@ -90,17 +91,32 @@ Component({
...
@@ -90,17 +91,32 @@ Component({
console
.
log
(
this
.
data
.
codeImg
)
console
.
log
(
this
.
data
.
codeImg
)
if
(
this
.
data
.
codeImg
)
{
if
(
this
.
data
.
codeImg
)
{
// this.selectComponent('#getPoster').getAvaterInfo()
// this.selectComponent('#getPoster').getAvaterInfo()
let
obj
=
{
if
(
this
.
data
.
product
){
productName
:
this
.
data
.
cardTitle
,
let
obj
=
{
minSalePrice
:
this
.
data
.
product
.
minSalePrice
,
productName
:
this
.
data
.
cardTitle
,
productImg
:
this
.
data
.
cardUrl
,
minSalePrice
:
this
.
data
.
product
.
minSalePrice
,
qrcodeImg
:
this
.
data
.
codeImg
,
productImg
:
this
.
data
.
cardUrl
,
type
:
this
.
data
.
product
.
type
qrcodeImg
:
this
.
data
.
codeImg
,
};
type
:
this
.
data
.
product
.
type
};
wx
.
setStorageSync
(
'shareInfo'
,
obj
)
wx
.
navigateTo
({
url
:
'/subPackage/page/pages/shareConfig/shareConfig'
,
});
}
else
{
let
obj
=
{
productName
:
this
.
data
.
cardTitle
,
productImg
:
this
.
data
.
cardUrl
,
qrcodeImg
:
this
.
data
.
codeImg
,
}
wx
.
navigateTo
({
wx
.
setStorageSync
(
'shareArticle'
,
obj
)
url
:
'/subPackage/page/pages/shareConfig/shareConfig?shareInfo='
+
JSON
.
stringify
(
obj
),
wx
.
navigateTo
({
});
url
:
'/subPackageA/page/pages/shareArticle/shareArticle'
,
});
}
}
}
}
}
})
})
...
...
src/component/waterFlowLayout/waterFlowLayout.wxml
View file @
f71194d8
...
@@ -77,7 +77,7 @@
...
@@ -77,7 +77,7 @@
data-id="{{id}}"
data-id="{{id}}"
data-current-type="{{currentType}}"
data-current-type="{{currentType}}"
>
>
<image class="share-img" src="
https://img3.bigaka.com/prd/3001/202003/20200309/3001843570f0-4ff8-4e72-8d69-9710269420bf
.png" />
<image class="share-img" src="
/assets/imgs/7_1_0/08_22/share
.png" />
<text class="share-number">{{transmitSum || 0}}</text>
<text class="share-number">{{transmitSum || 0}}</text>
</view>
</view>
</view>
</view>
...
...
src/pages/extendProduct/extendProduct.js
View file @
f71194d8
...
@@ -280,10 +280,10 @@ wxService.page({
...
@@ -280,10 +280,10 @@ wxService.page({
type
:
'spread'
,
type
:
'spread'
,
};
};
wx
.
setStorageSync
(
'shareInfo'
,
obj
);
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
'/subPackage/page/pages/shareConfig/shareConfig
?shareInfo='
+
JSON
.
stringify
(
obj
)
,
url
:
'/subPackage/page/pages/shareConfig/shareConfig
'
,
});
});
// this.selectComponent('#getPoster').getAvaterInfo()
}
}
})
})
}
}
...
...
src/pages/myShare/myShare.js
View file @
f71194d8
...
@@ -75,7 +75,6 @@ wxService.page({
...
@@ -75,7 +75,6 @@ wxService.page({
},
},
//根据详情那边过来的点赞分享数据 更改列表中对应的数据
//根据详情那边过来的点赞分享数据 更改列表中对应的数据
updateFavoriteAndShareNumById
(){
updateFavoriteAndShareNumById
(){
console
.
log
(
wx
.
getStorageSync
(
'articleInfo'
))
let
articleInfo
=
wx
.
getStorageSync
(
'articleInfo'
);
let
articleInfo
=
wx
.
getStorageSync
(
'articleInfo'
);
if
(
articleInfo
){
if
(
articleInfo
){
//更新数据
//更新数据
...
@@ -256,7 +255,8 @@ wxService.page({
...
@@ -256,7 +255,8 @@ wxService.page({
// 分享
// 分享
_onTapShare
(
e
){
_onTapShare
(
e
){
const
{
memberId
,
member
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
const
{
memberId
,
member
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
);
e
.
detail
.
title
=
e
.
detail
.
title
?
e
.
detail
.
title
:
e
.
detail
.
headline
;
let
tentacleInfo
=
{
let
tentacleInfo
=
{
content
:
JSON
.
stringify
(
e
.
detail
),
content
:
JSON
.
stringify
(
e
.
detail
),
contentId
:
e
.
detail
.
id
,
contentId
:
e
.
detail
.
id
,
...
@@ -266,7 +266,6 @@ wxService.page({
...
@@ -266,7 +266,6 @@ wxService.page({
}
}
this
.
data
.
currentShareContent
=
e
.
detail
;
this
.
data
.
currentShareContent
=
e
.
detail
;
wxService
.
getTentacleContent
(
tentacleInfo
).
then
(
res
=>
{
wxService
.
getTentacleContent
(
tentacleInfo
).
then
(
res
=>
{
if
(
res
&&
res
.
id
){
if
(
res
&&
res
.
id
){
this
.
data
.
currentShareContent
.
tentacleId
=
res
.
id
;
this
.
data
.
currentShareContent
.
tentacleId
=
res
.
id
;
...
...
src/pages/myShare/myShare.wxml
View file @
f71194d8
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
open-type='getUserInfo'
open-type='getUserInfo'
hover-class="btn-hover"
hover-class="btn-hover"
>
>
<view class="add">
+
</view>
<view class="add">
<image src='/assets/imgs/icon_plus.png' mode='aspectFit'></image>
</view>
</button>
</button>
<view wx:if="{{currentHasUserInfo}}">
<view wx:if="{{currentHasUserInfo}}">
...
...
src/pages/myShare/myShare.wxss
View file @
f71194d8
...
@@ -62,7 +62,7 @@ scroll-view{
...
@@ -62,7 +62,7 @@ scroll-view{
color: #ffffff;
color: #ffffff;
position: fixed;
position: fixed;
right: 25rpx;
right: 25rpx;
bottom:
32
0rpx;
bottom:
23
0rpx;
/* bottom: 35rpx; */
/* bottom: 35rpx; */
z-index: 99;
z-index: 99;
display: flex;
display: flex;
...
...
src/pages/wantToBuyDetail/wantToBuyDetail.wxml
View file @
f71194d8
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
bindgetuserinfo="_getUserInfo"
bindgetuserinfo="_getUserInfo"
open-type='getUserInfo' class="clear-btn">
open-type='getUserInfo' class="clear-btn">
<view class="share-oprate" bindtap="onTapShare">
<view class="share-oprate" bindtap="onTapShare">
<image class="share-img" src="
https://img3.bigaka.com/prd/3001/202003/20200309/3001843570f0-4ff8-4e72-8d69-9710269420bf
.png" />
<image class="share-img" src="
/assets/imgs/7_1_0/08_22/share
.png" />
<text class="share-number">{{contentInfo.transmitSum || 0}}</text>
<text class="share-number">{{contentInfo.transmitSum || 0}}</text>
</view>
</view>
</button>
</button>
...
@@ -73,7 +73,7 @@
...
@@ -73,7 +73,7 @@
</view>
</view>
<view class="share-oprate" bindtap="onTapShare">
<view class="share-oprate" bindtap="onTapShare">
<image class="share-img" src="
https://img3.bigaka.com/prd/3001/202003/20200309/3001843570f0-4ff8-4e72-8d69-9710269420bf
.png" />
<image class="share-img" src="
/assets/imgs/7_1_0/08_22/share
.png" />
<text class="share-number">{{contentInfo.transmitSum || 0}}</text>
<text class="share-number">{{contentInfo.transmitSum || 0}}</text>
</view>
</view>
...
...
src/project.config.json
View file @
f71194d8
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
"list"
:
[]
"list"
:
[]
},
},
"miniprogram"
:
{
"miniprogram"
:
{
"current"
:
6
5
,
"current"
:
1
5
,
"list"
:
[
"list"
:
[
{
{
"id"
:
-1
,
"id"
:
-1
,
...
@@ -149,7 +149,7 @@
...
@@ -149,7 +149,7 @@
"id"
:
16
,
"id"
:
16
,
"name"
:
"商品详情页"
,
"name"
:
"商品详情页"
,
"pathName"
:
"pages/productDetail/productDetail"
,
"pathName"
:
"pages/productDetail/productDetail"
,
"query"
:
"i
=c72c(omX00&t=c8Yp1GGc00
"
,
"query"
:
"i
d=634719195157905408
"
,
"scene"
:
null
"scene"
:
null
},
},
{
{
...
@@ -574,6 +574,13 @@
...
@@ -574,6 +574,13 @@
"pathName"
:
"subPackageA/page/pages/deliveryCode/deliveryCode"
,
"pathName"
:
"subPackageA/page/pages/deliveryCode/deliveryCode"
,
"query"
:
"id=686957183723900928"
,
"query"
:
"id=686957183723900928"
,
"scene"
:
null
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"种草海报"
,
"pathName"
:
"subPackageA/page/pages/shareArticle/shareArticle"
,
"query"
:
""
,
"scene"
:
null
}
}
]
]
}
}
...
...
src/subPackage/page/pages/myValueCard/myValueCard.js
View file @
f71194d8
...
@@ -166,6 +166,9 @@ wxService.page({
...
@@ -166,6 +166,9 @@ wxService.page({
this
.
generatorBarCode
(
canvasId
);
this
.
generatorBarCode
(
canvasId
);
});
});
//改成跳转到详情页
},
},
//关闭
//关闭
...
...
src/subPackage/page/pages/myValueCard/myValueCard.wxml
View file @
f71194d8
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<view class='card-status'>已过期</view>
<view class='card-status'>已过期</view>
</view>
</view>
</view>
</view>
<view class='card-top-info' bindtap='onTap
ShowMoreInfo
' data-item="{{item}}" data-index="{{idx}}">
<view class='card-top-info' bindtap='onTap
ToInfoPage
' data-item="{{item}}" data-index="{{idx}}">
<image class='bg-image {{item.isOpen ? "expand" : "unexpand"}}'
<image class='bg-image {{item.isOpen ? "expand" : "unexpand"}}'
src='{{item.backGroundUrl}}'
src='{{item.backGroundUrl}}'
mode='widthFix'></image>
mode='widthFix'></image>
...
...
src/subPackage/page/pages/myValueCardInfo/myValueCardInfo.js
View file @
f71194d8
...
@@ -72,6 +72,7 @@ wxService.page({
...
@@ -72,6 +72,7 @@ wxService.page({
no
:
obj
.
supValCardCode
no
:
obj
.
supValCardCode
},
()
=>
{
},
()
=>
{
this
.
generatorBarCode
();
this
.
generatorBarCode
();
this
.
startTimer
();
});
});
}
}
});
});
...
@@ -89,9 +90,10 @@ wxService.page({
...
@@ -89,9 +90,10 @@ wxService.page({
no
:
this
.
data
.
no
,
no
:
this
.
data
.
no
,
},
()
=>
{
},
()
=>
{
this
.
generatorBarCode
();
this
.
generatorBarCode
();
wx
.
showToast
({
// wx.showToast({
title
:
'刷新成功!'
,
// title: '已刷新',
});
// icon : 'none'
// });
})
})
}
}
else
{
else
{
...
@@ -104,6 +106,20 @@ wxService.page({
...
@@ -104,6 +106,20 @@ wxService.page({
});
});
},
},
//开始定时任务 每10s调用一下
startTimer
(){
this
.
timer
=
setInterval
(()
=>
{
this
.
onTapRefreshNo
();
},
10000
);
},
//
onUnload
(){
if
(
this
.
timer
){
clearInterval
(
this
.
timer
);
}
},
//生成条形码
//生成条形码
generatorBarCode
()
{
generatorBarCode
()
{
if
(
this
.
data
.
no
)
{
if
(
this
.
data
.
no
)
{
...
...
src/subPackage/page/pages/shareConfig/shareConfig.js
View file @
f71194d8
...
@@ -85,7 +85,7 @@ wxService.page({
...
@@ -85,7 +85,7 @@ wxService.page({
},
},
tempShareLogo
:
''
,
tempShareLogo
:
''
,
username
:
''
,
username
:
''
,
height
:
'1
1
00rpx'
,
height
:
'1
0
00rpx'
,
canvasTempFileUrl
:
''
,
canvasTempFileUrl
:
''
,
btnIsDisabled
:
true
,
btnIsDisabled
:
true
,
isInput
:
false
,
isInput
:
false
,
...
@@ -97,7 +97,7 @@ wxService.page({
...
@@ -97,7 +97,7 @@ wxService.page({
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
let
shareInfo
=
options
.
shareInfo
?
JSON
.
parse
(
options
.
shareInfo
)
:
null
;
let
shareInfo
=
wx
.
getStorageSync
(
'shareInfo'
)
?
wx
.
getStorageSync
(
'shareInfo'
)
:
null
;
this
.
getCurrentUserName
();
this
.
getCurrentUserName
();
wx
.
hideShareMenu
();
wx
.
hideShareMenu
();
if
(
shareInfo
)
{
if
(
shareInfo
)
{
...
@@ -112,6 +112,11 @@ wxService.page({
...
@@ -112,6 +112,11 @@ wxService.page({
}
}
},
},
//頁面销毁
onUnload
(){
wx
.
removeStorageSync
(
'shareInfo'
)
},
/**
/**
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
...
...
src/subPackageA/page/pages/shareArticle/shareArticle.js
0 → 100644
View file @
f71194d8
This diff is collapsed.
Click to expand it.
src/subPackageA/page/pages/shareArticle/shareArticle.json
0 → 100644
View file @
f71194d8
{
"navigationBarTitleText"
:
"种草海报"
,
"usingComponents"
:
{}
}
\ No newline at end of file
src/subPackageA/page/pages/shareArticle/shareArticle.wxml
0 → 100644
View file @
f71194d8
<!--share/share.wxml-->
<view hidden="{{isInput}}" class="canvas-container">
<canvas class='canvas' canvas-id="myCanvas" style="height:{{height}};"></canvas>
</view>
<view class="statistic-img" hidden="{{!isInput}}">
<image src="{{canvasTempFileUrl}}" mode="widthFix"></image>
</view>
<view class="btns-containers">
<view class="edit-btn" bindtap="onTapEditShareContent">编辑文案(限50字)</view>
<view class="save-btn {{btnIsDisabled ? 'disabled' : ''}}" bindtap="onTapSaveImg">保存海报至相册</view>
</view>
<!-- 输入文案 -->
<view class="input-text" hidden="{{!isInput}}">
<view class="input-body">
<textarea placeholder="请设置您的个性化分享海报文案(最多50个字)..."
value="{{inputText}}"
maxlength="50" bindinput="onShareTextInput"></textarea>
<view class="bot-btns">
<view class="mo-btns" bindtap="onTapCancal">取消</view>
<view class="mo-btns reset" bindtap="onTapReset">重置</view>
<view class="mo-btns sure" bindtap="onTapSure">确认</view>
</view>
</view>
</view>
\ No newline at end of file
src/subPackageA/page/pages/shareArticle/shareArticle.wxss
0 → 100644
View file @
f71194d8
/* subPackage/page/pages/shareConfig/shareConfig.wxss */
/* share/share.wxss */
page{
background: #ffffff;
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
view{
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.canvas-container{
display: flex;
justify-content: center;
padding-top: 20rpx;
}
.canvas-container canvas{
box-shadow: 0 0 8rpx 3rpx rgba(0, 0, 0, 0.1);
}
.btns-containers{
/* width: 100%; */
height: auto;
display: flex;
align-items: center;
justify-content: space-between;
/* padding: 30rpx 80rpx; */
width: 562rpx;
margin: auto;
margin-top: 30rpx;
padding-bottom: 30rpx;
}
.btns-containers .save-btn{
background: #cb3c3c;
color: #ffffff;
flex: 1;
height: 80rpx;
border-radius: 35rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 24rpx;
border: solid 2rpx #cb3c3c;
}
.btns-containers .save-btn.disabled{
opacity:0.6;
}
.btns-containers .edit-btn{
background: #ffffff;
color: #cb3c3c;
flex: 0;
min-width: 40%;
max-width: 40%;
height: 80rpx;
border-radius: 35rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 24rpx;
border: solid 2rpx #cb3c3c;
margin-right: 30rpx;
}
.btns-containers .edit-btn:active{
opacity: 0.7;
}
.statistic-img{
width: 100%;
height: auto;
display: flex;
justify-content: center;
}
.statistic-img image{
display: block;
width: 562rpx;
height: 1000rpx;
box-shadow: 0 0 8rpx 6rpx rgba(0, 0, 0, 0.1);
}
.input-text{
position: fixed;
width: 100%;
height: 100%;
z-index: 22;
background: rgba(0,0,0,0.5);
left: 0;
top: 0;
}
.input-body{
position: absolute;
width: 80vw;
height: 28vh;
left: 50%;
margin-left: -40vw;
top: 50%;
margin-top: -20vh;
background: #ffffff;
border-radius: 8rpx;
padding: 30rpx;
display: flex;
flex-direction: column;
padding-bottom: 0;
}
.input-body textarea{
width: 100%;
flex: 1;
color: #333333;
}
.input-body .bot-btns{
flex: 0;
width: 100%;
height: auto;
/* padding-top: 30rpx; */
min-height: 90rpx;
max-height: 90rpx;
border-top: solid 1rpx #eeeeee;
display: flex;
align-items: center;
justify-content: center;
}
.input-body .bot-btns .mo-btns{
flex: 0;
min-width: 33.3%;
max-width: 33.3%;
font-size: 28rpx;
display: flex;
align-items: center;
justify-content: center;
}
.input-body .bot-btns .mo-btns.reset{
border-left: solid 1rpx #eeeeee;
color: #999999;
}
.input-body .bot-btns .mo-btns.sure{
border-left: solid 1rpx #eeeeee;
color: #cb3c3c;
}
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