Commit e6a465e0ad7d8d1c8e240f66cc7eb5fd04dfd13a

Authored by zhiyangdu
1 parent a6e7df55

优化一些已知bug

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