[商品权证分页及刷新处理]
This commit is contained in:
@@ -387,6 +387,7 @@
|
||||
|
||||
let submitFund = this.$Route.query.type === 'edit' ? managesGoodsPut(this.$Route.query.id, submitData) : managesGoodsCreate(submitData)
|
||||
submitFund.then(res => {
|
||||
uni.setStorageSync('refresh',true)
|
||||
if(this.type === 2){
|
||||
uni.showModal({
|
||||
title : '提示',
|
||||
@@ -416,6 +417,7 @@
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
|
||||
@@ -144,6 +144,7 @@
|
||||
}
|
||||
let submitFund = managesGoodsAuth(this.$Route.query.id, submitData)
|
||||
submitFund.then(res => {
|
||||
uni.setStorageSync('refresh',true)
|
||||
uni.showModal({
|
||||
title : '提示',
|
||||
content : '商品权证认证信息已提交,请耐心等待平台审核',
|
||||
|
||||
@@ -64,27 +64,53 @@
|
||||
pages : {},
|
||||
itemGoods : {},
|
||||
stock : 1,
|
||||
stockType : ''
|
||||
stockType : '',
|
||||
page:1,
|
||||
has_more :true,
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
onLoad() {
|
||||
this.getList()
|
||||
},
|
||||
onShow() {
|
||||
if(uni.getStorageSync('refresh')){
|
||||
this.goods = []
|
||||
this.page = 1
|
||||
this.has_more = true
|
||||
this.getList()
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
if(this.has_more){
|
||||
this.page = this.page + 1
|
||||
this.getList()
|
||||
}else{
|
||||
uni.showToast({
|
||||
title:'我是有底线的~',
|
||||
icon:'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// tabs
|
||||
onTabs(value){
|
||||
if(value == this.status) return
|
||||
this.goods = []
|
||||
this.page =1,
|
||||
this.has_more = true
|
||||
this.status = value
|
||||
this.getList()
|
||||
},
|
||||
// 权证列表
|
||||
getList(){
|
||||
managesGoodsIndex({
|
||||
status: this.status
|
||||
status: this.status,
|
||||
page:this.page
|
||||
}).then(res => {
|
||||
this.goods = res.data
|
||||
this.goods = this.goods.concat(res.data)
|
||||
this.pages = res.page
|
||||
this.has_more = res.page.has_more
|
||||
uni.setStorageSync('refresh',false)
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
|
||||
Reference in New Issue
Block a user