1002884655 4 лет назад
Родитель
Сommit
868d48a1ef
2 измененных файлов: 116 добавлений и 80 удалений
  1. 108
    80
      src/pages/WoDe/YeZhuShenHe/index.jsx
  2. 8
    0
      src/utils/api.js

+ 108
- 80
src/pages/WoDe/YeZhuShenHe/index.jsx Просмотреть файл

@@ -33,110 +33,138 @@ export default function YeZhuShenHe () {
33 33
     })
34 34
   }
35 35
 
36
+  const Detele = () => { // 删除当前资料
37
+    Taro.showModal({
38
+      title: '提示',
39
+      content: '确认删除当前资料?',
40
+      success: (res) => {
41
+        if (res.confirm) {
42
+          if (Detail.verifyStatus - 0 === 1) { // 删除审核通过的房产
43
+            request({ ...apis.deletePassRenZheng, args: { id: CurrnetId } }).then((res) => {
44
+              Taro.showToast({title: '删除成功', icon: 'none'})
45
+            }).catch((res) => {
46
+              Taro.showToast({title: res, icon: 'none'})
47
+            })
48
+          } else { // 删除审核中的房产
49
+            request({ ...apis.deleteCheckingRenZheng, args: { id: CurrnetId } }).then((res) => {
50
+              Taro.showToast({title: '删除成功', icon: 'none'})
51
+            }).catch((res) => {
52
+              Taro.showToast({title: res, icon: 'none'})
53
+            })
54
+          }
55
+        }
56
+      }
57
+    })
58
+  }
59
+
36 60
   return (
37 61
     <view className='YeZhuShenHe'>
38
-      <view className='ShenHeContent'>
39
-
40
-        {/* 审核中 */}
41
-        {
42
-          Status - 0 === 0 &&
43
-          <view className='CheckStatus Checking'>
44
-            <view className='Status'>
45
-              <text className='iconfont iconshenhezhong'></text>
46
-              <text>审核中</text>
47
-              <text>请等待物业或户主审核</text>
48
-            </view>
62
+      {
63
+        Detail !== null &&
64
+        <view className='ShenHeContent'>
49 65
 
50
-            <view className='Info'>
51
-              <view className='flex-h'>
52
-                <text>身份:</text>
53
-                <text className='flex-item'>户主</text>
54
-              </view>
55
-              <view className='flex-h'>
56
-                <text>房产:</text>
57
-                <text className='flex-item'>金科蓝湾小区  一区  六栋  一单元  六楼</text>
66
+          {/* 审核中 */}
67
+          {
68
+            Detail.verifyStatus - 0 === 0 &&
69
+            <view className='CheckStatus Checking'>
70
+              <view className='Status'>
71
+                <text className='iconfont iconshenhezhong'></text>
72
+                <text>审核中</text>
73
+                <text>请等待物业或户主审核</text>
58 74
               </view>
59
-            </view>
60
-          </view>
61
-        }
62 75
 
63
-        {/* 审核通过 */}
64
-        {
65
-          Status - 0 === 1 &&
66
-          <view className='CheckStatus Pass'>
67
-            <view className='Status'>
68
-              <text className='iconfont iconyitongguo'></text>
69
-              <text>审核通过</text>
76
+              <view className='Info'>
77
+                <view className='flex-h'>
78
+                  <text>身份:</text>
79
+                  <text className='flex-item'>户主</text>
80
+                </view>
81
+                <view className='flex-h'>
82
+                  <text>房产:</text>
83
+                  <text className='flex-item'>{Detail.phaseName} {Detail.buildingName} {Detail.unitName} {Detail.levelName} {Detail.roomNoName}</text>
84
+                </view>
85
+              </view>
70 86
             </view>
87
+          }
71 88
 
72
-            <view className='Info'>
73
-              <view className='flex-h'>
74
-                <text>身份:</text>
75
-                <text className='flex-item'>户主</text>
89
+          {/* 审核通过 */}
90
+          {
91
+            Detail.verifyStatus - 0 === 1 &&
92
+            <view className='CheckStatus Pass'>
93
+              <view className='Status'>
94
+                <text className='iconfont iconyitongguo'></text>
95
+                <text>审核通过</text>
76 96
               </view>
77
-              <view className='flex-h'>
78
-                <text>房产:</text>
79
-                <text className='flex-item'>金科蓝湾小区  一区  六栋  一单元  六楼</text>
97
+
98
+              <view className='Info'>
99
+                <view className='flex-h'>
100
+                  <text>身份:</text>
101
+                  <text className='flex-item'>户主</text>
102
+                </view>
103
+                <view className='flex-h'>
104
+                  <text>房产:</text>
105
+                  <text className='flex-item'>{Detail.phaseName} {Detail.buildingName} {Detail.unitName} {Detail.levelName} {Detail.roomNoName}</text>
106
+                </view>
80 107
               </view>
81 108
             </view>
82
-          </view>
83
-        }
109
+          }
84 110
 
85
-        {/* 审核未通过 */}
86
-        {
87
-          Status - 0 === 2 &&
88
-          <view className='CheckStatus NoPass'>
89
-            <view className='Status'>
90
-              <text className='iconfont iconweitongguo'></text>
91
-              <text>审核未通过</text>
92
-            </view>
111
+          {/* 审核未通过 */}
112
+          {
113
+            Detail.verifyStatus - 0 === 2 &&
114
+            <view className='CheckStatus NoPass'>
115
+              <view className='Status'>
116
+                <text className='iconfont iconweitongguo'></text>
117
+                <text>审核未通过</text>
118
+              </view>
93 119
 
94
-            <view className='Info'>
95
-              <view className='flex-h'>
96
-                <text>审核人</text>
97
-                <text className='flex-item'>物业</text>
120
+              <view className='Info'>
121
+                <view className='flex-h'>
122
+                  <text>审核人</text>
123
+                  <text className='flex-item'>{Detail.verifyName || '-'}</text>
124
+                </view>
125
+                <view className='flex-h'>
126
+                  <text>原因</text>
127
+                  <text className='flex-item'>{Detail.remark || '-'}</text>
128
+                </view>
98 129
               </view>
99
-              <view className='flex-h'>
100
-                <text>原因</text>
101
-                <text className='flex-item'>信息填写不完善</text>
130
+
131
+              <view className='Info'>
132
+                <view className='flex-h'>
133
+                  <text>身份</text>
134
+                  <text className='flex-item'>户主</text>
135
+                </view>
136
+                <view className='flex-h'>
137
+                  <text>房产</text>
138
+                  <text className='flex-item'>{Detail.phaseName} {Detail.buildingName} {Detail.unitName} {Detail.levelName} {Detail.roomNoName}</text>
139
+                </view>
102 140
               </view>
103 141
             </view>
142
+          }
104 143
 
105
-            <view className='Info'>
106
-              <view className='flex-h'>
107
-                <text>身份</text>
108
-                <text className='flex-item'>户主</text>
109
-              </view>
110
-              <view className='flex-h'>
111
-                <text>房产</text>
112
-                <text className='flex-item'>金科蓝湾小区  一区  六栋  一单元  六楼</text>
113
-              </view>
144
+          <view className='OtherTab'>
145
+            <view className='flex-h' onClick={() => { setShowPopup(true) }}>
146
+              <text className='flex-item'>联系物业</text>
147
+              <text className='iconfont iconjiantouright'></text>
148
+            </view>
149
+            <view className='flex-h' onClick={Detele}>
150
+              <text className='flex-item'>删除当前资料</text>
151
+              <text className='iconfont iconjiantouright'></text>
152
+            </view>
153
+            <view className='flex-h' onClick={() => { Taro.redirectTo({ url: `/pages/WoDe/YeZhuRenZheng/index` }) }}>
154
+              <text className='flex-item'>关联其他房产</text>
155
+              <text className='iconfont iconjiantouright'></text>
114 156
             </view>
115 157
           </view>
116
-        }
117 158
 
118
-        <view className='OtherTab'>
119
-          <view className='flex-h' onClick={() => { setShowPopup(true) }}>
120
-            <text className='flex-item'>联系物业</text>
121
-            <text className='iconfont iconjiantouright'></text>
122
-          </view>
123
-          <view className='flex-h'>
124
-            <text className='flex-item'>删除当前资料</text>
125
-            <text className='iconfont iconjiantouright'></text>
126
-          </view>
127
-          <view className='flex-h' onClick={() => { Taro.redirectTo({ url: `/pages/WoDe/YeZhuRenZheng/index` }) }}>
128
-            <text className='flex-item'>关联其他房产</text>
129
-            <text className='iconfont iconjiantouright'></text>
130
-          </view>
131
-        </view>
159
+          <view className='ContentBottom'></view>
132 160
 
133
-        <view className='ContentBottom'></view>
161
+        </view>
162
+      }
134 163
 
135
-      </view>
136 164
 
137 165
       {/* 审核未通过 */}
138 166
       {
139
-        Status - 0 === 2 &&
167
+        Detail !== null && Status - 0 === 2 &&
140 168
         <view className='BottomBtn'>
141 169
           <text>重新认证</text>
142 170
         </view>

+ 8
- 0
src/utils/api.js Просмотреть файл

@@ -17,6 +17,14 @@ const $api = {
17 17
     method: 'post',
18 18
     url: `${prefix}/user/signin`
19 19
   },
20
+  deleteCheckingRenZheng: { // 删除审核中的房产
21
+    method: 'post',
22
+    url: `${prefix}/user/verify/delete/:id`
23
+  },
24
+  deletePassRenZheng: { // 删除审核通过的房产
25
+    method: 'post',
26
+    url: `${prefix}/current_user/verify/delete/:id`
27
+  },
20 28
   getOwnerVerifyList: { // 获取业主认证列表
21 29
     method: 'get',
22 30
     url: `${prefix}/user/verify/list`