Commit 9be51b90 by 谢中龙

7.12.0新功能及优化

parent 73195b5a
......@@ -109,7 +109,8 @@
"pages/pointExchangeGoods/pointExchangeGoods",
"pages/payCardInfo/payCardInfo",
"pages/moneyBuyCoupon/moneyBugCoupon",
"pages/moneyBuyCouponInfo/moneyBuyCouponInfo"
"pages/moneyBuyCouponInfo/moneyBuyCouponInfo",
"pages/moneyBuyCouponRecords/moneyBuyCouponRecords"
]
},
{
......
......@@ -17,16 +17,16 @@ wxService.page({
//包邮券
postalVoucherList : []
},
//滑动切换
swiperTab: function (e) {
const {current} = e.detail
this.tabSwitch(current);
},
// 点击切换
clickTab: function (e) {
const {current} = e.target.dataset
this.tabSwitch(current);
},
//滑动切换
swiperTab: function (e) {
const {current} = e.detail
this.tabSwitch(current);
},
// 点击切换
clickTab: function (e) {
const {current} = e.target.dataset
this.tabSwitch(current);
},
//tab栏切换
tabSwitch(current){
if (this.data.currentTab == current) return false;
......@@ -121,4 +121,8 @@ wxService.page({
onBottom(){
},
//跳转到我的购买优惠券记录
onTapToBuyCouponRecords(){
},
})
\ No newline at end of file
......@@ -10,9 +10,9 @@
</view>
<!--bindchange="swiperTab"-->
<swiper current="{{currentTab}}" duration="300" bindchange="swiperTab">
<swiper-item>
<swiper-item >
<!-- 优惠券 -->
<scroll-view scroll-y wx:if="{{couponList.length}}" bindscrolltolower="onBottom">
<scroll-view scroll-y wx:if="{{couponList.length}}" bindscrolltolower="onBottom" style="height:86vh;">
<view class='coupon-wrap'>
<view
class='coupon-list'
......@@ -136,6 +136,9 @@
</swiper-item>
</swiper>
</view>
<!-- 优惠券购买记录 -->
<view class="coupon-buy-records" wx:if="{{currentTab == 0}}" bindtap="onTapToBuyCouponRecords">优惠券购买记录</view>
<!--goHome-->
<go-home/>
<floatNav bind:getAuth="_getUserInfo" bind:updatePage="updatePage"/>
......
......@@ -30,6 +30,7 @@ scroll-view{
margin: 190rpx auto 0;
text-align: center;
}
.empty-img{
width: 197rpx;
height: 176rpx;
......@@ -141,9 +142,28 @@ scroll-view{
swiper {
width: 100%;
flex: 1;
height:90vh;
padding-bottom:20rpx;
height:91vh;
/* padding-bottom:20rpx; */
position: absolute;
overflow: scroll;
top: 100rpx;
}
.coupon-buy-records{
background: #05c35b;
width: 100%;
height: 80rpx;
color: #ffffff;
font-size: 28rpx;
position: fixed;
bottom: 0;
left: 0;
z-index: 999;
display: flex;
align-items: center;
justify-content: center;
}
.coupon-buy-records:active{
opacity: 0.7;
}
\ No newline at end of file
......@@ -666,6 +666,13 @@
"pathName": "subPackageA/page/pages/moneyBuyCouponInfo/moneyBuyCouponInfo",
"query": "id=704317444864479232",
"scene": null
},
{
"id": -1,
"name": "优惠券购买记录",
"pathName": "subPackageA/page/pages/moneyBuyCouponRecords/moneyBuyCouponRecords",
"query": "",
"scene": null
}
]
}
......
......@@ -38,7 +38,11 @@
<view class='guider'>
<view class='header'>
<label>所属导购:</label>
<text>{{guider.member.name ? guider.member.name : "暂无名称"}}</text>
<text>{{guider.member.name ? guider.member.name : "暂无"}}</text>
</view>
<view class='header'>
<label>注册门店:</label>
<text>{{memberInfo.storeName ? memberInfo.storeName : "暂无"}}</text>
</view>
<view class='month'>
......
// subPackageA/page/pages/moneyBuyCouponRecords/moneyBuyCouponRecords.js
const wxService = require('../../../../utils/wxService')
const util = require('../../../../utils/util')
wxService.page({
/**
* 页面的初始数据
*/
data: {
recordsList : [],
pageSize : 10,
pageNo : 1,
totalPage : 0,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
wx.hideShareMenu();
this.getBuyCouponRecords();
},
//获取优惠券购买记录
getBuyCouponRecords(refresh){
let pageNo = this.data.pageNo , pageSize = this.data.pageSize;
if(refresh){
wx.stopPullDownRefresh();
wx.showToast({
title: '刷新成功',
});
}
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
this.data.pageNo = 1;
this.data.recordsList = [];
this.getBuyCouponRecords(true);
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
if(this.data.pageNo < this.data.totalPage){
this.data.pageNo ++;
this.getBuyCouponRecords();
}
else{
if(this.data.pageNo > 1){
wx.showToast({
title: '暂无更多数据了~',
icon :' none'
});
}
}
},
})
\ No newline at end of file
{
"enablePullDownRefresh":true,
"navigationBarTitleText": "优惠券购买记录",
"usingComponents": {
"empty": "/component/empty/empty"
}
}
\ No newline at end of file
<!--subPackageA/page/pages/moneyBuyCouponRecords/moneyBuyCouponRecords.wxml-->
<view class="records-list" wx:if="{{recordsList.length > 0}}">
<view class="records-item">
<view class="records-title">
<label>活动名称活动名称活动名称活动名称</label>
<text>¥50.00</text>
</view>
<view class="other-info">
有效时间: <label>2020-04-30 15:30:30至2020-04-30 15:30:30</label>
</view>
</view>
</view>
<!-- 空的时候 -->
<empty text="未查到任何优惠券购买记录~" wx:if="{{recordsList.length == 0}}"/>
\ No newline at end of file
/* subPackageA/page/pages/moneyBuyCouponRecords/moneyBuyCouponRecords.wxss */
page{
background: #ffffff;
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
view{
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.records-list{
width: 100%;
height: auto;
padding: 20rpx;
}
.records-list .records-item{
padding: 20rpx;
border-bottom: solid 1rpx #dddddd;
font-size: 24rpx;
color: #333333;
}
.records-title{
font-size: 28rpx;
font-weight: bold;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 10rpx;
}
.other-info{
color: #999999;
font-weight: 24rpx;
}
.records-title text{
color: red;
}
\ No newline at end of file
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