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
d167bd8b
Commit
d167bd8b
authored
Dec 19, 2019
by
谢中龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化功能
parent
67460242
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
237 additions
and
111 deletions
+237
-111
app.js
src/app.js
+4
-1
personCenter.js
src/component/personCenter/personCenter.js
+2
-1
index.js
src/config/index.js
+11
-0
cart.wxss
src/pages/cart/cart.wxss
+4
-3
couponCodeDetail.js
src/pages/couponCodeDetail/couponCodeDetail.js
+6
-3
memberOfOwn.js
src/pages/memberOfOwn/memberOfOwn.js
+95
-6
memberOfOwn.wxml
src/pages/memberOfOwn/memberOfOwn.wxml
+15
-2
memberOfOwn.wxss
src/pages/memberOfOwn/memberOfOwn.wxss
+0
-0
my.wxml
src/pages/my/my.wxml
+2
-2
userCenter.js
src/pages/userCenter/userCenter.js
+2
-6
userCenter.wxml
src/pages/userCenter/userCenter.wxml
+2
-2
couponWriteOff.js
src/shoppingGuid/page/pages/couponWriteOff/couponWriteOff.js
+13
-16
home.js
src/shoppingGuid/page/pages/home/home.js
+7
-5
kpi.js
src/shoppingGuid/page/pages/kpi/kpi.js
+15
-3
kpi.json
src/shoppingGuid/page/pages/kpi/kpi.json
+3
-1
kpi.wxml
src/shoppingGuid/page/pages/kpi/kpi.wxml
+8
-4
moreCoupons.js
src/shoppingGuid/page/pages/moreCoupons/moreCoupons.js
+3
-3
welfare.js
src/shoppingGuid/page/pages/welfare/welfare.js
+3
-3
categoryPro.js
src/subPackage/page/pages/categoryPro/categoryPro.js
+22
-28
categoryPro.json
src/subPackage/page/pages/categoryPro/categoryPro.json
+1
-0
Http.js
src/utils/Http.js
+2
-3
wxService.js
src/utils/wxService.js
+17
-19
No files found.
src/app.js
View file @
d167bd8b
...
...
@@ -18,7 +18,7 @@ App({
wx
.
setStorageSync
(
'reLoginErr'
,
false
)
try
{
this
.
isFromQiyeConsoleIn
(
e
);
this
.
checkForUpdate
();
let
res
=
wx
.
getSystemInfoSync
();
// 获取当前运行环境
config
.
pixelRate
=
res
.
windowWidth
/
750
;
config
.
platform
=
res
.
platform
;
...
...
@@ -83,6 +83,9 @@ App({
},
onShow
:
function
(
options
=
{})
{
//检查是不是有更新
this
.
checkForUpdate
();
const
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
// 获取当前会员是否是体验者
const
{
member
}
=
baseUserInfo
...
...
src/component/personCenter/personCenter.js
View file @
d167bd8b
...
...
@@ -68,7 +68,7 @@ Component({
},
},
attached
()
{
console
.
log
(
"isvip"
,
this
.
data
.
isVip
)
//
console.log("isvip", this.data.isVip)
const
{
imageUrl
}
=
app
.
globalData
const
{
personData
,
isVip
}
=
this
.
data
this
.
setData
({
...
...
@@ -94,6 +94,7 @@ Component({
},
_userInfoChange
(
newVal
,
oldVal
)
{
if
(
newVal
!==
oldVal
)
{
// console.log(newVal)
this
.
setData
({
memberActivateStatus
:
newVal
&&
newVal
.
memberActivateStatus
||
false
,
memberCardNo
:
newVal
&&
newVal
.
memberCardNo
||
''
,
...
...
src/config/index.js
View file @
d167bd8b
...
...
@@ -57,6 +57,15 @@ const needMock = '' //
* contactUspluginId = a6ea55b56eb09ced8f9aeeaa14383b52 联系我插件id
*/
/**
* 多多一上 生产环境配置
* appId = wxf7bc302c51166dc0 //小程序 appId
* tunnel-token = //token 杨辰提供
* brandId= 2007 //商户Id
* contactUspluginId = 联系我插件id
*/
// appid_dev_wx wxc3b64b09b1d3dfc2
// appid_test_wx wx857ea77f4f7f4f34// wxac09792264c49b5c // 1002商城
...
...
@@ -121,6 +130,8 @@ const envInfo = (() => {
appId
:
appId
[
PROJECT_ENV
],
brandId
:
3001
,
// 1001 1002 3001 3002 //2711 711生产brandId,
plusIsOpen
:
true
,
//是否开启plus
contactUsPluginId
:
'766c50920993bf9c41c6c3d2761a2df5'
,
contactUsIsOpen
:
true
,
//是否开启联系我
}
})()
...
...
src/pages/cart/cart.wxss
View file @
d167bd8b
...
...
@@ -228,10 +228,11 @@ page{
}
.empty{
color: #808080;
text-align: center;
width: 100%;
margin-top: 458rpx;
margin-top: 350rpx;
display: flex;
flex-direction: column;
height: 320rpx;
}
.empty-img{
margin: 0 auto;
...
...
src/pages/couponCodeDetail/couponCodeDetail.js
View file @
d167bd8b
...
...
@@ -24,9 +24,6 @@ wxService.page({
})
// 条形码
if
(
cardno
){
setTimeout
(()
=>
{
wxbarcode
.
barcode
(
'barcode'
,
cardno
,
600
,
180
);
},
200
)
this
.
getCouponDetail
(
cardno
)
}
},
...
...
@@ -54,6 +51,12 @@ wxService.page({
},()
=>
{
wx
.
hideLoading
()
})
// 重新渲染条形码
wxbarcode
.
barcode
(
'barcode'
,
this
.
data
.
cardno
,
600
,
180
);
setTimeout
(()
=>
{
wxbarcode
.
barcode
(
'barcode'
,
this
.
data
.
cardno
,
600
,
180
);
},
200
)
}
else
{
wx
.
hideLoading
()
wx
.
showToast
({
...
...
src/pages/memberOfOwn/memberOfOwn.js
View file @
d167bd8b
...
...
@@ -5,6 +5,22 @@ const utils = require('../../utils/util')
const
envInfo
=
require
(
'../../config/index'
).
envInfo
var
wxbarcode
=
require
(
'../../codeUtils/index.js'
);
var
count
=
0
;
const
COLOR_OBJ
=
{
Color010
:
'#63B359'
,
Color020
:
'#2C9F67'
,
Color030
:
'#509FC9'
,
Color040
:
'#5885CF'
,
Color050
:
'#9062C0'
,
Color060
:
'#D09A45'
,
Color070
:
'#E4B138'
,
Color080
:
'#EE903C'
,
Color081
:
'#F08500'
,
Color082
:
'#A9D92D'
,
Color090
:
'#DD6549'
,
Color100
:
'#CC463D'
,
Color101
:
'#CF3E36'
,
Color102
:
'#5E6671'
,
}
wxService
.
page
({
/**
...
...
@@ -33,6 +49,14 @@ wxService.page({
}
],
index
:
0
,
cardStyle
:
{
bgColor
:
''
,
bgUrl
:
''
},
cardNoOffline
:
''
,
qrCardNo
:
''
,
membershipCardnoType
:
'1'
,
////1 舞象会员卡号 2 关联实卡号
codeType
:
''
,
//CODE_TYPE_QRCODE 二维码 //CODE_TYPE_BARCODE 条形码 ///CODE_TYPE_TEXT 仅展示卡号
},
bindPickerChange
(
e
)
{
this
.
setData
({
...
...
@@ -44,10 +68,77 @@ wxService.page({
*/
onLoad
(
options
)
{
wx
.
hideShareMenu
();
const
{
memberCardNo
,
memberId
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
const
{
memberCardNo
,
memberId
,
member
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
// if(memberCardNo){
// }
if
(
member
){
this
.
data
.
cardNoOffline
=
member
.
cardNoOffline
;
}
},
//获取会员卡面设置
getMemberCardSetting
(){
wxService
.
post
(
`/member/cardSetting/getByBrandId`
).
then
(
res
=>
{
let
obj
=
res
.
data
.
data
?
res
.
data
.
data
.
cardStyle
:
{};
if
(
obj
.
backgroundPicUrl
){
this
.
data
.
cardStyle
.
bgUrl
=
obj
.
backgroundPicUrl
;
this
.
data
.
cardStyle
.
bgColor
=
''
;
}
else
if
(
obj
.
color
){
this
.
data
.
cardStyle
.
bgUrl
=
''
;
this
.
data
.
cardStyle
.
bgColor
=
COLOR_OBJ
[
obj
.
color
];
}
else
{
this
.
data
.
cardStyle
.
bgUrl
=
'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/711_08.png'
;
this
.
data
.
cardStyle
.
bgColor
=
''
;
}
let
tempObj
=
res
.
data
.
data
?
res
.
data
.
data
:
{};
this
.
data
.
membershipCardnoType
=
tempObj
.
membershipCardnoType
?
tempObj
.
membershipCardnoType
:
1
;
this
.
data
.
codeType
=
tempObj
.
codeType
?
tempObj
.
codeType
:
'CODE_TYPE_BARCODE'
;
// this.data.codeType = 'CODE_TYPE_TEXT';
// this.data.codeType = 'CODE_TYPE_QRCODE';
// this.data.codeType = 'CODE_TYPE_BARCODE';
if
(
this
.
data
.
membershipCardnoType
==
1
){
//舞象会员卡号
this
.
data
.
qrCardNo
=
this
.
data
.
memberCardNo
;
}
else
{
//三方实体卡
this
.
data
.
qrCardNo
=
this
.
data
.
cardNoOffline
;
}
// this.data.qrCardNo = this.data.memberCardNo;
this
.
setData
({
qrCardNo
:
this
.
data
.
qrCardNo
,
membershipCardnoType
:
this
.
data
.
membershipCardnoType
,
codeType
:
this
.
data
.
codeType
,
cardStyle
:
this
.
data
.
cardStyle
},()
=>
{
if
(
this
.
data
.
codeType
==
'CODE_TYPE_QRCODE'
){
this
.
generateQrcode
();
}
else
if
(
this
.
data
.
codeType
==
'CODE_TYPE_BARCODE'
){
this
.
generateBarCode
();
}
});
})
},
//生成条形码
generateBarCode
(){
wxbarcode
.
barcode
(
'barcode'
,
this
.
data
.
qrCardNo
,
500
,
120
);
setTimeout
(()
=>
{
wxbarcode
.
barcode
(
'barcode'
,
this
.
data
.
qrCardNo
,
500
,
120
);
},
200
);
},
//生成二维码
generateQrcode
(){
wxbarcode
.
qrcode
(
'qrcode'
,
this
.
data
.
qrCardNo
,
300
,
300
);
setTimeout
(()
=>
{
wxbarcode
.
qrcode
(
'qrcode'
,
this
.
data
.
qrCardNo
,
300
,
300
);
},
200
);
},
//微信支付
onTapWxPay
()
{
...
...
@@ -159,15 +250,13 @@ wxService.page({
data
.
member
.
sex
=
2
}
this
.
setData
({
cardNoOffline
:
data
.
member
.
cardNoOffline
,
memberInfo
:
data
.
member
,
index
:
data
.
member
.
sex
,
date
:
data
.
member
.
birthday
},()
=>
{
this
.
getMemberCardSetting
();
})
wxbarcode
.
barcode
(
'barcode'
,
this
.
data
.
memberCardNo
,
500
,
120
);
setTimeout
(()
=>
{
wxbarcode
.
barcode
(
'barcode'
,
this
.
data
.
memberCardNo
,
500
,
120
);
},
200
);
// this.setInternal();
}
})
...
...
src/pages/memberOfOwn/memberOfOwn.wxml
View file @
d167bd8b
<!--pages/userCenter.wxml-->
<view class='page-memberOfOwn'>
<view class='own-content'>
<view class='user-info'>
<view class='user-info'
style='background-image:url({{cardStyle.bgUrl}});background-color:{{cardStyle.bgColor}}'
>
<view class="user-avatar">
<open-data type="userAvatarUrl" />
</view>
...
...
@@ -15,10 +17,21 @@
<image src='/assets/imgs/711_11.png' bindtap='handleGoWxCard' />
</view>-->
</view>
<view class='user-qr-code'>
<!-- 条形码 -->
<view class='user-qr-code' wx:if="{{codeType == 'CODE_TYPE_BARCODE' && qrCardNo}}">
<canvas canvas-id="barcode" binderror="canvasIdErrorCallback" />
<view class='card-no'>{{qrCardNo}}</view>
<!-- <view class='wx-pay-code' bindtap="onTapWxPay">微信支付</view>-->
</view>
<!-- 二维码 -->
<view class='u-qr-code' wx:if="{{codeType == 'CODE_TYPE_QRCODE' && qrCardNo}}">
<canvas canvas-id="qrcode" binderror="canvasIdErrorCallback" />
<view class='card-no'>{{qrCardNo}}</view>
</view>
<!-- 仅展示卡号 -->
<view class='u-qr-code' wx:if="{{codeType == 'CODE_TYPE_TEXT' && qrCardNo}}">
<label>{{qrCardNo}}</label>
</view>
</view>
<view class="form-info">
...
...
src/pages/memberOfOwn/memberOfOwn.wxss
View file @
d167bd8b
This diff is collapsed.
Click to expand it.
src/pages/my/my.wxml
View file @
d167bd8b
...
...
@@ -36,7 +36,7 @@
<view class="bottom-fixed" style="padding-bottom:{{paddingBottom}}"></view>
<share-benefit-modal show="{{shareBenefitModalShow}}" benefit-data="{{benefitData}}"/>
<!-- 联系我 -->
<view class="cell-me" wx:if="{{!isQiye}}">
<view class="cell-me" wx:if="{{!isQiye
&& contactUsIsOpen
}}">
<cell
bind:startmessage='startmessage'
isMask="0"
...
...
@@ -46,7 +46,7 @@
buttonText="0"
bubbleColor="cb3c3c"
bind:completemessage="completemessage"
plugid='
766c50920993bf9c41c6c3d2761a2df5
' />
plugid='
{{contactUsPluginId}}
' />
</view>
<!-- 联系我点击成功之后的回调 -->
...
...
src/pages/userCenter/userCenter.js
View file @
d167bd8b
...
...
@@ -290,6 +290,7 @@ wxService.page({
const
renderData
=
render
.
next
()
this
.
data
.
renderPageOver
=
renderData
.
done
this
.
renderPageFunc
({
products
:
renderData
.
value
})
// this.renderPageFunc({ products: products })
//是否有tabbar 或 plus
let
tabbar
=
products
.
filter
(
item
=>
item
.
type
==
5
);
let
plus
=
products
.
filter
(
item
=>
item
.
type
==
9
);
...
...
@@ -309,10 +310,7 @@ wxService.page({
paddingBottom
:
'40rpx'
})
}
}
}).
finally
(()
=>
{
wx
.
hideLoading
();
})
...
...
@@ -324,6 +322,7 @@ wxService.page({
* @param now
*/
renderPageFunc
({
products
})
{
this
.
data
.
pages
=
[];
// 9 plus(9/5-权重高)
let
newProducts
=
[...
products
]
let
typeArr
=
[]
...
...
@@ -334,10 +333,7 @@ wxService.page({
})
}
// let productData = handlerDataOnPage.handlerArray(products)
let
productData
=
handlerDataOnPage
.
handlerArray
(
newProducts
)
logger
.
log
(
'productData.keysNum'
,
productData
.
keysNum
(),
productData
)
this
.
setData
({
...
productData
},
()
=>
{
...
...
src/pages/userCenter/userCenter.wxml
View file @
d167bd8b
...
...
@@ -47,7 +47,7 @@
<view class="bottom-fixed" style="padding-bottom:{{paddingBottom}}"></view>
<!--联系我 客服ID-->
<!-- style='left:{{x}}px;top:{{y}}px' -->
<view class="cell-me" wx:if="{{!isQiye}}" >
<view class="cell-me" wx:if="{{!isQiye
&& contactUsIsOpen
}}" >
<cell
bind:startmessage='startmessage'
isMask="0"
...
...
@@ -57,7 +57,7 @@
buttonText="0"
bubbleColor="cb3c3c"
bind:completemessage="completemessage"
plugid='
766c50920993bf9c41c6c3d2761a2df5
' />
plugid='
{{contactUsPluginId}}
' />
<!-- 766c50920993bf9c41c6c3d2761a2df5 -->
<!-- 泰华 a6ea55b56eb09ced8f9aeeaa14383b52 -->
</view>
...
...
src/shoppingGuid/page/pages/couponWriteOff/couponWriteOff.js
View file @
d167bd8b
...
...
@@ -19,7 +19,6 @@ wxService.page({
*/
onLoad
:
function
(
options
)
{
let
param
=
options
.
id
;
console
.
log
(
param
)
if
(
param
){
this
.
getCurrentStoreId
();
this
.
data
.
couponId
=
param
;
...
...
@@ -51,8 +50,6 @@ wxService.page({
//获取优惠券详情
getCouponDetail
(){
wxService
.
post
(
`/coupon/coupon/get?cardNo=
${
this
.
data
.
couponId
}
`
).
then
(
res
=>
{
console
.
log
(
'请求卡券详情接口cardNo----'
,
this
.
data
.
couponId
)
console
.
log
(
'获取卡券结果----'
,
res
)
if
(
res
){
this
.
data
.
couponInfo
=
res
.
data
.
data
?
res
.
data
.
data
:
{};
this
.
data
.
couponInfo
.
takeCouponBgimg
=
this
.
data
.
couponInfo
.
couponDetail
.
style
.
takeCouponBgimg
;
...
...
@@ -93,7 +90,6 @@ wxService.page({
}
else
if
(
res
.
cancel
)
{}
}
})
},
//核销优惠券
...
...
@@ -101,26 +97,28 @@ wxService.page({
wx
.
showLoading
({
title
:
'核销中..'
,
});
wxService
.
post
(
`/coupon/coupon/checkAndInvalid`
,{
cardNo
:
this
.
data
.
couponId
,
useStoreId
:
this
.
data
.
useStoreId
,
brandId
:
app
.
globalData
.
brandId
}).
then
(
res
=>
{
let
param
=
{};
param
.
cardNo
=
this
.
data
.
couponId
;
param
.
useStoreId
=
this
.
data
.
useStoreId
;
param
.
brandId
=
app
.
globalData
.
brandId
;
wxService
.
post
(
`/coupon/coupon/checkAndInvalid`
,
param
).
then
(
res
=>
{
wx
.
hideLoading
();
if
(
res
){
if
(
res
.
data
.
result
==
0
)
{
wx
.
showToast
({
title
:
'核销成功'
,
});
setTimeout
(()
=>
{
icon
:
'success'
,
duration
:
2000
,
mask
:
true
,
success
:
function
(){
wx
.
navigateBack
({
delta
:
1
});
},
500
);
}
});
}
}
}).
finally
(()
=>
{
wx
.
hideLoading
();
});
}
});
\ No newline at end of file
src/shoppingGuid/page/pages/home/home.js
View file @
d167bd8b
...
...
@@ -219,7 +219,7 @@ wxService.page({
let
content
=
{
title
:
item
.
title
,
id
:
id
,
url
:
item
.
couponBg
url
:
'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/icon_get_coupon.png'
}
let
tentacleInfo
=
{
content
:
JSON
.
stringify
(
content
),
...
...
@@ -236,8 +236,8 @@ wxService.page({
let
inner_tentacleId
=
Integer
.
digit
(
tentacleId
,
10
,
64
);
var
path
=
'subPackage/page/pages/scanCoupon/scanCoupon'
+
'?i='
+
inner_id
+
'&t='
+
inner_tentacleId
;
this
.
data
.
shareModel
.
title
=
item
.
title
;
this
.
data
.
shareModel
.
imageUrl
=
item
.
couponBg
;
this
.
data
.
shareModel
.
path
=
item
.
path
;
this
.
data
.
shareModel
.
imageUrl
=
'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/icon_get_coupon.png'
;
this
.
data
.
shareModel
.
path
=
path
;
this
.
setData
({
shareModel
:
this
.
data
.
shareModel
,
showModal
:
true
...
...
@@ -258,7 +258,7 @@ wxService.page({
let
content
=
{
title
:
item
.
title
,
id
:
item
.
id
,
url
:
item
.
imageBg
url
:
'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/icon_get_coupon.png'
}
let
tentacleInfo
=
{
...
...
@@ -279,7 +279,7 @@ wxService.page({
wx
.
qy
.
shareToExternalContact
({
appid
:
app
.
globalData
.
appId
,
//小程序的appid
title
:
item
.
couponName
,
//小程序消息的title
imgUrl
:
item
.
imageBg
,
//小程序消息的封面图
imgUrl
:
'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/icon_get_coupon.png'
,
//小程序消息的封面图
page
:
path
,
//小程序消息打开后的路径
success
:
function
(
r
)
{
wx
.
showToast
({
...
...
@@ -431,6 +431,8 @@ wxService.page({
* 用户点击右上角分享
*/
onShareAppMessage
:
function
(
res
)
{
console
.
log
(
res
)
console
.
log
(
this
.
data
.
shareModel
)
if
(
res
.
from
==
'button'
)
{
return
{
title
:
this
.
data
.
shareModel
.
title
,
...
...
src/shoppingGuid/page/pages/kpi/kpi.js
View file @
d167bd8b
...
...
@@ -35,7 +35,7 @@ wxService.page({
onShow
:
function
()
{
},
getTaskPage
(
pageSize
,
pageNo
,
current
)
{
// 1 销售任务 2 招募任务
getTaskPage
(
pageSize
,
pageNo
,
current
,
refresh
)
{
// 1 销售任务 2 招募任务
wx
.
showLoading
({
title
:
'加载中'
})
...
...
@@ -69,11 +69,19 @@ wxService.page({
}
})
this
.
setData
({
list
:
pageNo
==
1
?
[...
data
.
content
]:
[...
this
.
data
.
list
,...
data
.
content
],
list
:
pageNo
==
1
?
[...
data
.
content
]:
[...
this
.
data
.
list
,...
data
.
content
],
totalPages
:
data
.
totalPages
})
}
}
if
(
refresh
){
wx
.
showToast
({
title
:
'刷新成功'
,
});
wx
.
stopPullDownRefresh
();
}
})
},
// 点击事件
...
...
@@ -130,7 +138,11 @@ wxService.page({
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
this
.
data
.
pageSize
=
10
;
this
.
data
.
pageNo
=
1
;
this
.
data
.
list
=
[];
const
{
pageSize
,
pageNo
,
current
}
=
this
.
data
this
.
getTaskPage
(
pageSize
,
pageNo
,
current
,
true
)
},
/**
...
...
src/shoppingGuid/page/pages/kpi/kpi.json
View file @
d167bd8b
{
"navigationBarTitleText"
:
"任务中心"
,
"enablePullDownRefresh"
:
true
,
"usingComponents"
:
{
"empty"
:
"../../../../component/empty/empty"
}
}
\ No newline at end of file
src/shoppingGuid/page/pages/kpi/kpi.wxml
View file @
d167bd8b
...
...
@@ -16,7 +16,8 @@
</view>
<!-- list -->
<view class='list' wx:if="{{current == 1}}">
<view wx:if="{{current == 1}}">
<view class='list' wx:if="{{list.length > 0}}">
<view class='list-item'
wx:for="{{list}}"
wx:for-index="idx"
...
...
@@ -43,9 +44,12 @@
</view>
</view>
</view>
<empty text="暂无进行中销售任务哦~" wx:else/>
</view>
<!-- 招募任务 -->
<view class='list' wx:if="{{current == 2}}">
<view wx:if="{{current == 2}}">
<view class='list' wx:if="{{list.length > 0}}">
<view class='list-item'
wx:for="{{list}}"
wx:for-index="idx"
...
...
@@ -72,6 +76,6 @@
</view>
</view>
</view>
<empty text="暂无进行中招募任务哦~" wx:else/>
</view>
</view>
src/shoppingGuid/page/pages/moreCoupons/moreCoupons.js
View file @
d167bd8b
...
...
@@ -91,8 +91,8 @@ wxService.page({
let
inner_tentacleId
=
Integer
.
digit
(
tentacleId
,
10
,
64
);
var
path
=
'subPackage/page/pages/scanCoupon/scanCoupon'
+
'?i='
+
inner_id
+
'&t='
+
inner_tentacleId
;
this
.
data
.
shareCouponObj
.
title
=
item
.
title
;
this
.
data
.
shareCouponObj
.
imageUrl
=
item
.
imageBg
;
this
.
data
.
shareCouponObj
.
path
=
item
.
path
;
this
.
data
.
shareCouponObj
.
imageUrl
=
'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/icon_get_coupon.png'
;
this
.
data
.
shareCouponObj
.
path
=
path
;
this
.
setData
({
shareCouponObj
:
this
.
data
.
shareCouponObj
,
showShareModel
:
true
...
...
@@ -134,7 +134,7 @@ wxService.page({
wx
.
qy
.
shareToExternalContact
({
appid
:
app
.
globalData
.
appId
,
//小程序的appid
title
:
item
.
couponName
,
//小程序消息的title
imgUrl
:
item
.
imageBg
,
//小程序消息的封面图
imgUrl
:
'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/icon_get_coupon.png'
,
//小程序消息的封面图
page
:
path
,
//小程序消息打开后的路径
success
:
function
(
r
)
{
wx
.
showToast
({
...
...
src/shoppingGuid/page/pages/welfare/welfare.js
View file @
d167bd8b
...
...
@@ -148,8 +148,8 @@ wxService.page({
let
inner_tentacleId
=
Integer
.
digit
(
tentacleId
,
10
,
64
);
var
path
=
'subPackage/page/pages/scanCoupon/scanCoupon'
+
'?i='
+
inner_id
+
'&t='
+
inner_tentacleId
;
this
.
data
.
shareModel
.
title
=
item
.
title
;
this
.
data
.
shareModel
.
imageUrl
=
item
.
couponBg
;
this
.
data
.
shareModel
.
path
=
item
.
path
;
this
.
data
.
shareModel
.
imageUrl
=
'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/icon_get_coupon.png'
;
this
.
data
.
shareModel
.
path
=
path
;
this
.
setData
({
shareModel
:
this
.
data
.
shareModel
,
showModal
:
true
...
...
@@ -192,7 +192,7 @@ wxService.page({
wx
.
qy
.
shareToExternalContact
({
appid
:
app
.
globalData
.
appId
,
//小程序的appid
title
:
item
.
couponName
,
//小程序消息的title
imgUrl
:
item
.
imageBg
,
//小程序消息的封面图
imgUrl
:
'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/icon_get_coupon.png'
,
//小程序消息的封面图
page
:
path
,
//小程序消息打开后的路径
success
:
function
(
r
)
{
wx
.
showToast
({
...
...
src/subPackage/page/pages/categoryPro/categoryPro.js
View file @
d167bd8b
...
...
@@ -2,7 +2,6 @@
var
app
=
getApp
()
const
wxService
=
require
(
'../../../../utils/wxService'
)
import
{
Integer
}
from
'../../../../utils/integerDigitalConvertion'
const
{
memberId
,
member
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
wxService
.
page
({
...
...
@@ -64,17 +63,18 @@ wxService.page({
this
.
generatePointObject
(
tentacleInfo
);
}
this
.
setData
({
'form.sortType'
:
this
.
data
.
currentTab
})
this
.
getProList
();
},
/**
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
const
{
memberId
,
member
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
this
.
setData
({
'form.sortType'
:
this
.
data
.
currentTab
})
this
.
getProList
();
},
// 切换tab
...
...
@@ -101,11 +101,13 @@ wxService.page({
},
//获取商品列表
getProList
()
{
getProList
(
refresh
)
{
wx
.
showLoading
({
title
:
'加载中'
})
wxService
.
post
(
`/sale/product/buyer/listPageByCategoryId?pageNo=
${
this
.
data
.
pageNo
}
&pageSize=
${
this
.
data
.
pageSize
}
`
,
this
.
data
.
form
).
then
(
res
=>
{
});
let
pageNo
=
this
.
data
.
pageNo
,
pageSize
=
this
.
data
.
pageSize
;
wxService
.
post
(
`/sale/product/buyer/listPageByCategoryId?pageNo=
${
pageNo
}
&pageSize=
${
pageSize
}
`
,
this
.
data
.
form
).
then
(
res
=>
{
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
&&
data
.
content
)
{
wx
.
hideLoading
()
...
...
@@ -115,6 +117,14 @@ wxService.page({
totalElements
:
data
.
totalElements
})
}
if
(
refresh
){
wx
.
showToast
({
title
:
'数据已刷新'
,
});
wx
.
stopPullDownRefresh
();
}
}).
finally
(()
=>
{
wx
.
hideLoading
()
})
...
...
@@ -128,28 +138,12 @@ wxService.page({
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
:
function
()
{
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
:
function
()
{
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
this
.
setData
({
pageNo
:
1
,
})
this
.
getProList
()
wx
.
stopPullDownRefresh
();
this
.
data
.
pageNo
=
1
;
this
.
data
.
totalPages
=
0
;
this
.
getProList
(
true
);
},
/**
...
...
src/subPackage/page/pages/categoryPro/categoryPro.json
View file @
d167bd8b
{
"navigationBarTitleText"
:
"商品列表"
,
"enablePullDownRefresh"
:
true
,
"usingComponents"
:
{
"product-list-style-one"
:
"/component/productListStyleOne/productListStyleOne"
,
"product-list-style-two"
:
"/component/productListStyleTwo/productListStyleTwo"
,
...
...
src/utils/Http.js
View file @
d167bd8b
...
...
@@ -82,8 +82,8 @@ class Http {
get
(
url
,
parmas
)
{
let
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
console
.
log
(
this
.
getTentacle
())
if
(
bas
eUserInfo
){
let
guideUserInfo
=
wx
.
getStorageSync
(
'guidBaseInfo'
);
if
(
baseUserInfo
||
guid
eUserInfo
){
return
this
.
request
({
url
,
method
:
'GET'
,
...
...
@@ -196,7 +196,6 @@ class Http {
})
})
}
console
.
log
(
JSON
.
stringify
(
error
))
return
Promise
.
reject
(
error
)
}
...
...
src/utils/wxService.js
View file @
d167bd8b
...
...
@@ -165,7 +165,7 @@ class WXService extends Http {
login
()
{
const
currentEnv
=
wx
.
getStorageSync
(
'_qyWeChat'
)
console
.
log
(
'全局'
,
currentEnv
)
//
console.log('全局', currentEnv)
return
new
Promise
((
resolve
,
reject
)
=>
{
wx
.
login
({
success
:
(
res
)
=>
{
...
...
@@ -217,12 +217,12 @@ class WXService extends Http {
icon
:
'none'
})
console
.
log
(
JSON
.
stringify
(
baseUserInfo
))
//
console.log(JSON.stringify(baseUserInfo))
return
this
.
get
(
'i-user/info'
,
{
unionId
:
baseUserInfo
.
unionId
,
minaOpenId
:
baseUserInfo
.
openId
}).
then
((
res
)
=>
{
console
.
log
(
'i-user/info res is %o '
,
res
)
//
console.log('i-user/info res is %o ', res)
if
(
res
.
data
.
code
===
-
10001
)
{
this
.
showToast
(
`
${
res
.
data
.
message
}
`
)
return
Promise
.
reject
({
...
...
@@ -257,7 +257,7 @@ class WXService extends Http {
//生成触点对象Id
getTentacleContent
(
tentacleInfo
)
{
console
.
log
(
'生成触点对象Id'
,
tentacleInfo
)
//
console.log('生成触点对象Id', tentacleInfo)
return
this
.
post
(
'/marketing/tentacleContent/getTentacleContent'
,
tentacleInfo
).
then
((
res
)
=>
{
let
data
=
res
.
data
.
data
return
Promise
.
resolve
(
data
);
...
...
@@ -349,7 +349,7 @@ class WXService extends Http {
//判断tentacleInfo是否为空
if
(
!
tentacleInfo
)
{
wx
.
setStorageSync
(
'TENTACLE_CONTENT'
,
tempTentacleInfo
);
console
.
log
(
'TENTACLE_CONTENT'
,
wx
.
getStorageSync
(
'TENTACLE_CONTENT'
))
//
console.log('TENTACLE_CONTENT', wx.getStorageSync('TENTACLE_CONTENT'))
return
;
}
//tentacleInfo 不为空
...
...
@@ -576,6 +576,8 @@ class WXService extends Http {
// 集点体验者
config
.
data
.
experAccessible
;
config
.
data
.
plusIsOpen
=
envInfo
.
plusIsOpen
;
config
.
data
.
contactUsPluginId
=
envInfo
.
contactUsPluginId
;
config
.
data
.
contactUsIsOpen
=
envInfo
.
contactUsIsOpen
;
const
CONFIG_PAPGE
=
{
onLoad
:
function
(...
args
)
{
...
...
@@ -604,8 +606,8 @@ class WXService extends Http {
pageIsFromShare
=
true
;
let
idParam
=
decodeURIComponent
(
item
[
'scene'
]).
split
(
'&'
)[
0
];
let
shareId
=
idParam
&&
idParam
.
split
(
'='
)[
1
]
||
0
;
console
.
log
(
shareId
)
console
.
log
(
idParam
)
//
console.log(shareId)
//
console.log(idParam)
//处理pageId的
if
(
idParam
.
indexOf
(
'pageId'
)
>
-
1
){
item
[
'pageId'
]
=
shareId
;
...
...
@@ -623,8 +625,6 @@ class WXService extends Http {
_self
.
getTentacleContentByTentacleId
(
id
);
}
// console.log('args ----',args)
config
.
onLoad
&&
config
.
onLoad
.
apply
(
page
,
args
);
},
onShow
:
function
(...
args
)
{
...
...
@@ -644,8 +644,8 @@ class WXService extends Http {
let
currentEndTime
=
(
new
Date
(
premiumExpireStorage
.
replace
(
/-/g
,
'/'
))).
getTime
();
// 到期时间
let
currentTime
=
(
new
Date
()).
getTime
();
let
vipFlag
=
currentTime
<=
currentEndTime
?
true
:
false
// 当前时间 < 到期时间为vip
console
.
log
(
'premiumExpireStorage'
,
premiumExpireStorage
)
console
.
log
(
'当前时间 < 到期时间为vip'
,
vipFlag
)
//
console.log('premiumExpireStorage', premiumExpireStorage)
//
console.log('当前时间 < 到期时间为vip', vipFlag)
if
(
baseUserInfo
&&
wx
.
getStorageSync
(
'token'
))
{
page
.
setData
({
...
...
@@ -727,12 +727,12 @@ class WXService extends Http {
},
//处理分享页面打开时参数为memberId时生成触点对象信息
generatePointObject
(
tentacleInfo
)
{
console
.
log
(
'---call 生成触点接口----'
)
console
.
log
(
tentacleInfo
)
//
console.log('---call 生成触点接口----')
//
console.log(tentacleInfo)
_self
.
getTentacleContent
(
tentacleInfo
).
then
(
res
=>
{
console
.
log
(
'-----处理分享页面打开时参数为memberId时生成触点对象信息------'
)
console
.
log
(
'-----成功返回是------'
,
res
);
//
console.log('-----处理分享页面打开时参数为memberId时生成触点对象信息------')
//
console.log('-----成功返回是------', res);
if
(
res
&&
res
.
tentacleId
)
{
let
data
=
res
;
let
TENTACLE_CONTENT
=
{
...
...
@@ -899,11 +899,11 @@ class WXService extends Http {
const
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
return
new
Promise
((
resolve
,
reject
)
=>
{
if
(
baseUserInfo
&&
baseUserInfo
.
memberActivateStatus
)
{
console
.
log
(
'已开卡'
,
baseUserInfo
)
//
console.log('已开卡', baseUserInfo)
wxService
.
openCardList
()
resolve
(
baseUserInfo
)
}
else
if
(
!
baseUserInfo
||
!
baseUserInfo
.
memberActivateStatus
)
{
console
.
log
(
'去开卡'
,
baseUserInfo
)
//
console.log('去开卡', baseUserInfo)
return
this
.
navigateToMiniProgram
({
biz
:
baseUserInfo
.
biz
,
encrypt_card_id
:
baseUserInfo
.
encryptCardId
,
...
...
@@ -980,7 +980,6 @@ class WXService extends Http {
getCitysEnterty
()
{
const
citys
=
citysData
.
default
console
.
log
(
'8888'
,
citys
)
let
list
=
{}
if
(
this
.
citysEntertys
)
{
list
=
this
.
citysEntertys
...
...
@@ -988,7 +987,6 @@ class WXService extends Http {
for
(
const
key
in
citys
)
{
if
(
citys
.
hasOwnProperty
(
key
))
{
const
element
=
citys
[
key
]
console
.
log
(
'element'
,
element
)
handler2citys
({
city
:
element
,
result
:
{
name
:
[],
code
:
[]
},
...
...
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