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
056a36a3
Commit
056a36a3
authored
Sep 11, 2019
by
赵雅纹
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_7.1.0' into fixbug-ZYW
parents
999f6494
dd43fccb
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
137 additions
and
68 deletions
+137
-68
app.js
src/app.js
+9
-2
app.json
src/app.json
+1
-0
applyRefund.js
src/component/applyRefund/applyRefund.js
+0
-1
personCenter.js
src/component/personCenter/personCenter.js
+21
-18
personCenter.wxml
src/component/personCenter/personCenter.wxml
+18
-4
picNav.js
src/component/picNav/picNav.js
+0
-1
picNav.wxml
src/component/picNav/picNav.wxml
+0
-6
cart.js
src/pages/cart/cart.js
+13
-1
confirmOrder.js
src/pages/confirmOrder/confirmOrder.js
+43
-13
confirmOrder.wxss
src/pages/confirmOrder/confirmOrder.wxss
+1
-0
productDetail.js
src/pages/productDetail/productDetail.js
+5
-4
productDetail.wxml
src/pages/productDetail/productDetail.wxml
+6
-7
userCenter.js
src/pages/userCenter/userCenter.js
+0
-2
userCenter.wxml
src/pages/userCenter/userCenter.wxml
+1
-1
project.config.json
src/project.config.json
+18
-3
subPage.js
src/subPackage/page/pages/subPage/subPage.js
+0
-1
subPage.wxml
src/subPackage/page/pages/subPage/subPage.wxml
+1
-1
wxService.js
src/utils/wxService.js
+0
-3
No files found.
src/app.js
View file @
056a36a3
...
...
@@ -8,6 +8,7 @@ var cityJson = require('utils/city.js')
var
wxService
=
require
(
'utils/wxService'
)
let
config
=
require
(
'./configScreen/configScreen'
);
const
envInfo
=
require
(
'config/index'
).
envInfo
let
isPlusVip
=
false
App
({
onLaunch
:
function
(
e
)
{
...
...
@@ -38,8 +39,14 @@ App({
},
onShow
:
function
(
options
=
{})
{
console
.
log
(
'app-onshow'
,
options
)
const
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
const
{
registerTime
=
''
}
=
baseUserInfo
.
member
// ios 兼容 是不是plus vip
let
currentEndTime
=
(
new
Date
(
registerTime
.
replace
(
/-/g
,
'/'
))).
getTime
();
// 过期时间
let
currentTime
=
(
new
Date
()).
getTime
();
// 现在时间
this
.
globalData
.
isPlusVip
=
currentTime
>=
currentEndTime
?
true
:
false
if
(
options
.
referrerInfo
&&
options
.
referrerInfo
.
extraData
!=
null
){
const
{
activate_ticket
,
card_id
,
code
,
errCode
,
wx_activate_after_submit_url
}
=
options
.
referrerInfo
.
extraData
let
urlData
=
wx_activate_after_submit_url
.
split
(
"?"
);
...
...
@@ -114,7 +121,7 @@ App({
isFullSucreen
:
false
,
// 当前设备是否为 FullSucreen
commonFunc
:
commonFunc
,
contants
:
contants
,
isPlusVip
:
isPlusVip
,
cityJson
:
cityJson
,
// brandId: 2711,
// brandId: 2005,
...
...
src/app.json
View file @
056a36a3
...
...
@@ -18,6 +18,7 @@
"pages/cart/cart"
,
"pages/my/my"
,
"pages/my_1/my"
,
"pages/my_11/my"
,
"pages/wantToBuyDetail/wantToBuyDetail"
,
"pages/myShare/myShare"
,
"pages/productDetail/productDetail"
,
...
...
src/component/applyRefund/applyRefund.js
View file @
056a36a3
...
...
@@ -22,7 +22,6 @@ Component({
*/
methods
:
{
selectCoupon
()
{
console
.
log
(
'2222'
)
this
.
setData
({
isSelect
:
!
this
.
data
.
isSelect
})
...
...
src/component/personCenter/personCenter.js
View file @
056a36a3
...
...
@@ -5,6 +5,10 @@ const envInfo = require('../../config/index').envInfo
Component
({
properties
:
{
currentHasUserInfo
:{
type
:
Boolean
,
type
:
false
},
personData
:
{
type
:
Object
,
value
:
{},
...
...
@@ -21,16 +25,6 @@ Component({
type
:
Object
,
value
:
{},
observer
:
'_userInfoChange'
// observer(newVal, oldVal){
// console.log('---newVal',newVal,oldVal)
// if (newVal !== oldVal) {
// this.setData({
// memberActivateStatus: newVal && newVal.memberActivateStatus || false,
// memberCardNo: newVal && newVal.memberCardNo || '',
// currentMobile: newVal && newVal.member && newVal.member.mobile || '',
// })
// }
// }
},
couponNum
:
{
type
:
Number
,
...
...
@@ -60,7 +54,9 @@ Component({
_token
:
''
,
currentMobile
:
''
,
baseImgUrl
:
''
,
storgeUserInfo
:
wx
.
getStorageSync
(
'_baseUserInfo'
)
storgeUserInfo
:
wx
.
getStorageSync
(
'_baseUserInfo'
),
isPlusVip
:
false
,
currentPlusStyle
:
null
},
observers
:
{
'**'
:
function
(
e
)
{
...
...
@@ -68,17 +64,24 @@ Component({
},
},
attached
()
{
const
{
isPlusVip
,
imageUrl
}
=
app
.
globalData
const
{
personData
}
=
this
.
data
this
.
setData
({
personCenter
:
this
.
data
.
personData
,
baseImgUrl
:
app
.
globalData
.
imageUrl
personCenter
:
personData
,
baseImgUrl
:
imageUrl
,
isPlusVip
,
currentPlusStyle
:
isPlusVip
?
personData
.
plus
.
filter
(
item
=>
item
.
purchased
==
1
)[
0
]
:
personData
.
plus
.
filter
(
item
=>
item
.
purchased
==
0
)[
1
]
},()
=>
{
console
.
log
(
'aaaaaaaaaa'
,
this
.
data
.
currentPlusStyle
)
})
// let base64 = wx.getFileSystemManager().readFileSync(this.data.baseUrl, "base64");
// this.setData({
// baseUrl: "data:image/png;base64," + base64
// })
},
methods
:
{
_getUserInfo
(
res
=
{})
{
wxService
.
nextTick
(()
=>
{
this
.
triggerEvent
(
'getAuth'
,
res
);
})
},
_userInfoChange
(
newVal
,
oldVal
)
{
if
(
newVal
!==
oldVal
)
{
this
.
setData
({
...
...
src/component/personCenter/personCenter.wxml
View file @
056a36a3
<!--component/personCenter/personCenter.wxml-->
<wxs src="../../wxs/utils.wxs" module="utils" />
<view wx:if='{{!currentMobile}}' class="member-unActive {{personCenter.noactiveBackgroundImageUrl ?'':'member-unActive-bgc'}}" bindtap="handleTtoActiveMemebr">
<image src="{{utils.formateUrl(personCenter.noactiveBackgroundImageUrl,baseImgUrl)}}" class="no-active-img" mode="widthFix" />
<image
wx:if="{{currentHasUserInfo}}"
src="{{utils.formateUrl(personCenter.noactiveBackgroundImageUrl,baseImgUrl)}}"
class="no-active-img"
mode="widthFix"
/>
<button
wx:if="{{!currentHasUserInfo}}"
bindgetuserinfo="_getUserInfo"
data-jflag="false"
open-type='getUserInfo'
class='btn df'
hover-class="btn-hover"
style="height:100%"
>
<image src="{{utils.formateUrl(personCenter.noactiveBackgroundImageUrl,baseImgUrl)}}" class="no-active-img" mode="widthFix" />
</button>
</view>
<view
wx:if='{{currentMobile}}'
...
...
@@ -42,8 +58,6 @@
</view>
<!--plus-->
<view class='df tc person-num' wx:if='{{currentMobile}}'>
<!--plus--
>
<image class="" src='{{currentPlusStyle.imageUrl}}' mode="widthFix" /
>
</view>
<authorization-modal isAuthorization='{{isAuthorization}}' />
src/component/picNav/picNav.js
View file @
056a36a3
...
...
@@ -57,7 +57,6 @@ Component({
// 获取当前帐号信息
const
userInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
console
.
log
(
'curItemType'
,
curItemType
)
// link row
if
(
curItemType
.
link
)
{
let
currentClickType
=
app
.
globalData
.
commonFunc
.
getLink
(
curItemType
.
link
.
type
,
curItemType
)
...
...
src/component/picNav/picNav.wxml
View file @
056a36a3
...
...
@@ -44,10 +44,4 @@
</view>
</view>
<authorization-modal
isAuthorization='{{isAuthorization}}'
bind:activeTocard="activeTocard"
isAuthorizationType="{{isAuthorizationType}}"
isAuthorizationActiveText="{{isAuthorizationActiveText}}"
/>
src/pages/cart/cart.js
View file @
056a36a3
...
...
@@ -241,8 +241,8 @@ wxService.page({
// let parmas = {
// trolleySku2Buy: JSON.stringify(trolleySku2Buy)
// }
let
tradeDto
=
{
couponId
:
''
,
trolleySku2Buy
:
JSON
.
stringify
(
trolleySku2Buy
)
}
const
parmas
=
tradeDto
...
...
@@ -250,6 +250,18 @@ wxService.page({
wxService
.
router
(
'/pages/confirmOrder/confirmOrder'
)
.
search
(
parmas
)
// let tradeDto = {
// couponId: '',
// trolleySku2Buy:JSON.stringify(trolleySku2Buy)
// }
// const parmas = tradeDto
// wxService
// .router('/pages/confirmOrder/confirmOrder')
// .search(parmas)
// 直接调支付
// this.handleGoBuy(skuIds)
},
...
...
src/pages/confirmOrder/confirmOrder.js
View file @
056a36a3
...
...
@@ -7,6 +7,8 @@ wxService.page({
* 页面的初始数据
*/
data
:
{
couponId
:
null
,
checkByPremium
:
false
,
addressInfo
:
[],
showSelectCoupon
:
false
,
skuIds
:
[],
...
...
@@ -30,10 +32,16 @@ wxService.page({
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
const
{
couponId
,
trolleySku2Buy
}
=
this
.
options
// const { couponId, trolleySku2Buy } = this.options
// let tradeDto = {
// couponId: couponId,
// trolleySku2Buy: JSON.parse(trolleySku2Buy)
// }
const
{
trolleySku2Buy
}
=
this
.
options
let
tradeDto
=
{
couponId
:
couponId
,
trolleySku2Buy
:
JSON
.
parse
(
trolleySku2Buy
)
}
...
...
@@ -41,8 +49,13 @@ wxService.page({
// 下单 && 计算优惠价
this
.
setData
({
trolleySku2Buy
:
tradeDto
},
()
=>
{
this
.
calPreferentialPrice
(
tradeDto
)
// 计算优惠价
this
.
setData
({
trolleySku2Buy
:
tradeDto
.
trolleySku2Buy
},
()
=>
{
const
{
trolleySku2Buy
,
checkByPremium
}
=
this
.
data
let
params
=
{
checkByPremium
,
trolleySku2Buy
}
this
.
calPreferentialPrice
(
params
)
// 计算优惠价
})
this
.
initCitys
()
...
...
@@ -178,6 +191,20 @@ wxService.page({
handelChangeSelectVip
()
{
this
.
setData
({
isSelect
:
!
this
.
data
.
isSelect
},
()
=>
{
const
{
isSelect
}
=
this
.
data
console
.
log
(
'isSelect'
,
isSelect
)
this
.
setData
({
checkByPremium
:
isSelect
},
()
=>
{
const
{
trolleySku2Buy
,
checkByPremium
}
=
this
.
data
let
params
=
{
checkByPremium
,
trolleySku2Buy
}
this
.
calPreferentialPrice
(
params
)
// 重新计算优惠价
})
})
},
// 默认地址
...
...
@@ -185,11 +212,11 @@ wxService.page({
wxService
.
router
(
'/pages/myAddress/myAddress'
)
},
// 计算优惠价
calPreferentialPrice
(
tradeDto
)
{
calPreferentialPrice
(
params
)
{
wx
.
showLoading
({
title
:
'加载中'
})
wxService
.
post
(
`/sale/trade/buyer/preview`
,
tradeDto
).
then
(
res
=>
{
wxService
.
post
(
`/sale/trade/buyer/preview`
,
params
).
then
(
res
=>
{
if
(
res
)
{
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
...
...
@@ -200,22 +227,25 @@ wxService.page({
})
},
handelGobuy
()
{
const
{
trolleySku2Buy
}
=
this
.
data
this
.
getBill
(
trolleySku2Buy
)
// 下单
const
{
trolleySku2Buy
,
couponId
}
=
this
.
data
let
params
=
{
couponId
,
trolleySku2Buy
}
this
.
getBill
(
params
)
// 下单
},
// 下单
getBill
(
trolleySku2Buy
)
{
getBill
(
params
)
{
wx
.
showLoading
({
title
:
'加载中'
})
wxService
.
post
(
`/sale/trade/buyer/bill`
,
trolleySku2Buy
).
then
(
res
=>
{
wxService
.
post
(
`/sale/trade/buyer/bill`
,
params
).
then
(
res
=>
{
if
(
res
)
{
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
delete
data
.
appId
wx
.
requestPayment
(
Object
.
assign
({
success
(
res
)
{
console
.
log
(
'000000'
,
res
)
wx
.
hideLoading
()
// 支付成功页面
wxService
.
router
(
'/subPackage/page/pages/paymentStatus/paymentStatus'
)
...
...
@@ -223,12 +253,12 @@ wxService.page({
fail
(
res
)
{
wx
.
hideLoading
()
wx
.
showToast
({
title
:
'
支付失败
'
,
title
:
'
已取消
'
,
icon
:
'none'
,
mask
:
true
})
}
},
data
))
},
data
.
wxParams
))
}
}
})
...
...
src/pages/confirmOrder/confirmOrder.wxss
View file @
056a36a3
...
...
@@ -65,6 +65,7 @@
.pro-list{
border-bottom: 1px solid rgba(151,151,151,0.3);
padding:31rpx 0 25rpx;
display: flex;
}
.pro-list:last-child{
border-bottom: none;
...
...
src/pages/productDetail/productDetail.js
View file @
056a36a3
...
...
@@ -24,7 +24,7 @@ wxService.page({
memberLevel
:
false
,
showCardModal
:
false
,
currentShareContent
:
null
,
fromZc
:
false
,
fromZc
:
false
,
},
/**
...
...
@@ -35,10 +35,10 @@ wxService.page({
if
(
options
&&
options
.
id
)
{
this
.
setData
({
productId
:
options
.
id
,
fromZc
:
options
.
fromZc
==
1
fromZc
:
options
.
fromZc
==
1
});
//不是从种草过来的, 需要清除本地临时的触点信息
if
(
!
options
.
fromZc
){
if
(
!
options
.
fromZc
)
{
wx
.
removeStorageSync
(
'TEMP_TENTACLE_INFO'
);
wx
.
removeStorageSync
(
'TIME_EXPIRATION'
);
}
...
...
@@ -239,8 +239,9 @@ wxService.page({
let
parmas
=
{
trolleySku2Buy
:
JSON
.
stringify
(
trolleySku2Buy
)
}
const
{
fromZc
}
=
this
.
data
//判断是否从种草商品过来购买
if
(
fromZc
){
if
(
fromZc
)
{
wxService
.
updateLocalTentacleInfo
();
}
wxService
...
...
src/pages/productDetail/productDetail.wxml
View file @
056a36a3
...
...
@@ -101,7 +101,7 @@
formType="submit"
open-type="navigate"
>
<image src="
https://hwimagecdn.ihotwind.cn/hotwind-mini/images/hotnewicon/bottom-index
.png" mode="widthFix" />
<image src="
/assets/imgs/7_1_0/home_un
.png" mode="widthFix" />
<view>首页</view>
</navigator>
</form>
...
...
@@ -112,22 +112,21 @@
name='nav'
>
<navigator class='get-formId--btn footer-icon' open-type="navigate" url="/pages/cart/cart">
<image class="contact-share-img" src="
https://hwimagecdn.ihotwind.cn/hotwind-mini/images/hotnewicon/bottom-shop-cart
.png" />
<image class="contact-share-img" src="
/assets/imgs/7_1_0/cart_un
.png" />
<view class="add-car-text">购物车</view>
</navigator>
</form>
<form
<
!-- <
form
class='get-formId'
bindsubmit="nav"
report-submit
name='home'
>
<
!-- <
navigator class="get-formId--btn footer-icon">
<navigator class="get-formId--btn footer-icon">
<image src="https://hwimagecdn.ihotwind.cn/hotwind-mini/images/hotnewicon/bottom-kefu.png" mode="widthFix" />
<view class="tab-text">分享</view>
</navigator> -->
</form>
</navigator>
</form> -->
</view>
<block>
<view class="footer-buttons clearfix">
...
...
src/pages/userCenter/userCenter.js
View file @
056a36a3
...
...
@@ -36,7 +36,6 @@ wxService.page({
* 生命周期函数--监听页面加载
*/
onLoad
()
{
console
.
log
(
'onlod'
,
this
.
options
)
this
.
setData
(
{
pages
:
[],
...
...
@@ -78,7 +77,6 @@ wxService.page({
// 取会员卡号
const
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
console
.
log
(
'会员信息------------'
,
baseUserInfo
)
const
cardMember
=
wx
.
getStorageSync
(
'_cardMember'
)
// 登录接口返回err
const
reLoginErrFlag
=
wx
.
getStorageSync
(
'reLoginErr'
)
...
...
src/pages/userCenter/userCenter.wxml
View file @
056a36a3
...
...
@@ -6,7 +6,7 @@
<image-swiper image-data="{{pItem.rotationchart.images}}" />
</view>
<view class="" wx:if="{{pItem.type == 2}}">
<person-center base-user-info="{{baseUserInfo}}" person-data="{{pItem.customer}}" integral-num="{{integralNum}}" coupon-num="{{couponNum}}" token="{{token}}"/>
<person-center b
ind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}" b
ase-user-info="{{baseUserInfo}}" person-data="{{pItem.customer}}" integral-num="{{integralNum}}" coupon-num="{{couponNum}}" token="{{token}}"/>
</view>
<view class="" wx:if="{{pItem.type == 3}}">
<pic-nav pic-nav="{{pItem.navigation.images}}" bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}" bind:updatePage="updatePage"/>
...
...
src/project.config.json
View file @
056a36a3
...
...
@@ -39,7 +39,7 @@
"list"
:
[]
},
"miniprogram"
:
{
"current"
:
4
2
,
"current"
:
4
4
,
"list"
:
[
{
"id"
:
-1
,
...
...
@@ -144,14 +144,14 @@
"id"
:
16
,
"name"
:
"商品详情页"
,
"pathName"
:
"pages/productDetail/productDetail"
,
"query"
:
"
productId=1008190
"
,
"query"
:
"
id=621372413208301568
"
,
"scene"
:
null
},
{
"id"
:
17
,
"name"
:
"确认订单"
,
"pathName"
:
"pages/confirmOrder/confirmOrder"
,
"query"
:
"
couponId=&trolleySku2Buy=[{
\"
count
\"
:1,
\"
skuId
\"
:6134730989010985
00}]"
,
"query"
:
"
trolleySku2Buy=[{
\"
count
\"
:1,
\"
skuId
\"
:6213726287242240
00}]"
,
"scene"
:
null
},
{
...
...
@@ -325,6 +325,21 @@
"id"
:
-1
,
"name"
:
"subPackage/page/pages/goToHome /goToHome"
,
"pathName"
:
"subPackage/page/pages/goToHome/goToHome"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"plus页面"
,
"pathName"
:
"pages/my_1/my"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"plus页面11"
,
"pathName"
:
"pages/my_11/my"
,
"query"
:
""
,
"scene"
:
null
}
]
...
...
src/subPackage/page/pages/subPage/subPage.js
View file @
056a36a3
...
...
@@ -36,7 +36,6 @@ wxService.page({
* 生命周期函数--监听页面加载
*/
onLoad
()
{
console
.
log
(
'onlod'
,
this
.
options
)
this
.
setData
(
{
pages
:
[],
...
...
src/subPackage/page/pages/subPage/subPage.wxml
View file @
056a36a3
...
...
@@ -6,7 +6,7 @@
<image-swiper image-data="{{pItem.rotationchart.images}}" />
</view>
<view class="" wx:if="{{pItem.type == 2}}">
<person-center base-user-info="{{baseUserInfo}}" person-data="{{pItem.customer}}" integral-num="{{integralNum}}" coupon-num="{{couponNum}}" token="{{token}}"/>
<person-center b
ind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}" b
ase-user-info="{{baseUserInfo}}" person-data="{{pItem.customer}}" integral-num="{{integralNum}}" coupon-num="{{couponNum}}" token="{{token}}"/>
</view>
<view class="" wx:if="{{pItem.type == 3}}">
<pic-nav pic-nav="{{pItem.navigation.images}}" bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}" bind:updatePage="updatePage"/>
...
...
src/utils/wxService.js
View file @
056a36a3
...
...
@@ -567,9 +567,7 @@ class WXService extends Http {
_self
.
initAppGlobalDataSync
()
//修改参数
let
pageIsFromShare
=
false
,
tentacleId
=
null
;
console
.
log
(
'args'
,
args
)
args
.
forEach
(
item
=>
{
console
.
log
(
'item==='
,
item
)
if
(
item
[
't'
])
{
pageIsFromShare
=
true
;
tentacleId
=
Integer
.
digit
(
item
[
't'
],
64
,
10
);
...
...
@@ -593,7 +591,6 @@ class WXService extends Http {
config
.
onLoad
&&
config
.
onLoad
.
apply
(
page
,
args
);
},
onShow
:
function
(...
args
)
{
console
.
log
(
'________'
,
args
)
const
page
=
this
_self
.
currentPage
=
page
config
.
onShow
&&
config
.
onShow
.
apply
(
page
,
args
)
...
...
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