Commit 23609965 by member

分页显示不正常

parent ff23ec6b
<template> <template>
<div> <div>
<div class="filter-list"> <div class="filter-list">
<el-select v-model="cardType" style="width: 200px;" placeholder="卡券类型" @change="handleChange"> <el-select v-model="cardType" style="width: 200px;" placeholder="卡券类型" clearable @change="handleChange">
<el-option <el-option
v-for="item in cardOptions" v-for="item in cardOptions"
:key="item.value" :key="item.value"
...@@ -127,6 +127,8 @@ export default { ...@@ -127,6 +127,8 @@ export default {
} }
}); });
this.cardData = resData.result.result; this.cardData = resData.result.result;
} else {
this.cardData = [];
} }
this.total = resData.result.totalCount; this.total = resData.result.totalCount;
} }
......
<template> <template>
<div class="gift-list"> <div class="gift-list">
<div class="links-tools-row"> <div class="links-tools-row">
<el-select v-model="giftVal" style="width: 200px;" placeholder="礼品类型" @change="handleChange"> <el-select v-model="giftVal" style="width: 200px;" placeholder="礼品类型" clearable @change="handleChange">
<el-option <el-option
v-for="item in giftOptions" v-for="item in giftOptions"
:key="item.integralMallCategoryId" :key="item.integralMallCategoryId"
...@@ -113,7 +113,7 @@ export default { ...@@ -113,7 +113,7 @@ export default {
.then(res => { .then(res => {
const data = res.data; const data = res.data;
if (data.errorCode == 0) { if (data.errorCode == 0) {
if (!!data.result && data.result.rows && data.result.rows.length) { if (!!data.result && data.result.rows) {
this.goodsList = data.result.rows; this.goodsList = data.result.rows;
} }
this.total = data.result.total || 0; this.total = data.result.total || 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment