|
@@ -43,7 +43,7 @@
|
|
|
<i :class="item.icon"></i>积分
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="list-container">
|
|
|
+ <div class="list-container" v-loading="loading">
|
|
|
<el-empty v-if="goodsList.length == 0" :image-size="200"></el-empty>
|
|
|
<div v-else class="prize-list">
|
|
|
<div v-for="(item, index) in goodsList" :key="index" class="prize-card prize-item">
|
|
@@ -140,10 +140,11 @@
|
|
|
</template>
|
|
|
<script>
|
|
|
import { integralList, festivalList, notice, welfareType, integralTypes } from "@/api/allApi";
|
|
|
-import { getTab,setTab } from '@/utils/auth'
|
|
|
+import { getTab } from '@/utils/auth'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ loading:true,
|
|
|
// tab 列表
|
|
|
options: [],
|
|
|
goodsName: '',
|
|
@@ -262,18 +263,18 @@ export default {
|
|
|
productAttribute: this.productAttribute,
|
|
|
orderByClause: this.orderByClause
|
|
|
}
|
|
|
+ this.loading = true;
|
|
|
integralList(params).then(response => {
|
|
|
console.log(response.data.data);
|
|
|
- this.goodsList = response.data.data
|
|
|
- }).catch(() => {
|
|
|
- this.goodsList = []
|
|
|
+ this.goodsList = response.data.data;
|
|
|
+ this.loading = false;
|
|
|
})
|
|
|
} else {
|
|
|
+ this.loading = true;
|
|
|
festivalList({ welfareId: this.curChosed }).then(response => {
|
|
|
console.log(response.data.data);
|
|
|
- this.goodsList = response.data.data
|
|
|
- }).catch(() => {
|
|
|
- this.goodsList = []
|
|
|
+ this.goodsList = response.data.data;
|
|
|
+ this.loading = false;
|
|
|
})
|
|
|
}
|
|
|
},
|