积分公示

This commit is contained in:
liuye
2023-04-14 14:31:29 +08:00
parent 7d1d375240
commit 7d8b7f22c6
2 changed files with 17 additions and 7 deletions

View File

@@ -98,13 +98,16 @@ export default {
...mapState(['user']), ...mapState(['user']),
}, },
onLoad() { onLoad() {
this.getToatl() this.getTotal()
this.$dict.load(['integralSGType']).then(() => { this.$dict.load(['integralSGType']).then(() => {
this.getList() this.getList()
}) })
}, },
onShow() {
this.getTotal()
},
methods: { methods: {
getToatl() { getTotal() {
this.$instance.post(`/app/appintegraluser/integralUserInfoFD`).then(res => { this.$instance.post(`/app/appintegraluser/integralUserInfoFD`).then(res => {
if (res?.data) { if (res?.data) {
this.total = res.data.integral || 0 this.total = res.data.integral || 0

View File

@@ -42,7 +42,7 @@
</template> </template>
<script> <script>
import {mapState} from "vuex"; import {mapActions, mapState} from "vuex";
export default { export default {
name: 'pointsPublicity', name: 'pointsPublicity',
@@ -57,17 +57,24 @@ export default {
computed: { computed: {
...mapState(['user']), ...mapState(['user']),
}, },
onLoad(option) { onLoad() {
this.getList() this.getAuth()
}, },
methods: { methods: {
...mapActions(['getUserInfo']),
getList() { getList() {
this.$instance.post(`/app/appintegralpublicityinfo/list?current=${this.current}&girdId=`).then(res => { this.$instance.post(`/app/appintegralpublicityinfo/list?current=${this.current}&girdId=${this.user.girdId}`).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.list = this.current == 1 ? res.data.records : [...this.list, ...res.data.records] this.list = this.current == 1 ? res.data.records : [...this.list, ...res.data.records]
} }
}) })
} },
getAuth() {
this.$nextTick(() => {
this.getUserInfo('qujing')
this.getList()
})
},
}, },
onReachBottom() { onReachBottom() {
this.current++ this.current++