token问题使用sotorage方式存储和读取
This commit is contained in:
@@ -53,25 +53,13 @@ export default {
|
||||
pageSize:10,
|
||||
total:'',
|
||||
loading:false,
|
||||
items: [], // 当前页数
|
||||
token:'',
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// this.$toast('window.location'+window.location)
|
||||
this.getVehicleList();
|
||||
},
|
||||
methods:{
|
||||
updateVehicle(item){
|
||||
this.$router.push({
|
||||
name:'vehicleAdd',
|
||||
params:{
|
||||
// token:this.token,
|
||||
id:item.vehicleId
|
||||
}
|
||||
})
|
||||
},
|
||||
async getVehicleList(){
|
||||
async getVehicleList(){
|
||||
let result = await supplierVehicleList({
|
||||
pageNum:this.pageNum,
|
||||
pageSize:this.pageSize
|
||||
@@ -98,10 +86,16 @@ export default {
|
||||
if(result.code === 200){
|
||||
this.$toast('删除成功');
|
||||
await this.getVehicleList();
|
||||
}else{
|
||||
this.$toast(result.msg)
|
||||
}
|
||||
},
|
||||
updateVehicle(item){//修改
|
||||
this.$router.push({
|
||||
name:'vehicleAdd',
|
||||
params:{
|
||||
id:item.vehicleId
|
||||
}
|
||||
})
|
||||
},
|
||||
async handleScroll(){
|
||||
let num = Math.ceil( this.total / 10)
|
||||
if(num <= this.pageNum){
|
||||
@@ -109,7 +103,6 @@ export default {
|
||||
}else{
|
||||
this.pageNum++;
|
||||
await this.getVehicleList()
|
||||
// console.log("111111111111")
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user