张延森 4 年之前
父節點
當前提交
5b2a82cd92
共有 1 個檔案被更改,包括 3 行新增0 行删除
  1. 3
    0
      src/pages/recommend/index.jsx

+ 3
- 0
src/pages/recommend/index.jsx 查看文件

69
         success: function(res) {
69
         success: function(res) {
70
           if (res.confirm) {
70
           if (res.confirm) {
71
             console.log("用户点击确定");
71
             console.log("用户点击确定");
72
+            Taro.showLoading({ title: '删除中...' })
72
             request({
73
             request({
73
               url: `/taHouseSurround/${item.surroundId}`,
74
               url: `/taHouseSurround/${item.surroundId}`,
74
               method: "DELETE"
75
               method: "DELETE"
75
             }).then(res => {
76
             }).then(res => {
76
               setList(list.filter(x => x.surroundId != item.surroundId));
77
               setList(list.filter(x => x.surroundId != item.surroundId));
78
+              Taro.hideLoading()
77
             });
79
             });
78
           } else if (res.cancel) {
80
           } else if (res.cancel) {
79
             console.log("用户点击取消");
81
             console.log("用户点击取消");
82
+            Taro.hideLoading()
80
           }
83
           }
81
         }
84
         }
82
       });
85
       });