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
ab57f58b
Commit
ab57f58b
authored
Sep 09, 2019
by
赵雅纹
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_7.1.0' into feature-zyw-sc
parents
20f50643
2392bdb1
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
147 additions
and
38 deletions
+147
-38
base.wxss
src/base/base.wxss
+1
-1
bottomTabs.wxml
src/component/bottomTabs/bottomTabs.wxml
+4
-4
goHome.wxml
src/component/goHome/goHome.wxml
+4
-2
goHome.wxss
src/component/goHome/goHome.wxss
+13
-3
index.js
src/config/index.js
+1
-2
memberOfOwn.js
src/pages/memberOfOwn/memberOfOwn.js
+40
-6
memberOfOwn.json
src/pages/memberOfOwn/memberOfOwn.json
+2
-3
memberOfOwn.wxml
src/pages/memberOfOwn/memberOfOwn.wxml
+3
-5
memberOfOwn.wxss
src/pages/memberOfOwn/memberOfOwn.wxss
+20
-2
myShare.wxml
src/pages/myShare/myShare.wxml
+14
-2
productDetail.js
src/pages/productDetail/productDetail.js
+0
-1
productDetail.wxml
src/pages/productDetail/productDetail.wxml
+12
-2
productDetail.wxss
src/pages/productDetail/productDetail.wxss
+8
-1
myRelease.wxml
src/subPackage/page/pages/myRelease/myRelease.wxml
+13
-2
util.js
src/utils/util.js
+11
-2
utils.wxs
src/wxs/utils.wxs
+1
-0
No files found.
src/base/base.wxss
View file @
ab57f58b
...
...
@@ -1313,7 +1313,7 @@ a {
white-space: nowrap;
}
button {
background-color:
none
;
background-color:
transparent
;
border-radius:0;
padding: 0;
}
...
...
src/component/bottomTabs/bottomTabs.wxml
View file @
ab57f58b
...
...
@@ -13,26 +13,26 @@
open-type='getUserInfo'
class='btn btn-primary'
hover-class="btn-hover"
style="height: 100%;
background-color: #eee;
"
style="height: 100%;"
>
<image class='tab-img' src="{{utils.formateUrl(currHomePageId == tab.redirectId ? tab.activeImageUrl: tab.imageUrl,baseImgUrl)}}" />
</button>
</view>
<view wx:else class="btn-tab" data-item="{{tab}}" bindtap="handelToPage">
<button class='btn btn-primary' style="height: 100%;
background-color: #eee;
">
<button class='btn btn-primary' style="height: 100%;">
<image class='tab-img' src="{{utils.formateUrl(currHomePageId == tab.redirectId ? tab.activeImageUrl: tab.imageUrl,baseImgUrl)}}" />
</button>
</view>
</view>
<view wx:else class="btn-tab" data-item="{{tab}}" bindtap="handelToPage">
<button class='btn btn-primary' style="height: 100%
;background-color: #eee;
">
<button class='btn btn-primary' style="height: 100%">
<image class='tab-img' src="{{utils.formateUrl(currHomePageId == tab.redirectId ? tab.activeImageUrl: tab.imageUrl,baseImgUrl)}}" />
</button>
</view>
</view>
</block>
</view>
<view class="bottom-tab fixed-bottom0"
style="height: 108rpx;"
wx:if="{{tabBar.num == 5}}">
<view class="bottom-tab fixed-bottom0" wx:if="{{tabBar.num == 5}}">
<block wx:for="{{tabs}}" wx:key="{{index}}" wx:for-item="tab">
<view class="tab" data-item="{{tab}}" bindtap="handelToPage">
<button wx:if="{{currHomePageId == tab.redirectId}}">
...
...
src/component/goHome/goHome.wxml
View file @
ab57f58b
<!--component/goHome/goHome.wxml-->
<view class="bottom-img" bindtap="handelGoHome">
<image class="img-top" mode="widthFix" src="/assets/imgs/7_1_0/go-top.png" bindtap="goTop"></image>
<view class="bottom-img df" bindtap="handelGoHome">
<text>首页</text>
<!--<image class="img-top" mode="widthFix" src="/assets/imgs/7_1_0/go-top.png"></image>-->
</view>
\ No newline at end of file
src/component/goHome/goHome.wxss
View file @
ab57f58b
/* component/goHome/goHome.wxss */
@import './../../base/base.wxss';
.bottom-img{
position: fixed;
bottom: 143rpx;
right: 30rpx;
right: 25rpx;
width: 82rpx;
height: 82rpx;
border-radius: 50%;
color: #fff;
font-size: 24rpx;
background-color: rgba(0, 0, 0, 0.2);
box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
}
.bottom-img .img-top {
width: 8
5
rpx;
height: 8
5
rpx;
width: 8
2
rpx;
height: 8
2
rpx;
}
\ No newline at end of file
src/config/index.js
View file @
ab57f58b
...
...
@@ -4,8 +4,7 @@ const needMock = '' //
// appid_dev_wx wxc3b64b09b1d3dfc2
// appid_test_wx wx857ea77f4f7f4f34
// appid_pre_711 wx358b56af62edbde1
// appid_prod_711 wx700028bf32a3be66 上传生产注意 首页配置接口!!!!!!!!!!!!!!!!!!!!!!
// appid_prod_711 wx700028bf32a3be66
// 1 2 3 步!!!!!!!!!!!!!!!!!!!!!! prod appid brandId
...
...
src/pages/memberOfOwn/memberOfOwn.js
View file @
ab57f58b
...
...
@@ -11,7 +11,7 @@ wxService.page({
* 页面的初始数据
*/
data
:
{
endTime
:
''
,
// 2017-09-01
date
:
''
,
focus
:
false
,
memberCardNo
:
''
,
...
...
@@ -33,7 +33,6 @@ wxService.page({
}
],
index
:
0
,
date
:
''
,
},
bindPickerChange
(
e
)
{
this
.
setData
({
...
...
@@ -45,29 +44,64 @@ wxService.page({
*/
onLoad
(
options
)
{
wx
.
hideShareMenu
();
console
.
log
(
'onload'
)
const
{
memberCardNo
,
memberId
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
// if(memberCardNo){
// }
},
//微信支付
onTapWxPay
()
{
//调用接口回调拼接数据 TODO
this
.
getPayCodeParam
();
},
//获取小程序支付码配置参数
getPayCodeParam
()
{
wxService
.
get
(
`/platform/brand/openOfflinePayView`
).
then
(
res
=>
{
if
(
!
res
)
return
false
;
const
{
result
,
data
}
=
res
&&
res
.
data
||
res
&&
res
.
result
if
(
result
==
0
)
{
wx
.
openOfflinePayView
({
appId
:
data
.
appId
,
nonceStr
:
data
.
nonceStr
,
package
:
data
.
package
,
signType
:
data
.
signType
,
timeStamp
:
data
.
timeStamp
,
paySign
:
data
.
paySign
,
success
:
function
(
res
)
{
console
.
log
(
'success'
,
res
)
},
fail
:
function
(
res
)
{
console
.
log
(
'error'
,
res
)
},
complete
:
function
(
res
)
{
console
.
log
(
'complete'
,
res
)
}
})
// this.setInternal();
}
})
},
/**
* 生命周期函数--监听页面显示
*/
onShow
()
{
console
.
log
(
'onshow'
)
// 取会员卡号
const
{
memberCardNo
,
memberId
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
if
(
memberCardNo
&&
memberId
)
{
// 获取当前日期
const
currentDate
=
utils
.
formatDate
(
new
Date
())
this
.
setData
({
endTime
:
currentDate
},
()
=>
{
this
.
setData
({
memberCardNo
,
memberId
},
()
=>
{
// 获取会员信息
this
.
getMemberFind
()
})
})
}
},
...
...
src/pages/memberOfOwn/memberOfOwn.json
View file @
ab57f58b
{
"navigationBarTitleText"
:
"我的会员"
,
"usingComponents"
:
{
"go-home"
:
"/component/goHome/goHome"
}
"usingComponents"
:
{}
}
\ No newline at end of file
src/pages/memberOfOwn/memberOfOwn.wxml
View file @
ab57f58b
...
...
@@ -17,6 +17,7 @@
</view>
<view class='user-qr-code'>
<canvas canvas-id="barcode" binderror="canvasIdErrorCallback" />
<view class='wx-pay-code' bindtap="onTapWxPay">微信支付</view>
</view>
</view>
...
...
@@ -63,8 +64,7 @@
<picker
mode="date"
value="{{date}}"
start=""
end=""
end="{{endTime}}"
name="birthday"
disabled="{{memberInfo.birthday}}"
bindchange="bindDateChange"
...
...
@@ -109,10 +109,8 @@
</view>
</view>
<button type='primary' class='btn-primary' form-type="submit" style="background-color: rgb(2, 186, 112);">确认</button>
<button type='primary' class='btn-primary
-own
' form-type="submit" style="background-color: rgb(2, 186, 112);">确认</button>
</form>
</view>
<!--goHome-->
<go-home />
</view>
src/pages/memberOfOwn/memberOfOwn.wxss
View file @
ab57f58b
...
...
@@ -59,7 +59,7 @@ page{
background-color: #ffffff;
border-radius: 7rpx;
display: flex;
height:
2
00rpx;
height:
3
00rpx;
flex-direction: column;
justify-content: center;
align-items: center;
...
...
@@ -116,7 +116,7 @@ textarea {
font-size: 26rpx;
}
.btn-primary{
.btn-primary
-own
{
width: 650rpx;
margin-top: 100rpx;
padding-left: 0;
...
...
@@ -125,3 +125,20 @@ textarea {
font-size: 14px;
box-sizing: border-box;
}
.wx-pay-code{
padding-left: 0;
width: 50%;
height: 80rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 14px;
box-sizing: border-box;
margin-top: 40rpx;
color: #ffffff;
background: rgb(2, 186, 112);
}
.wx-pay-code:active{
opacity: 0.7;
}
\ No newline at end of file
src/pages/myShare/myShare.wxml
View file @
ab57f58b
...
...
@@ -25,11 +25,23 @@
</view>
</scroll-view>
</view>
<block wx:if="{{contentPermission}}">
<button
wx:if="{{!currentHasUserInfo}}"
bindgetuserinfo="_getUserInfo"
data-jflag="false"
open-type='getUserInfo'
hover-class="btn-hover"
>
<view class="add">+</view>
</button>
<view wx:if="{{currentHasUserInfo}}">
<block wx:if="{{contentPermission}}">
<navigator open-type="navigate" url="/subPackage/page/pages/grassCommunity/grassCommunity">
<view class="add">+</view>
</navigator>
</block>
</block>
</view>
<card-modal
show-card-modal="{{showCardModal}}"
card-title="{{cardTitle}}"
...
...
src/pages/productDetail/productDetail.js
View file @
ab57f58b
...
...
@@ -103,7 +103,6 @@ wxService.page({
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
console
.
log
(
'0this.data.currentHasUserInfo'
,
this
.
data
.
currentHasUserInfo
)
this
.
getProInfo
()
this
.
getOpenStatus
()
this
.
data
.
currentShareContent
=
null
...
...
src/pages/productDetail/productDetail.wxml
View file @
ab57f58b
...
...
@@ -30,7 +30,17 @@
<text class="price">¥618</text>
<text class="cost-price">¥888</text>
</view>
<view class="share-wrap" bindtap="onTapShare">
<button
wx:if="{{!currentHasUserInfo}}"
bindgetuserinfo="_getUserInfo"
data-jflag="false"
open-type='getUserInfo'
hover-class="btn-hover"
>
<image class="share-img" src="/assets/imgs/share.png" />
<text class="share-text">分享</text>
</button>
<view wx:if="{{currentHasUserInfo}}" class="share-wrap" bindtap="onTapShare">
<image class="share-img" src="/assets/imgs/share.png" />
<text class="share-text">分享</text>
</view>
...
...
@@ -129,7 +139,7 @@
name='nav'
wx:if="{{!fromZc}}"
>
<button class="cart-button get-formId--btn" formType="submit"
>加入购物车</button>
<button class="cart-button get-formId--btn" formType="submit">加入购物车</button>
</form>
<form
class='get-formId get-formId--form'
...
...
src/pages/productDetail/productDetail.wxss
View file @
ab57f58b
/* pages/productDetail/productDetail.wxss */
@import './../../base/base.wxss';
page{
padding-bottom: 100rpx;
}
.swiper-image{
width: 100%;
}
.product-price {
display: flex;
justify-content: space-between;
align-items: center;
}
.dots{
position: absolute;
left: 0;
...
...
@@ -70,7 +77,7 @@ page{
margin-left: 8rpx;
}
.price-wrap{
display: inline-block
;
flex: 1
;
}
.product-name{
color: #333333;
...
...
src/subPackage/page/pages/myRelease/myRelease.wxml
View file @
ab57f58b
...
...
@@ -12,11 +12,22 @@
<view class="diy-banner">
<image src="{{bannerUrl}}" />
</view>
<block wx:if="{{contentPermission}}">
<button
wx:if="{{!currentHasUserInfo}}"
bindgetuserinfo="_getUserInfo"
data-jflag="false"
open-type='getUserInfo'
hover-class="btn-hover"
>
<view class="add">+</view>
</button>
<view wx:if="{{currentHasUserInfo}}">
<block wx:if="{{contentPermission}}">
<navigator open-type="navigate" url="/subPackage/page/pages/grassCommunity/grassCommunity">
<view class="add">+</view>
</navigator>
</block>
</block>
</view>
<!--goHome-->
<go-home/>
<water-flow-layout
...
...
src/utils/util.js
View file @
ab57f58b
...
...
@@ -14,6 +14,15 @@ const formatTime = date => {
return
[
year
,
month
,
day
].
map
(
formatNumber
).
join
(
'/'
)
+
' '
+
[
hour
,
minute
,
second
].
map
(
formatNumber
).
join
(
':'
)
}
/*格式化日期 2017-09-01*/
const
formatDate
=
date
=>
{
const
year
=
date
.
getFullYear
()
const
month
=
date
.
getMonth
()
+
1
const
day
=
date
.
getDate
()
return
[
year
,
month
,
day
].
map
(
formatNumber
).
join
(
'-'
)
}
/* 获取当前页url */
function
getCurrentPageUrl
()
{
var
pages
=
getCurrentPages
()
// 获取加载的页面
...
...
@@ -285,8 +294,7 @@ const formatNumber = n => {
}
function
_getUserInfo
(
ev
)
{
console
.
log
(
'iiiiiiiiiiiiii'
,
ev
)
const
userInfo
=
ev
.
detail
const
userInfo
=
ev
.
detail
||
ev
return
getUserInfoByBtn
(
userInfo
).
then
((
data
=
{})
=>
{
const
{
token
}
=
data
wx
.
setStorageSync
(
'_accreditUserInfo'
,
userInfo
)
...
...
@@ -352,6 +360,7 @@ module.exports = {
// _: underscore,
HandlerDataOnPage
,
formatTime
:
formatTime
,
formatDate
,
getAppUserInfo
,
formatNumber
:
formatNumber
,
logger
:
new
Logger
(),
...
...
src/wxs/utils.wxs
View file @
ab57f58b
...
...
@@ -24,6 +24,7 @@ function formateUrl(url, BASE_IMG_URL){
if(url){
url = url.indexOf('http') > -1 ? url : BASE_IMG_URL + url;
}
console.log('url', url)
return url;
}
...
...
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