Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
7
7_Eleven_Alipay
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_Alipay
Commits
59b44945
Commit
59b44945
authored
Mar 28, 2020
by
谢中龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增积分活动分组
parent
b81ec473
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
1509 additions
and
10 deletions
+1509
-10
mini-program.json
.tea/configuration/mini-program.json
+0
-0
editor.json
.tea/editor.json
+0
-0
editorTabs.json
.tea/editorTabs.json
+2
-2
index$.web.js
.tea/entryFiles-development/index$.web.js
+3
-0
index$.worker.js
.tea/entryFiles-development/index$.worker.js
+4
-0
recentlyTouched.json
.tea/recentlyTouched.json
+2
-2
8577039fe016658544a91cc387e0c40e1584585221050ef1
...p-saving/8577039fe016658544a91cc387e0c40e1584585221050ef1
+147
-0
app.json
app.json
+4
-1
index.js
config/index.js
+2
-2
integralWater.js
pages/integralWater/integralWater.js
+3
-1
myValueCardInfo.js
subPackage/page/pages/myValueCardInfo/myValueCardInfo.js
+2
-2
pointActivityGroup.acss
...age/page/pages/pointActivityGroup/pointActivityGroup.acss
+127
-0
pointActivityGroup.axml
...age/page/pages/pointActivityGroup/pointActivityGroup.axml
+39
-0
pointActivityGroup.js
...ckage/page/pages/pointActivityGroup/pointActivityGroup.js
+155
-0
pointActivityGroup.json
...age/page/pages/pointActivityGroup/pointActivityGroup.json
+7
-0
pointExchangeCoupon.acss
...e/page/pages/pointExchangeCoupon/pointExchangeCoupon.acss
+227
-0
pointExchangeCoupon.axml
...e/page/pages/pointExchangeCoupon/pointExchangeCoupon.axml
+73
-0
pointExchangeCoupon.js
...age/page/pages/pointExchangeCoupon/pointExchangeCoupon.js
+179
-0
pointExchangeCoupon.json
...e/page/pages/pointExchangeCoupon/pointExchangeCoupon.json
+9
-0
pointExchangeGoods.acss
...age/page/pages/pointExchangeGoods/pointExchangeGoods.acss
+227
-0
pointExchangeGoods.axml
...age/page/pages/pointExchangeGoods/pointExchangeGoods.axml
+75
-0
pointExchangeGoods.js
...ckage/page/pages/pointExchangeGoods/pointExchangeGoods.js
+212
-0
pointExchangeGoods.json
...age/page/pages/pointExchangeGoods/pointExchangeGoods.json
+10
-0
No files found.
.tea/configuration/mini-program.json
View file @
59b44945
This diff is collapsed.
Click to expand it.
.tea/editor.json
View file @
59b44945
This source diff could not be displayed because it is too large. You can
view the blob
instead.
.tea/editorTabs.json
View file @
59b44945
{
"tabs"
:[
"file:///d%3A/work/711Web/711/7_Eleven_Alipay/config/index.js"
,
"file:///d%3A/work/711Web/711/7_Eleven_Alipay/subPackage/page/pages/valueCardInfo/valueCardInfo.axml"
,
"file:///d%3A/work/711Web/711/7_Eleven_Alipay/subPackage/page/pages/valueCardInfo/valueCardInfo.acss"
,
"file:///d%3A/work/711Web/711/7_Eleven_Alipay/subPackage/page/pages/valueCardInfo/valueCardInfo.js"
],
"current"
:
"file:///d%3A/work/711Web/711/7_Eleven_Alipay/subPackage/page/pages/valueCardInfo/valueCardInfo.js"
,
"storageVersion"
:
"0.70.14"
}
\ No newline at end of file
{
"tabs"
:[],
"current"
:
"file:///d%3A/work/711Web/711/7_Eleven_Alipay/config/index.js"
,
"storageVersion"
:
"0.70.14"
}
\ No newline at end of file
.tea/entryFiles-development/index$.web.js
View file @
59b44945
...
...
@@ -48,3 +48,6 @@ require('../../subPackage/page/pages/valueCardInfo/valueCardInfo');
require
(
'../../subPackage/page/pages/valueCardRecords/valueCardRecords'
);
require
(
'../../subPackage/page/pages/myValueCard/myValueCard'
);
require
(
'../../subPackage/page/pages/myValueCardInfo/myValueCardInfo'
);
require
(
'../../subPackage/page/pages/pointActivityGroup/pointActivityGroup'
);
require
(
'../../subPackage/page/pages/pointExchangeCoupon/pointExchangeCoupon'
);
require
(
'../../subPackage/page/pages/pointExchangeGoods/pointExchangeGoods'
);
.tea/entryFiles-development/index$.worker.js
View file @
59b44945
...
...
@@ -65,6 +65,9 @@ require('../../subPackage/page/pages/valueCardInfo/valueCardInfo');
require
(
'../../subPackage/page/pages/valueCardRecords/valueCardRecords'
);
require
(
'../../subPackage/page/pages/myValueCard/myValueCard'
);
require
(
'../../subPackage/page/pages/myValueCardInfo/myValueCardInfo'
);
require
(
'../../subPackage/page/pages/pointActivityGroup/pointActivityGroup'
);
require
(
'../../subPackage/page/pages/pointExchangeCoupon/pointExchangeCoupon'
);
require
(
'../../subPackage/page/pages/pointExchangeGoods/pointExchangeGoods'
);
}
self
.
bootstrapApp
?
self
.
bootstrapApp
({
success
})
:
success
();
}
\ No newline at end of file
.tea/recentlyTouched.json
View file @
59b44945
{
"files"
:[
"d:
\\
work
\\
711Web
\\
711
\\
7_Eleven_Alipay
\\
config
\\
index.js"
,
"d:
\\
work
\\
711Web
\\
711
\\
7_Eleven_Alipay
\\
subPackage
\\
page
\\
pages
\\
myValueCardInfo
\\
myValueCardInfo.js"
,
"d:
\\
work
\\
711Web
\\
711
\\
7_Eleven_Alipay
\\
subPackage
\\
page
\\
pages
\\
myValueCard
\\
myValueCard.js"
,
"d:
\\
work
\\
711Web
\\
711
\\
7_Eleven_Alipay
\\
utils
\\
wxService.js"
,
"d:
\\
work
\\
711Web
\\
711
\\
7_Eleven_Alipay
\\
utils
\\
Http.js"
,
"d:
\\
work
\\
711Web
\\
711
\\
7_Eleven_Alipay
\\
subPackage
\\
page
\\
pages
\\
valueCard
\\
valueCard.js"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
config
\\
index.js"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
subPackage
\\
page
\\
pages
\\
IntegralMallGoods
\\
IntegralMallGoods.axml"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
subPackage
\\
page
\\
pages
\\
IntegrateGoodsExchangeInfo
\\
IntegrateGoodsExchangeInfo.js"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
subPackage
\\
page
\\
pages
\\
IntegrateGoodsExchangeInfo
\\
IntegrateGoodsExchangeInfo.axml"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
subPackage
\\
page
\\
pages
\\
exchangeAddress
\\
exchangeAddress.axml"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
project.config.json"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
Behavior.js"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
app.json"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
app.js"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
utils
\\
Http.js"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
package-lock.json"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
debug.log"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
pages
\\
consumptionDetails
\\
consumptionDetails.axml"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
pages
\\
integralWater
\\
integralWater.axml"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
pages
\\
userCenter
\\
userCenter.axml"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
pages
\\
integralMallDetail
\\
integralMallDetail.js"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
pages
\\
integralMallDetail
\\
integralMallDetail.axml"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
component
\\
exchange-coupon-modal
\\
exchange-coupon-modal.axml"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
component
\\
authorization-modal
\\
authorization-modal.js"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
wx2my.js"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
component
\\
picNav
\\
picNav.axml"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
component
\\
citySelection
\\
citySelection.js"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
pages
\\
pointDetail
\\
pointDetail.js"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
pages
\\
couponCodeDetail
\\
couponCodeDetail.js"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
component
\\
citySelection
\\
citySelection.axml"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
subPackage
\\
page
\\
pages
\\
subPage
\\
subPage.json"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
subPackage
\\
page
\\
pages
\\
subPage
\\
subPage.js"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
subPackage
\\
page
\\
pages
\\
subPage
\\
subPage.axml"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
subPackage
\\
page
\\
pages
\\
pointGoodsList
\\
pointGoodsList.axml"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
subPackage
\\
page
\\
pages
\\
goToHome
\\
goToHome.js"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
subPackage
\\
page
\\
pages
\\
pointGoodsList
\\
pointGoodsList.js"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
subPackage
\\
page
\\
pages
\\
subPage
\\
subPage.acss"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
subPackage
\\
page
\\
pages
\\
aliPayCoupon
\\
aliPayCoupon.acss"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
subPackage
\\
page
\\
pages
\\
aliPayCoupon
\\
aliPayCoupon.js"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
subPackage
\\
page
\\
pages
\\
aliPayCoupon
\\
aliPayCoupon.json"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
utils
\\
common.js"
,
"f:
\\
code
\\
7_Eleven_Alipay
\\
utils
\\
util.js"
,
"f:
\\
code
\\
7_Eleven_Alipay
\\
pages
\\
memberOfOwn
\\
memberOfOwn.js"
,
"f:
\\
code
\\
7_Eleven_Alipay
\\
pages
\\
consumptionDetails
\\
consumptionDetails.js"
,
"f:
\\
code
\\
7_Eleven_Alipay
\\
component
\\
authorization-modal
\\
authorization-modal.js"
,
"f:
\\
code
\\
7_Eleven_Alipay
\\
component
\\
exchange-coupon-modal
\\
exchange-coupon-modal.js"
],
"storageVersion"
:
"0.70.14"
}
\ No newline at end of file
{
"files"
:[
"d:
\\
work
\\
711Web
\\
711
\\
7_Eleven_Alipay
\\
app.json"
,
"d:
\\
work
\\
711Web
\\
711
\\
7_Eleven_Alipay
\\
subPackage
\\
page
\\
pages
\\
pointExchangeGoods
\\
pointExchangeGoods.axml"
,
"d:
\\
work
\\
711Web
\\
711
\\
7_Eleven_Alipay
\\
subPackage
\\
page
\\
pages
\\
pointExchangeGoods
\\
pointExchangeGoods.acss"
,
"d:
\\
work
\\
711Web
\\
711
\\
7_Eleven_Alipay
\\
subPackage
\\
page
\\
pages
\\
pointExchangeCoupon
\\
pointExchangeCoupon.axml"
,
"d:
\\
work
\\
711Web
\\
711
\\
7_Eleven_Alipay
\\
subPackage
\\
page
\\
pages
\\
pointExchangeCoupon
\\
pointExchangeCoupon.acss"
,
"d:
\\
work
\\
711Web
\\
711
\\
7_Eleven_Alipay
\\
subPackage
\\
page
\\
pages
\\
IntegralMallGoods
\\
IntegralMallGoods.js"
,
"d:
\\
work
\\
711Web
\\
711
\\
7_Eleven_Alipay
\\
subPackage
\\
page
\\
pages
\\
IntegralMallGoods
\\
IntegralMallGoods.axml"
,
"d:
\\
work
\\
711Web
\\
711
\\
7_Eleven_Alipay
\\
subPackage
\\
page
\\
pages
\\
pointActivityGroup
\\
pointActivityGroup.axml"
,
"d:
\\
work
\\
711Web
\\
711
\\
7_Eleven_Alipay
\\
subPackage
\\
page
\\
pages
\\
pointExchangeCoupon
\\
pointExchangeCoupon.js"
,
"d:
\\
work
\\
711Web
\\
711
\\
7_Eleven_Alipay
\\
subPackage
\\
page
\\
pages
\\
pointExchangeCoupon
\\
pointExchangeCoupon.json"
,
"d:
\\
work
\\
711Web
\\
711
\\
7_Eleven_Alipay
\\
subPackage
\\
page
\\
pages
\\
IntegralMallGoods
\\
IntegralMallGoods.json"
,
"d:
\\
work
\\
711Web
\\
711
\\
7_Eleven_Alipay
\\
component
\\
citySelection
\\
citySelection.axml"
,
"d:
\\
work
\\
711Web
\\
711
\\
7_Eleven_Alipay
\\
subPackage
\\
page
\\
pages
\\
pointActivityGroup
\\
pointActivityGroup.js"
,
"d:
\\
work
\\
711Web
\\
711
\\
7_Eleven_Alipay
\\
subPackage
\\
page
\\
pages
\\
pointActivityGroup
\\
pointActivityGroup.json"
,
"d:
\\
work
\\
711Web
\\
711
\\
7_Eleven_Alipay
\\
subPackage
\\
page
\\
pages
\\
myValueCard
\\
myValueCard.js"
,
"d:
\\
work
\\
711Web
\\
711
\\
7_Eleven_Alipay
\\
subPackage
\\
page
\\
pages
\\
myValueCard
\\
myValueCard.json"
,
"d:
\\
work
\\
711Web
\\
711
\\
7_Eleven_Alipay
\\
pages
\\
pointList
\\
pointList.acss"
,
"d:
\\
work
\\
711Web
\\
711
\\
7_Eleven_Alipay
\\
project.config.json"
,
"d:
\\
work
\\
711Web
\\
711
\\
7_Eleven_Alipay
\\
utils
\\
wxService.js"
,
"d:
\\
work
\\
711Web
\\
711
\\
7_Eleven_Alipay
\\
utils
\\
Http.js"
,
"d:
\\
work
\\
711Web
\\
711
\\
7_Eleven_Alipay
\\
subPackage
\\
page
\\
pages
\\
valueCard
\\
valueCard.js"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
config
\\
index.js"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
subPackage
\\
page
\\
pages
\\
IntegralMallGoods
\\
IntegralMallGoods.axml"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
subPackage
\\
page
\\
pages
\\
IntegrateGoodsExchangeInfo
\\
IntegrateGoodsExchangeInfo.js"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
subPackage
\\
page
\\
pages
\\
IntegrateGoodsExchangeInfo
\\
IntegrateGoodsExchangeInfo.axml"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
subPackage
\\
page
\\
pages
\\
exchangeAddress
\\
exchangeAddress.axml"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
project.config.json"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
Behavior.js"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
app.json"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
app.js"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
utils
\\
Http.js"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
package-lock.json"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
debug.log"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
pages
\\
consumptionDetails
\\
consumptionDetails.axml"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
pages
\\
integralWater
\\
integralWater.axml"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
pages
\\
userCenter
\\
userCenter.axml"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
pages
\\
integralMallDetail
\\
integralMallDetail.js"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
pages
\\
integralMallDetail
\\
integralMallDetail.axml"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
component
\\
exchange-coupon-modal
\\
exchange-coupon-modal.axml"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
component
\\
authorization-modal
\\
authorization-modal.js"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
wx2my.js"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
component
\\
picNav
\\
picNav.axml"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
component
\\
citySelection
\\
citySelection.js"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
pages
\\
pointDetail
\\
pointDetail.js"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
pages
\\
couponCodeDetail
\\
couponCodeDetail.js"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
component
\\
citySelection
\\
citySelection.axml"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
subPackage
\\
page
\\
pages
\\
subPage
\\
subPage.json"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
subPackage
\\
page
\\
pages
\\
subPage
\\
subPage.js"
,
"d:
\\
work
\\
projects
\\
7_Eleven_Alipay
\\
subPackage
\\
page
\\
pages
\\
subPage
\\
subPage.axml"
],
"storageVersion"
:
"0.70.14"
}
\ No newline at end of file
.tea/tmp-saving/8577039fe016658544a91cc387e0c40e1584585221050ef1
0 → 100644
View file @
59b44945
// subPackage/page/pages/myValueCardInfo/myValueCardInfo.js
const wx2my = require('../../../../wx2my');
const Behavior = require('../../../../Behavior');
const wxService = require('../../../../utils/wxService')
const utils = require('../../../../utils/util')
var wxbarcode = require('../../../../codeUtils/index.js');
wxService.page({
/**
* 页面的初始数据
*/
data: {
supValCardId : null,
no: '',
valueCardInfo : {}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.data.supValCardId = options.id;
my.hideShareMenu();
this.getMyValueCardInfo();
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
//获取我的超值卡详情
getMyValueCardInfo(){
let supValCardId = this.data.supValCardId;
let url = `/merchant/superValueCard/miniProgram/getDetail?supValCardId=${supValCardId}`;
wxService.post(url).then(res => {
if(res){
let obj = res.data.data;
obj.leftTimes = obj.totalTimes - obj.usedTimes;
// obj.
//处理图标显示问题
let arr = [];
for (let i = 0; i < obj.totalTimes; i ++){
let tempObj = {
icon: obj.checkFlagUrl,
};
arr.push(tempObj);
}
for (let j = 0; j < obj.leftTimes ; j ++){
arr[j].icon = obj.noCheckFlagUrl;
}
obj.icons = arr;
obj.startTime = obj.startTime.substring(0, 10);
obj.endTime = obj.endTime.substring(0,10);
if (obj.buyAwayType == 1){
obj.buyPriceText = parseFloat(obj.buyPrice/10/10).toFixed(2);
}
obj.activityDesc = obj.activityDesc ? JSON.parse(obj.activityDesc) : [];
obj.hasDate = obj.activityDesc.filter(item => item.type == 1).length > 0;
let descArr = JSON.parse(JSON.stringify(obj.activityDesc));
descArr = descArr.filter(item => item.type != 1);
// let tempArr = descArr.map(item => {
// return item.value;
// });
obj.descArr = descArr;
this.data.valueCardInfo = obj;
this.setData({
valueCardInfo: this.data.valueCardInfo,
no: obj.supValCardCode
},() => {
this.generatorBarCode();
this.startTimer();
});
}
});
},
//开始定时任务 每60s调用一下
startTimer() {
this.timer = setInterval(() => {
this.onTapRefreshNo();
}, 60000);
},
//
onUnload() {
if (this.timer) {
clearInterval(this.timer);
}
},
//刷新
onTapRefreshNo(){
let supValCardId = this.data.supValCardId;
let url = `/merchant/superValueCard/miniProgram/getChangeCode?supValCardId=${supValCardId}`;
wxService.post(url).then(res => {
if (res) {
if (res.data.data) {
let no = res.data.data;
this.data.no = no;
this.setData({
no: this.data.no,
},() => {
this.generatorBarCode();
// wx2my.showToast({
// title: '刷新成功!',
// });
})
}
else {
wx2my.showToast({
title: '刷新失败,请重试',
icon: ' none'
})
}
}
});
},
//生成条形码
generatorBarCode() {
if (this.data.no) {
wxbarcode.barcode('barcode', this.data.no, 570, 140);
setTimeout(() => {
wxbarcode.barcode('barcode', this.data.no, 570, 140);
}, 200);
}
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
})
\ No newline at end of file
app.json
View file @
59b44945
...
...
@@ -33,7 +33,10 @@
"pages/valueCardInfo/valueCardInfo"
,
"pages/valueCardRecords/valueCardRecords"
,
"pages/myValueCard/myValueCard"
,
"pages/myValueCardInfo/myValueCardInfo"
"pages/myValueCardInfo/myValueCardInfo"
,
"pages/pointActivityGroup/pointActivityGroup"
,
"pages/pointExchangeCoupon/pointExchangeCoupon"
,
"pages/pointExchangeGoods/pointExchangeGoods"
]
}
],
...
...
config/index.js
View file @
59b44945
const
wx2my
=
require
(
'../wx2my'
);
const
Behavior
=
require
(
'../Behavior'
);
const
PROJECT_ENV
=
'
prod
'
;
// 生产 prod, 开发 dev, 测试 test, 预生产 pre
const
brandId
=
2711
;
//2711 生产 1002 测试
const
PROJECT_ENV
=
'
test
'
;
// 生产 prod, 开发 dev, 测试 test, 预生产 pre
const
brandId
=
1002
;
//2711 生产 1002 测试
const
needMock
=
''
;
//
// appid_dev_wx wxc3b64b09b1d3dfc2
...
...
pages/integralWater/integralWater.js
View file @
59b44945
...
...
@@ -133,7 +133,9 @@ wxService.page({
// 去积分商城
handleGoIntegralMall
()
{
// wxService.router(`/pages/IntegralMall/IntegralMall`)
wxService
.
router
(
`/subPackage/page/pages/IntegralMallGoods/IntegralMallGoods`
)
// wxService.router(`/subPackage/page/pages/IntegralMallGoods/IntegralMallGoods`)
//修改为跳转到积分活动分组
wxService
.
router
(
`/subPackage/page/pages/pointActivityGroup/pointActivityGroup`
)
},
// 消费详情
handleGoDetail
(
e
)
{
...
...
subPackage/page/pages/myValueCardInfo/myValueCardInfo.js
View file @
59b44945
...
...
@@ -79,11 +79,11 @@ wxService.page({
}
});
},
//开始定时任务 每
1
0s调用一下
//开始定时任务 每
6
0s调用一下
startTimer
()
{
this
.
timer
=
setInterval
(()
=>
{
this
.
onTapRefreshNo
();
},
1
0000
);
},
6
0000
);
},
//
...
...
subPackage/page/pages/pointActivityGroup/pointActivityGroup.acss
0 → 100644
View file @
59b44945
/* pages/userCenter.wxss */
@import "/base/base.acss";
page {
/* background-color: rgba(0, 0, 0, 0.05); */
background: #ffffff;
}
.page-integral-mall {
border-top: 1px solid rgba(151, 151, 151, 0.1);
}
.box{
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.empty-wrap {
width: 300rpx;
margin: 190rpx auto 0;
text-align: center;
}
.empty-img {
width: 197rpx;
height: 176rpx;
margin-bottom: 48rpx;
}
.empty-text {
color: #cccccc;
font-size: 28rpx;
}
.text-align-left{
text-align: left !important;
}
.point-img {
width: 28rpx;
height: 36rpx;
}
.title-img-point {
display: flex;
align-items: center;
}
.point-exchange-goods-records{
font-size: 28rpx;
color: #ffffff;
display: flex;
justify-content: center;
align-items: center;
height: 80rpx;
position: fixed;
left: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.65);
z-index: 2;
width: 100%;
}
.point-exchange-goods-records:active{
opacity: 0.7;
}
.text-point {
color: rgba(51, 51, 51, 1);
font-size: 42rpx;
margin-left: 10rpx;
}
.mall-title {
height: 150rpx;
padding-left: 50rpx;
padding-right: 42rpx;
box-sizing: border-box;
background-color: rgba(255, 255, 255, 1);
box-shadow: 0px 0px 8px 5px rgba(0, 0, 0, 0.05),
0px 0px 3px 0px rgba(0, 0, 0, 0.03);
}
.title-num-point {
padding-top: 30rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.integral-vip-rules {
width: 133rpx;
height: 42rpx;
line-height: 42rpx;
border-radius: 34rpx;
font-size: 23rpx;
text-align: center;
border: 1px solid rgba(204, 204, 204, 1);
}
.title-time-point {
color: rgba(102, 102, 102, 1);
font-size: 20rpx;
text-align: left;
padding-top: 3rpx;
margin-top: 15rpx;
}
/* 活动分组 */
.activity-group-list{
width: 100%;
height: auto;
padding: 10rpx 30rpx;
margin-top: 20rpx;
}
.activity-group-list .list-item{
width: 100%;
height: auto;
margin-bottom: 20rpx;
}
.activity-group-list .list-item:active{
opacity: 0.7;
}
.activity-group-list .list-item image{
width: 100%;
display: block;
border-radius: 10rpx;
}
\ No newline at end of file
subPackage/page/pages/pointActivityGroup/pointActivityGroup.axml
0 → 100644
View file @
59b44945
<!--pages/userCenter.wxml-->
<view class='page-integral-mall'>
<!-- title -->
<view class='mall-title'>
<view class='title-num-point'>
<view class='title-img-point'>
<view class='img-point'>
<image class="point-img" src='/assets/imgs/point.png' mode="widthFix" />
</view>
<view class='text-point'>
{{memberPoint.total}}
</view>
</view>
<view class='integral-vip-rules' onTap="handleGoMemberRulesRules">会员规则</view>
</view>
<view class='title-time-point' a:if="{{memberPoint.expirePoint > 0}}">
{{memberPoint.expirePoint}} 积分将于 {{memberPoint.expireDate}} 清零
</view>
<view class='title-time-point' a:if="{{memberPoint.expirePoint == 0}}">
暂无将过期积分
</view>
</view>
<!-- 活动分组列表 -->
<view class='activity-group-list box' a:if="{{activityList.length > 0}}">
<view class='list-item'
a:for="{{activityList}}"
a:for-item="item"
data-item="{{item}}"
onTap='onTapToInfo'
a:key="*this">
<image mode='widthFix' src='{{item.msgUrl}}'></image>
</view>
</view>
<!-- 空 -->
<empty text="当前商家暂无任何积分兑换活动~" a:else/>
</view>
subPackage/page/pages/pointActivityGroup/pointActivityGroup.js
0 → 100644
View file @
59b44945
// pages/userCenter.js
const
wxService
=
require
(
'../../../../utils/wxService'
)
const
wx2my
=
require
(
'../../../../wx2my'
);
const
Behavior
=
require
(
'../../../../Behavior'
);
wxService
.
page
({
/**
* 页面的初始数据
*/
data
:
{
query
:
''
,
memberPoint
:
{
total
:
'--'
,
expirePoint
:
0
,
expireDate
:
''
},
activityList
:
[],
pageNo
:
1
,
pageSize
:
10
,
totalPage
:
0
,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
my
.
hideShareMenu
();
this
.
refreshPointRequest
();
this
.
getPointActivityGroupList
();
},
//刷新积分请求
refreshPointRequest
()
{
const
{
memberId
}
=
wx2my
.
getStorageSync
(
'_baseUserInfo'
)
?
wx2my
.
getStorageSync
(
'_baseUserInfo'
).
data
:
{};
if
(
!
memberId
)
{
return
;
}
wxService
.
get
(
'/member/memberPoint/refreshExpiredPoint?memberId='
+
memberId
).
then
(
res
=>
{
})
},
/**
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
//获取会员积分信息
this
.
getMemberIntegrateInfo
();
},
//查询会员积分信息
getMemberIntegrateInfo
()
{
// wx.showLoading({
// title: '数据请求中..',
// });
const
{
memberId
}
=
wx2my
.
getStorageSync
(
'_baseUserInfo'
)
?
wx2my
.
getStorageSync
(
'_baseUserInfo'
).
data
:
{};
if
(
!
memberId
)
{
return
;
}
wxService
.
get
(
`/member/memberPoint/getMemberPointInfo?memberId=
${
memberId
}
`
).
then
(
res
=>
{
let
data
=
res
.
data
.
data
?
res
.
data
.
data
:
{};
this
.
data
.
memberPoint
.
total
=
data
.
point
?
data
.
point
:
0
;
this
.
data
.
memberPoint
.
expirePoint
=
data
.
pointWillExpired
?
data
.
pointWillExpired
:
0
;
let
expireDate
=
data
.
pointExpiredTime
?
data
.
pointExpiredTime
:
'2019-12-31 23:59:59'
;
if
(
expireDate
)
{
let
dateStr
=
expireDate
.
replace
(
/-/g
,
'/'
);
let
da
=
new
Date
(
dateStr
);
let
year
=
da
.
getFullYear
();
let
month
=
(
da
.
getMonth
()
+
1
)
<
10
?
'0'
+
(
da
.
getMonth
()
+
1
)
:
da
.
getMonth
()
+
1
;
let
day
=
da
.
getDate
()
<
10
?
'0'
+
da
.
getDate
()
:
da
.
getDate
();
expireDate
=
`
${
year
}
年
${
month
}
月
${
day
}
日`
}
this
.
data
.
memberPoint
.
expireDate
=
expireDate
;
this
.
setData
({
memberPoint
:
this
.
data
.
memberPoint
});
});
},
// 点击跳转至会员规则页
handleGoMemberRulesRules
()
{
wxService
.
router
(
`/pages/memberRules/memberRules?type=2`
)
},
//获取积分分组活动列表
getPointActivityGroupList
(
refres
){
let
pageNo
=
this
.
data
.
pageNo
,
pageSize
=
this
.
data
.
pageSize
;
wxService
.
post
(
`/merchant/groupingActivities/findPage?pageNo=
${
pageNo
}
&pageSize=
${
pageSize
}
`
,{
status
:
0
}).
then
(
res
=>
{
if
(
res
){
let
list
=
res
.
data
.
data
.
content
?
res
.
data
.
data
.
content
:
[];
this
.
data
.
activityList
=
this
.
data
.
activityList
.
concat
(
list
);
this
.
data
.
totalPage
=
res
.
data
.
data
.
totalPages
;
this
.
setData
({
activityList
:
this
.
data
.
activityList
,
totalPage
:
this
.
data
.
totalPage
});
}
if
(
refres
){
my
.
stopPullDownRefresh
();
wx2my
.
showToast
({
title
:
'刷新成功'
,
});
}
})
},
//去详情
onTapToInfo
(
e
){
let
item
=
e
.
currentTarget
.
dataset
.
item
;
if
(
item
.
type
==
1
){
//积分换物
wx2my
.
navigateTo
({
url
:
'/subPackage/page/pages/pointExchangeGoods/pointExchangeGoods?id='
+
item
.
id
,
});
}
else
if
(
item
.
type
==
2
){
//积分兑换优惠券
wx2my
.
navigateTo
({
url
:
'/subPackage/page/pages/pointExchangeCoupon/pointExchangeCoupon?id='
+
item
.
id
,
});
}
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
this
.
data
.
pageNo
=
1
;
this
.
data
.
activityList
=
[];
this
.
getPointActivityGroupList
(
true
);
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
if
(
this
.
data
.
pageNo
<
this
.
data
.
totalPage
){
this
.
data
.
pageNo
++
;
this
.
getPointActivityGroupList
();
}
else
{
if
(
this
.
data
.
pageNo
>
1
){
wx2my
.
showToast
({
title
:
'没有更多数据啦~'
,
icon
:
'none'
});
}
}
},
});
\ No newline at end of file
subPackage/page/pages/pointActivityGroup/pointActivityGroup.json
0 → 100644
View file @
59b44945
{
"defaultTitle"
:
"积分活动中心"
,
"pullRefresh"
:
true
,
"usingComponents"
:
{
}
}
\ No newline at end of file
subPackage/page/pages/pointExchangeCoupon/pointExchangeCoupon.acss
0 → 100644
View file @
59b44945
/* pages/userCenter.wxss */
@import "/base/base.acss";
page {
/* background-color: rgba(0, 0, 0, 0.05); */
background: #ffffff;
}
.page-integral-mall {
border-top: 1px solid rgba(151, 151, 151, 0.1);
}
.empty-wrap {
width: 300rpx;
margin: 190rpx auto 0;
text-align: center;
}
.empty-img {
width: 197rpx;
height: 176rpx;
margin-bottom: 48rpx;
}
.empty-text {
color: #cccccc;
font-size: 28rpx;
}
/* 卡劵列表 */
.coupon-wrap {
padding: 20rpx;
clear: both;
}
.coupon-list {
margin-bottom: 10rpx;
border-bottom: solid 1px #eeeeee;
}
.coupon-img-title {
display: flex;
align-items: center;
}
.coupon-item {
display: flex;
align-items: center;
height: 144rpx;
background-color: #fff;
justify-content: space-between;
}
.coupon-btn {
margin-right: 30rpx;
}
.coupon-btn-click {
width: 153.8rpx;
height: 48rpx;
border-radius: 33rpx;
background-color: rgba(5, 195, 91, 1);
box-shadow: 0rpx 3rpx 10rpx 0rpx rgba(5, 195, 91, 0.3);
line-height: 48rpx;
color: rgba(255, 255, 255, 1);
font-size: 24rpx;
text-align: center;
}
.coupon-btn-click.disabled{
background-color: #dddddd !important;
box-shadow: none;
}
.coupon-btn-num {
width: 153.8rpx;
height: 22rpx;
color: rgba(250, 100, 0, 1);
font-size: 22rpx;
text-align: center;
margin-top: 10rpx;
}
.coupon-img {
box-sizing: border-box;
margin-left: 30rpx;
}
.coupon-img image {
width: 80rpx;
height: 80rpx;
}
.coupon-info {
padding: 42rpx 39rpx;
box-sizing: border-box;
}
.coupon-name {
color: #333;
}
.coupon-time {
color: #fc921e;
margin-bottom: 18rpx;
font-size: 26rpx;
}
.coupon-desc {
/* color: #999;
margin-top: 11rpx;
width: 360rpx;
font-size: 24rpx; */
color: rgba(118, 161, 213, 1);
font-size: 22rpx;
text-align: right;
margin-top: 18rpx;
}
.text-align-left{
text-align: left !important;
}
.coupon-code {
color: #ffffff;
word-wrap: break-word;
font-weight: bold;
margin: 0 10rpx;
padding: 35rpx 20rpx;
box-sizing: content-box;
width: 40rpx;
line-height: 35rpx;
}
.invalid-coupon {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
background-color: rgba(0, 0, 0, 0.5);
z-index: 3;
border-radius: 7rpx;
}
.invalid-img {
position: absolute;
width: 147rpx;
height: 147rpx;
right: 81rpx;
top: 31rpx;
z-index: 4;
}
.point-img {
width: 28rpx;
height: 36rpx;
}
.title-img-point {
display: flex;
align-items: center;
}
.point-exchange-goods-records{
font-size: 28rpx;
color: #ffffff;
display: flex;
justify-content: center;
align-items: center;
height: 80rpx;
position: fixed;
left: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.65);
z-index: 2;
width: 100%;
}
.point-exchange-goods-records:active{
opacity: 0.7;
}
.text-point {
color: rgba(51, 51, 51, 1);
font-size: 42rpx;
margin-left: 10rpx;
}
.mall-title {
height: 150rpx;
padding-left: 50rpx;
padding-right: 42rpx;
box-sizing: border-box;
background-color: rgba(255, 255, 255, 1);
box-shadow: 0px 0px 8px 5px rgba(0, 0, 0, 0.05),
0px 0px 3px 0px rgba(0, 0, 0, 0.03);
}
.title-num-point {
padding-top: 30rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.integral-vip-rules {
width: 133rpx;
height: 42rpx;
line-height: 42rpx;
border-radius: 34rpx;
font-size: 23rpx;
text-align: center;
border: 1px solid rgba(204, 204, 204, 1);
}
.title-time-point {
color: rgba(102, 102, 102, 1);
font-size: 20rpx;
text-align: left;
padding-top: 3rpx;
margin-top: 15rpx;
}
.mall-tab {
height: 80rpx;
display: flex;
align-items: center;
background-color: #fff;
padding: 5rpx 0;
box-sizing: border-box;
margin-top: 10rpx;
border-bottom: solid 1px #eeeeee;
}
.tab-coupon, .tab-goods,.tab-coupon-goods {
flex: 1;
text-align: center;
color: rgba(102, 102, 102, 1);
font-size: 26rpx;
}
.tab-coupon {
border-right: 1rpx solid rgba(102, 102, 102, 1);
}
.tab-active {
color: rgba(5, 195, 91, 1);
}
\ No newline at end of file
subPackage/page/pages/pointExchangeCoupon/pointExchangeCoupon.axml
0 → 100644
View file @
59b44945
<!--pages/userCenter.wxml-->
<view class='page-integral-mall' style="padding-bottom: {{currentTab =='goods' ? '80rpx' : '40rpx'}}">
<!-- title -->
<view class='mall-title'>
<view class='title-num-point'>
<view class='title-img-point'>
<view class='img-point'>
<image class="point-img" src='/assets/imgs/point.png' mode="widthFix" />
</view>
<view class='text-point'>
{{memberPoint.total}}
</view>
</view>
<view class='integral-vip-rules' a:if="{{integralCouponList.length}}" onTap="handleGoMemberRulesRules">会员规则</view>
</view>
<view class='title-time-point' a:if="{{memberPoint.expirePoint > 0}}">
{{memberPoint.expirePoint}} 积分将于 {{memberPoint.expireDate}} 清零
</view>
<view class='title-time-point' a:if="{{memberPoint.expirePoint == 0}}">
暂无将过期积分
</view>
</view>
<!-- 优惠券列表-->
<view>
<view class='coupon-wrap' a:if="{{integralCouponList.length}}">
<view
class='coupon-list'
a:for="{{integralCouponList}}"
a:for-item="item"
a:for-index="k"
a:key="{{k}}"
data-id="{{item.id}}"
onTap="goCouponDetail"
>
<view class="coupon-item">
<view class='coupon-img-title'>
<view class='coupon-img'>
<image a:if="{{item.thumbnail}}" src='{{item.thumbnail}}' />
<image a:else src='https://img3.bigaka.com/prd/3001/202003/20200309/30018086c13a-4579-47ed-a16e-c74cb8010c1d.png' />
</view>
<view class='coupon-info'>
<view class='coupon-name fs-28'>{{item.title}}</view>
<view class='coupon-desc text-align-left fs-24'>查看详情</view>
</view>
</view>
<view class='coupon-btn'>
<view class='coupon-btn-click'
data-id="{{item.id}}"
data-point="{{item.point}}"
catchTap='exchange'>立即兑换</view>
<view class='coupon-btn-num'>{{item.point}}积分</view>
</view>
</view>
</view>
</view>
<view class='empty-wrap' a:if="{{!integralCouponList.length}}">
<view class='empty-info'>
<image class='empty-img'
src='https://img3.bigaka.com/prd/3001/202003/20200309/30012bce7628-f373-4fa7-a6a4-ada9c1c721d6.png' />
<view class='empty-text'>没有任何卡劵</view>
</view>
</view>
</view>
<exchange-coupon-modal exchangeId="{{exchangeId}}" exchangePoint="{{exchangePoint}}" isExchange='{{isExchange}}' onClickClose="modalClose"/>
<!--<no-more wx:if="{{noMore}}"/>-->
</view>
subPackage/page/pages/pointExchangeCoupon/pointExchangeCoupon.js
0 → 100644
View file @
59b44945
// pages/userCenter.js
const
wxService
=
require
(
'../../../../utils/wxService'
)
const
wx2my
=
require
(
'../../../../wx2my'
);
const
Behavior
=
require
(
'../../../../Behavior'
);
wxService
.
page
({
/**
* 页面的初始数据
*/
data
:
{
query
:
''
,
integralCouponList
:
[],
// 积分兑换优惠券列表
noMore
:
false
,
isExchange
:
false
,
exchangeId
:
''
,
exchangePoint
:
0
,
memberPoint
:
{
total
:
'--'
,
expirePoint
:
0
,
expireDate
:
''
},
activityId
:
''
,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
this
.
data
.
activityId
=
options
.
id
;
my
.
hideShareMenu
();
this
.
refreshPointRequest
();
this
.
getActivityGroupInfo
();
},
//刷新积分请求
refreshPointRequest
()
{
const
{
memberId
}
=
wx2my
.
getStorageSync
(
'_baseUserInfo'
)
?
wx2my
.
getStorageSync
(
'_baseUserInfo'
).
data
:
{};
if
(
!
memberId
)
{
return
;
}
wxService
.
get
(
'/member/memberPoint/refreshExpiredPoint?memberId='
+
memberId
).
then
(
res
=>
{
})
},
/**
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
//获取会员积分信息
this
.
getMemberIntegrateInfo
();
},
//查询会员积分信息
getMemberIntegrateInfo
()
{
// wx.showLoading({
// title: '数据请求中..',
// });
const
{
memberId
}
=
wx2my
.
getStorageSync
(
'_baseUserInfo'
)
?
wx2my
.
getStorageSync
(
'_baseUserInfo'
).
data
:
{};
if
(
!
memberId
)
{
return
;
}
wxService
.
get
(
`/member/memberPoint/getMemberPointInfo?memberId=
${
memberId
}
`
).
then
(
res
=>
{
let
data
=
res
.
data
.
data
?
res
.
data
.
data
:
{};
this
.
data
.
memberPoint
.
total
=
data
.
point
?
data
.
point
:
0
;
this
.
data
.
memberPoint
.
expirePoint
=
data
.
pointWillExpired
?
data
.
pointWillExpired
:
0
;
let
expireDate
=
data
.
pointExpiredTime
?
data
.
pointExpiredTime
:
'2019-12-31 23:59:59'
;
if
(
expireDate
)
{
let
dateStr
=
expireDate
.
replace
(
/-/g
,
'/'
);
let
da
=
new
Date
(
dateStr
);
let
year
=
da
.
getFullYear
();
let
month
=
(
da
.
getMonth
()
+
1
)
<
10
?
'0'
+
(
da
.
getMonth
()
+
1
)
:
da
.
getMonth
()
+
1
;
let
day
=
da
.
getDate
()
<
10
?
'0'
+
da
.
getDate
()
:
da
.
getDate
();
expireDate
=
`
${
year
}
年
${
month
}
月
${
day
}
日`
}
this
.
data
.
memberPoint
.
expireDate
=
expireDate
;
this
.
setData
({
memberPoint
:
this
.
data
.
memberPoint
});
});
},
//查询指定积分换物活动兑换数量
findExchangeNumByIds
(
integralGoodsList
)
{
//获取ids
let
ids
=
integralGoodsList
.
map
(
g
=>
{
return
g
.
id
;
});
wxService
.
post
(
`/member/pointsRedemptionProductSetting/getExchangeCount`
,
ids
).
then
(
res
=>
{
if
(
res
)
{
let
data
=
res
.
data
.
data
?
res
.
data
.
data
:
null
;
if
(
data
)
{
for
(
let
k
in
data
)
{
let
id
=
k
,
value
=
data
[
k
];
for
(
let
i
=
0
;
i
<
integralGoodsList
.
length
;
i
++
)
{
if
(
integralGoodsList
[
i
].
id
==
id
)
{
integralGoodsList
[
i
].
canExchange
=
integralGoodsList
[
i
].
stock
>
value
;
}
}
}
}
}
this
.
setData
({
integralGoodsList
:
integralGoodsList
,
});
});
},
//关闭事件
modalClose
(){
this
.
setData
({
isExchange
:
false
});
},
//获取积分活动分组详情
getActivityGroupInfo
(){
wxService
.
get
(
`/merchant/groupingActivities/findById?id=
${
this
.
data
.
activityId
}
`
).
then
(
res
=>
{
if
(
res
){
let
data
=
res
.
data
.
data
?
res
.
data
.
data
:
null
;
if
(
data
){
let
ids
=
data
.
sons
.
map
(
item
=>
{
return
item
.
activateId
;
});
this
.
initIntegralCouponList
(
ids
);
}
}
})
},
// 积分兑换优惠券列表
initIntegralCouponList
(
ids
)
{
wx2my
.
showLoading
({
title
:
'加载中'
});
wxService
.
post
(
`/coupon/pointsRedemptionCouponSetting/findByIds`
,
ids
).
then
(
res
=>
{
if
(
res
)
{
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
wx2my
.
hideLoading
()
this
.
setData
({
integralCouponList
:
data
.
reverse
()
});
}
}
}).
finally
(()
=>
{
wx2my
.
hideLoading
();
})
},
//立即兑换优惠券
exchange
(
e
)
{
const
{
id
,
point
}
=
e
.
currentTarget
.
dataset
this
.
setData
({
isExchange
:
true
,
exchangeId
:
id
,
exchangePoint
:
point
})
},
// 点击跳转至会员规则页
handleGoMemberRulesRules
()
{
wxService
.
router
(
`/pages/memberRules/memberRules?type=2`
)
},
goCouponDetail
(
e
)
{
const
{
id
}
=
e
.
currentTarget
.
dataset
wxService
.
router
(
`/pages/integralMallDetail/integralMallDetail?id=
${
id
}
`
)
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
},
})
\ No newline at end of file
subPackage/page/pages/pointExchangeCoupon/pointExchangeCoupon.json
0 → 100644
View file @
59b44945
{
"defaultTitle"
:
"积分兑换优惠券"
,
"pullRefresh"
:
true
,
"usingComponents"
:
{
"no-more"
:
"/component/noMore/noMore"
,
"exchange-coupon-modal"
:
"/component/exchange-coupon-modal/exchange-coupon-modal"
}
}
\ No newline at end of file
subPackage/page/pages/pointExchangeGoods/pointExchangeGoods.acss
0 → 100644
View file @
59b44945
/* pages/userCenter.wxss */
@import "/base/base.acss";
page {
/* background-color: rgba(0, 0, 0, 0.05); */
background: #ffffff;
}
.page-integral-mall {
border-top: 1px solid rgba(151, 151, 151, 0.1);
}
.empty-wrap {
width: 300rpx;
margin: 190rpx auto 0;
text-align: center;
}
.empty-img {
width: 197rpx;
height: 176rpx;
margin-bottom: 48rpx;
}
.empty-text {
color: #cccccc;
font-size: 28rpx;
}
/* 卡劵列表 */
.coupon-wrap {
padding: 20rpx;
clear: both;
}
.coupon-list {
margin-bottom: 10rpx;
border-bottom: solid 1px #eeeeee;
}
.coupon-img-title {
display: flex;
align-items: center;
}
.coupon-item {
display: flex;
align-items: center;
height: 144rpx;
background-color: #fff;
justify-content: space-between;
}
.coupon-btn {
margin-right: 30rpx;
}
.coupon-btn-click {
width: 153.8rpx;
height: 48rpx;
border-radius: 33rpx;
background-color: rgba(5, 195, 91, 1);
box-shadow: 0rpx 3rpx 10rpx 0rpx rgba(5, 195, 91, 0.3);
line-height: 48rpx;
color: rgba(255, 255, 255, 1);
font-size: 24rpx;
text-align: center;
}
.coupon-btn-click.disabled{
background-color: #dddddd !important;
box-shadow: none;
}
.coupon-btn-num {
width: 153.8rpx;
height: 22rpx;
color: rgba(250, 100, 0, 1);
font-size: 22rpx;
text-align: center;
margin-top: 10rpx;
}
.coupon-img {
box-sizing: border-box;
margin-left: 30rpx;
}
.coupon-img image {
width: 80rpx;
height: 80rpx;
}
.coupon-info {
padding: 42rpx 39rpx;
box-sizing: border-box;
}
.coupon-name {
color: #333;
}
.coupon-time {
color: #fc921e;
margin-bottom: 18rpx;
font-size: 26rpx;
}
.coupon-desc {
/* color: #999;
margin-top: 11rpx;
width: 360rpx;
font-size: 24rpx; */
color: rgba(118, 161, 213, 1);
font-size: 22rpx;
text-align: right;
margin-top: 18rpx;
}
.text-align-left{
text-align: left !important;
}
.coupon-code {
color: #ffffff;
word-wrap: break-word;
font-weight: bold;
margin: 0 10rpx;
padding: 35rpx 20rpx;
box-sizing: content-box;
width: 40rpx;
line-height: 35rpx;
}
.invalid-coupon {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
background-color: rgba(0, 0, 0, 0.5);
z-index: 3;
border-radius: 7rpx;
}
.invalid-img {
position: absolute;
width: 147rpx;
height: 147rpx;
right: 81rpx;
top: 31rpx;
z-index: 4;
}
.point-img {
width: 28rpx;
height: 36rpx;
}
.title-img-point {
display: flex;
align-items: center;
}
.point-exchange-goods-records{
font-size: 28rpx;
color: #ffffff;
display: flex;
justify-content: center;
align-items: center;
height: 80rpx;
position: fixed;
left: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.65);
z-index: 2;
width: 100%;
}
.point-exchange-goods-records:active{
opacity: 0.7;
}
.text-point {
color: rgba(51, 51, 51, 1);
font-size: 42rpx;
margin-left: 10rpx;
}
.mall-title {
height: 150rpx;
padding-left: 50rpx;
padding-right: 42rpx;
box-sizing: border-box;
background-color: rgba(255, 255, 255, 1);
box-shadow: 0px 0px 8px 5px rgba(0, 0, 0, 0.05),
0px 0px 3px 0px rgba(0, 0, 0, 0.03);
}
.title-num-point {
padding-top: 30rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.integral-vip-rules {
width: 133rpx;
height: 42rpx;
line-height: 42rpx;
border-radius: 34rpx;
font-size: 23rpx;
text-align: center;
border: 1px solid rgba(204, 204, 204, 1);
}
.title-time-point {
color: rgba(102, 102, 102, 1);
font-size: 20rpx;
text-align: left;
padding-top: 3rpx;
margin-top: 15rpx;
}
.mall-tab {
height: 80rpx;
display: flex;
align-items: center;
background-color: #fff;
padding: 5rpx 0;
box-sizing: border-box;
margin-top: 10rpx;
border-bottom: solid 1px #eeeeee;
}
.tab-coupon, .tab-goods,.tab-coupon-goods {
flex: 1;
text-align: center;
color: rgba(102, 102, 102, 1);
font-size: 26rpx;
}
.tab-coupon {
border-right: 1rpx solid rgba(102, 102, 102, 1);
}
.tab-active {
color: rgba(5, 195, 91, 1);
}
\ No newline at end of file
subPackage/page/pages/pointExchangeGoods/pointExchangeGoods.axml
0 → 100644
View file @
59b44945
<!--pages/userCenter.wxml-->
<view class='page-integral-mall' style="padding-bottom: 80rpx;">
<!-- title -->
<view class='mall-title'>
<view class='title-num-point'>
<view class='title-img-point'>
<view class='img-point'>
<image class="point-img" src='/assets/imgs/point.png' mode="widthFix" />
</view>
<view class='text-point'>
{{memberPoint.total}}
</view>
</view>
</view>
<view class='title-time-point' a:if="{{memberPoint.expirePoint > 0}}">
{{memberPoint.expirePoint}} 积分将于 {{memberPoint.expireDate}} 清零
</view>
<view class='title-time-point' a:if="{{memberPoint.expirePoint == 0}}">
暂无将过期积分
</view>
</view>
<!-- goods -->
<view>
<view class='coupon-wrap' a:if="{{integralGoodsList.length}}">
<view
class='coupon-list'
a:for="{{integralGoodsList}}"
a:for-item="item"
a:for-index="k"
a:key="{{k}}"
data-id="{{item.id}}"
onTap="goIntegrateGoodsExchangeDetail"
>
<view class="coupon-item">
<view class='coupon-img-title'>
<view class='coupon-img'>
<image a:if="{{item.thumbnail}}" src='{{item.thumbnail}}' />
<image a:else src='https://img3.bigaka.com/prd/3001/202003/20200309/30018086c13a-4579-47ed-a16e-c74cb8010c1d.png' />
</view>
<view class='coupon-info'>
<view class='coupon-name fs-28'>{{item.title}}</view>
<view class='coupon-desc text-align-left fs-24'>查看详情</view>
</view>
</view>
<view class='coupon-btn'>
<view class='coupon-btn-click'
data-id="{{item.id}}"
data-point="{{item.point}}"
data-canexchange="{{item.canExchange}}"
catchTap='exchangeGoods'>立即兑换</view>
<view class='coupon-btn-num'>{{item.point}}积分</view>
</view>
</view>
</view>
</view>
<view class='empty-wrap' a:if="{{!integralGoodsList.length}}">
<view class='empty-info'>
<image class='empty-img'
src='https://img3.bigaka.com/prd/3001/202003/20200309/30012bce7628-f373-4fa7-a6a4-ada9c1c721d6.png' />
<view class='empty-text'>没有任何物品</view>
</view>
</view>
</view>
<!-- 悬浮兑换记录 -->
<view class='point-exchange-goods-records' onTap='onTapToExchangeRecords'>
查看兑换记录 >>
</view>
</view>
<!-- 库存没了 -->
<dialog-stock-empty show="{{dialogStockEmpty}}" onDialogBtnCallBack="dialogBtnCallBack"/>
<dialog-user-limit show="{{dialogUserLimit}}"/>
subPackage/page/pages/pointExchangeGoods/pointExchangeGoods.js
0 → 100644
View file @
59b44945
// pages/userCenter.js
const
wxService
=
require
(
'../../../../utils/wxService'
)
const
wx2my
=
require
(
'../../../../wx2my'
);
const
Behavior
=
require
(
'../../../../Behavior'
);
wxService
.
page
({
/**
* 页面的初始数据
*/
data
:
{
query
:
''
,
integralGoodsList
:
[],
// 限量精品列表
noMore
:
false
,
isExchange
:
false
,
exchangeId
:
''
,
exchangePoint
:
0
,
memberPoint
:
{
total
:
'--'
,
expirePoint
:
0
,
expireDate
:
''
},
dialogStockEmpty
:
false
,
dialogUserLimit
:
false
,
activityId
:
''
,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
this
.
data
.
activityId
=
options
.
id
;
my
.
hideShareMenu
();
this
.
refreshPointRequest
();
this
.
getActivityGroupInfo
();
},
//刷新积分请求
refreshPointRequest
()
{
const
{
memberId
}
=
wx2my
.
getStorageSync
(
'_baseUserInfo'
)?
wx2my
.
getStorageSync
(
'_baseUserInfo'
).
data
:
{};
if
(
!
memberId
)
{
return
;
}
wxService
.
get
(
'/member/memberPoint/refreshExpiredPoint?memberId='
+
memberId
).
then
(
res
=>
{
})
},
//获取积分活动分组详情
getActivityGroupInfo
()
{
wxService
.
get
(
`/merchant/groupingActivities/findById?id=
${
this
.
data
.
activityId
}
`
).
then
(
res
=>
{
if
(
res
)
{
let
data
=
res
.
data
.
data
?
res
.
data
.
data
:
null
;
if
(
data
)
{
let
ids
=
data
.
sons
.
map
(
item
=>
{
return
item
.
activateId
;
});
this
.
initIntegralProductList
(
ids
);
}
}
})
},
/**
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
//获取会员积分信息
this
.
getMemberIntegrateInfo
();
if
(
wx2my
.
getStorageSync
(
'needReloadExchangeList'
).
data
)
{
wx2my
.
removeStorageSync
(
'needReloadExchangeList'
);
this
.
getActivityGroupInfo
();
}
},
//积分换物记录
onTapToExchangeRecords
()
{
wx2my
.
navigateTo
({
url
:
'/subPackage/page/pages/recordList/recordList'
,
});
},
//查询会员积分信息
getMemberIntegrateInfo
()
{
// wx.showLoading({
// title: '数据请求中..',
// });
const
{
memberId
}
=
wx2my
.
getStorageSync
(
'_baseUserInfo'
)
?
wx2my
.
getStorageSync
(
'_baseUserInfo'
).
data
:
{};
if
(
!
memberId
)
{
return
;
}
wxService
.
get
(
`/member/memberPoint/getMemberPointInfo?memberId=
${
memberId
}
`
).
then
(
res
=>
{
let
data
=
res
.
data
.
data
?
res
.
data
.
data
:
{};
this
.
data
.
memberPoint
.
total
=
data
.
point
?
data
.
point
:
0
;
this
.
data
.
memberPoint
.
expirePoint
=
data
.
pointWillExpired
?
data
.
pointWillExpired
:
0
;
let
expireDate
=
data
.
pointExpiredTime
?
data
.
pointExpiredTime
:
'2019-12-31 23:59:59'
;
if
(
expireDate
)
{
let
dateStr
=
expireDate
.
replace
(
/-/g
,
'/'
);
let
da
=
new
Date
(
dateStr
);
let
year
=
da
.
getFullYear
();
let
month
=
(
da
.
getMonth
()
+
1
)
<
10
?
'0'
+
(
da
.
getMonth
()
+
1
)
:
da
.
getMonth
()
+
1
;
let
day
=
da
.
getDate
()
<
10
?
'0'
+
da
.
getDate
()
:
da
.
getDate
();
expireDate
=
`
${
year
}
年
${
month
}
月
${
day
}
日`
}
this
.
data
.
memberPoint
.
expireDate
=
expireDate
;
this
.
setData
({
memberPoint
:
this
.
data
.
memberPoint
});
});
},
// 查询所有生效中的活动 限量精品
initIntegralProductList
(
ids
)
{
wx2my
.
showLoading
({
title
:
'加载中'
})
wxService
.
post
(
`/member/pointsRedemptionProductSetting/findByIds`
,
ids
).
then
(
res
=>
{
if
(
res
)
{
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
let
list
=
data
?
data
:
[];
let
integralGoodsList
=
list
;
this
.
findExchangeNumByIds
(
integralGoodsList
);
}
}
}).
finally
(()
=>
{
wx2my
.
hideLoading
();
})
},
//查询指定积分换物活动兑换数量
findExchangeNumByIds
(
integralGoodsList
)
{
//获取ids
let
ids
=
integralGoodsList
.
map
(
g
=>
{
return
g
.
id
;
});
wxService
.
post
(
`/member/pointsRedemptionProductSetting/getExchangeCount`
,
ids
).
then
(
res
=>
{
if
(
res
)
{
let
data
=
res
.
data
.
data
?
res
.
data
.
data
:
null
;
if
(
data
)
{
for
(
let
k
in
data
)
{
let
id
=
k
,
value
=
data
[
k
];
for
(
let
i
=
0
;
i
<
integralGoodsList
.
length
;
i
++
)
{
if
(
integralGoodsList
[
i
].
id
==
id
)
{
integralGoodsList
[
i
].
canExchange
=
integralGoodsList
[
i
].
stock
>
value
;
}
}
}
}
}
this
.
setData
({
integralGoodsList
:
integralGoodsList
,
});
});
},
// 立即兑换物品
exchangeGoods
(
e
)
{
const
{
id
,
point
,
canexchange
}
=
e
.
currentTarget
.
dataset
;
const
{
memberId
}
=
wx2my
.
getStorageSync
(
'_baseUserInfo'
)
?
wx2my
.
getStorageSync
(
'_baseUserInfo'
).
data
:
{};
if
(
!
canexchange
)
{
this
.
setData
({
dialogStockEmpty
:
true
});
return
;
}
//检查是不是可以兑换
wx2my
.
showLoading
({
title
:
'检查兑换资格中..'
,
});
wxService
.
post
(
`/member/pointsRedemptionProductRecord/checkByMemberIdAndSettingId?memberId=
${
memberId
}
&settingId=
${
id
}
`
).
then
(
res
=>
{
if
(
res
.
data
.
data
==
-
1
)
{
this
.
setData
({
dialogUserLimit
:
true
})
}
else
{
wx2my
.
navigateTo
({
url
:
'/subPackage/page/pages/exchangeAddress/exchangeAddress?id='
+
id
,
});
}
});
},
//跳转积分换物详情
// subPackage/page/pages/IntegrateGoodsExchangeInfo/IntegrateGoodsExchangeInfo
goIntegrateGoodsExchangeDetail
(
e
)
{
const
{
id
}
=
e
.
currentTarget
.
dataset
wxService
.
router
(
`/subPackage/page/pages/IntegrateGoodsExchangeInfo/IntegrateGoodsExchangeInfo?id=
${
id
}
`
)
},
//库存弹框回调事件
dialogBtnCallBack
(
close
){
this
.
setData
({
dialogStockEmpty
:
false
});
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
},
})
\ No newline at end of file
subPackage/page/pages/pointExchangeGoods/pointExchangeGoods.json
0 → 100644
View file @
59b44945
{
"defaultTitle"
:
"积分换物"
,
"pullRefresh"
:
true
,
"usingComponents"
:
{
"no-more"
:
"/component/noMore/noMore"
,
"dialog-stock-empty"
:
"/component/dialogStockEmpty/dialogStockEmpty"
,
"dialog-user-limit"
:
"/component/dialogUserLimit/dialogUserLimit"
}
}
\ No newline at end of file
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