xinelu-applet-ui/pagesB/Behaviorpoints/Behaviorpoints.vue
2023-10-16 10:08:17 +08:00

121 lines
2.5 KiB
Vue

<template>
<view class="app">
<view class="background">
<view class="content">
<image src="/static/pagesB/Behave.png" mode=""></image>
<view class="name">我的积分
</view>
<view class="number">1000
</view>
<view class="PointsMall" @tap='gointegral'>
积分商城
</view>
<view class="Exchangerecords" @tap="goexchange">
兑换记录
</view>
</view>
<view class="bottomitem">
<view class="PointsRecord">
积分记录
</view>
<view class="Establishingarchives">
建立档案
</view>
<view class="integral">
+20000
</view>
<view class="timeone">
2023-03-09 13:23:12
</view>
<view class="Establishingarchives">
兑换商品
</view>
<view class="integraltwo">
-2000000000
</view>
<view class="timeone">
2023-03-09 13:23:12
</view>
</view>
</view>
</view>
</template>
<script>
import {
prizeExchangelist
} from '@/api/pagesB/Behaviorpoints/index.js'
// import {
// mapActions
// } from "vuex";
export default {
data() {
return {
query: {
identity: '372325195905293621',
pageNum: 1,
pageSize: 10,
},
list: [],
total: 0,
};
},
onLoad() {
this.info();
},
methods: {
info() {
prizeExchangelist(this.query, '2').then(res => {
this.list = res.rows
this.total = res.total
})
},
goexchange() {
uni.navigateTo({
url: '/pagesB/exchangerecords/exchangerecords'
})
},
//积分页面
// ...mapActions(["integralopenPopup"]),
gointegral() {
// const value = uni.getStorageSync('openid');
// const value2 = uni.getStorageSync('patientId');
// if (value && value2) {
// setTimeout(e => {
// uni.navigateTo({
// url: `/pagesB/healthybeans/healthybeans?integral=${this.appPersonallist.integral}`
// })
// }, 0)
// } else {
uni.navigateTo({
url: '/pagesB/PointsMall/PointsMall'
})
// this.gologin();
// }
},
},
onReachBottom() { //下滑加载
if (this.list.length >= this.total) {} else {
this.query.pageNum++
prizeExchangelist(this.query, '1').then(res => {
if (res.rows) {
res.rows.forEach(e => {
this.list.push(e)
})
}
})
}
},
onPullDownRefresh() { //下拉刷新
this.query.pageNum = 1;
this.info();
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},
}
</script>
<style lang="scss">
@import './Behaviorpoints.scss'
</style>