修复分页请求逻辑以及变量大小写错误。

fix
游梦婷 11 months ago
parent 1817c25a2f
commit e0d29a0ac0
  1. 63
      pages/index/bindScan/bindScan.vue
  2. 27
      pages/index/equity-activities-details/equity-activities-details.vue
  3. 8
      pages/index/equity-activities/equity-activities.vue
  4. 27
      pages/index/normal-Merchant/normal-Merchant.vue
  5. 25
      pages/index/scanList/scanList.vue

@ -34,7 +34,7 @@
return {
serviceList: [],
pageNum: 1,
pagesize: 15,
pageSize: 15,
isLoadMore: false, //
userInfo: app.globalData.userInfo, //
typeId: '', //
@ -43,14 +43,10 @@
}
},
onReachBottom() { //
if (!this.isLoadMore) { //
this.isLoadMore = true
this.pageNum += 1
if (this.typeId == 2) {
this.getStoreQrCodeList();
} else {
this.getSalesmanQrCodeList();
}
if (this.typeId == 2) {
this.getStoreQrCodeList();
} else {
this.getSalesmanQrCodeList();
}
},
onLoad(options) {
@ -68,7 +64,6 @@
methods: {
toSearch() {
this.pageNum = 1;
this.pageSize = 10;
this.isLoadMore = false;
this.serviceList = [];
if (this.typeId == 2) {
@ -79,59 +74,75 @@
},
//
getStoreQrCodeList() {
if (this.isLoadMore) {
return false;
}
uni.showLoading({
title: '加载中...'
})
let params = {
pageNum: this.pageNum,
pageSize: this.pagesize,
pageSize: this.pageSize,
serialNumber: this.scanNo,
storeId: this.storeId
}
getStoreQrCodeList(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000' && res.return_data.list) {
this.isLoadMore = res.return_data.list.length == this.pageSize ? false : true;
this.serviceList = this.serviceList.concat(res.return_data.list);
if (res.return_data.total == (this.pageNum * this.pageSize)) {
if (res.return_data.total == this.serviceList.length) {
this.isLoadMore = true;
}else{
this.isLoadMore = false;
}
this.pageNum = res.return_data.list.length == this.pageSize ? ++pagenum : pagenum;
this.pageNum = this.pageNum + 1;
} else {
this.serviceList = [];
this.isLoadMore = true
this.isLoadMore = true;
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
})
}
});
},
//
getSalesmanQrCodeList() {
uni.showLoading({
title: '加载中...'
})
if (this.isLoadMore) {
uni.hideLoading()
return false;
}
let pagenum = this.pageNum;
uni.showLoading({
title: '加载中...'
})
let datas = {
salesmanId: this.userInfo.salesman.id,
isAssignStore: false,
serialNumber: this.scanNo,
pageNum: pagenum,
pageSize: this.pagesize,
pageNum: this.pageNum,
pageSize: this.pageSize,
}
getSalesmanQrCodeList(datas).then(res => {
uni.hideLoading();
if (res.return_code == '000000' && res.return_data.list) {
this.isLoadMore = res.return_data.list.length == this.pageSize ? false : true;
this.serviceList = this.serviceList.concat(res.return_data.list);
if (res.return_data.total == (this.pageNum * this.pageSize)) {
if (res.return_data.total == this.serviceList.length) {
this.isLoadMore = true;
}else{
this.isLoadMore = false;
}
this.pageNum = res.return_data.list.length == this.pageSize ? ++pagenum : pagenum;
this.pageNum = this.pageNum + 1;
} else {
this.serviceList = [];
this.isLoadMore = true
this.isLoadMore = true;
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
})
}
});
},

@ -22,19 +22,20 @@
<view class="width90 mart20 marb15 fcor333 fontwig6 font16" v-if="activitydetails.bankActivityRoster ==null">
商户信息
</view>
<view class="username">
<view class="namecont">商户名称</view>
<view class="font14 fcor333 text2 width75 fotrt">{{merDetailInfo.mer.merName}}</view>
</view>
<view class="username">
<view class="namecont">支行名称</view>
<view class="font14 fcor333 text2 width75 fotrt">{{merDetailInfo.mer.merSettleAcct.openningBankName}}</view>
</view>
<view class="username">
<view class="namecont">支行行号</view>
<view class="font14 fcor333 text2 width75 fotrt">{{merDetailInfo.mer.merSettleAcct.openningBankCode}}</view>
</view>
<template v-if="merDetailInfo">
<view class="username">
<view class="namecont">商户名称</view>
<view class="font14 fcor333 text2 width75 fotrt">{{merDetailInfo.mer.merName}}</view>
</view>
<view class="username">
<view class="namecont">支行名称</view>
<view class="font14 fcor333 text2 width75 fotrt">{{merDetailInfo.mer.merSettleAcct.openningBankName}}</view>
</view>
<view class="username">
<view class="namecont">支行行号</view>
<view class="font14 fcor333 text2 width75 fotrt">{{merDetailInfo.mer.merSettleAcct.openningBankCode}}</view>
</view>
</template>
<!-- <view class="username">
<view class="namecont">银行地址</view>
<pickRegions :defaultRegion="defaultRegionCodes" class="width70" @getRegion="handleBankCityCode">

@ -59,8 +59,7 @@
}
], //
activityList: [], //
pageNum: 1,
pagesize: 15,
statusid: 1, //
isLoadMore: false, //
merId: '' // id
@ -68,17 +67,12 @@
},
onLoad(options) {
this.merId = options.id;
},
onShow() {
this.pageNum = 1;
this.activityList = [];
this.queryActivityList();
},
methods: {
//id
switchid(item) {
this.statusid = item.id;
this.pageNum = 1;
},
//
queryActivityList() {

@ -5,7 +5,7 @@
<input placeholder="请输入商户名称" v-model="mersearchName" placeholder-style="color:#c0c0c0;"
@input="getMerListBySalesman()" />
</view>
<view class="mart20 width100">
<view class="paddbotm10 width100 ">
<view v-if="merchantlist == '' " class="mart60 fotct font14 fcor666">
<image mode="widthFix" style="width: 70vw;" src="../../../static/img/noorder.png"></image>
</view>
@ -50,7 +50,7 @@
return {
merchantlist: [],
pageNum: 1,
pagesize: 10,
pageSize: 10,
isLoadMore: false, //
mersearchName: '' //
}
@ -58,19 +58,18 @@
onShow() {
this.merchantlist = [];
this.pageNum = 1;
this.isLoadMore = false;
this.getMerListBySalesman();
},
onReachBottom() { //
if (!this.isLoadMore) { //
this.isLoadMore = true
this.pageNum += 1
this.getMerListBySalesman()
}
this.getMerListBySalesman()
},
methods: {
//
getMerListBySalesman() {
this.merchantlist = [];
if(this.isLoadMore){
return
}
uni.showLoading({
title: '加载中'
})
@ -78,7 +77,7 @@
merStatus: 1,
merName: this.mersearchName,
pageNum: this.pageNum,
pageSize: this.pagesize,
pageSize: this.pageSize,
}
getMerListBySalesman(datas).then(res => {
uni.hideLoading();
@ -87,11 +86,17 @@
if (res.return_data.pages == this.pageNum) {
this.isLoadMore = true;
} else {
this.isLoadMore = false
this.isLoadMore = false;
}
this.pageNum = this.pageNum+1;
} else {
this.merchantlist = [];
this.isLoadMore = true
this.isLoadMore = true;
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
})
}
});
},

@ -36,7 +36,7 @@
return {
serviceList: [],
pageNum: 1,
pagesize: 15,
pageSize: 15,
isLoadMore: false, //
userInfo: app.globalData.userInfo, //
scanNo: '' ,//
@ -44,11 +44,12 @@
}
},
onReachBottom() { //
if (!this.isLoadMore) { //
this.isLoadMore = true
this.pageNum += 1
this.getStoreQrCodeList();
}
// if (!this.isLoadMore) { //
// this.isLoadMore = true
// this.pageNum += 1
// this.getStoreQrCodeList();
// }
this.getStoreQrCodeList();
},
onLoad(options) {
this.getStoreQrCodeList();
@ -56,7 +57,6 @@
methods: {
toSearch() {
this.pageNum = 1;
this.pageSize = 10;
this.isLoadMore = false;
this.serviceList = [];
this.getStoreQrCodeList();
@ -68,21 +68,26 @@
})
let params = {
pageNum: this.pageNum,
pageSize: this.pagesize,
pageSize: this.pageSize,
serialNumber: this.scanNo,
storeId: this.userInfo.store.id
}
getStoreQrCodeList(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000' && res.return_data.list) {
this.receiverList = this.receiverList.concat(res.return_data.list);
this.serviceList = this.serviceList.concat(res.return_data.list);
if (res.return_data.pages == this.pageNum) {
this.isLoadMore = true;
} else {
this.isLoadMore = false
}
this.pageNum = this.pageNum+1;
} else {
this.isLoadMore = true
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
})
}
});
},

Loading…
Cancel
Save