xinelu-applet-ui/pagesB/Behaviorpoints/Behaviorpoints.vue

121 lines
2.5 KiB
Vue
Raw Normal View History

2023-09-20 14:21:34 +08:00
<template>
<view class="app">
2023-09-20 15:30:34 +08:00
<view class="background">
2023-09-20 17:44:17 +08:00
<view class="content">
<image src="/static/pagesB/Behave.png" mode=""></image>
<view class="name">我的积分
</view>
<view class="number">1000
</view>
2023-09-22 15:29:53 +08:00
<view class="PointsMall" @tap='gointegral'>
2023-09-20 17:44:17 +08:00
积分商城
</view>
2023-09-27 13:50:42 +08:00
<view class="Exchangerecords" @tap="goexchange">
2023-09-20 17:44:17 +08:00
兑换记录
</view>
2023-09-20 14:21:34 +08:00
</view>
2023-09-20 17:44:17 +08:00
<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>
2023-09-28 17:06:51 +08:00
<view class="Establishingarchives">
2023-09-20 17:44:17 +08:00
兑换商品
</view>
<view class="integraltwo">
-2000000000
</view>
<view class="timeone">
2023-03-09 13:23:12
</view>
2023-09-20 14:21:34 +08:00
</view>
</view>
2023-09-20 17:44:17 +08:00
2023-09-20 14:21:34 +08:00
</view>
</template>
<script>
2023-09-22 15:29:53 +08:00
import {
2023-10-16 10:08:17 +08:00
prizeExchangelist
} from '@/api/pagesB/Behaviorpoints/index.js'
// import {
// mapActions
// } from "vuex";
2023-09-20 14:21:34 +08:00
export default {
data() {
return {
2023-10-16 10:08:17 +08:00
query: {
identity: '372325195905293621',
pageNum: 1,
pageSize: 10,
},
list: [],
total: 0,
2023-09-20 14:21:34 +08:00
};
},
2023-10-16 10:08:17 +08:00
onLoad() {
this.info();
},
2023-09-20 14:21:34 +08:00
methods: {
2023-10-16 10:08:17 +08:00
info() {
prizeExchangelist(this.query, '2').then(res => {
this.list = res.rows
this.total = res.total
})
},
2023-09-28 17:06:51 +08:00
goexchange() {
2023-09-27 13:50:42 +08:00
uni.navigateTo({
url: '/pagesB/exchangerecords/exchangerecords'
})
},
2023-09-22 15:29:53 +08:00
//积分页面
2023-10-16 10:08:17 +08:00
// ...mapActions(["integralopenPopup"]),
2023-09-22 15:29:53 +08:00
gointegral() {
2023-09-28 17:06:51 +08:00
// 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();
// }
2023-09-22 15:29:53 +08:00
},
2023-09-20 14:21:34 +08:00
},
2023-10-16 10:08:17 +08:00
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);
},
2023-09-20 14:21:34 +08:00
}
</script>
<style lang="scss">
2023-09-20 14:26:05 +08:00
@import './Behaviorpoints.scss'
2023-09-28 17:06:51 +08:00
</style>