浏览代码

避免拿到空结果

xiaohaizhao 1 年之前
父节点
当前提交
c5abda016e
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      pages/index/market/index.js

+ 4 - 0
pages/index/market/index.js

@@ -126,6 +126,10 @@ Component({
         content
         content
       }).then(res => {
       }).then(res => {
         console.log("商品列表", res)
         console.log("商品列表", res)
+        if (res.msg != '成功') return wx.showToast({
+          title: res.msg,
+          icon: "none"
+        })
         this.selectComponent('#ListBox').RefreshToComplete();
         this.selectComponent('#ListBox').RefreshToComplete();
         content.pageNumber = res.pageNumber + 1;
         content.pageNumber = res.pageNumber + 1;
         content.pageTotal = res.pageTotal;
         content.pageTotal = res.pageTotal;