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
7ef7e73e
Commit
7ef7e73e
authored
Jan 03, 2020
by
谢中龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化部分功能
parent
2688d89e
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
103 additions
and
48 deletions
+103
-48
index.js
src/config/index.js
+1
-1
userCenter.wxml
src/pages/userCenter/userCenter.wxml
+0
-0
userCenter.wxss
src/pages/userCenter/userCenter.wxss
+16
-0
couponWriteOff.js
src/shoppingGuid/page/pages/couponWriteOff/couponWriteOff.js
+21
-4
couponWriteOff.wxml
...hoppingGuid/page/pages/couponWriteOff/couponWriteOff.wxml
+8
-0
couponWriteOff.wxss
...hoppingGuid/page/pages/couponWriteOff/couponWriteOff.wxss
+30
-0
home.js
src/shoppingGuid/page/pages/home/home.js
+1
-0
moreProducts.wxml
src/shoppingGuid/page/pages/moreProducts/moreProducts.wxml
+1
-1
welfare.wxml
src/shoppingGuid/page/pages/welfare/welfare.wxml
+1
-1
h5page.js
src/subPackage/page/pages/h5/h5page.js
+11
-38
h5page.json
src/subPackage/page/pages/h5/h5page.json
+2
-1
common.js
src/utils/common.js
+2
-2
wxService.js
src/utils/wxService.js
+9
-0
No files found.
src/config/index.js
View file @
7ef7e73e
...
...
@@ -108,7 +108,7 @@ const prod_brand_config = {
plusIsOpen
:
true
,
//是否开启plus
contactUsIsOpen
:
true
,
//是否开启联系我
contactUsPluginId
:
'766c50920993bf9c41c6c3d2761a2df5'
,
//联系我们插件PluginID
hasTrial
:
tru
e
,
// 是否有体验账号
hasTrial
:
fals
e
,
// 是否有体验账号
isMall
:
isMall
,
// 商城或门户 true 商城 false 门户
orderingMustOpenCard
:
false
,
//下单是否必须卡开
},
...
...
src/pages/userCenter/userCenter.wxml
View file @
7ef7e73e
src/pages/userCenter/userCenter.wxss
View file @
7ef7e73e
...
...
@@ -9,6 +9,22 @@ page{
top: 76%;
z-index: 2;
}
/* .cell--bubble{
width:40px !important;
height:40px !important;
border-radius:24px;
text-align:center;
line-height:40px !important;
display:inline-block;
background-color: rgba(0, 0, 0, 0.5) !important;
}
.cell--light_without_border{
width:16px !important;
height:14px !important;
} */
.bottom-fixed{
padding-bottom: 40rpx;
}
...
...
src/shoppingGuid/page/pages/couponWriteOff/couponWriteOff.js
View file @
7ef7e73e
...
...
@@ -11,7 +11,8 @@ wxService.page({
couponId
:
''
,
paramIsError
:
false
,
useStoreId
:
''
,
couponInfo
:
{}
couponInfo
:
{},
subStoreData
:
[]
},
/**
...
...
@@ -38,9 +39,9 @@ wxService.page({
//获取当前登录用户的storeId
getCurrentStoreId
(){
//获取当前登录用户的storeid
let
member
=
wx
.
getStorageSync
(
'
_baseUserInfo'
)
?
wx
.
getStorageSync
(
'_baseUser
Info'
)
:
null
;
let
member
=
wx
.
getStorageSync
(
'
guidBaseInfo'
)
?
wx
.
getStorageSync
(
'guidBase
Info'
)
:
null
;
if
(
member
)
{
this
.
data
.
useStoreId
=
member
.
member
.
s
toreId
;
this
.
data
.
useStoreId
=
member
.
shoppingGuideS
toreId
;
}
else
{
this
.
setData
({
paramIsError
:
true
...
...
@@ -69,8 +70,16 @@ wxService.page({
this
.
data
.
couponInfo
.
notice
=
this
.
data
.
couponInfo
.
notice
.
filter
(
item
=>
item
.
type
!=
1
);
}
let
subStoreData
=
[];
if
(
this
.
data
.
couponInfo
.
couponDetail
){
subStoreData
=
this
.
data
.
couponInfo
.
couponDetail
.
useCondition
?
this
.
data
.
couponInfo
.
couponDetail
.
useCondition
.
subStoreData
:
[];
}
this
.
data
.
subStoreData
=
subStoreData
;
this
.
setData
({
couponInfo
:
this
.
data
.
couponInfo
couponInfo
:
this
.
data
.
couponInfo
,
subStoreData
:
this
.
data
.
subStoreData
});
}
}).
finally
(()
=>
{
...
...
@@ -94,6 +103,14 @@ wxService.page({
//核销优惠券
writeOffCoupon
(){
if
(
!
this
.
data
.
useStoreId
){
wx
.
showToast
({
title
:
'未获取到导购门店信息'
,
icon
:
'none'
});
return
;
}
wx
.
showLoading
({
title
:
'核销中..'
,
});
...
...
src/shoppingGuid/page/pages/couponWriteOff/couponWriteOff.wxml
View file @
7ef7e73e
...
...
@@ -28,6 +28,14 @@
<view class='rg-desc'>{{item.value}}</view>
</view>
</view>
<!-- 适用门店 -->
<view class='use-stores' wx:if="{{subStoreData.length > 0}}">
<view class='use-store-title'>适用门店</view>
<view class='store-item' wx:for="{{subStoreData}}" wx:for-index="idx" wx:for-item="item" wx:key="{{idx}}">
<view>{{item.name}}</view>
<view class='store-code'>{{item.code}}</view>
</view>
</view>
</view>
<!-- 核销按钮 -->
<view class='off'>
...
...
src/shoppingGuid/page/pages/couponWriteOff/couponWriteOff.wxss
View file @
7ef7e73e
...
...
@@ -235,3 +235,32 @@ view{
.comfirm .confirm-body .c-bottom view:active{
opacity: 0.7;
}
.use-stores{
background: #ffffff;
margin-top: 10rpx;
padding: 20rpx;
}
.use-stores .use-store-title{
font-size: 28rpx;
color: #333333;
font-weight: bold;
}
.use-stores .store-item{
padding: 20rpx 0;
border-bottom: solid 2rpx #eeeeee;
color: #333333;
font-size: 24rpx;
}
.use-stores .store-item .store-code{
font-size: 22rpx;
color: #999999;
margin-top: 5rpx;
}
.use-stores .store-item:last-child{
border-bottom: none;
}
\ No newline at end of file
src/shoppingGuid/page/pages/home/home.js
View file @
7ef7e73e
...
...
@@ -53,6 +53,7 @@ wxService.page({
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
console
.
log
(
'guidBaseInfo----'
,
wx
.
getStorageSync
(
'guidBaseInfo'
))
this
.
getCouponList
();
this
.
getGoodsList
();
},
...
...
src/shoppingGuid/page/pages/moreProducts/moreProducts.wxml
View file @
7ef7e73e
...
...
@@ -24,7 +24,7 @@
<image class='goods-lf-icon' src='{{item.productImgUrl}}' mode='aspectFit'></image>
<view class='goods-rg-info'>
<view class='goods-title'>{{item.productName}}</view>
<
view class='goods-second-title'>这个是说明</view
>
<
!-- <view class='goods-second-title'>这个是说明</view> --
>
<view class='goods-price'>
<view class='price'>
<view class='plus'>
...
...
src/shoppingGuid/page/pages/welfare/welfare.wxml
View file @
7ef7e73e
...
...
@@ -66,7 +66,7 @@
<image class='goods-lf-icon' src='{{item.productImgUrl}}' mode='aspectFit'></image>
<view class='goods-rg-info'>
<view class='goods-title'>{{item.productName}}</view>
<
view class='goods-second-title'>这个是商品的描述</view
>
<
!-- <view class='goods-second-title'>这个是商品的描述</view> --
>
<view class='goods-price'>
<view class='price'>
<view class='plus'>
...
...
src/subPackage/page/pages/h5/h5page.js
View file @
7ef7e73e
...
...
@@ -7,6 +7,7 @@ wxService.page({
*/
data
:
{
path
:
''
,
title
:
''
,
h5WhitePages
:
[
'/mp6Y/begin.html'
,
'/mp6Y/index.html'
,
...
...
@@ -18,10 +19,17 @@ wxService.page({
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
const
url
=
options
.
url
let
url
=
options
.
url
;
console
.
log
(
options
)
if
(
url
)
{
url
=
decodeURIComponent
(
url
);
this
.
data
.
title
=
options
.
title
;
wx
.
setNavigationBarTitle
({
title
:
this
.
data
.
title
,
});
this
.
setData
({
path
:
`
${
decodeURIComponent
(
url
)}
`
path
:
url
})
}
},
...
...
@@ -43,14 +51,6 @@ wxService.page({
// }
// }
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
:
function
()
{
},
/**
* 生命周期函数--监听页面显示
*/
...
...
@@ -58,33 +58,6 @@ wxService.page({
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
:
function
()
{
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
:
function
()
{
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
},
/**
* 用户点击右上角分享
...
...
@@ -93,7 +66,7 @@ wxService.page({
// 需要 encodeURIComponent path
const
{
path
}
=
this
.
data
const
enCodeUrl
=
encodeURIComponent
(
path
)
let
sharePath
=
`/subPackage/page/pages/h5/h5page?url=
${
enCodeUrl
}
`
let
sharePath
=
`/subPackage/page/pages/h5/h5page?url=
${
enCodeUrl
}
&title=
${
this
.
data
.
title
}
`
return
{
// title: '分享给好友',
path
:
sharePath
,
...
...
src/subPackage/page/pages/h5/h5page.json
View file @
7ef7e73e
{
"navigationBarTitleText"
:
"
h5
"
"navigationBarTitleText"
:
""
}
\ No newline at end of file
src/utils/common.js
View file @
7ef7e73e
...
...
@@ -66,7 +66,7 @@ HandlerLink.prototype = {
// 跳转路径中包括http的跳转到h5页面中,用web-view去加载h5页面
if
(
/http/gi
.
test
(
item
.
link
.
url
))
{
const
enCodeUrl
=
encodeURIComponent
(
item
.
link
.
url
)
return
`/subPackage/page/pages/h5/h5page?url=
${
enCodeUrl
}
`
return
`/subPackage/page/pages/h5/h5page?url=
${
enCodeUrl
}
&title=
${
item
.
link
.
name
}
`
}
return
`/
${
item
.
link
.
url
}
`
}
else
if
(
type
==
7
)
{
...
...
@@ -137,7 +137,7 @@ HandlerLinkRow.prototype = {
// 跳转路径中包括http的跳转到h5页面中,用web-view去加载h5页面
if
(
/http/gi
.
test
(
item
.
link
.
url
))
{
const
enCodeUrl
=
encodeURIComponent
(
item
.
link
.
url
)
return
`/subPackage/page/pages/h5/h5page?url=
${
enCodeUrl
}
`
return
`/subPackage/page/pages/h5/h5page?url=
${
enCodeUrl
}
&title=
${
item
.
link
.
name
}
`
}
return
`/
${
item
.
link
.
url
}
`
}
else
if
(
type
==
7
)
{
...
...
src/utils/wxService.js
View file @
7ef7e73e
...
...
@@ -334,6 +334,15 @@ class WXService extends Http {
item
.
content
=
item
.
content
}
}
//展示开卡页的
if
(
item
.
contentType
==
12
){
if
(
item
.
contentId
)
{
let
content
=
JSON
.
parse
(
item
.
content
)
item
.
contentArr
=
[
content
]
}
else
{
item
.
content
=
item
.
content
}
}
}
//更新本地触点对象信息
...
...
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