Commit 7f3d397e by zhangxw

bug修改

1 parent 3219625c
......@@ -28,6 +28,7 @@
}
.mobile{
display: flex;
align-items: center;
font-size: 30rpx;
color: #1B233D;
margin-top: 10rpx;
......
......@@ -29,7 +29,7 @@ Page({
},
onRoute(options) {
let activityId = options.activityId
let activityId = options.id
ActivityApi.getActivityOrderList({
activityId
}).then(res => {
......
......@@ -16,7 +16,7 @@
<image webp src="{{item.customerImageUrl ? item.customerImageUrl : IMGURL+'order_person_default.png'}}"></image>
<view class="name-mobile">
<view class="name">
{{item.customerNickName}}
{{item.customerNickName || ""}}
<text class="order-statue {{item.orderStatus == 0 ? '' : 'green'}}">{{item.orderStatus == 0 ? '未下单' : '已下单'}}</text>
</view>
<view class="mobile" wx:if="{{item.customerPhone}}">{{item.customerPhone}}</view>
......
/* pages/tab/index/components/activityDiagnosis/activityDiagnosis.wxss */
.content{
.content-box{
padding: 0 22rpx 50rpx 24rpx;
.content-item{
width: 100%;
......
<!--pages/tab/index/components/activityDiagnosis/activityDiagnosis.wxml-->
<wxs src="../index.wxs" module="fn"></wxs>
<view class="content">
<view class="content-box">
<block wx:for="{{activityList}}" wx:key="index">
<view class="content-item">
<view class="item-bg">
......
......@@ -132,12 +132,14 @@ Page({
if (num == 1) {
this.setData({
activeList: onPullDown ? res.list : [...activeList, ...res.list],
activeTotal: res.total
activeTotal: res.total,
activeTrigger: false
})
} else {
this.setData({
activityEndList: onPullDown ? res.list : [...activityEndList, ...res.list],
total: res.total
total: res.total,
activeTrigger: false
})
}
})
......@@ -184,18 +186,36 @@ Page({
this.getData(true)
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
let { activePageNum, pageNum , activeTotal, total, tabIndex } = this.data
wx.$util.onReachBottom({
pageNum: tabIndex == 0 ? activePageNum : pageNum,
total: tabIndex == 0 ? activeTotal: total
}, () => {
this.getActivityList(tabIndex+1)
// 下拉刷新
activityRefresh(e) {
let {type} = e.currentTarget.dataset
this.setData({
activePageNum: 1,
pageNum: 1
})
this.getActivityList(type)
},
// 上拉触底加载
scrollonReachBottom(e) {
let {type} = e.currentTarget.dataset
let { activePageNum, pageNum , activeTotal, total, pageSize } = this.data
// 判断当前页是否是末页
if (type == 1) {
if (Math.floor(activeTotal / pageSize) == activePageNum - 1) return
this.setData({
activePageNum: activePageNum + 1
})
this.getActivityList(type)
} else {
if (Math.floor(total / pageSize) == pageNum - 1) return
this.setData({
pageNum: pageNum + 1
})
this.getActivityList(type)
}
},
/**
* 用户点击右上角分享
*/
......
......@@ -4,6 +4,5 @@
"activity-diagnosis": "./components/activityDiagnosis/activityDiagnosis"
},
"navigationStyle": "custom",
"onReachBottomDistance": 100,
"enablePullDownRefresh": true
"onReachBottomDistance": 100
}
......@@ -21,13 +21,13 @@
</block>
</view>
<!-- 活动中 -->
<scroll-view scroll-y class="content" hidden="{{tabIndex != 0}}">
<scroll-view scroll-y class="content" refresher-enabled bindrefresherrefresh="activityRefresh" bindscrolltolower="scrollonReachBottom" data-type="{{1}}" refresher-triggered="{{activeTrigger}}" hidden="{{tabIndex != 0}}">
<block>
<active-box activeList="{{activeList}}" nothing="{{nothing}}" activeDateIndex="{{activeDateIndex}}" allTaskCount="{{allTaskCount}}"></active-box>
</block>
</scroll-view>
<!-- 活动诊断 -->
<scroll-view scroll-y class="content" hidden="{{tabIndex != 1}}">
<scroll-view scroll-y class="content" refresher-enabled bindrefresherrefresh="activityRefresh" bindscrolltolower="scrollonReachBottom" data-type="{{2}}" refresher-triggered="{{activeTrigger}}" hidden="{{tabIndex != 1}}">
<block>
<activity-diagnosis activityList="{{activityEndList}}" nothing="{{nothing}}"></activity-diagnosis>
</block>
......
......@@ -6,7 +6,7 @@ const target = ['ip', 'dev', 'uat', 'prod']
2测试
3生产
*/
const index = 2
const index = 1
const secretKey = {
ip: {},
dev: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!