1
This commit is contained in:
parent
042b8245d2
commit
c168237c63
@ -160,4 +160,12 @@ export function saveOrder(data) {
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
//积分列表
|
||||
export function pointList(params) {
|
||||
return request({
|
||||
url: '/member/points/list',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
@ -294,7 +294,7 @@
|
||||
* 去积分列表
|
||||
*/
|
||||
goPoints() {
|
||||
this.$tab.navigateTo('/pages/mine/points/points')
|
||||
this.$tab.navigateTo('/pages/mine/points/points?userId='+this.userInfo.userId+'&pointsBalance='+this.userInfo.pointsBalance)
|
||||
},
|
||||
/**
|
||||
* 跳转编辑页
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
<image src="@/static/mine/points.png" mode="aspectFit">
|
||||
</image>可用积分
|
||||
</view>
|
||||
<view class="left-dom-bottom">{{formatNumberWithCommas(56320)}}</view>
|
||||
<view class="left-dom-bottom">{{pointsBalance}}</view>
|
||||
</view>
|
||||
<view class="right-dom" @click="outData()">提现</view>
|
||||
</view>
|
||||
@ -64,9 +64,9 @@
|
||||
|
||||
<script>
|
||||
import navigationBarVue from '@/components/navigation/navigationBar.vue';
|
||||
import {
|
||||
formatNumberWithCommas
|
||||
} from '@/utils/common.js'
|
||||
import {formatNumberWithCommas} from '@/utils/common.js'
|
||||
import {pointList} from '@/api/business/member.js'
|
||||
import {toast} from '@/utils/common.js'
|
||||
export default {
|
||||
components: {
|
||||
navigationBarVue,
|
||||
@ -95,13 +95,24 @@
|
||||
}],
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
pageSize: 10,
|
||||
userId:null
|
||||
},
|
||||
total: 0,
|
||||
//下来刷新状态
|
||||
isTriggered: false,
|
||||
userId:null,
|
||||
pointsBalance:0
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(option){
|
||||
this.userId = option.userId
|
||||
this.queryParams.userId = option.userId
|
||||
this.pointsBalance = option.pointsBalance
|
||||
this.initData()
|
||||
},
|
||||
|
||||
methods: {
|
||||
/**
|
||||
* 格式化数字
|
||||
@ -110,6 +121,21 @@
|
||||
formatNumberWithCommas(number) {
|
||||
return formatNumberWithCommas(number)
|
||||
},
|
||||
|
||||
/**初始化数据*/
|
||||
initData(){
|
||||
pointList(this.queryParams).then(res=>{
|
||||
if (res.code == 200){
|
||||
if (this.queryParams.pageNum == 1) {
|
||||
this.dataList = res.data.records
|
||||
} else {
|
||||
this.dataList = this.dataList.concat(res.data.records)
|
||||
}
|
||||
this.total = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 提现
|
||||
*/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user