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

修改二期bug

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