Commit 7f3d397e by zhangxw

bug修改

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