提交 b61f11d7 authored 作者: 宋雄's avatar 宋雄

修改二期bug

上级 da87009a
......@@ -6,7 +6,7 @@ const serverConfig = {
// imageURL: "https://life.cloud.hjxbc.cn/sys/common/static/",
imageURL: "https://life.test.hjxbc.cn/sys/common/static/",
baseURL: "https://life.test.hjxbc.cn",
// baseURL: "http://192.168.0.119:9999",
// baseURL: "http://192.168.0.106:9999",
// baseURL: "http://220.203.25.212:9999", /* 根域名 */
// baseURL: "http://114.67.111.37:8001" /* 根域名 */
}
......
......@@ -239,12 +239,14 @@
},{
"path": "pages/integralList/index",
"style": {
"navigationBarTitleText": "我的积分"
"navigationBarTitleText": "我的积分",
"enablePullDownRefresh": true
}
},{
"path": "pages/integralRecord/index",
"style": {
"navigationBarTitleText": "积分记录"
"navigationBarTitleText": "积分记录",
"enablePullDownRefresh": true
}
}
],
......
......@@ -12,11 +12,11 @@
};
},
onLoad(options) {
this.webUrl = decodeURIComponent(options.webUrl)
this.webUrl = decodeURIComponent(options.webUrl) + '&paySource=miniapp'
}
}
</script>
<style lang="less">
</style>
</style>
......@@ -312,9 +312,13 @@
// });
uni.scanCode({
success: function (res) {
console.log(res)
uni.navigateTo({
url: '/pages/h5Template/h5Template?webUrl=' + encodeURIComponent(res.result)
});
},
fail: function(err) {
console.log(err)
}
});
}
......@@ -804,8 +808,8 @@
.item {
width: 25%;
display: flex;
flex-wrap: wrap;
justify-content: center;
flex-direction: column;
align-items: center;
margin-bottom: 40rpx;
.item-img {
......
......@@ -50,7 +50,7 @@
</view>
<view class="item-box" v-for="item in integralList" :key="item.id">
<view>
<view class="describe">{{item.type === 'scanQrCodePay' ? '扫码支付' : '抵扣物业费'}}</view>
<view class="describe">{{item.typeName}}</view>
<view class="date-time">{{item.createTime}}</view>
</view>
<view class="compute">{{item.integralChange < 0 ? item.integralChange : ('+' + item.integralChange)}}</view>
......@@ -72,7 +72,8 @@
return {
integralInfo: {},
integralList: [],
pageNo: 1
pageNo: 1,
isFinish: false
}
},
methods: {
......@@ -82,11 +83,27 @@
result['totalIntegral'] = (Number(result.freezeIntegral) + result.availableIntegral).toFixed(2).replace('.00', '')
this.integralInfo = {...result}
},
async getList() {
async getList(flag) {
let {result} = await ownerIntegralListApi({
pageNo: this.pageNo
})
this.integralList = [...result.records]
let data = result.records.map(item=> {
return {
...item,
typeName: item.type === 'scanQrCodePay' ? '扫码支付' : (item.type === 'payPropertyFee' ? '抵扣物业费' : '申请退款')
}
})
if(flag) {
uni.stopPullDownRefresh();
this.integralList = [].concat(data)
} else {
this.integralList = this.integralList.concat(data)
}
if(data.length < 10) {
this.isFinish = true
} else {
this.pageNo += 1
}
},
toRecord(type) {
if(type == 1){
......@@ -108,6 +125,16 @@
onLoad() {
this.getMessage()
this.getList()
},
onPullDownRefresh() {
this.isFinish = false
this.pageNo = 1
this.getMessage()
this.getList(true)
},
onReachBottom() {
if(this.isFinish) return
this.getList()
}
}
</script>
......
......@@ -13,7 +13,7 @@
</view>
<view class="item-box" v-for="item in payList" :key="item.id">
<view>
<view class="describe">{{item.type === 'scanQrCodePay' ? '扫码支付' : '抵扣物业费'}}</view>
<view class="describe">{{item.typeName}}</view>
<view class="date-time">{{item.createTime}}</view>
</view>
<view class="compute">{{item.integralChange < 0 ? item.integralChange : ('+' + item.integralChange)}}</view>
......@@ -36,22 +36,40 @@
useIntegral: 0,
pageNo: 1,
range: [],
payList: []
payList: [],
isFinish: false
}
},
methods: {
onRangeChange(val) {
this.isFinish = false
this.pageNo = 1
this.range = val
this.getList()
},
async getList() {
async getList(flag) {
let {result} = await ownerIntegralRecordsApi({
pageNo: this.pageNo,
startDate: this.range[0] || '',
endDate: this.range[1] || ''
})
this.payList = result.pageList.records
let data = result.pageList.records.map(item=> {
return {
...item,
typeName: item.type === 'scanQrCodePay' ? '扫码支付' : (item.type === 'payPropertyFee' ? '抵扣物业费' : '申请退款')
}
})
if(flag) {
uni.stopPullDownRefresh();
this.payList = [].concat(data)
} else {
this.payList = this.payList.concat(data)
}
if(data.length < 10) {
this.isFinish = true
} else {
this.pageNo += 1
}
this.getIntegral = result.getIntegral
this.useIntegral = result.useIntegral * -1
},
......@@ -69,6 +87,15 @@
},
onLoad() {
this.getList()
},
onPullDownRefresh() {
this.isFinish = false
this.pageNo = 1
this.getList(true)
},
onReachBottom() {
if(this.isFinish) return
this.getList()
}
}
</script>
......
......@@ -106,6 +106,7 @@
this.getList()
},
onPullDownRefresh() {
this.isFinish = false
this.pageNumber = 1
this.getList(true)
},
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论