浏览代码

Merge branch 'dev1.0' of http://git.ycjcjy.com/civilized_city/miniapp into dev1.0

Yansen 2 年前
父节点
当前提交
6e818c95c2
共有 2 个文件被更改,包括 5 次插入2 次删除
  1. 1
    1
      src/pages/apply/verify/index.jsx
  2. 4
    1
      src/pages/user/list/index.jsx

+ 1
- 1
src/pages/apply/verify/index.jsx 查看文件

@@ -160,6 +160,7 @@ export default (props) => {
160 160
 
161 161
   return (
162 162
     <Page loading={loading}>
163
+      <Dialog id={dialogId} />
163 164
       <Issue issueId={issueId} />
164 165
 
165 166
       {
@@ -241,7 +242,6 @@ export default (props) => {
241 242
       </CellGroup>
242 243
       <CellGroup>
243 244
         <View style={{ marginTop: '20px', display: 'flex' }}>
244
-          <Dialog id={dialogId} />
245 245
           <Button block type="primary" loading={submitting} onClick={onSubmit} style={{ flex: 5, marginLeft: 'var(--main-space)' }}>审 批</Button>
246 246
           <Button block type="info" loading={loading2} onClick={onCopy} style={{ flex: 1, margin: '0 var(--main-space)' }}>复制</Button>
247 247
         </View>

+ 4
- 1
src/pages/user/list/index.jsx 查看文件

@@ -14,6 +14,7 @@ const sid1 = Math.random().toString(36).substring(2, 8);
14 14
 export default (props) => {
15 15
   const [loading, setLoading] = React.useState(false);
16 16
   const listRef = React.useRef();
17
+  const dialogId = React.useMemo(() => `dialog-${Math.random().toString(36).substring(2, 7)}`, []);
17 18
 
18 19
   const onAdd = () => {
19 20
     Taro.navigateTo({
@@ -25,6 +26,7 @@ export default (props) => {
25 26
     Dialog.confirm({
26 27
       width: '70vw',
27 28
       title: "确认删除用户?",
29
+      selector: dialogId,
28 30
     }).then((action) => {
29 31
       if (action === "confirm") {
30 32
         setLoading(true);
@@ -49,9 +51,10 @@ export default (props) => {
49 51
     listRef.current.refresh();
50 52
   }
51 53
 
52
-  console.log('loading', loading);
54
+  // console.log('loading', loading);
53 55
   return (
54 56
     <Page loading={loading} onShow={onShow}>
57
+      <Dialog id={dialogId} />
55 58
       <view className={styles["user-warpper"]}>
56 59
         <view className={styles["user-warpper-list"]}>
57 60
           <PowerList