xg
This commit is contained in:
parent
0f0249243b
commit
104a84e7bb
@ -177,7 +177,7 @@
|
||||
}
|
||||
wxSportDecrypt(obj).then(Sportres => {
|
||||
if (Sportres.data && Sportres.data[0].step >= 5000) {
|
||||
wxsportadd(this.userinfo.cardNo).then(sportaddres => {
|
||||
wxsportadd(this.userinfo.cardNo, Sportres.data[0].step).then(sportaddres => {
|
||||
if (sportaddres.code == 200) {
|
||||
let sportitem = {
|
||||
text: `${this.userinfo.cardNo}${Sportres.data[0].date}`,
|
||||
|
||||
@ -77,14 +77,16 @@
|
||||
pageSize: 10,
|
||||
},
|
||||
region: uni.getStorageSync('region'),
|
||||
list: null,
|
||||
list: [],
|
||||
total: 0,
|
||||
score: 0,
|
||||
title: '',
|
||||
orgNo: '',
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
onShow() {
|
||||
this.list = []
|
||||
this.query.pageNum = 1
|
||||
this.info();
|
||||
this.scoretotalinfo();
|
||||
},
|
||||
@ -112,7 +114,7 @@
|
||||
},
|
||||
info() {
|
||||
scorelist(this.query).then(res => {
|
||||
this.list = res.rows
|
||||
this.list = [...this.list, ...res.rows]
|
||||
this.total = res.total
|
||||
})
|
||||
},
|
||||
@ -153,17 +155,12 @@
|
||||
onReachBottom() { //下滑加载
|
||||
if (this.list.length >= this.total) {} else {
|
||||
this.query.pageNum++
|
||||
scorelist(this.query).then(res => {
|
||||
if (res.rows) {
|
||||
res.rows.forEach(e => {
|
||||
this.list.push(e)
|
||||
})
|
||||
}
|
||||
})
|
||||
this.info();
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() { //下拉刷新
|
||||
this.query.pageNum = 1;
|
||||
this.list = []
|
||||
this.info();
|
||||
setTimeout(function() {
|
||||
uni.stopPullDownRefresh();
|
||||
|
||||
@ -42,8 +42,7 @@
|
||||
methods: {
|
||||
tapstep(item) {
|
||||
if (item.step >= 5000) {
|
||||
console.log(item)
|
||||
wxsportaddV1(uni.getStorageSync('userinfo').cardNo, item.date).then(res => {
|
||||
wxsportaddV1(uni.getStorageSync('userinfo').cardNo, item.date, item.step).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.$refs.uToast.show({
|
||||
title: '新增积分成功',
|
||||
@ -85,7 +84,7 @@
|
||||
this.list = Sportres.data
|
||||
if (!this.sportlist.some(e => e.text == identtime)) {
|
||||
if (Sportres.data && Sportres.data[0].step >= 5000) {
|
||||
wxsportadd(this.userinfo.cardNo).then(sportaddres => {
|
||||
wxsportadd(this.userinfo.cardNo, Sportres.data[0].step).then(sportaddres => {
|
||||
if (sportaddres.code == 200) {
|
||||
let sportitem = {
|
||||
text: `${this.userinfo.cardNo}${Sportres.data[0].date}`,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user