Commit e6a465e0ad7d8d1c8e240f66cc7eb5fd04dfd13a
1 parent
a6e7df55
优化一些已知bug
Showing
1 changed file
with
30 additions
and
20 deletions
src/pages/myGiftBox/myGiftBox.vue
| @@ -161,16 +161,17 @@ export default { | @@ -161,16 +161,17 @@ export default { | ||
| 161 | this.active = active; | 161 | this.active = active; |
| 162 | // 初始化加载状态 | 162 | // 初始化加载状态 |
| 163 | this.loading = false; | 163 | this.loading = false; |
| 164 | - if (active === 1) { | ||
| 165 | - // 调用im是否显示隐藏1显示im聊天弹窗0不显示 | ||
| 166 | - this.setGiftBottomVisibleBySwitchTab(1); | ||
| 167 | - // 送礼订单列表 | ||
| 168 | - this.getorderGiveGiftList(); | ||
| 169 | - } else { | 164 | + this.btnActive = 0; // 切换送礼和收礼时;初始化tab默认都为全部 |
| 165 | + if (active == 0) { | ||
| 170 | // 收礼订单列表 | 166 | // 收礼订单列表 |
| 171 | this.getorderGiftList(); | 167 | this.getorderGiftList(); |
| 172 | // 调用im是否显示隐藏1显示im聊天弹窗0不显示 | 168 | // 调用im是否显示隐藏1显示im聊天弹窗0不显示 |
| 173 | this.setGiftBottomVisibleBySwitchTab(0); | 169 | this.setGiftBottomVisibleBySwitchTab(0); |
| 170 | + } else { | ||
| 171 | + // 调用im是否显示隐藏1显示im聊天弹窗0不显示 | ||
| 172 | + this.setGiftBottomVisibleBySwitchTab(1); | ||
| 173 | + // 送礼订单列表 | ||
| 174 | + this.getorderGiveGiftList(); | ||
| 174 | } | 175 | } |
| 175 | }, | 176 | }, |
| 176 | // tab订单状态筛选 | 177 | // tab订单状态筛选 |
| @@ -178,13 +179,15 @@ export default { | @@ -178,13 +179,15 @@ export default { | ||
| 178 | if(this.active==0){ | 179 | if(this.active==0){ |
| 179 | // 收礼订单列表 | 180 | // 收礼订单列表 |
| 180 | this.receivingGiftStatue = name; | 181 | this.receivingGiftStatue = name; |
| 181 | - this.receivingGifts.tipText = null | 182 | + this.receivingGifts.tipText = null; |
| 183 | + this.receivingGifts.pages = 1 | ||
| 182 | this.getorderGiftList(1); | 184 | this.getorderGiftList(1); |
| 183 | }else{ | 185 | }else{ |
| 184 | // 送礼订单列表 | 186 | // 送礼订单列表 |
| 185 | this.giveGifStatue = name; | 187 | this.giveGifStatue = name; |
| 186 | - this.giftGiving.tipText = null | ||
| 187 | - this.getorderGiveGiftList(1); | 188 | + this.giftGiving.tipText = null; |
| 189 | + this.giftGiving.pages = 1; | ||
| 190 | + this.getorderGiveGiftList(); | ||
| 188 | } | 191 | } |
| 189 | }, | 192 | }, |
| 190 | /** | 193 | /** |
| @@ -271,7 +274,7 @@ export default { | @@ -271,7 +274,7 @@ export default { | ||
| 271 | "/Api/" + this.getApiVersion().index + "/orderGiftList", | 274 | "/Api/" + this.getApiVersion().index + "/orderGiftList", |
| 272 | { | 275 | { |
| 273 | uid: this.$route.query.uid, // 用户id | 276 | uid: this.$route.query.uid, // 用户id |
| 274 | - page: initPage || this.receivingGifts.pages, // 分页 默认为1 一页20条 | 277 | + page: this.receivingGifts.pages, // 分页 默认为1 一页20条 |
| 275 | type: 1, // 1 收礼列表 2 送礼列表(送礼已废弃) | 278 | type: 1, // 1 收礼列表 2 送礼列表(送礼已废弃) |
| 276 | status:this.receivingGiftStatue// 0或者不传 全部 1 未填地址 2 未发货 3 已完成 4 已发货 | 279 | status:this.receivingGiftStatue// 0或者不传 全部 1 未填地址 2 未发货 3 已完成 4 已发货 |
| 277 | }, | 280 | }, |
| @@ -299,9 +302,9 @@ export default { | @@ -299,9 +302,9 @@ export default { | ||
| 299 | // is_data是否有赠礼 1 有 0 无 | 302 | // is_data是否有赠礼 1 有 0 无 |
| 300 | this.receivingGifts.isData = datas.is_data | 303 | this.receivingGifts.isData = datas.is_data |
| 301 | // 页脚等于1的时候会出现数据获取为空 | 304 | // 页脚等于1的时候会出现数据获取为空 |
| 302 | - if(ext.initPage==1 || this.receivingGifts.pages==1){ | ||
| 303 | - this.receivingGiftsInfo = datas.list; | ||
| 304 | - } | 305 | + // if(this.receivingGifts.pages==1){ |
| 306 | + // this.receivingGiftsInfo = datas.list; | ||
| 307 | + // } | ||
| 305 | // 设置shopFnsDynamic达人动态数据 | 308 | // 设置shopFnsDynamic达人动态数据 |
| 306 | if (datas.list && datas.list.length) { | 309 | if (datas.list && datas.list.length) { |
| 307 | // 隐藏加载圈 | 310 | // 隐藏加载圈 |
| @@ -318,8 +321,12 @@ export default { | @@ -318,8 +321,12 @@ export default { | ||
| 318 | // this.receivingGifts.pages = 1; // 数据为空时页脚从1开始计算 | 321 | // this.receivingGifts.pages = 1; // 数据为空时页脚从1开始计算 |
| 319 | if(this.receivingGifts.pages>1){ | 322 | if(this.receivingGifts.pages>1){ |
| 320 | this.receivingGifts.tipText = "已经全部加载完毕"; //提示全部加载为空 | 323 | this.receivingGifts.tipText = "已经全部加载完毕"; //提示全部加载为空 |
| 324 | + }else{ | ||
| 325 | + //页脚等于1的时候会出现数据获取为空 | ||
| 326 | + this.receivingGiftsInfo = datas.list; | ||
| 327 | + this.receivingGifts.tipText = ""; //不提示数据加载完 | ||
| 321 | } | 328 | } |
| 322 | - console.log(this.tipText) | 329 | + console.log(this.receivingGifts.tipText); |
| 323 | } | 330 | } |
| 324 | /* 获取达人动态数据 结束 */ | 331 | /* 获取达人动态数据 结束 */ |
| 325 | } else if (res.code == 400) { | 332 | } else if (res.code == 400) { |
| @@ -392,7 +399,7 @@ export default { | @@ -392,7 +399,7 @@ export default { | ||
| 392 | /** | 399 | /** |
| 393 | * 获取送礼礼物列表 | 400 | * 获取送礼礼物列表 |
| 394 | */ | 401 | */ |
| 395 | - getorderGiveGiftList(initPage) { | 402 | + getorderGiveGiftList() { |
| 396 | this.giftGiving.loading = true; | 403 | this.giftGiving.loading = true; |
| 397 | // 加载中提示 | 404 | // 加载中提示 |
| 398 | Indicator.open("加载中..."); | 405 | Indicator.open("加载中..."); |
| @@ -402,14 +409,13 @@ export default { | @@ -402,14 +409,13 @@ export default { | ||
| 402 | "/Api/" + this.getApiVersion().index + "/orderGiveGiftList", | 409 | "/Api/" + this.getApiVersion().index + "/orderGiveGiftList", |
| 403 | { | 410 | { |
| 404 | uid: this.$route.query.uid, // 用户id | 411 | uid: this.$route.query.uid, // 用户id |
| 405 | - page: initPage||this.giftGiving.pages, // 分页 默认为1 一页20条 | 412 | + page: this.giftGiving.pages, // 分页 默认为1 一页20条 |
| 406 | type: 1, // 1 收礼列表 2 送礼列表(送礼已废弃) | 413 | type: 1, // 1 收礼列表 2 送礼列表(送礼已废弃) |
| 407 | status: this.giveGifStatue // 0或者不传 全部 1 未填地址 2 未发货 3 已完成 4 已发货 | 414 | status: this.giveGifStatue // 0或者不传 全部 1 未填地址 2 未发货 3 已完成 4 已发货 |
| 408 | }, | 415 | }, |
| 409 | this.getorderGiveGiftListCallback, | 416 | this.getorderGiveGiftListCallback, |
| 410 | { | 417 | { |
| 411 | method: "post", | 418 | method: "post", |
| 412 | - initPage | ||
| 413 | } | 419 | } |
| 414 | ); | 420 | ); |
| 415 | }, | 421 | }, |
| @@ -430,9 +436,9 @@ export default { | @@ -430,9 +436,9 @@ export default { | ||
| 430 | // is_data是否有赠礼 1 有 0 无 | 436 | // is_data是否有赠礼 1 有 0 无 |
| 431 | this.giftGiving.isData = datas.is_data | 437 | this.giftGiving.isData = datas.is_data |
| 432 | // 页脚等于1的时候会出现数据获取为空 | 438 | // 页脚等于1的时候会出现数据获取为空 |
| 433 | - if(ext.initPage==1 || this.receivingGifts.pages==1){ | ||
| 434 | - this.giftGivingItem = datas.list; | ||
| 435 | - } | 439 | + // if(this.receivingGifts.pages==1){ |
| 440 | + // this.giftGivingItem = datas.list; | ||
| 441 | + // } | ||
| 436 | // 设置giftGivingItem数据 | 442 | // 设置giftGivingItem数据 |
| 437 | if (datas.list && datas.list.length) { | 443 | if (datas.list && datas.list.length) { |
| 438 | // 隐藏加载圈 | 444 | // 隐藏加载圈 |
| @@ -449,6 +455,10 @@ export default { | @@ -449,6 +455,10 @@ export default { | ||
| 449 | // this.giftGiving.pages = 1;// 数据为空时设置分页数为1 | 455 | // this.giftGiving.pages = 1;// 数据为空时设置分页数为1 |
| 450 | if(this.giftGiving.pages>1){ | 456 | if(this.giftGiving.pages>1){ |
| 451 | this.giftGiving.tipText = "已经全部加载完毕"; //提示全部加载为空 | 457 | this.giftGiving.tipText = "已经全部加载完毕"; //提示全部加载为空 |
| 458 | + }else{ | ||
| 459 | + this.giftGiving.tipText = ""; | ||
| 460 | + //页脚等于1的时候会出现数据获取为空 | ||
| 461 | + this.giftGivingItem = datas.list; | ||
| 452 | } | 462 | } |
| 453 | // this.tipText = "已经全部加载完毕"; //提示全部加载为空 | 463 | // this.tipText = "已经全部加载完毕"; //提示全部加载为空 |
| 454 | } | 464 | } |