张延森 3 years ago
parent
commit
2c58b87186

+ 2
- 0
src/app.config.js View File

11
     'pages/dogList/index',
11
     'pages/dogList/index',
12
     'pages/setDogInfo/index',
12
     'pages/setDogInfo/index',
13
     'pages/dogCardDetail/index',
13
     'pages/dogCardDetail/index',
14
+    'pages/payPage/index',
15
+    'pages/ApplicationList/index',
14
   ],
16
   ],
15
   window: {
17
   window: {
16
     backgroundTextStyle: 'light',
18
     backgroundTextStyle: 'light',

BIN
src/assets/more.png View File


BIN
src/assets/noticeIcon.png View File


+ 11
- 0
src/pages/ApplicationList/index.config.js View File

1
+export default {
2
+  navigationBarTitleText: '申请状态列表',
3
+  disableScroll: true,
4
+  navigationBarBackgroundColor: "#FBD804",
5
+  navigationBarTextStyle: "black",
6
+  backgroundColor: "#FBD804",
7
+  usingComponents: {
8
+
9
+  }
10
+
11
+}

+ 229
- 0
src/pages/ApplicationList/index.jsx View File

1
+import { ScrollView, View, Image, Button } from '@tarojs/components'
2
+import Taro from '@tarojs/taro';
3
+import { useState } from 'react';
4
+import { useEffect } from 'react';
5
+import { getOrder } from '../../services/dogAPI';
6
+import './style.less'
7
+
8
+export default (props) => {
9
+  const id = Taro.getCurrentInstance().router.params.id;
10
+  const [orderInfo, setOrderInfo] = useState()
11
+
12
+  useEffect(() => {
13
+    if (id) {
14
+      getOrder(id).then((e) => {
15
+        console.log('e', e);
16
+        setOrderInfo(e)
17
+      })
18
+    }
19
+
20
+  }, [id])
21
+
22
+  const goSetDogLicense = () => {
23
+    Taro.navigateTo({
24
+      url: '/pages/setDogLicense/index'
25
+    })
26
+  }
27
+
28
+
29
+  return (
30
+    <ScrollView scrollY style={{ height: '100vh' }}>
31
+      <View className='ApplicationListBox'>
32
+        <View className='ApplicationListBox-CardBox'>
33
+
34
+          <View className='ApplicationListBox-CardBox-headerTop'>
35
+            狗狗姓名
36
+            <View className='ApplicationListBox-CardBox-headerTop-right'>
37
+              <View>我的二狗子</View>
38
+
39
+              <Image src='https://gss0.baidu.com/7Po3dSag_xI4khGko9WTAnF6hhy/zhidao/pic/item/48540923dd54564e953f5e6cbede9c82d1584f08.jpg' />
40
+            </View>
41
+          </View>
42
+          {/* 状态
43
+
44
+待付款 
45
+审核中 > 驳回 点击去修改  /退款
46
+驳回原因
47
+
48
+待发卡
49
+已完成 
50
+
51
+        狗名字
52
+        时间
53
+        方式
54
+        状态
55
+        单号+快递公司
56
+*/}
57
+
58
+          <View className='ApplicationListBox-CardBox-content'>
59
+            <View>申请时间</View>
60
+            <View>2022-05-06 12:36</View>
61
+          </View>
62
+          <View className='ApplicationListBox-CardBox-content'>
63
+            <View>审领方式</View>
64
+            <View>邮寄</View>
65
+          </View>
66
+          <View className='ApplicationListBox-CardBox-content'>
67
+            <View>状态</View>
68
+            <View>已完成</View>
69
+          </View>
70
+          <View className='ApplicationListBox-CardBox-content'>
71
+            <View>邮政快递</View>
72
+            <View>3200222000</View>
73
+          </View>
74
+        </View>
75
+
76
+      </View>
77
+      <View className='ApplicationListBox'>
78
+        <View className='ApplicationListBox-CardBox'>
79
+
80
+          <View className='ApplicationListBox-CardBox-headerTop'>
81
+            狗狗姓名
82
+            <View className='ApplicationListBox-CardBox-headerTop-right'>
83
+              <View>我的二狗子</View>
84
+
85
+              <Image src='https://gss0.baidu.com/7Po3dSag_xI4khGko9WTAnF6hhy/zhidao/pic/item/48540923dd54564e953f5e6cbede9c82d1584f08.jpg' />
86
+            </View>
87
+          </View>
88
+          {/* 状态
89
+
90
+待付款 
91
+审核中 > 驳回 点击去修改  /退款
92
+驳回原因
93
+
94
+待发卡
95
+已完成 
96
+
97
+        狗名字
98
+        时间
99
+        方式
100
+        状态
101
+        单号+快递公司
102
+*/}
103
+
104
+          <View className='ApplicationListBox-CardBox-content'>
105
+            <View>申请时间</View>
106
+            <View>2022-05-06 12:36</View>
107
+          </View>
108
+          <View className='ApplicationListBox-CardBox-content'>
109
+            <View>审领方式</View>
110
+            <View>邮寄</View>
111
+          </View>
112
+          <View className='ApplicationListBox-CardBox-content'>
113
+            <View>状态</View>
114
+            <View>已完成</View>
115
+          </View>
116
+          <View className='ApplicationListBox-CardBox-content'>
117
+            <View>邮政快递</View>
118
+            <View>3200222000</View>
119
+          </View>
120
+        </View>
121
+
122
+      </View>
123
+      <View className='ApplicationListBox'>
124
+        <View className='ApplicationListBox-CardBox'>
125
+
126
+          <View className='ApplicationListBox-CardBox-headerTop'>
127
+            狗狗姓名
128
+            <View className='ApplicationListBox-CardBox-headerTop-right'>
129
+              <View>我的二狗子</View>
130
+
131
+              <Image src='https://gss0.baidu.com/7Po3dSag_xI4khGko9WTAnF6hhy/zhidao/pic/item/48540923dd54564e953f5e6cbede9c82d1584f08.jpg' />
132
+            </View>
133
+          </View>
134
+          {/* 状态
135
+
136
+待付款 
137
+审核中 > 驳回 点击去修改  /退款
138
+驳回原因
139
+
140
+待发卡
141
+已完成 
142
+
143
+        狗名字
144
+        时间
145
+        方式
146
+        状态
147
+        单号+快递公司
148
+*/}
149
+
150
+          <View className='ApplicationListBox-CardBox-content'>
151
+            <View>申请时间</View>
152
+            <View>2022-05-06 12:36</View>
153
+          </View>
154
+          <View className='ApplicationListBox-CardBox-content'>
155
+            <View>审领方式</View>
156
+            <View>邮寄</View>
157
+          </View>
158
+          <View className='ApplicationListBox-CardBox-content'>
159
+            <View>状态</View>
160
+            <View>已完成</View>
161
+          </View>
162
+          <View className='ApplicationListBox-CardBox-content'>
163
+            <View>邮政快递</View>
164
+            <View>3200222000</View>
165
+          </View>
166
+        </View>
167
+
168
+      </View>
169
+      <View className='ApplicationListBox'>
170
+        <View className='ApplicationListBox-CardBox'>
171
+
172
+          <View className='ApplicationListBox-CardBox-headerTop'>
173
+            狗狗姓名
174
+            <View className='ApplicationListBox-CardBox-headerTop-right'>
175
+              <View>我的二狗子</View>
176
+
177
+              <Image src='https://gss0.baidu.com/7Po3dSag_xI4khGko9WTAnF6hhy/zhidao/pic/item/48540923dd54564e953f5e6cbede9c82d1584f08.jpg' />
178
+            </View>
179
+          </View>
180
+          {/* 状态
181
+
182
+待付款 
183
+审核中 > 驳回 点击去修改  /退款
184
+驳回原因
185
+
186
+待发卡
187
+已完成 
188
+
189
+        狗名字
190
+        时间
191
+        方式
192
+        状态
193
+        单号+快递公司
194
+*/}
195
+
196
+          <View className='ApplicationListBox-CardBox-content'>
197
+            <View>申请时间</View>
198
+            <View>2022-05-06 12:36</View>
199
+          </View>
200
+          <View className='ApplicationListBox-CardBox-content'>
201
+            <View>审领方式</View>
202
+            <View>邮寄</View>
203
+          </View>
204
+          <View className='ApplicationListBox-CardBox-content'>
205
+            <View>状态</View>
206
+            <View>已完成</View>
207
+          </View>
208
+          <View className='ApplicationListBox-CardBox-content'>
209
+            <View>邮政快递</View>
210
+            <View>3200222000</View>
211
+          </View>
212
+          <View>
213
+
214
+            <View className='ApplicationListBox-CardBox-refuse'>
215
+              <View>驳回原因</View>
216
+              <View>因地区政策原因,疫苗报告失效,请重新填写申请信息。</View>
217
+            </View>
218
+            <View style={{ margin: '0.5em 0 0.2em 0' }}>
219
+              <Button style={{ width: '135px', height: '35px', fontSize: '14px', backgroundColor: '#fbd804', borderRadius: '40px', color: '#000', border: '0px' }} class='weui-btn' type='primary' loading={false} onClick={goSetDogLicense}>重新填写</Button>
220
+            </View>
221
+          </View>
222
+
223
+        </View>
224
+
225
+      </View>
226
+
227
+    </ScrollView>
228
+  )
229
+}

+ 72
- 0
src/pages/ApplicationList/style.less View File

1
+// #858B9C
2
+.ApplicationListBox {
3
+  background-color: white;
4
+  padding: 30px 30px;
5
+  margin-top: 3vw;
6
+  // font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande",
7
+  //   "Lucida Sans", Arial, sans-serif;
8
+
9
+  &-CardBox {
10
+    width: 90%;
11
+    background-color: #f9fafb;
12
+    border-radius: 20px;
13
+
14
+    padding: 20px 20px;
15
+    margin: 0 auto;
16
+    &-headerTop {
17
+      display: flex;
18
+      align-items: center;
19
+      border-bottom: 1px solid rgba(219, 219, 219, 0.603);
20
+      padding-bottom: 30px;
21
+      justify-content: space-between;
22
+      // font-weight: 600;
23
+      font-size: 30px;
24
+
25
+      &-right {
26
+        display: flex;
27
+        flex-flow: row-reverse;
28
+        align-items: center;
29
+        color: #41485d;
30
+        > Image {
31
+          width: 45px;
32
+          height: 45px;
33
+          border-radius: 50%;
34
+          margin: 0 10px;
35
+        }
36
+      }
37
+    }
38
+
39
+    &-content {
40
+      display: flex;
41
+      align-items: center;
42
+      justify-content: space-between;
43
+      margin: 20px auto;
44
+      // font-weight: 600;
45
+      font-size: 30px;
46
+      > View:nth-child(1) {
47
+        color: #858b9c;
48
+      }
49
+      > View:nth-child(2) {
50
+        color: #41485d;
51
+      }
52
+    }
53
+    &-refuse {
54
+      border-top: 1px solid rgba(219, 219, 219, 0.603);
55
+      display: flex;
56
+      font-size: 30px;
57
+      text-align: left;
58
+      margin-top: 30px;
59
+      padding-top: 15px;
60
+
61
+      > View:nth-child(1) {
62
+        width: 180px;
63
+        color: #858b9c;
64
+      }
65
+      > View:nth-child(2) {
66
+        color: #41485d;
67
+        font-size: 27px;
68
+        text-align: right;
69
+      }
70
+    }
71
+  }
72
+}

+ 22
- 14
src/pages/NoticeInfo/index.jsx View File

1
 import { View, RichText, ScrollView } from '@tarojs/components'
1
 import { View, RichText, ScrollView } from '@tarojs/components'
2
+import Taro from '@tarojs/taro'
3
+import { useEffect, useState } from 'react'
4
+import { getNoticeInfo } from '../../services/dogAPI'
2
 
5
 
3
 import './style.less'
6
 import './style.less'
4
 
7
 
5
 export default (props) => {
8
 export default (props) => {
9
+  const id = Taro.getCurrentInstance().router.params.id;
10
+  const [content, setContent] = useState()
11
+  useEffect(() => {
12
+    if (id) {
13
+      getNoticeInfo(id).then((res) => {
14
+        setContent(res)
15
+      })
16
+    }
17
+
18
+  }, [id])
19
+
20
+
21
+  const htmlSnip = content?.content.replace(/<\/p>/g, '</p><p style="height: 1em">&nbsp;</p>')
6
 
22
 
7
-  let htmlSnip=`<p style="text-align: center;"><strong>通知2士大夫敢死队</strong></p>
8
-  <p style="text-indent: 2em;" data-spm-anchor-id="C73544894212.P59511941341.0.i0">在今天举行的上海市新冠肺炎疫情防控新闻发布会上,相关部门介绍,全市高三、高二年级学生从6月6日,初三年级学生从6月13日起返校复学;中小学其他各年级学生继续居家在线学习至学期结束,学校可在学期结束前安排一次学生返校活动。有关部门将按照规范完成校园消杀,确保校园安全干净,为学校配备专门的核酸采样和检测力量,实施校园网格化管理等措施。</p>
9
-  <p style="text-indent: 2em;">上海复工复产加快推动,上海四家整车厂、中国船舶集团旗下的三大船企都实现复工复产。上海还将根据疫情防控形势,在6月推动工业、服务业和外资外贸企业等应复尽复。</p>
10
-  <p style="text-indent: 2em; text-align: right;">2022年5月26日</p>
11
-  <p style="text-indent: 2em; text-align: right;">南京防疫办公室</p>`
12
-  
13
-  htmlSnip = htmlSnip.replace(/<\/p>/g, '</p><p style="height: 1em">&nbsp;</p>')
14
-  
15
   return (
23
   return (
16
-    <ScrollView scrollY style={{height:'100vh'}}>
17
-    <View className='noticeInfo'>
18
-      <View className='title'>我是标题</View>
19
-      <View className='date'>2022-6-9 13:33</View>
20
-      <RichText nodes={htmlSnip}></RichText>
21
-    </View>
24
+    <ScrollView scrollY style={{ height: '100vh' }}>
25
+      <View className='noticeInfo'>
26
+        <View className='title'>{content?.title}</View>
27
+        <View className='date'>{content?.createDate}</View>
28
+        <RichText nodes={htmlSnip}></RichText>
29
+      </View>
22
     </ScrollView>
30
     </ScrollView>
23
   )
31
   )
24
 }
32
 }

+ 2
- 2
src/pages/dogCardDetail/index.jsx View File

47
                 <View className='content'>{applicationInfoDate?.petName}</View>
47
                 <View className='content'>{applicationInfoDate?.petName}</View>
48
               </View>
48
               </View>
49
               <View className='cell'>
49
               <View className='cell'>
50
-                <View className='lable'>毛色</View>:
51
-                <View className='content'>米白</View>
50
+                <View className='lable'>性别</View>:
51
+                <View className='content'>{applicationInfoDate?.petSex}</View>
52
               </View>
52
               </View>
53
             </View>
53
             </View>
54
             <View className='cardRight'>
54
             <View className='cardRight'>

+ 4
- 4
src/pages/index/index.jsx View File

10
 import MenuItem from './components/MenuItem'
10
 import MenuItem from './components/MenuItem'
11
 
11
 
12
 import './style.less'
12
 import './style.less'
13
-import { getNoticeList } from '../../services/dogAPI'
13
+import { getBanner, getNoticeList } from '../../services/dogAPI'
14
 
14
 
15
 const pt16 = {
15
 const pt16 = {
16
   paddingTop: '16px'
16
   paddingTop: '16px'
25
   const [totalApplyNum, setTotalApplyNum] = useState(0)
25
   const [totalApplyNum, setTotalApplyNum] = useState(0)
26
   const [noticeList, setNoticeList] = useState([])
26
   const [noticeList, setNoticeList] = useState([])
27
   const [bannerList, setBannerList] = useState([])
27
   const [bannerList, setBannerList] = useState([])
28
-  
28
+
29
   useEffect(() => {
29
   useEffect(() => {
30
     getNoticeList({ pageSize: 5 }).then((res) => {
30
     getNoticeList({ pageSize: 5 }).then((res) => {
31
       console.log('res', res);
31
       console.log('res', res);
66
                 subtitle='Registration application'
66
                 subtitle='Registration application'
67
                 to='/pages/setDogLicense/index?type=first'
67
                 to='/pages/setDogLicense/index?type=first'
68
               >
68
               >
69
-                <View>您有<Text>{ totalApplyNum }</Text>条办证申请记录</View>
69
+                <View>您有<Text>{totalApplyNum}</Text>条办证申请记录</View>
70
               </MenuItem>
70
               </MenuItem>
71
             </View>
71
             </View>
72
             <View class='weui-flex__item' style={ml16}>
72
             <View class='weui-flex__item' style={ml16}>
76
                 icon='certificate'
76
                 icon='certificate'
77
                 to='/pages/dogLicenseList/index'
77
                 to='/pages/dogLicenseList/index'
78
               >
78
               >
79
-                <View>您有<Text>{ cards ? cards.length : 0 }</Text>条办证申请记录</View>
79
+                <View>您有<Text>{cards ? cards.length : 0}</Text>条办证申请记录</View>
80
               </MenuItem>
80
               </MenuItem>
81
             </View>
81
             </View>
82
           </View>
82
           </View>

+ 2
- 1
src/pages/main/index.jsx View File

24
   }
24
   }
25
   const goDogApplyList = () => {
25
   const goDogApplyList = () => {
26
     Taro.navigateTo({
26
     Taro.navigateTo({
27
-      // url: '/pages/setUser/index'
27
+      url: '/pages/ApplicationList/index'
28
+
28
     })
29
     })
29
   }
30
   }
30
   const goSetUser = (personId) => {
31
   const goSetUser = (personId) => {

+ 49
- 63
src/pages/noticeList/index.jsx View File

1
-import { ScrollView, View } from '@tarojs/components'
1
+import { ScrollView, View, Image } from '@tarojs/components'
2
 import Taro from '@tarojs/taro';
2
 import Taro from '@tarojs/taro';
3
+import more from '@/assets/more.png'
4
+import noticeIcon from '@/assets/noticeIcon.png'
3
 import './style.less'
5
 import './style.less'
4
 
6
 
5
 export default (props) => {
7
 export default (props) => {
6
-  const onClick = () => { 
7
-    Taro.navigateTo({url:'/pages/noticeInfo/index'})
8
+  const onClick = () => {
9
+    Taro.navigateTo({ url: '/pages/noticeInfo/index' })
8
   }
10
   }
9
   return (
11
   return (
10
     <ScrollView scrollY style={{ height: '100vh' }}>
12
     <ScrollView scrollY style={{ height: '100vh' }}>
11
       <View className='noticeList'>
13
       <View className='noticeList'>
12
         <View className='notice-item-row' onClick={onClick}>
14
         <View className='notice-item-row' onClick={onClick}>
13
-          <View className='iconfont icon-notice' />
15
+          <Image className='notice' src={noticeIcon} mode='aspectFit' />
14
           <View className='notice-item-body'>
16
           <View className='notice-item-body'>
15
-            <View className='notice-item-title'>这是我第一个通知</View>
16
-            <View className='notice-item-time'>2022.05.26</View>
17
+            <View className='notice-item-title'>望都人注意!禁养犬只名录正式出炉!快看你家狗狗能养吗</View>
18
+            <View className='notice-item-time'>2022.05.26 16:21</View>
17
           </View>
19
           </View>
18
-          <View className='iconfont icon-action' />
20
+          <Image className='action' src={more} mode='aspectFit' />
19
         </View>
21
         </View>
20
         <View className='notice-item-row' onClick={onClick}>
22
         <View className='notice-item-row' onClick={onClick}>
21
-          <View className='iconfont icon-notice' />
23
+          <Image className='notice' src={noticeIcon} mode='aspectFit' />
22
           <View className='notice-item-body'>
24
           <View className='notice-item-body'>
23
-            <View className='notice-item-title'>这是我第一个通知江苏省南京市江宁区南京南站</View>
24
-            <View className='notice-item-time'>2022.05.26</View>
25
+            <View className='notice-item-title'>望都人注意!禁养犬只名录正式出炉!快看你家狗狗能养吗</View>
26
+            <View className='notice-item-time'>2022.05.26 16:21</View>
25
           </View>
27
           </View>
26
-          <View className='iconfont icon-action' />
28
+          <Image className='action' src={more} mode='aspectFit' />
27
         </View>
29
         </View>
28
         <View className='notice-item-row' onClick={onClick}>
30
         <View className='notice-item-row' onClick={onClick}>
29
-          <View className='iconfont icon-notice' />
30
-          <View>
31
-            <View className='notice-item-title'>这是我第一个通知</View>
32
-            <View className='notice-item-time'>2022.05.26</View>
33
-          </View>
34
-          <View className='iconfont icon-action' />
35
-        </View>
36
-        <View className='notice-item-row' onClick={onClick}>
37
-          <View className='iconfont icon-notice' />
31
+          <Image className='notice' src={noticeIcon} mode='aspectFit' />
38
           <View className='notice-item-body'>
32
           <View className='notice-item-body'>
39
-            <View className='notice-item-title'>这是我第一个通知</View>
40
-            <View className='notice-item-time'>2022.05.26</View>
33
+            <View className='notice-item-title'>望都人注意!禁养犬只名录正式出炉!快看你家狗狗能养吗</View>
34
+            <View className='notice-item-time'>2022.05.26 16:21</View>
41
           </View>
35
           </View>
42
-          <View className='iconfont icon-action' />
36
+          <Image className='action' src={more} mode='aspectFit' />
43
         </View>
37
         </View>
44
         <View className='notice-item-row' onClick={onClick}>
38
         <View className='notice-item-row' onClick={onClick}>
45
-          <View className='iconfont icon-notice' />
39
+          <Image className='notice' src={noticeIcon} mode='aspectFit' />
46
           <View className='notice-item-body'>
40
           <View className='notice-item-body'>
47
-            <View className='notice-item-title'>这是我第一个通知江苏省南京市江宁区南京南站</View>
48
-            <View className='notice-item-time'>2022.05.26</View>
49
-          </View>
50
-          <View className='iconfont icon-action' />
51
-        </View>
52
-        <View className='notice-item-row' onClick={onClick}>
53
-          <View className='iconfont icon-notice' />
54
-          <View>
55
-            <View className='notice-item-title'>这是我第一个通知</View>
56
-            <View className='notice-item-time'>2022.05.26</View>
41
+            <View className='notice-item-title'>望都人注意!禁养犬只名录正式出炉!快看你家狗狗能养吗</View>
42
+            <View className='notice-item-time'>2022.05.26 16:21</View>
57
           </View>
43
           </View>
58
-          <View className='iconfont icon-action' />
44
+          <Image className='action' src={more} mode='aspectFit' />
59
         </View>
45
         </View>
60
         <View className='notice-item-row' onClick={onClick}>
46
         <View className='notice-item-row' onClick={onClick}>
61
-          <View className='iconfont icon-notice' />
47
+          <Image className='notice' src={noticeIcon} mode='aspectFit' />
62
           <View className='notice-item-body'>
48
           <View className='notice-item-body'>
63
-            <View className='notice-item-title'>这是我第一个通知</View>
64
-            <View className='notice-item-time'>2022.05.26</View>
49
+            <View className='notice-item-title'>望都人注意!禁养犬只名录正式出炉!快看你家狗狗能养吗</View>
50
+            <View className='notice-item-time'>2022.05.26 16:21</View>
65
           </View>
51
           </View>
66
-          <View className='iconfont icon-action' />
52
+          <Image className='action' src={more} mode='aspectFit' />
67
         </View>
53
         </View>
68
         <View className='notice-item-row' onClick={onClick}>
54
         <View className='notice-item-row' onClick={onClick}>
69
-          <View className='iconfont icon-notice' />
55
+          <Image className='notice' src={noticeIcon} mode='aspectFit' />
70
           <View className='notice-item-body'>
56
           <View className='notice-item-body'>
71
-            <View className='notice-item-title'>这是我第一个通知江苏省南京市江宁区南京南站</View>
72
-            <View className='notice-item-time'>2022.05.26</View>
57
+            <View className='notice-item-title'>望都人注意!禁养犬只名录正式出炉!快看你家狗狗能养吗</View>
58
+            <View className='notice-item-time'>2022.05.26 16:21</View>
73
           </View>
59
           </View>
74
-          <View className='iconfont icon-action' />
60
+          <Image className='action' src={more} mode='aspectFit' />
75
         </View>
61
         </View>
76
         <View className='notice-item-row' onClick={onClick}>
62
         <View className='notice-item-row' onClick={onClick}>
77
-          <View className='iconfont icon-notice' />
78
-          <View>
79
-            <View className='notice-item-title'>这是我第一个通知</View>
80
-            <View className='notice-item-time'>2022.05.26</View>
63
+          <Image className='notice' src={noticeIcon} mode='aspectFit' />
64
+          <View className='notice-item-body'>
65
+            <View className='notice-item-title'>望都人注意!禁养犬只名录正式出炉!快看你家狗狗能养吗</View>
66
+            <View className='notice-item-time'>2022.05.26 16:21</View>
81
           </View>
67
           </View>
82
-          <View className='iconfont icon-action' />
68
+          <Image className='action' src={more} mode='aspectFit' />
83
         </View>
69
         </View>
84
         <View className='notice-item-row' onClick={onClick}>
70
         <View className='notice-item-row' onClick={onClick}>
85
-          <View className='iconfont icon-notice' />
71
+          <Image className='notice' src={noticeIcon} mode='aspectFit' />
86
           <View className='notice-item-body'>
72
           <View className='notice-item-body'>
87
-            <View className='notice-item-title'>这是我第一个通知</View>
88
-            <View className='notice-item-time'>2022.05.26</View>
73
+            <View className='notice-item-title'>望都人注意!禁养犬只名录正式出炉!快看你家狗狗能养吗</View>
74
+            <View className='notice-item-time'>2022.05.26 16:21</View>
89
           </View>
75
           </View>
90
-          <View className='iconfont icon-action' />
91
-        </View>
76
+          <Image className='action' src={more} mode='aspectFit' />
77
+        </View>      
92
         <View className='notice-item-row' onClick={onClick}>
78
         <View className='notice-item-row' onClick={onClick}>
93
-          <View className='iconfont icon-notice' />
79
+          <Image className='notice' src={noticeIcon} mode='aspectFit' />
94
           <View className='notice-item-body'>
80
           <View className='notice-item-body'>
95
-            <View className='notice-item-title'>这是我第一个通知江苏省南京市江宁区南京南站</View>
96
-            <View className='notice-item-time'>2022.05.26</View>
81
+            <View className='notice-item-title'>望都人注意!禁养犬只名录正式出炉!快看你家狗狗能养吗</View>
82
+            <View className='notice-item-time'>2022.05.26 16:21</View>
97
           </View>
83
           </View>
98
-          <View className='iconfont icon-action' />
84
+          <Image className='action' src={more} mode='aspectFit' />
99
         </View>
85
         </View>
100
         <View className='notice-item-row' onClick={onClick}>
86
         <View className='notice-item-row' onClick={onClick}>
101
-          <View className='iconfont icon-notice' />
102
-          <View>
103
-            <View className='notice-item-title'>这是我第一个通知</View>
104
-            <View className='notice-item-time'>2022.05.26</View>
87
+          <Image className='notice' src={noticeIcon} mode='aspectFit' />
88
+          <View className='notice-item-body'>
89
+            <View className='notice-item-title'>望都人注意!禁养犬只名录正式出炉!快看你家狗狗能养吗</View>
90
+            <View className='notice-item-time'>2022.05.26 16:21</View>
105
           </View>
91
           </View>
106
-          <View className='iconfont icon-action' />
107
-        </View>
92
+          <Image className='action' src={more} mode='aspectFit' />
93
+        </View>      
108
       </View>
94
       </View>
109
     </ScrollView>
95
     </ScrollView>
110
   )
96
   )

+ 23
- 55
src/pages/noticeList/style.less View File

1
 .noticeList{
1
 .noticeList{
2
   padding: 32px;
2
   padding: 32px;
3
-  @font-face {
4
-    font-family: 'iconfont';  /* Project id 2904679 */
5
-    src: url('//at.alicdn.com/t/font_2904679_ix6j11q9hir.woff2?t=1653563318275') format('woff2'),
6
-      url('//at.alicdn.com/t/font_2904679_ix6j11q9hir.woff?t=1653563318275') format('woff'),
7
-      url('//at.alicdn.com/t/font_2904679_ix6j11q9hir.ttf?t=1653563318275') format('truetype');  }
8
-  .iconfont {
9
-    font-family: "iconfont" !important;
10
-    font-size: 16px;
11
-    font-style: normal;
12
-    -webkit-font-smoothing: antialiased;
13
-    -moz-osx-font-smoothing: grayscale;
14
-  }
15
-  .icon-notice{
16
-    font-size: 80px;
17
-    width: 80px;
18
-    flex:none;
19
-    margin-right: 16px;
20
-    color: rgb(31 , 136, 217);
21
-  }
22
-  .icon-notice:before {
23
-    content: "\e60d";
24
-  }
25
-  .icon-action{
26
-    font-size: 40px;
27
-    width: 40px;
28
-    margin-left: 16px;
29
-    flex:none;
30
-  }
31
-  .icon-action:before {
32
-    content: "\e60e";
33
-  }
3
+  
34
   .notice-item-row {
4
   .notice-item-row {
35
     align-items: center;
5
     align-items: center;
36
     background-color: white;
6
     background-color: white;
40
     & + .notice-item-row {
10
     & + .notice-item-row {
41
       margin-top: 32px;
11
       margin-top: 32px;
42
     } 
12
     } 
43
-    .notice-item-title {
44
-      width: calc(100vw - 280px);
45
-      white-space: nowrap;
46
-      overflow: hidden;
47
-      text-overflow: ellipsis;
48
-      font-weight: bold;
49
-    } 
50
-    .notice-item-time{
51
-      font-size: 0.5em;
52
-      margin-top: 8px;
53
-    }
54
-    .icon-notice{
55
-      font-size: 80px;
56
-      width: 80px;
13
+    .notice{
14
+      width: 64px;
57
       flex:none;
15
       flex:none;
16
+      height: 64px;
58
       margin-right: 16px;
17
       margin-right: 16px;
59
-      color: rgb(31 , 136, 217);
60
-    }
61
-    .icon-notice:before {
62
-      content: "\e60d";
18
+      margin-top: -48px;
63
     }
19
     }
64
-    .icon-action{
65
-      font-size: 40px;
66
-      width: 40px;
20
+    .action{
21
+      width: 64px;
22
+      height: 64px;
67
       margin-left: 16px;
23
       margin-left: 16px;
68
       flex:none;
24
       flex:none;
69
     }
25
     }
70
-    .icon-action:before {
71
-      content: "\e60e";
72
-    }  
26
+    .notice-item-body{
27
+      flex: 1;
28
+      .notice-item-title {
29
+        width: calc(100vw - 290px);
30
+        white-space: nowrap;
31
+        overflow: hidden;
32
+        text-overflow: ellipsis;
33
+        font-weight: bold;
34
+      } 
35
+      .notice-item-time{
36
+        font-size: 0.5em;
37
+        margin-top: 24px;
38
+        color: #969696;
39
+      }
40
+    }    
73
   } 
41
   } 
74
 }
42
 }

+ 11
- 0
src/pages/payPage/index.config.js View File

1
+export default {
2
+  navigationBarTitleText: '订单确认',
3
+  disableScroll: true,
4
+  navigationBarBackgroundColor: "#FBD804",
5
+  navigationBarTextStyle: "black",
6
+  backgroundColor: "#FBD804",
7
+  usingComponents: {
8
+
9
+  }
10
+
11
+}

+ 78
- 0
src/pages/payPage/index.jsx View File

1
+import { ScrollView, View, Button } from '@tarojs/components'
2
+import Taro from '@tarojs/taro';
3
+import { useState } from 'react';
4
+import { useEffect } from 'react';
5
+import { getOrder } from '../../services/dogAPI';
6
+import './style.less'
7
+
8
+export default (props) => {
9
+  const id = Taro.getCurrentInstance().router.params.id;
10
+  const [orderInfo, setOrderInfo] = useState()
11
+
12
+  useEffect(() => {
13
+    if (id) {
14
+      getOrder(id).then((e) => {
15
+        console.log('e', e);
16
+        setOrderInfo(e)
17
+      })
18
+    }
19
+
20
+  }, [id])
21
+
22
+  const pay = (params) => {
23
+    Taro.hideLoading()
24
+    console.log("🚀 ~ file: index.jsx ~ line 92 ~ requestPayment ~ params", params)
25
+    Taro.requestPayment({
26
+      // ...params,
27
+      // package: params.packageValue,
28
+      success: () => {
29
+        Taro.showToast({
30
+          title: "支付成功",
31
+          icon: "success",
32
+          duration: 1000,
33
+        }).then(() => {
34
+          setTimeout(() => {
35
+            Taro.reLaunch({
36
+              url: `/pages/index/index?tab=2`
37
+            })
38
+          }, 400)
39
+        })
40
+      },
41
+      fail: (e) => {
42
+        Taro.showToast({
43
+          title: "支付失败",
44
+          icon: "none",
45
+          duration: 2000,
46
+        });
47
+        Taro.reLaunch({
48
+          // url: `/pages/MineUserAll/AllOrder/index?tabJump=1`
49
+        })
50
+      },
51
+    })
52
+  }
53
+
54
+
55
+
56
+  return (
57
+    <ScrollView scrollY style={{ height: '100vh' }}>
58
+      <View className='payPageBox'>
59
+        <View className='payPageBox-payItemBox'>
60
+          <View className='payPageBox-payItemBox-left'></View>
61
+          <View className='payPageBox-payItemBox-content'>订单号: <View>32121321321</View></View>
62
+        </View>
63
+        <View className='payPageBox-payItemBox'>
64
+          <View className='payPageBox-payItemBox-leftText'>工本费: <View>20</View>元</View>
65
+        </View>
66
+        <View className='payPageBox-payItemBox'>
67
+          <View className='payPageBox-payItemBox-leftText'>快递费: <View>3221321</View>元</View>
68
+        </View>
69
+        <View className='payPageBox-payItemBox'>
70
+          <View className='payPageBox-payItemBox-leftText'>总金额: <View style={{ color: 'red' }}>20</View>元</View>
71
+        </View>
72
+      </View>
73
+      <View slot='button' style={{ margin: '4em 0 2em 0' }}>
74
+        <Button style={{ backgroundColor: '#fbd804', borderRadius: '40px', color: '#000', border: '0px' }} class='weui-btn' type='primary' loading={false} onClick={pay}>支付</Button>
75
+      </View>
76
+    </ScrollView>
77
+  )
78
+}

+ 40
- 0
src/pages/payPage/style.less View File

1
+.payPageBox {
2
+  width: 86%;
3
+  background-color: #fff;
4
+  border-radius: 20px;
5
+  margin: 10vw auto;
6
+  padding-bottom: 50px;
7
+  padding-top: 30px;
8
+  &-payItemBox {
9
+    padding: 8px 30px;
10
+    display: flex;
11
+    align-items: center;
12
+    &-left {
13
+      width: 10px;
14
+      height: 35px;
15
+      background-color: #fbd804;
16
+      margin-right: 20px;
17
+      border-radius: 10px;
18
+    }
19
+    &-content {
20
+      width: 70vw;
21
+      font-size: 28px;
22
+      display: flex;
23
+      color: #858585;
24
+      > View {
25
+        display: flex;
26
+        align-items: center;
27
+      }
28
+    }
29
+    &-leftText {
30
+      display: flex;
31
+      margin-left: 25px;
32
+      font-weight: 400;
33
+
34
+      > View {
35
+        font-weight: 600;
36
+        margin-right: 15px;
37
+      }
38
+    }
39
+  }
40
+}

+ 51
- 70
src/pages/setDogLicense/index.jsx View File

1
 import { View, Button, Text, RadioGroup, Picker, Image, Input, Radio, Label, ScrollView } from '@tarojs/components'
1
 import { View, Button, Text, RadioGroup, Picker, Image, Input, Radio, Label, ScrollView } from '@tarojs/components'
2
 import Taro, { useDidShow } from '@tarojs/taro';
2
 import Taro, { useDidShow } from '@tarojs/taro';
3
-import { useState, useEffect } from 'react';
3
+import { useState } from 'react';
4
 import Form from '@/components/Form';
4
 import Form from '@/components/Form';
5
 import AuthProfile from '@/components/Authorize/AuthProfile';
5
 import AuthProfile from '@/components/Authorize/AuthProfile';
6
 
6
 
7
-import { addDogList, addlication, getDogCardList, getDogInfo } from '../../services/dogAPI';
7
+import { addDogList, addlication, getDogInfo } from '../../services/dogAPI';
8
 import { useModel } from '../../store';
8
 import { useModel } from '../../store';
9
 
9
 
10
 import './style.less'
10
 import './style.less'
11
+import { uploadFile } from '../../utils/request';
11
 
12
 
12
 export default (props) => {
13
 export default (props) => {
13
-  const { dogs, person, setDogs } = useModel('userData')
14
+  const { dogs, person } = useModel('userData')
14
   const [formData, setFormData] = useState()
15
   const [formData, setFormData] = useState()
15
 
16
 
16
-  const [dogDate, setDogDate] = useState({ petBirthday: '请选择生日', petSex: [], petType: [] })
17
-  const [imgUrl, setImgUrl] = useState({ img1: null, immunization: null })
18
-  const [showDialog, setShowDialog] = useState(false)
17
+  const [dogDate, setDogDate] = useState({ immunizationDate: '请选择日期', petBirthday: '请选择生日', petSex: [], petType: [] })
18
+  const [imgUrl, setImgUrl] = useState({ img1: null, immunizationImg: null })
19
   const [mainDog, setMainDog] = useState([])
19
   const [mainDog, setMainDog] = useState([])
20
   useDidShow(() => {
20
   useDidShow(() => {
21
-    if (dogs.length == 0 || person.phone == null) {
22
-      console.log('不可以', dogs);
23
-      setShowDialog(true)
24
-
25
-    } else {
26
-
27
-      addDogList().then((res) => {
28
-        setMainDog(res.records)
29
-      })
30
-    }
31
-
32
-  }, [dogs, person])
21
+    addDogList().then((res) => {
22
+      setMainDog(res.records)
23
+    })
24
+  }, [])
33
 
25
 
34
   const getMainDogChange = (value) => {
26
   const getMainDogChange = (value) => {
35
     console.log("🚀 ~ file: index.jsx ~ line 34 ~ getMainDogChange ~ value", value)
27
     console.log("🚀 ~ file: index.jsx ~ line 34 ~ getMainDogChange ~ value", value)
40
       const sex = [{ value: e?.sex, text: e?.sex == 1 ? '雄' : '雌' }];
32
       const sex = [{ value: e?.sex, text: e?.sex == 1 ? '雄' : '雌' }];
41
       const petType = [{ value: 0, name: e?.petType }];
33
       const petType = [{ value: 0, name: e?.petType }];
42
 
34
 
43
-      setDogDate({ petBirthday: e?.birthday, petSex: sex, petType: petType })
35
+      setDogDate({ ...dogDate, petBirthday: e?.birthday, petSex: sex, petType: petType })
44
       setImgUrl({ ...imgUrl, img1: e.image })
36
       setImgUrl({ ...imgUrl, img1: e.image })
45
       console.log('test', e);
37
       console.log('test', e);
46
 
38
 
60
         setDogDate({ ...dogDate, petBirthday: value })
52
         setDogDate({ ...dogDate, petBirthday: value })
61
         break;
53
         break;
62
       case 'petType':
54
       case 'petType':
63
-        setDogDate({ ...dogDate, petType: value })//value 01  text 文字
55
+        setDogDate({ ...dogDate, petType: value })
56
+        break;
57
+      case 'immunizationDate':
58
+        setDogDate({ ...dogDate, immunizationDate: value })
64
         break;
59
         break;
65
       default:
60
       default:
66
         break;
61
         break;
67
     }
62
     }
68
   }
63
   }
69
-  const handleDialog = () => {
70
-    console.log('handleDialog',);
71
-    if (dogs.length == 0 && person.phone == null) {
72
-      //如果 人 狗都没有维护,那么先维护人的。回到这个页面后,必定只有狗没维护 跳 狗
73
-
74
-      Taro.navigateTo({
75
-        url: '/pages/setUser/index'
76
-      })
77
-      setShowDialog(false)
78
-
79
-    } else {
80
-      Taro.navigateTo({
81
-        url: '/pages/setDogInfo/index'
82
-      })
83
-      setShowDialog(false)
84
-
85
-    }
86
-  }
87
-
88
-  const buttons = [{ text: '确定' }]
89
 
64
 
90
   const modeList = [
65
   const modeList = [
91
     {
66
     {
100
   ]
75
   ]
101
 
76
 
102
   const addImage = (e) => {
77
   const addImage = (e) => {
103
-    console.log("🚀 ~ file: index.jsx ~ line 94 ~ addImage ~ e", e)
104
 
78
 
105
     if (e == 'img1') {
79
     if (e == 'img1') {
106
       Taro.chooseImage({
80
       Taro.chooseImage({
110
         success: function (res) {
84
         success: function (res) {
111
           // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
85
           // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
112
           var tempFilePaths = res.tempFilePaths
86
           var tempFilePaths = res.tempFilePaths
113
-          setImgUrl({ ...imgUrl, img1: tempFilePaths[0] })
87
+          uploadFile(tempFilePaths[0]).then((res2) => {
88
+            console.log("🚀 ~ file: index.jsx ~ line 61 ~ uploadFile ~ res2", res2)
89
+            setImgUrl({ ...imgUrl, img1: res2 })
90
+
91
+
92
+          })
114
         },
93
         },
115
         fail () {
94
         fail () {
116
           Taro.showToast({
95
           Taro.showToast({
129
         success: function (res) {
108
         success: function (res) {
130
           // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
109
           // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
131
           var tempFilePaths = res.tempFilePaths
110
           var tempFilePaths = res.tempFilePaths
132
-          setImgUrl({ ...imgUrl, immunization: tempFilePaths[0] })
111
+          uploadFile(tempFilePaths[0]).then((res2) => {
112
+            console.log("🚀 ~ file: index.jsx ~ line 61 ~ uploadFile ~ res2", res2)
113
+            setImgUrl({ ...imgUrl, immunizationImg: res2 })
114
+
115
+
116
+          })
133
         },
117
         },
134
         fail () {
118
         fail () {
135
           Taro.showToast({
119
           Taro.showToast({
141
       })
125
       })
142
     }
126
     }
143
 
127
 
144
-    console.log("🚀 ~ file: index.jsx ~ line 61 ~ addImage ~ tempFilePaths", imgUrl)
145
-
146
 
128
 
147
   }
129
   }
148
   // ...dogDate,
130
   // ...dogDate,
154
         icon: 'none',
136
         icon: 'none',
155
         duration: 1000
137
         duration: 1000
156
       })
138
       })
157
-      setTimeout(() => {
158
-        Taro.navigateBack({
159
-          delta: 1
160
-        })
161
-      }, 600);
139
+      Taro.navigateTo({
140
+        url: `/pages/payPage/index?id=${res.applyId}`
141
+      })
162
     })
142
     })
163
   }
143
   }
164
 
144
 
170
       <View class='page' >
150
       <View class='page' >
171
         <Form onSubmit={formSubmit} >
151
         <Form onSubmit={formSubmit} >
172
           <mp-form  >
152
           <mp-form  >
173
-            <mp-cells title=''>
153
+            <mp-cells >
154
+              <mp-cell title='犬主姓名' extClass=''>
155
+                <View >{person?.nickName}</View>
156
+              </mp-cell>
174
               <mp-cell title='狗狗名称' extClass=''>
157
               <mp-cell title='狗狗名称' extClass=''>
175
                 {/* <Input name='petName' placeholder='请输入狗狗名称' /> */}
158
                 {/* <Input name='petName' placeholder='请输入狗狗名称' /> */}
176
                 <s-picker name='petName' rangeKey='name' rangeValue='value' range={mainDog} value={formData?.name} onChange={getMainDogChange} />
159
                 <s-picker name='petName' rangeKey='name' rangeValue='value' range={mainDog} value={formData?.name} onChange={getMainDogChange} />
177
-                <View onClick={onDateChange}>asdasdsad</View>
160
+                <View onClick={onDateChange}>log打印</View>
178
                 {/* <Picker name='petSex' mode='selector' range={selector} onChange={(e) => { onDateChange('petSex', e.detail.value) }}>
161
                 {/* <Picker name='petSex' mode='selector' range={selector} onChange={(e) => { onDateChange('petSex', e.detail.value) }}>
179
                   <View className='picker'>
162
                   <View className='picker'>
180
                     {dogDate.petSex}
163
                     {dogDate.petSex}
182
                 </Picker> */}
165
                 </Picker> */}
183
               </mp-cell>
166
               </mp-cell>
184
               <mp-cell title='狗狗性别' extClass=''>
167
               <mp-cell title='狗狗性别' extClass=''>
185
-                <s-picker name='petSex' rangeKey='text' rangeValue='value' range={dogDate.petSex} value={dogDate?.petSex[0]?.text} />
186
-
187
-                {/* <Picker name='petSex' mode='selector' range={dogSex} onChange={(e) => { onDateChange('petSex', e.detail.value) }}>
188
-                  <View className='picker'>
189
-                    {dogDate.petSex}
190
-                  </View>
191
-                </Picker> */}
168
+                <s-picker name='petSex' rangeKey='text' rangeValue='value' range={dogDate.petSex} value={formData?.sex} />
192
               </mp-cell>
169
               </mp-cell>
193
               <mp-cell title='犬种' extClass=''>
170
               <mp-cell title='犬种' extClass=''>
194
-                <s-picker name='petType' rangeKey='name' rangeValue='value' range={dogDate.petType} value={dogDate?.petType[0]?.name} />
195
-
196
-                {/* <Picker name='petType' mode='selector' range={dogType} rangeKey='text' onChange={(e) => { onDateChange('petType', e.detail.value) }}>
197
-                  <View className='picker'>
198
-                    {dogDate.petType}
199
-                  </View>
200
-                </Picker> */}
171
+                <s-picker name='petType' rangeKey='name' rangeValue='name' range={dogDate.petType} value={formData?.petType} />
201
               </mp-cell>
172
               </mp-cell>
202
               <mp-cell title='生日' extClass=''>
173
               <mp-cell title='生日' extClass=''>
203
                 <Picker name='petBirthday' mode='date' onChange={(e) => { onDateChange('petBirthday', e.detail.value) }}>
174
                 <Picker name='petBirthday' mode='date' onChange={(e) => { onDateChange('petBirthday', e.detail.value) }}>
220
                 }
191
                 }
221
 
192
 
222
               </mp-cell>
193
               </mp-cell>
194
+              <mp-cell title='最近免疫日期' extClass=''>
195
+                <Picker name='immunizationDate' mode='date' onChange={(e) => { onDateChange('immunizationDate', e.detail.value) }}>
196
+                  <View className='picker' style={!formData ? { "color": '#858585' } : {}}>
197
+                    {dogDate.immunizationDate}
198
+                  </View>
199
+                </Picker>
200
+              </mp-cell>
201
+              <mp-cell title='免疫证号' extClass=''>
202
+                <Input name='immunizationCode' placeholder='请输入免疫证号' />
203
+              </mp-cell>
223
               <mp-cell title='免疫证明' extClass=''>
204
               <mp-cell title='免疫证明' extClass=''>
224
                 {
205
                 {
225
-                  !imgUrl.immunization ?
226
-                    <View className='addImage' onClick={() => addImage('immunization')} >
206
+                  !imgUrl.immunizationImg ?
207
+                    <View className='addImage' onClick={() => addImage('immunizationImg')} >
227
                       <Text>+</Text>
208
                       <Text>+</Text>
228
                     </View>
209
                     </View>
229
                     :
210
                     :
230
-                    <Image className='dogImg1' name='immunization' src={imgUrl.immunization} onClick={() => addImage('immunization')} />
211
+                    <Image className='dogImg1' name='immunizationImg' src={imgUrl.immunizationImg} onClick={() => addImage('immunizationImg')} />
231
                 }
212
                 }
232
-                {/* <Input name='immunization' placeholder='请输入身份证号' type='idcard' /> */}
213
+                {/* <Input name='immunizationImg' placeholder='请输入身份证号' type='idcard' /> */}
233
               </mp-cell>
214
               </mp-cell>
234
               <mp-cell title='详细地址' extClass=''>
215
               <mp-cell title='详细地址' extClass=''>
235
                 <Input name='address' placeholder='请输入详细地址' />
216
                 <Input name='address' placeholder='请输入详细地址' />

+ 2
- 42
src/pages/setUser/index.jsx View File

1
-import { View, Button, Text, Image, Slot, Input, ScrollView } from '@tarojs/components'
1
+import { View, Button, Slot, Input, ScrollView } from '@tarojs/components'
2
 import Taro from '@tarojs/taro';
2
 import Taro from '@tarojs/taro';
3
 import { useEffect, useState } from 'react';
3
 import { useEffect, useState } from 'react';
4
 import { setPersons } from '@/services/dogAPI';
4
 import { setPersons } from '@/services/dogAPI';
20
 export default (props) => {
20
 export default (props) => {
21
   const [showTopTips, setShowTopTips] = useState(false)
21
   const [showTopTips, setShowTopTips] = useState(false)
22
   const [errorMsg, setErrorMsg] = useState()
22
   const [errorMsg, setErrorMsg] = useState()
23
-  const { setPerson, person, setDogs } = useModel('userData')
23
+  const { setPerson, person } = useModel('userData')
24
   // const [imgUrl, setImgUrl] = useState()
24
   // const [imgUrl, setImgUrl] = useState()
25
   const [userInfo, setUserInfo] = useState({ cardImg1: null, sex: '请选择性别' })
25
   const [userInfo, setUserInfo] = useState({ cardImg1: null, sex: '请选择性别' })
26
   useEffect(() => {
26
   useEffect(() => {
71
     uploadFile(file.path).then(next)
71
     uploadFile(file.path).then(next)
72
   }
72
   }
73
 
73
 
74
-  const handleSetUser = (type, value) => {
75
-    // console.log(e)
76
-    if (type == 'img') {
77
-      Taro.chooseImage({
78
-        count: 1, // 默认9
79
-        sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
80
-        sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有,在H5浏览器端支持使用 `user` 和 `environment`分别指定为前后摄像头
81
-        success: function (res) {
82
-          console.log('-------chooseImage----->', res)
83
-          // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
84
-          var tempFilePaths = res.tempFilePaths
85
-          uploadFile(tempFilePaths[0]).then((res2) => {
86
-            console.log("🚀 ~ file: index.jsx ~ line 61 ~ uploadFile ~ res2", res2)
87
-            setUserInfo({ ...userInfo, cardImg1: res2 })
88
-
89
-          })
90
-        },
91
-        fail () {
92
-          Taro.showToast({
93
-            title: '上传失败请重试',
94
-            icon: 'error',
95
-            duration: 1000
96
-          })
97
-        }
98
-      })
99
-    }
100
-  }
101
-
102
   return (
74
   return (
103
     <ScrollView scrollY style={{ height: '100vh' }}>
75
     <ScrollView scrollY style={{ height: '100vh' }}>
104
       <mp-toptips msg={errorMsg} type='error' show={showTopTips} onHide={() => setShowTopTips(false)}></mp-toptips>
76
       <mp-toptips msg={errorMsg} type='error' show={showTopTips} onHide={() => setShowTopTips(false)}></mp-toptips>
125
               <mp-cell>
97
               <mp-cell>
126
                 <Slot name='title'><FieldLabel required>身份证图片</FieldLabel></Slot>
98
                 <Slot name='title'><FieldLabel required>身份证图片</FieldLabel></Slot>
127
                 <uploader name='cardImg1' value={person?.cardImg1} onFile={handleFile} />
99
                 <uploader name='cardImg1' value={person?.cardImg1} onFile={handleFile} />
128
-                {/* {
129
-                  !userInfo.cardImg1 ?
130
-                    <View className='addImage' onClick={(e) => handleSetUser('img', e.detail.value)} >
131
-                      <Text>+</Text>
132
-                    </View>
133
-                    :
134
-                    <Image className='userImg1' name='cardImg1' src={userInfo.cardImg1} onClick={(e) => handleSetUser('img', e.detail.value)} />
135
-                } */}
136
               </mp-cell>
100
               </mp-cell>
137
             </mp-cells>
101
             </mp-cells>
138
           </mp-form>
102
           </mp-form>
144
     </ScrollView >
108
     </ScrollView >
145
   )
109
   )
146
 }
110
 }
147
-
148
-
149
-
150
-

+ 26
- 2
src/services/dogAPI.js View File

117
 export const getNoticeList = (id, data) => request(`/notice`, { data, method: 'GET' })
117
 export const getNoticeList = (id, data) => request(`/notice`, { data, method: 'GET' })
118
 
118
 
119
 /**
119
 /**
120
-* Banner 列表
120
+* 消息详情
121
 * @param {*} data
121
 * @param {*} data
122
 * @returns
122
 * @returns
123
 */
123
 */
124
-export const getBannerList = () => request(`/banner`)
124
+export const getNoticeInfo = (id, data) => request(`/notice/${id}`, { data, method: 'GET' })
125
+
126
+
127
+
128
+
129
+
130
+/**
131
+* banner列表
132
+* @param {*} data
133
+* @returns
134
+*/
135
+export const getBannerList = (id, data) => request(`/banner`, { data, method: 'GET' })
136
+
137
+
138
+
139
+
140
+/**
141
+* 生成订单
142
+* @param {*} data
143
+* @returns
144
+*/
145
+export const getOrder = (id, data) => request(`/order?applyId=${id}`, { data, method: 'POST' })
146
+
147
+
148
+