Commit 001cff5c by 谢中龙

超值卡

parent 67562292
...@@ -115,9 +115,9 @@ App({ ...@@ -115,9 +115,9 @@ App({
imageUrl: envInfo.imgCtx, //图片地址 imageUrl: envInfo.imgCtx, //图片地址
isFullSucreen: false, // 当前设备是否为 FullSucreen isFullSucreen: false, // 当前设备是否为 FullSucreen
commonFunc: commonFunc, commonFunc: commonFunc,
// brandId: 2711, brandId: 2711,
// brandId: 2005, // brandId: 2005,
// brandId: 1001, // brandId: 1001,
brandId: 1002, // brandId: 1002,
} }
}) })
// component/empty/empty.js
Component({
/**
* 组件的属性列表
*/
properties: {
show : Boolean,
text : {
type : String,
default : '暂无数据~'
}
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<!--component/empty/empty.wxml-->
<view class='page-empty'>
<image src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/empty.png' mode='aspectFit'></image>
<view>{{text}}</view>
</view>
/* component/empty/empty.wxss */
.page-empty{
width: 100%;
height: auto;
padding: 100rpx 40rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 24rpx;
color: #999999;
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.page-empty image{
width: 200rpx;
height: 160rpx;
margin-bottom: 20rpx;
}
\ No newline at end of file
const PROJECT_ENV = 'test' // 生产 prod, 开发1 dev,开发2 dev2, 测试 test, 预生产 pre const PROJECT_ENV = 'prod' // 生产 prod, 开发1 dev,开发2 dev2, 测试 test, 预生产 pre
const needMock = '' // const needMock = '' //
// appid_dev_wx wxc3b64b09b1d3dfc2 // appid_dev_wx wxc3b64b09b1d3dfc2
......
...@@ -154,7 +154,7 @@ wxService.page({ ...@@ -154,7 +154,7 @@ wxService.page({
}) })
// 动态页面 // 动态页面
wxService.post(`/merchant/modelPage/mainSetting/mall?brandId=${app.globalData.brandId}`).then(res => { wxService.post(`/merchant/modelPage/mainSetting?brandId=${app.globalData.brandId}`).then(res => {
if (!res) return false if (!res) return false
const { result, data } = res.data const { result, data } = res.data
if (result == 0) { if (result == 0) {
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
}, },
"compileType": "miniprogram", "compileType": "miniprogram",
"libVersion": "2.8.2", "libVersion": "2.8.2",
"appid": "wxac09792264c49b5c", "appid": "wx700028bf32a3be66",
"projectname": "7-11", "projectname": "7-11",
"debugOptions": { "debugOptions": {
"hidedInDevtools": [] "hidedInDevtools": []
......
...@@ -8,12 +8,12 @@ wxService.page({ ...@@ -8,12 +8,12 @@ wxService.page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
no: '', no : '',
pageNum: 1, pageNum : 1,
pageSize: 10, pageSize : 10,
totalPage: 0, totalPage : 0,
isNoData: false, isNoData :false,
myCardsList: [] myCardsList : []
}, },
/** /**
...@@ -32,17 +32,17 @@ wxService.page({ ...@@ -32,17 +32,17 @@ wxService.page({
}, },
//barcode 失败回调 //barcode 失败回调
canvasIdErrorCallback(e) { canvasIdErrorCallback(e){
}, },
//跳转到购买记录 //跳转到购买记录
onTapToBuyRecords() { onTapToBuyRecords(){
wx.navigateTo({ wx.navigateTo({
url: '/subPackage/page/pages/valueCardRecords/valueCardRecords', url: '/subPackage/page/pages/valueCardRecords/valueCardRecords',
}); });
}, },
//跳转到详情 //跳转到详情
onTapToInfoPage(e) { onTapToInfoPage(e){
let item = e.currentTarget.dataset.item; let item = e.currentTarget.dataset.item;
wx.navigateTo({ wx.navigateTo({
url: '/subPackage/page/pages/myValueCardInfo/myValueCardInfo?id=' + item.id, url: '/subPackage/page/pages/myValueCardInfo/myValueCardInfo?id=' + item.id,
...@@ -50,13 +50,13 @@ wxService.page({ ...@@ -50,13 +50,13 @@ wxService.page({
}, },
//刷新no //刷新no
onTapRefreshNo(e) { onTapRefreshNo(e){
let supValCardId = e.currentTarget.dataset.id; let supValCardId = e.currentTarget.dataset.id;
let index = e.currentTarget.dataset.index; let index = e.currentTarget.dataset.index;
let url = `/merchant/superValueCard/miniProgram/getChangeCode?supValCardId=${supValCardId}`; let url = `/merchant/superValueCard/miniProgram/getChangeCode?supValCardId=${supValCardId}`;
wxService.post(url).then(res => { wxService.post(url).then(res => {
if (res) { if (res) {
if (res.data.data) { if (res.data.data){
let no = res.data.data; let no = res.data.data;
this.data.no = no; this.data.no = no;
let canvasId = 'barcode' + index; let canvasId = 'barcode' + index;
...@@ -69,10 +69,10 @@ wxService.page({ ...@@ -69,10 +69,10 @@ wxService.page({
}); });
}); });
} }
else { else{
wx.showToast({ wx.showToast({
title: '刷新失败,请重试', title: '刷新失败,请重试',
icon: ' none' icon : ' none'
}) })
} }
} }
...@@ -80,7 +80,7 @@ wxService.page({ ...@@ -80,7 +80,7 @@ wxService.page({
}, },
//获取我的超值卡列表 //获取我的超值卡列表
getMyValueCardList(refresh) { getMyValueCardList(refresh){
const { member } = wx.getStorageSync('_baseUserInfo'); const { member } = wx.getStorageSync('_baseUserInfo');
if (!member) { if (!member) {
wx.showToast({ wx.showToast({
...@@ -99,12 +99,12 @@ wxService.page({ ...@@ -99,12 +99,12 @@ wxService.page({
pageSize = this.data.pageSize; pageSize = this.data.pageSize;
let url = `/merchant/superValueCard/miniProgram/getPageList?memberId=${memeberId}&pageNum=${pageNum}&pageSize=${pageSize}`; let url = `/merchant/superValueCard/miniProgram/getPageList?memberId=${memeberId}&pageNum=${pageNum}&pageSize=${pageSize}`;
wxService.post(url).then(res => { wxService.post(url).then(res => {
if (res) { if(res){
let data = res.data.data ? res.data.data : []; let data = res.data.data ? res.data.data : [];
if (data.length == 0 && this.data.pageNum > 1) { if(data.length == 0 && this.data.pageNum > 1){
this.data.isNoData = true; this.data.isNoData = true;
} }
else { else{
this.data.isNoData = false; this.data.isNoData = false;
} }
//buyAwayType 1 现金 2 积分 //buyAwayType 1 现金 2 积分
...@@ -114,7 +114,7 @@ wxService.page({ ...@@ -114,7 +114,7 @@ wxService.page({
item.no = item.supValCardCode ? item.supValCardCode : item.supValCardId; item.no = item.supValCardCode ? item.supValCardCode : item.supValCardId;
item.id = item.supValCardId; item.id = item.supValCardId;
item.startTime = item.startTime.substring(0, 10); item.startTime = item.startTime.substring(0, 10);
item.endTime = item.endTime.substring(0, 10); item.endTime = item.endTime.substring(0,10);
}); });
this.data.myCardsList = this.data.myCardsList.concat(data); this.data.myCardsList = this.data.myCardsList.concat(data);
...@@ -124,7 +124,7 @@ wxService.page({ ...@@ -124,7 +124,7 @@ wxService.page({
}) })
} }
if (refresh) { if(refresh){
wx.showToast({ wx.showToast({
title: '刷新成功', title: '刷新成功',
}); });
...@@ -135,8 +135,8 @@ wxService.page({ ...@@ -135,8 +135,8 @@ wxService.page({
}, },
//生成条形码 //生成条形码
generatorBarCode(canvasId) { generatorBarCode(canvasId){
if (this.data.no) { if (this.data.no){
wxbarcode.barcode(canvasId, this.data.no, 500, 100); wxbarcode.barcode(canvasId, this.data.no, 500, 100);
setTimeout(() => { setTimeout(() => {
wxbarcode.barcode(canvasId, this.data.no, 500, 100); wxbarcode.barcode(canvasId, this.data.no, 500, 100);
...@@ -144,11 +144,11 @@ wxService.page({ ...@@ -144,11 +144,11 @@ wxService.page({
} }
}, },
//展开 //展开
onTapShowMoreInfo(e) { onTapShowMoreInfo(e){
let item = e.currentTarget.dataset.item; let item = e.currentTarget.dataset.item;
let index = e.currentTarget.dataset.index; let index = e.currentTarget.dataset.index;
if (item.isOpen) { if (item.isOpen){
return; return ;
} }
this.data.myCardsList.forEach(item => { this.data.myCardsList.forEach(item => {
...@@ -168,7 +168,7 @@ wxService.page({ ...@@ -168,7 +168,7 @@ wxService.page({
}, },
//关闭 //关闭
onTapCloseExtro(e) { onTapCloseExtro(e){
let index = e.currentTarget.dataset.index; let index = e.currentTarget.dataset.index;
this.data.myCardsList[index].isOpen = false; this.data.myCardsList[index].isOpen = false;
this.data.no = ''; this.data.no = '';
...@@ -193,7 +193,7 @@ wxService.page({ ...@@ -193,7 +193,7 @@ wxService.page({
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom: function () { onReachBottom: function () {
if (!this.data.isNoData) { if(!this.data.isNoData){
this.data.pageNum++; this.data.pageNum++;
this.getMyValueCardList(); this.getMyValueCardList();
} }
......
<!--subPackage/page/pages/myValueCard/myValueCard.wxml--> <!--subPackage/page/pages/myValueCard/myValueCard.wxml-->
<view class='my-value-card-list'> <view class='my-value-card-list'>
<view class='my-value-card-item' <view class='my-value-card-item'
wx:if="{{myCardsList.length > 0 }}"
wx:for="{{myCardsList}}" wx:for="{{myCardsList}}"
wx:for-item="item" wx:for-item="item"
wx:for-index="idx" wx:for-index="idx"
...@@ -41,6 +42,8 @@ ...@@ -41,6 +42,8 @@
</view> </view>
</view> </view>
</view> </view>
<view class='empty' wx:if="{{myCardsList.length == 0 }}">您还未购买任何超值卡~</view>
</view> </view>
<view class='no-more' wx:if="{{isNoData}}">-- 我也是有底线滴 --</view> <view class='no-more' wx:if="{{isNoData}}">-- 我也是有底线滴 --</view>
......
...@@ -179,3 +179,12 @@ view{ ...@@ -179,3 +179,12 @@ view{
.buy-records:active{ .buy-records:active{
opacity: 0.7; opacity: 0.7;
} }
.empty{
padding: 30rpx;
padding-top: 80rpx;
display: flex;
align-items: center;
justify-content: center;
color: #999999;
}
\ No newline at end of file
...@@ -58,13 +58,14 @@ wxService.page({ ...@@ -58,13 +58,14 @@ wxService.page({
} }
obj.activityDesc = obj.activityDesc ? JSON.parse(obj.activityDesc) : []; 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)); let descArr = JSON.parse(JSON.stringify(obj.activityDesc));
descArr = descArr.filter(item => item.type != 1); descArr = descArr.filter(item => item.type != 1);
let tempArr = descArr.map(item => { // let tempArr = descArr.map(item => {
return item.value; // return item.value;
}); // });
obj.descArr = tempArr; obj.descArr = descArr;
this.data.valueCardInfo = obj; this.data.valueCardInfo = obj;
this.setData({ this.setData({
valueCardInfo: this.data.valueCardInfo, valueCardInfo: this.data.valueCardInfo,
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<view class='card-info-body'> <view class='card-info-body'>
<view class='card-desc-item'> <view class='card-desc-item' wx:if="{{valueCardInfo.hasDate}}">
<view class='lf'>活动时间</view> <view class='lf'>活动时间</view>
<view class='rg'>{{valueCardInfo.startTime}} 至 {{valueCardInfo.endTime}}</view> <view class='rg'>{{valueCardInfo.startTime}} 至 {{valueCardInfo.endTime}}</view>
</view> </view>
...@@ -52,14 +52,15 @@ ...@@ -52,14 +52,15 @@
<view class='lf'>积分兑换</view> <view class='lf'>积分兑换</view>
<view class='rg'>{{valueCardInfo.buyIntegration}}积分</view> <view class='rg'>{{valueCardInfo.buyIntegration}}积分</view>
</view> </view>
<view class='card-desc-item'> <view class='card-desc-item'
<view class='lf'>使用说明</view>
<view class='rg'>
<view class='list-item'
wx:for="{{valueCardInfo.descArr}}" wx:for="{{valueCardInfo.descArr}}"
wx:for-item="item" wx:for-item="item"
wx:for-index="idx" wx:for-index="idx"
wx:key="*this"> {{idx + 1}}、{{item}}</view> wx:key="*this">
<view class='lf'>{{item.label ? item.label : '说明内容' }}</view>
<view class='rg'>
<view class='list-item'
>{{item.value}}</view>
</view> </view>
</view> </view>
</view> </view>
/* subPackage/page/pages/myValueCardInfo/myValueCardInfo.wxss */ /* subPackage/page/pages/myValueCardInfo/myValueCardInfo.wxss */
page{ page{
background: #ffffff; background: #f2f2f2;
box-sizing: border-box; box-sizing: border-box;
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
} }
...@@ -42,7 +42,7 @@ view{ ...@@ -42,7 +42,7 @@ view{
width: 100%; width: 100%;
height: auto; height: auto;
padding: 30rpx 90rpx; padding: 30rpx 90rpx;
background: #f2f2f2; background: #ffffff;
} }
.left-num-container .left-icons{ .left-num-container .left-icons{
......
...@@ -46,7 +46,7 @@ wxService.page({ ...@@ -46,7 +46,7 @@ wxService.page({
}); });
} }
wx.hideLoading(); wx.hideLoading();
if (refresh) { if(refresh){
setTimeout(() => { setTimeout(() => {
wx.showToast({ wx.showToast({
title: '刷新成功', title: '刷新成功',
......
...@@ -2,5 +2,7 @@ ...@@ -2,5 +2,7 @@
"navigationBarTitleText": "超值卡", "navigationBarTitleText": "超值卡",
"backgroundTextStyle": "dark", "backgroundTextStyle": "dark",
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
"usingComponents": {} "usingComponents": {
"empty" : "../../../../component/empty/empty"
}
} }
\ No newline at end of file
<!--subPackage/page/pages/valueCard/valueCard.wxml--> <!--subPackage/page/pages/valueCard/valueCard.wxml-->
<view class='cards-list'> <view class='cards-list' wx:if="{{cardList.length > 0}}">
<view class='card-item' <view class='card-item'
wx:for="{{cardList}}" wx:for="{{cardList}}"
wx:for-item="item" wx:for-item="item"
...@@ -12,4 +12,6 @@ ...@@ -12,4 +12,6 @@
</view> </view>
</view> </view>
<view class='no-more'>-- 我也是有底线滴 --</view> <empty text="暂无任何超值卡活动哦~" wx:else/>
\ No newline at end of file
<!-- <view class='no-more'>-- 我也是有底线滴 --</view> -->
\ No newline at end of file
...@@ -7,11 +7,11 @@ wxService.page({ ...@@ -7,11 +7,11 @@ wxService.page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
id: null, id : null,
checked: false, checked : false,
showModal: false, showModal : false,
valueCardInfo: {}, valueCardInfo : {},
buyType: '2',//现金支付 2 积分兑换 buyType : '2',//现金支付 2 积分兑换
}, },
/** /**
...@@ -32,7 +32,7 @@ wxService.page({ ...@@ -32,7 +32,7 @@ wxService.page({
}, },
//获取活动详情 //获取活动详情
getValueCardActivityInfo() { getValueCardActivityInfo(){
wx.showLoading({ wx.showLoading({
title: '加载中..', title: '加载中..',
}); });
...@@ -40,20 +40,22 @@ wxService.page({ ...@@ -40,20 +40,22 @@ wxService.page({
wxService.post(`/merchant/superValueCardActivity/miniProgram/getDetail?id=${this.data.id}`).then(res => { wxService.post(`/merchant/superValueCardActivity/miniProgram/getDetail?id=${this.data.id}`).then(res => {
if (res) { if (res) {
let obj = res.data.data ? res.data.data : null; let obj = res.data.data ? res.data.data : null;
if (obj) { if(obj){
obj.activityDesc = obj.activityDesc ? JSON.parse(obj.activityDesc) : []; obj.activityDesc = obj.activityDesc ? JSON.parse(obj.activityDesc) : [];
this.data.buyType = obj.payWayType; this.data.buyType = obj.payWayType;
obj.acPayMoney = parseFloat(obj.moneyAmount / 10 / 10).toFixed(2); obj.acPayMoney = parseFloat(obj.moneyAmount / 10 / 10).toFixed(2);
obj.startTime = obj.startTime.substring(0, 10); obj.startTime = obj.startTime.substring(0, 10);
obj.endTime = obj.endTime.substring(0, 10); obj.endTime = obj.endTime.substring(0,10);
obj.hasDate = obj.activityDesc.filter(item => item.type == 1).length > 0;
//处理说明文本 //处理说明文本
let descArr = JSON.parse(JSON.stringify(obj.activityDesc)); let descArr = JSON.parse(JSON.stringify(obj.activityDesc));
descArr = descArr.filter(item => item.type != 1); descArr = descArr.filter(item => item.type != 1);
let tempArr = descArr.map(item => { // let tempArr = descArr.map(item => {
return item.value; // return item.value;
}); // });
obj.descArr = tempArr; // console.log(obj)
obj.descArr = descArr;
this.data.valueCardInfo = obj; this.data.valueCardInfo = obj;
this.setData({ this.setData({
buyType: this.data.buyType, buyType: this.data.buyType,
...@@ -66,44 +68,44 @@ wxService.page({ ...@@ -66,44 +68,44 @@ wxService.page({
}, },
//修改选中状态 //修改选中状态
onTapSwitchChecked() { onTapSwitchChecked(){
this.data.checked = !this.data.checked; this.data.checked = !this.data.checked;
this.setData({ this.setData({
checked: this.data.checked checked: this.data.checked
}); });
}, },
//关闭modal //关闭modal
onTapCloseModal() { onTapCloseModal(){
this.setData({ this.setData({
showModal: false, showModal : false,
}); });
}, },
//查看rule //查看rule
onTapViewRule() { onTapViewRule(){
this.setData({ this.setData({
showModal: true showModal : true
}) })
}, },
//同意并阅读 //同意并阅读
onTapModalAgree() { onTapModalAgree(){
this.setData({ this.setData({
showModal: false, showModal: false,
checked: true, checked : true,
}); });
}, },
//立即购买 //立即购买
onTapBuy() { onTapBuy(){
if (!this.data.checked) { if(!this.data.checked){
return; return ;
} }
const { member } = wx.getStorageSync('_baseUserInfo'); const { member } = wx.getStorageSync('_baseUserInfo');
if (!member) { if(!member){
wx.showToast({ wx.showToast({
title: '请先去登录', title: '请先去登录',
icon: 'none' icon : 'none'
}) })
return; return ;
} }
let memeberId = member.id, let memeberId = member.id,
...@@ -111,10 +113,10 @@ wxService.page({ ...@@ -111,10 +113,10 @@ wxService.page({
storeId = ''; storeId = '';
let activityId = this.data.id; let activityId = this.data.id;
let url = ''; let url = '';
if (this.data.buyType == 1) { if (this.data.buyType == 1){
url = `/merchant/superValueCard/miniProgram/buy?activityId=${activityId}&memberId=${memeberId}&payType=1&storeId=${storeId}`; url = `/merchant/superValueCard/miniProgram/buy?activityId=${activityId}&memberId=${memeberId}&payType=1&storeId=${storeId}`;
} }
else { else{
url = `/merchant/superValueCard/miniProgram/buy?activityId=${activityId}&memberId=${memeberId}&storeId=${storeId}`; url = `/merchant/superValueCard/miniProgram/buy?activityId=${activityId}&memberId=${memeberId}&storeId=${storeId}`;
} }
...@@ -124,11 +126,14 @@ wxService.page({ ...@@ -124,11 +126,14 @@ wxService.page({
wxService.post(url).then(res => { wxService.post(url).then(res => {
wx.hideLoading(); wx.hideLoading();
if (res.data.result == 0) { if(res.data.result == 0){
this.setData({
checked: false,
});
//现金支付 //现金支付
if (this.data.buyType == 1) { if (this.data.buyType == 1){
let data = res.data.data ? res.data.data : null; let data = res.data.data ? res.data.data : null;
if (data) { if(data){
let wxParams = data.wxParams; let wxParams = data.wxParams;
wx.requestPayment({ wx.requestPayment({
timeStamp: wxParams.timeStamp, timeStamp: wxParams.timeStamp,
...@@ -136,7 +141,7 @@ wxService.page({ ...@@ -136,7 +141,7 @@ wxService.page({
package: wxParams.package, package: wxParams.package,
signType: wxParams.signType, signType: wxParams.signType,
paySign: wxParams.paySign, paySign: wxParams.paySign,
success: res => { success : res => {
wx.showToast({ wx.showToast({
title: '支付成功!', title: '支付成功!',
}); });
...@@ -148,36 +153,38 @@ wxService.page({ ...@@ -148,36 +153,38 @@ wxService.page({
wx.navigateTo({ wx.navigateTo({
url: '/subPackage/page/pages/myValueCard/myValueCard', url: '/subPackage/page/pages/myValueCard/myValueCard',
}); });
}, 500); },500);
}, },
fail: error => { fail : error => {
wx.showToast({ wx.showToast({
title: '已取消支付', title: '已取消支付',
icon: 'none' icon : 'none'
}); });
} }
}) })
} }
} }
else { else{
wx.showToast({ wx.showModal({
title: '支付成功!', title: '购买成功',
}); content: '是否跳转到我的超值卡列表查看?',
wx.showLoading({ confirmColor: '#ff2222',
title: '跳转中...', success(res){
}); if (res.confirm) {
setTimeout(() => {
wx.hideLoading();
wx.navigateTo({ wx.navigateTo({
url: '/subPackage/page/pages/myValueCard/myValueCard', url: '/subPackage/page/pages/myValueCard/myValueCard',
}); });
}, 500); } else if (res.cancel) {
}
},
});
} }
} }
else { else{
wx.showToast({ wx.showToast({
title: '购买失败,请稍后再试!', title: '购买失败,请稍后再试!',
icon: 'none' icon : 'none'
}); });
} }
}); });
......
<!--subPackage/page/pages/valueCardInfo/valueCardInfo.wxml--> <!--subPackage/page/pages/valueCardInfo/valueCardInfo.wxml-->
<image src='{{valueCardInfo.listUrl}}' class='card-info' mode='widthFix'></image> <image src='{{valueCardInfo.infoUrl}}' class='card-info' mode='widthFix'></image>
<view class='card-info-body'> <view class='card-info-body'>
<view class='card-title'>{{valueCardInfo.activityName}}</view> <view class='card-title'>{{valueCardInfo.activityName}}</view>
<view class='card-desc-item'> <view class='card-desc-item' wx:if="{{valueCardInfo.hasDate}}">
<view class='lf'>活动时间</view> <view class='lf'>活动时间</view>
<view class='rg'>{{valueCardInfo.startTime}} 至 {{valueCardInfo.endTime}}</view> <view class='rg'>{{valueCardInfo.startTime}} 至 {{valueCardInfo.endTime}}</view>
</view> </view>
...@@ -14,19 +14,19 @@ ...@@ -14,19 +14,19 @@
<view class='lf'>积分兑换</view> <view class='lf'>积分兑换</view>
<view class='rg'>{{valueCardInfo.integrationAmount}}积分</view> <view class='rg'>{{valueCardInfo.integrationAmount}}积分</view>
</view> </view>
<view class='card-desc-item'> <view class='card-desc-item'
<view class='lf'>使用说明</view>
<view class='rg'>
<view class='list-item'
wx:for="{{valueCardInfo.descArr}}" wx:for="{{valueCardInfo.descArr}}"
wx:for-item="item" wx:for-item="item"
wx:for-index="idx" wx:for-index="idx"
wx:key="*this" wx:key="*this">
> {{idx+1}}、{{item}}</view> <view class='lf'>{{item.label ? item.label : '说明内容'}}</view>
<view class='rg'>
<view class='list-item'> {{item.value}}</view>
</view> </view>
</view> </view>
</view> </view>
<!-- 底部 --> <!-- 底部 -->
<view class='bottom-buy'> <view class='bottom-buy'>
<view class='lf-info'> <view class='lf-info'>
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
</view> </view>
<view class='explain'> <view class='explain'>
<label> 阅读并同意 </label> <label> 阅读并同意 </label>
<text bindtap='onTapViewRule'>《广东-7Eleven超值卡规则》</text> <text bindtap='onTapViewRule'>《超值卡规则》</text>
</view> </view>
</view> </view>
<view class='rg-button {{checked ? "" : "disabled"}}' bindtap='onTapBuy'>{{buyType == 1 ? "立即购买" : "立即兑换"}}</view> <view class='rg-button {{checked ? "" : "disabled"}}' bindtap='onTapBuy'>{{buyType == 1 ? "立即购买" : "立即兑换"}}</view>
......
...@@ -51,6 +51,7 @@ view{ ...@@ -51,6 +51,7 @@ view{
.card-desc-item .rg .list-item{ .card-desc-item .rg .list-item{
margin-bottom: 8rpx; margin-bottom: 8rpx;
white-space: pre-line;
} }
.bottom-buy{ .bottom-buy{
...@@ -63,6 +64,7 @@ view{ ...@@ -63,6 +64,7 @@ view{
height: 100rpx; height: 100rpx;
display: flex; display: flex;
align-items: center; align-items: center;
background: #ffffff;
} }
.bottom-buy .rg-button{ .bottom-buy .rg-button{
......
...@@ -31,8 +31,8 @@ wxService.page({ ...@@ -31,8 +31,8 @@ wxService.page({
//获取购买记录 //获取购买记录
getBuyRecordsList(refresh){ getBuyRecordsList(refresh){
const { memberId } = wx.getStorageSync('_baseUserInfo'); const { memberId } = wx.getStorageSync('_baseUserInfo');
if (!memberId){ if (!memberId) {
return ; return;
} }
let pageNum = this.data.pageNum, let pageNum = this.data.pageNum,
......
...@@ -121,9 +121,9 @@ class Http { ...@@ -121,9 +121,9 @@ class Http {
url, url,
method: 'GET', method: 'GET',
header: { header: {
'tunnel-token': 'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD', // 测试 // 'tunnel-token': 'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD', // 测试
// 'tunnel-token' : 'd6db651f8b9c7db4176465accfc1c913843fd9ad328cd5f4fe201d918072c9e8', // 生产 3001 // 'tunnel-token' : 'd6db651f8b9c7db4176465accfc1c913843fd9ad328cd5f4fe201d918072c9e8', // 生产 3001
// 'tunnel-token' : '4c8d641cb2b8a576317ee5f6ead1f36474463041d61fb5d4289364565b0c6c63', // 生产 2711 'tunnel-token' : '4c8d641cb2b8a576317ee5f6ead1f36474463041d61fb5d4289364565b0c6c63', // 生产 2711
}, },
data: parmas data: parmas
}) })
...@@ -147,9 +147,9 @@ class Http { ...@@ -147,9 +147,9 @@ class Http {
url, url,
method: 'POST', method: 'POST',
header: { header: {
'tunnel-token': 'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD', // 测试 // 'tunnel-token': 'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD', // 测试
// 'tunnel-token' : 'd6db651f8b9c7db4176465accfc1c913843fd9ad328cd5f4fe201d918072c9e8', // 生产 3001 // 'tunnel-token' : 'd6db651f8b9c7db4176465accfc1c913843fd9ad328cd5f4fe201d918072c9e8', // 生产 3001
// 'tunnel-token' : '4c8d641cb2b8a576317ee5f6ead1f36474463041d61fb5d4289364565b0c6c63', // 生产 2711 'tunnel-token' : '4c8d641cb2b8a576317ee5f6ead1f36474463041d61fb5d4289364565b0c6c63', // 生产 2711
}, },
data: parmas, data: parmas,
channel: channel channel: channel
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment