张延森 5 anos atrás
pai
commit
97868137dd

+ 3
- 3
config/dev.js Ver arquivo

@@ -3,14 +3,14 @@ module.exports = {
3 3
     NODE_ENV: '"development"'
4 4
   },
5 5
   defineConstants: {
6
-    // HOST: '"http://47.101.36.130:8085"',//测试
6
+		// HOST: '"http://47.101.36.130:8085"',//测试
7 7
     // WSS_HOST: '"wss://47.101.36.130:8085"',
8 8
     // HOST: '"https://dev.jinchengjiaye.com"',//测试
9 9
     // WSS_HOST: '"wss://dev.jinchengjiaye.com"',
10 10
     // HOST: '"https://lt.pawoma.cn"',
11 11
     // WSS_HOST: '"wss://lt.pawoma.cn"',
12
-    HOST: '"http://127.0.0.1:8080"',
13
-    WSS_HOST: '"ws://127.0.0.1:8080"',
12
+    HOST: '"http://192.168.0.238:8080"',
13
+    WSS_HOST: '"ws://192.168.0.238:8080"',
14 14
   },
15 15
   weapp: {},
16 16
   h5: {}

+ 1
- 0
src/app.js Ver arquivo

@@ -46,6 +46,7 @@ class App extends Component {
46 46
       'pages/project/index',
47 47
       'pages/person/index',
48 48
       'pages/person/profile/index',
49
+      'pages/person/profile/detail/index',
49 50
       'pages/project/detail/index',
50 51
       'pages/activity/assemblePage',
51 52
       'pages/activity/assistancePage',

BIN
src/assets/add.png Ver arquivo


BIN
src/assets/close.png Ver arquivo


BIN
src/assets/profile.png Ver arquivo


+ 2
- 1
src/components/Poster/style.scss Ver arquivo

@@ -1,3 +1,4 @@
1
+@import "@styles/theme.scss";
1 2
 .poster {
2 3
   position: fixed;
3 4
   width: 100vw;
@@ -55,7 +56,7 @@
55 56
     color: white;
56 57
     border: none;
57 58
     font-size: 36px;
58
-    background: linear-gradient(90deg, rgba(255, 199, 12, 1) 0%, rgba(255, 65, 65, 1) 100%);
59
+    background: $primary-color;
59 60
     border-radius: 12px;
60 61
     margin: 20px 0;
61 62
   }

+ 2
- 0
src/constants/api.js Ver arquivo

@@ -28,6 +28,8 @@ export const API_QUERY_CUSTOMER_INFO = resolvePath('customer/myCustomer')
28 28
 export const API_QUERY_MYREPORT = resolvePath('customer/myReport')
29 29
 export const API_QUERY_DOCUMENTVERIFY = resolvePath('documentVerify')
30 30
 
31
+export const API_QUERY_DOCUMENTVERIFY_list = resolvePath('documentVerify/list')
32
+
31 33
 
32 34
 // chat
33 35
 export const API_CHAT_HISTORY = resolvePath('chat/history')

+ 5
- 2
src/pages/activity/detail/index.scss Ver arquivo

@@ -50,6 +50,9 @@
50 50
     }
51 51
     .row-content{
52 52
       color: #FF245A;
53
+      min-width: 6em;
54
+      display: inline-block;
55
+      white-space: nowrap;
53 56
     }
54 57
   }
55 58
   .success-num{
@@ -274,7 +277,7 @@
274 277
     color: white;
275 278
     font-size: 32px;
276 279
     margin: 0;
277
-    background: linear-gradient(90deg, rgba(255, 199, 12, 1) 0%, rgba(255, 65, 65, 1) 100%);
280
+    background: $primary-color;
278 281
   }
279 282
 
280 283
   .hasSigned {
@@ -397,7 +400,7 @@
397 400
       .comfire {
398 401
         width: 490px;
399 402
         height: 96px;
400
-        background: linear-gradient(90deg, rgba(255, 199, 12, 1) 0%, rgba(255, 65, 65, 1) 100%);
403
+        background: $primary-color;
401 404
         border-radius: 7px;
402 405
         line-height: 96px;
403 406
         color: white;

+ 2
- 1
src/pages/activity/detail/poster.scss Ver arquivo

@@ -1,3 +1,4 @@
1
+@import "@styles/theme.scss";
1 2
 .poster {
2 3
   position: fixed;
3 4
   width: 100vw;
@@ -55,7 +56,7 @@
55 56
     color: white;
56 57
     border: none;
57 58
     font-size: 36px;
58
-    background: linear-gradient(90deg, rgba(255, 199, 12, 1) 0%, rgba(255, 65, 65, 1) 100%);
59
+    background: $primary-color;
59 60
     border-radius: 12px;
60 61
     margin: 20px 0;
61 62
   }

+ 1
- 1
src/pages/agent/client/index.scss Ver arquivo

@@ -110,7 +110,7 @@
110 110
   font-size: 30px;
111 111
   top:0;
112 112
   right:0;
113
-  background:linear-gradient(57deg,rgba(255,199,12,1) 0%,rgba(255,65,65,1) 100%);
113
+  background:$primary-color;
114 114
 
115 115
   text {
116 116
     color: #fff;

+ 2
- 1
src/pages/agent/recommend/index.scss Ver arquivo

@@ -1,3 +1,4 @@
1
+@import "@styles/theme.scss";
1 2
 .ani {
2 3
   position: absolute;
3 4
 }
@@ -51,7 +52,7 @@
51 52
     bottom: 3%;
52 53
     font-size: 30px;
53 54
     color: #fff;
54
-    background: linear-gradient(90deg, rgba(255, 199, 12, 1) 0%, rgba(255, 65, 65, 1) 100%);
55
+    background: $primary-color;
55 56
     border-radius: 10px;
56 57
   }
57 58
 }

+ 3
- 3
src/pages/card/index.scss Ver arquivo

@@ -232,7 +232,7 @@
232 232
     font-size: 30px;
233 233
     color: #fff;
234 234
     padding: 0;
235
-    background: linear-gradient(90deg, rgba(255, 199, 12, 1) 0%, rgba(255, 65, 65, 1) 100%);
235
+    background: $primary-color;
236 236
   }
237 237
 
238 238
   .poster-btn {
@@ -278,7 +278,7 @@
278 278
     .fans__num {
279 279
       font-size: 28px;
280 280
       color: rgba(0, 0, 0, 0.37);
281
-      background: linear-gradient(90deg, rgba(255, 199, 12, 1) 0%, rgba(255, 65, 65, 1) 30%, rgba(255, 65, 65, 1) 100%);
281
+      background: $primary-color;
282 282
       -webkit-background-clip: text;
283 283
       -webkit-text-fill-color: transparent;
284 284
       letter-spacing: 4px;
@@ -606,7 +606,7 @@
606 606
     &__btn {
607 607
       width: 490px;
608 608
       height: 96px;
609
-      background: linear-gradient(90deg, rgba(255, 199, 12, 1) 0%, rgba(255, 65, 65, 1) 100%);
609
+      background: $primary-color;
610 610
       border-radius: 7px;
611 611
       line-height: 96px;
612 612
       color: white;

+ 2
- 1
src/pages/card/poster.scss Ver arquivo

@@ -1,3 +1,4 @@
1
+@import "@styles/theme.scss";
1 2
 .poster {
2 3
   position: fixed;
3 4
   width: 100vw;
@@ -55,7 +56,7 @@
55 56
     color: white;
56 57
     border: none;
57 58
     font-size: 36px;
58
-    background: linear-gradient(90deg, rgba(255, 199, 12, 1) 0%, rgba(255, 65, 65, 1) 100%);
59
+    background: $primary-color;
59 60
     border-radius: 12px;
60 61
     margin: 20px 0;
61 62
   }

+ 2
- 1
src/pages/card/register/index.scss Ver arquivo

@@ -1,3 +1,4 @@
1
+@import "@styles/theme.scss";
1 2
 .login {
2 3
   padding: 50px 50px 0;
3 4
   padding-top: 200px;
@@ -16,7 +17,7 @@
16 17
       margin-top: 100px;
17 18
       width: 100%;
18 19
       Button{
19
-        background: linear-gradient(90deg, rgba(255, 199, 12, 1) 0%, rgba(255, 65, 65, 1) 100%);
20
+        background: $primary-color;
20 21
         box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.14);
21 22
         border-radius: 10px;
22 23
       }

+ 3
- 3
src/pages/im/index.scss Ver arquivo

@@ -31,7 +31,7 @@
31 31
   @extend .fixed-btn;
32 32
 
33 33
   bottom: 31%;
34
-  background: linear-gradient(90deg, rgba(90, 214, 163, 1) 0%, rgba(26, 181, 121, 1) 100%);
34
+  background: $primary-color;
35 35
   box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.25);
36 36
   .text {
37 37
     padding: 0 20px;
@@ -42,7 +42,7 @@
42 42
 .home__btn {
43 43
   @extend .fixed-btn;
44 44
   bottom: 20%;
45
-  background: linear-gradient(90deg, rgba(255, 199, 12, 1) 0%, rgba(255, 65, 65, 1) 100%);
45
+  background: $primary-color;
46 46
   box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.25);
47 47
   color: #fff;
48 48
 }
@@ -150,7 +150,7 @@
150 150
       padding: 5px 35px;
151 151
       color: white;
152 152
       margin: 0;
153
-      background: linear-gradient(90deg, rgba(255, 199, 12, 1) 0%, rgba(255, 65, 65, 1) 100%);
153
+      background: $primary-color;
154 154
       border-radius: 10px;
155 155
     }
156 156
     .submit-img {

+ 2
- 1
src/pages/news/detail/poster.scss Ver arquivo

@@ -1,3 +1,4 @@
1
+@import "@styles/theme.scss";
1 2
 .poster {
2 3
   position: fixed;
3 4
   width: 100vw;
@@ -48,7 +49,7 @@
48 49
     color: white;
49 50
     border: none;
50 51
     font-size: 36px;
51
-    background: linear-gradient(90deg, rgba(255, 199, 12, 1) 0%, rgba(255, 65, 65, 1) 100%);
52
+    background: $primary-color;
52 53
     border-radius: 12px;
53 54
     margin: 20px 0;
54 55
   }

+ 1
- 1
src/pages/person/feedback/index.scss Ver arquivo

@@ -61,7 +61,7 @@
61 61
     border: none;
62 62
     // border-radius: 0;
63 63
     color: white;
64
-    background: linear-gradient(90deg, rgba(255, 199, 12, 1) 0%, rgba(255, 65, 65, 1) 100%);
64
+    background: $primary-color;
65 65
     box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.14);
66 66
     border-radius: 10px;
67 67
   }

+ 1
- 5
src/pages/person/index.js Ver arquivo

@@ -49,10 +49,6 @@ export default class Person extends Component {
49 49
   doSign() {
50 50
     const { user: { id, havaSigned } } = this.state
51 51
     if (havaSigned) {
52
-      Taro.showToast({
53
-        title: '你已经签到过了',
54
-        icon: 'none'
55
-      })
56 52
       return
57 53
     }
58 54
 
@@ -175,7 +171,7 @@ export default class Person extends Component {
175 171
           </View>
176 172
           <View className='qiandao-con'>
177 173
             <Text className='qiandao-text'>签到得积分,积分兑好礼,马上去签到吧!</Text>
178
-            <View className="qiandao-btn" onClick={this.doSign}>签到</View>
174
+            <View className={user.havaSigned?'reday-qiandao-btn' : 'qiandao-btn'} onClick={this.doSign}>{user.havaSigned ? '已签到' : '签到'}</View>
179 175
 
180 176
             {/* <Text className='integral-cont_btn' onClick={this.goShop}>去兑换</Text> */}
181 177
 

+ 8
- 1
src/pages/person/index.scss Ver arquivo

@@ -105,6 +105,13 @@
105 105
       border:2px solid #fff;
106 106
       border-radius: 12px;
107 107
     }
108
+    .reday-qiandao-btn{
109
+      padding: 6px 18px;
110
+      font-size: 28px;
111
+      color: #ddd;
112
+      border:2px solid #ddd;
113
+      border-radius: 12px;
114
+    }
108 115
  
109 116
   }
110 117
   .bg {
@@ -186,7 +193,7 @@
186 193
     padding: 10px 0;
187 194
     font-size: 32px;
188 195
     text-align: center;
189
-    background: linear-gradient(90deg, rgba(255, 199, 12, 1) 0%, rgba(255, 149, 77, 1) 100%);
196
+    background: $primary-color;
190 197
     border-radius: 34px;
191 198
     border-top-right-radius: 0;
192 199
     border-bottom-right-radius: 0;

+ 214
- 0
src/pages/person/profile/detail/index.js Ver arquivo

@@ -0,0 +1,214 @@
1
+import Taro, { Component } from '@tarojs/taro';
2
+import './index.scss'
3
+import { AtImagePicker } from 'taro-ui'
4
+import dayjs from 'dayjs'
5
+
6
+import { getProfileDetail, editDocumentVerify } from '@services/user'
7
+
8
+import { uploadFiles } from '@utils/request'
9
+
10
+import "taro-ui/dist/style/components/image-picker.scss";
11
+import "taro-ui/dist/style/components/icon.scss";
12
+const profileBg = require('@assets/profile.png')
13
+const add = require('@assets/add.png')
14
+const img = require('@assets/shop/banner1.jpg')
15
+const closeImg = require('@assets/close.png')
16
+
17
+// import { connect } from '@tarojs/redux'
18
+
19
+
20
+// @connect(state => state.city)
21
+export default class Profile extends Component {
22
+  config = {
23
+    navigationBarTitleText: '审核详情'
24
+  }
25
+
26
+  state = {
27
+
28
+    imgList: [],
29
+    documentTitle: '',
30
+    detail: {}
31
+
32
+
33
+  }
34
+
35
+  componentDidMount() {
36
+    this.initPage()
37
+  }
38
+  initPage() {
39
+    let id = this.$router.params.id
40
+
41
+    if (id) {
42
+
43
+      getProfileDetail(id).then(res => {
44
+        this.setState({
45
+          detail: res,
46
+          imgList: res.imgList,
47
+          documentTitle: res.documentTitle,
48
+        })
49
+      })
50
+    }
51
+
52
+  }
53
+
54
+  // 选择图片
55
+  bindAlbumClick(e) {
56
+    e.stopPropagation()
57
+    Taro.chooseImage({
58
+      sizeType: ['original', 'compressed'],  //可选择原图或压缩后的图片
59
+      sourceType: ['album', 'camera'], //可选择性开放访问相册、相机
60
+      success: res => {
61
+        uploadFiles(res.tempFilePaths).then(data => {
62
+          let arr = []
63
+          data.map((item, index) => {
64
+            arr.push({ img: item, sort: index })
65
+          })
66
+          const imgList = this.state.imgList.concat(arr)
67
+          this.setState({
68
+            marginTop: 0,
69
+            messageType: 'image',
70
+            imgList: imgList
71
+          }, this.onSendMsg)
72
+        })
73
+      }
74
+    })
75
+  }
76
+  // 删除图片
77
+  deleteImg(inx) {
78
+
79
+    const imgList = this.state.imgList;
80
+    imgList.splice(inx, 1);
81
+    this.setState({
82
+      imgList: imgList
83
+    })
84
+  }
85
+
86
+
87
+  // 提交资料审核
88
+  commitBtn() {
89
+    if (this.state.imgList.length == 0) {
90
+      Taro.showToast({ icon: 'none', title: '请先上传图片' });
91
+    } else if (this.state.documentTitle == "") {
92
+      Taro.showToast({ icon: 'none', title: '资料说明不能为空' });
93
+    } else {
94
+
95
+      const payload = {
96
+        documentTitle: this.state.documentTitle,
97
+        imgList: this.state.imgList,
98
+        id: this.state.detail.documentVerifyId
99
+      }
100
+
101
+      editDocumentVerify(payload).then(res => {
102
+        this.setState({
103
+          detail: res,
104
+          imgList: res.imgList,
105
+          documentTitle: res.documentTitle,
106
+        })
107
+        Taro.showToast({ icon: 'none', title: '提交成功' });
108
+
109
+      }).catch((err) => {
110
+        Taro.showToast({ icon: 'none', title: err.errMsg || '提交失败' });
111
+        console.error(err);
112
+      });
113
+    }
114
+  }
115
+  // 输入资料说明
116
+  onInputText = e => {
117
+    this.setState({
118
+      documentTitle: e.detail.value
119
+    })
120
+  }
121
+  // 查看大图
122
+  onPreview = (item, e) => {
123
+    let urls = []
124
+    this.state.imgList.map((ele, index) => {
125
+      urls.push(ele.img)
126
+    })
127
+    e.stopPropagation()
128
+    e.preventDefault()
129
+    Taro.previewImage({
130
+      current: item.img,
131
+      urls: urls
132
+    })
133
+  }
134
+  // 上传资料模块
135
+  renderUpImages() {
136
+    return (
137
+      <Block>
138
+        <View className="up-btn" onClick={this.bindAlbumClick}>
139
+          <Image className="add-img" src={add} />
140
+          上传资料
141
+        </View>
142
+      </Block>
143
+    )
144
+  }
145
+  // 资料审核列表模块
146
+  // 审核状态 0未审核  1审核通过  2审核不通过 verifyStatus
147
+
148
+
149
+  render() {
150
+    const { imgList, documentTitle, detail } = this.state
151
+
152
+    return (
153
+      <View className="profile-page" style="background:#f4f4f4">
154
+        <ScrollView scrollY scrollWithAnimation style="height: 100vh">
155
+
156
+          {
157
+            detail.verifyStatus == 2 &&
158
+            <View>
159
+              <View className="reject-reason" >驳回原因:{detail.rejectReason || ''}</View>
160
+
161
+              <View className="desc-box">
162
+                资料说明:
163
+              <Input className='inputDesc' value={documentTitle || ''} onInput={this.onInputText.bind(this)} type='text' placeholder='请填写资料说明' />
164
+              </View>
165
+              <View style="padding:10px 20px">
166
+                {this.renderUpImages()}
167
+              </View>
168
+              <View className="image-box">
169
+                {imgList.length &&
170
+                  imgList.map((item, inx) => {
171
+                    return (
172
+                      <View className="image-con" key={`img-${inx}`}>
173
+                        <Image className="close-btn" src={closeImg} onClick={this.deleteImg.bind(this, (inx))} />
174
+                        <Image className="img" src={item.img} onClick={this.onPreview.bind(this, (item))} />
175
+                      </View>
176
+                    )
177
+                  })
178
+                }
179
+
180
+              </View>
181
+              <View className="commit-btn" onClick={this.commitBtn}>重新提交</View>
182
+
183
+            </View>
184
+          }
185
+          {
186
+            detail.verifyStatus != 2 &&
187
+            <View>
188
+              <View className="detail-title" >{detail.documentTitle || '资料审核'}</View>
189
+              {
190
+                detail.verifyStatus == 1 && <View className="commit-text" >审核通过</View>
191
+              }
192
+              {
193
+                detail.verifyStatus == 0 && <View className="verfying" >审核中</View>
194
+              }
195
+              <View className="image-box">
196
+                {imgList.length &&
197
+                  imgList.map((item, inx) => {
198
+                    return (
199
+                      <View className="image-con" key={`img-${inx}`}>
200
+                        <Image className="img" src={item.img} onClick={this.onPreview.bind(this, (item))} />
201
+                      </View>
202
+                    )
203
+                  })
204
+                }
205
+
206
+              </View>
207
+            </View>
208
+          }
209
+
210
+        </ScrollView>
211
+      </View>
212
+    )
213
+  }
214
+}

+ 120
- 0
src/pages/person/profile/detail/index.scss Ver arquivo

@@ -0,0 +1,120 @@
1
+@import "@styles/theme.scss";
2
+
3
+.profile-page{
4
+  background-color: #f4f4f4;
5
+  height: 100%;
6
+
7
+  .up-btn{
8
+    width: 670px;
9
+    height: 220px;
10
+    background-color: #fff;
11
+    border: 1px solid #E8E8E8;
12
+    border-radius: 12px;
13
+    text-align: center;
14
+    color: $primary-color;
15
+    margin: 0 auto;
16
+    .add-img{
17
+      width: 72px;
18
+      height: 72px;
19
+      margin: 42px auto 20px auto;
20
+      display: block;
21
+
22
+    }
23
+    }
24
+  .up-images{
25
+    width: 100%;
26
+    padding: 0 40px;
27
+    position: absolute;
28
+    top: 36%;
29
+    left: 0;
30
+    .tip{
31
+      font-size:28px;
32
+      color:#999;
33
+      text-align: center;
34
+      margin-bottom: 8px;
35
+      }
36
+  }
37
+  .desc-box{
38
+    color: #666;
39
+    font-size: 32px;
40
+    display: flex;
41
+    align-items: center;
42
+    padding: 20px 40px 6px 40px;
43
+    .inputDesc{
44
+      background-color: #fff;
45
+      height:64px;
46
+      line-height:64px;
47
+      width:470px;
48
+      padding: 0 15px;
49
+      box-shadow:0px 2px 0px 0px rgba(0,0,0,0.08);
50
+    }
51
+
52
+  }
53
+  
54
+  .image-box{
55
+    display: flex;
56
+    flex-wrap: wrap;
57
+    align-content: flex-start;
58
+    justify-content: space-between;
59
+    padding: 20px 25px;
60
+
61
+    .image-con {
62
+      flex: 0 0 50%;
63
+      height: 316px;
64
+      box-sizing: border-box;
65
+      margin-bottom: 42px;
66
+      position: relative;
67
+      .close-btn{
68
+        position: absolute;
69
+        width: 76px;
70
+        height: 48px;
71
+        right: 19px;
72
+        top:0;
73
+      }
74
+      .img{
75
+        width: 316px;
76
+        height: 316px;
77
+        border-radius: 12px;
78
+        margin: 0 17px;
79
+        background-color: #fff;
80
+      }
81
+    }
82
+  }
83
+  .commit-btn{
84
+    width:86%;
85
+    height:100px;
86
+    background:rgba(187,156,121,1);
87
+    border-radius:12px;
88
+    color: #fff;
89
+    font-size: 36px;
90
+    line-height: 100px;
91
+    text-align: center;
92
+    margin: 140px auto;
93
+    
94
+  }
95
+  .detail-title{
96
+    text-align: center;
97
+    margin: 20px auto;
98
+    color: #333;
99
+    padding: 0 40px;
100
+    font-size: 36px;
101
+  }
102
+  .commit-text{
103
+    text-align: center;
104
+    margin: 0 auto 30px auto;
105
+    color: rgba(187,156,121,1);
106
+    font-size: 36px;
107
+  }
108
+  .verfying{
109
+    text-align: center;
110
+    margin: 0 auto 30px auto;
111
+    color: #666;
112
+    font-size: 36px;
113
+  }
114
+  .reject-reason{
115
+    color: #BDBDBD;
116
+    padding: 0 90px;
117
+    margin-top:30px;
118
+    font-size: 26px;
119
+  }
120
+}

+ 176
- 104
src/pages/person/profile/index.js Ver arquivo

@@ -1,16 +1,13 @@
1 1
 import Taro, { Component } from '@tarojs/taro';
2 2
 import './index.scss'
3
-import { AtImagePicker } from 'taro-ui'
4
-import { getDocumentVerify, commitDocumentVerify, editDocumentVerify } from '@services/user'
3
+import dayjs from 'dayjs'
4
+import { getDocumentVerify, commitDocumentVerify, getVerifyList } from '@services/user'
5 5
 import { uploadFiles } from '@utils/request'
6 6
 
7
-import "taro-ui/dist/style/components/image-picker.scss";
8
-import "taro-ui/dist/style/components/icon.scss";
7
+const profileBg = require('@assets/profile.png')
8
+const add = require('@assets/add.png')
9
+const closeImg = require('@assets/close.png')
9 10
 
10
-// import { connect } from '@tarojs/redux'
11
-
12
-
13
-// @connect(state => state.city)
14 11
 export default class Profile extends Component {
15 12
   config = {
16 13
     navigationBarTitleText: '我的资料'
@@ -20,29 +17,23 @@ export default class Profile extends Component {
20 17
     files: [],
21 18
     auditStatus: 0,
22 19
     documentVerifyId: '',
20
+    imgList: [],
21
+    documentTitle: '',
22
+    verfyList: [], // 审核列表
23
+    descVisible: false,
23 24
 
24 25
   }
25
-  // 审核状态   0审核中  1审核通过  2审核不通过 3未审核
26
+
26 27
   componentDidMount() {
27 28
     this.getProfile()
28 29
   }
29 30
 
30 31
   getProfile() {
31 32
     Taro.showLoading()
32
-    getDocumentVerify().then(res => {
33
-      if (!res) {
34
-        this.setState({
35
-          auditStatus: 3,
36
-        })
37
-      } else {
38
-        this.setState({
39
-          files: res.imgList.map(x => ({ url: x.img })),
40
-          auditStatus: res.verifyStatus,
41
-          // resData:res,
42
-          documentVerifyId: res.documentVerifyId,
43
-        })
44
-      }
45
-
33
+    getVerifyList().then(res => {
34
+      this.setState({
35
+        verfyList: res
36
+      })
46 37
       Taro.hideLoading()
47 38
     }).catch((err) => {
48 39
       Taro.hideLoading()
@@ -53,70 +44,82 @@ export default class Profile extends Component {
53 44
     });
54 45
   }
55 46
 
56
-  onChange(files) {
57
-    const filePaths = files.map(x => x.file.path)
58
-    uploadFiles(filePaths).then((res) => {
59
-      this.setState({
60
-        files: res.map(x => ({ url: x}))
61
-      })
47
+  // 选择图片
48
+  bindAlbumClick(e) {
49
+    this.setState({
50
+      descVisible: true
51
+    })
52
+    e.stopPropagation()
53
+    Taro.chooseImage({
54
+      sizeType: ['original', 'compressed'],  //可选择原图或压缩后的图片
55
+      sourceType: ['album', 'camera'], //可选择性开放访问相册、相机
56
+      success: res => {
57
+        uploadFiles(res.tempFilePaths).then(data => {
58
+          let arr = []
59
+          data.map((item, index) => {
60
+            arr.push({ img: item, sort: index })
61
+          })
62
+          const imgList = this.state.imgList.concat(arr)
63
+          this.setState({
64
+            marginTop: 0,
65
+            messageType: 'image',
66
+            imgList: imgList
67
+          }, this.onSendMsg)
68
+        })
69
+      }
62 70
     })
63 71
   }
64
-  onFail(mes) {
65
-    console.log(mes)
72
+  // 删除图片
73
+  deleteImg(inx) {
74
+
75
+    const imgList = this.state.imgList;
76
+    imgList.splice(inx, 1);
77
+    this.setState({
78
+      imgList: imgList
79
+    })
66 80
   }
67
-  onImageClick(index, file) {
68
-    console.log(index, file)
81
+  toProfileDetail(item) {
82
+    console.log(item, "item")
83
+    Taro.navigateTo({
84
+      url: '/pages/person/profile/detail/index?id=' + item.documentVerifyId
85
+    })
69 86
   }
70
-
71
-  // 提交图片审核
87
+  // 查看大图
88
+  onPreview = (item, e) => {
89
+    let urls = []
90
+    this.state.imgList.map((ele, index) => {
91
+      urls.push(ele.img)
92
+    })
93
+    e.stopPropagation()
94
+    e.preventDefault()
95
+    Taro.previewImage({
96
+      current: item.img,
97
+      urls: urls
98
+    })
99
+  }
100
+  // 提交资料审核
72 101
   commitBtn() {
73 102
     console.log(this.state.auditStatus, "this.state.auditStatus")
74
-    if (this.state.files.length == 0) {
103
+    if (this.state.imgList.length == 0) {
75 104
       Taro.showToast({ icon: 'none', title: '请先上传图片' });
76
-    } else if (this.state.auditStatus != 3) {
77
-      let imgList = []
78
-      let fileList = this.state.files
79
-      fileList.map((item, index) => {
80
-          let newObj = {}
81
-          newObj.img = item.url,
82
-          newObj.sort = index
83
-          imgList.push(newObj)
84
-        }
85
-      )
105
+    } else if (this.state.documentTitle == "") {
106
+      Taro.showToast({ icon: 'none', title: '资料说明不能为空' });
107
+    }
108
+    else {
86 109
 
87 110
       const payload = {
88
-        imgList,
89
-        documentVerifyId: this.state.documentVerifyId
111
+        documentTitle: this.state.documentTitle,
112
+        imgList: this.state.imgList
90 113
       }
91 114
 
92
-      editDocumentVerify(payload).then(res => {
115
+      commitDocumentVerify(payload).then(res => {
93 116
         this.setState({
94
-          files: res.imgList.map(x => ({url: x.img})),
95
-          auditStatus: res.verifyStatus
96
-        })
97
-        Taro.showToast({ icon: 'none', title: '提交成功' });
98
-      }).catch((err) => {
99
-        Taro.showToast({ icon: 'none', title: err.errMsg || '提交失败' });
100
-        console.error(err);
101
-      });
102
-
103
-    } else {
104
-
105
-      let imgList = []
106
-      let fileList = this.state.files
107
-      fileList.map((item, index) => {
108
-        let newObj = {}
109
-        newObj.img = item.url
110
-        newObj.sort = index
111
-        imgList.push(newObj)
112
-      })
113
-
114
-      commitDocumentVerify(imgList).then(res => {
115
-        this.setState({
116
-          files: res.imgList.map(x => ({url: x.img})),
117
-          auditStatus: res.verifyStatus
117
+          documentTitle: '',
118
+          imgList: [],
119
+          descVisible: false,
118 120
         })
119 121
         Taro.showToast({ icon: 'none', title: '提交成功' });
122
+        this.getProfile()
120 123
 
121 124
       }).catch((err) => {
122 125
         Taro.showToast({ icon: 'none', title: err.errMsg || '提交失败' });
@@ -124,43 +127,112 @@ export default class Profile extends Component {
124 127
       });
125 128
     }
126 129
   }
127
-
128
-
129
-  render() {
130
-
131
-
130
+  // 输入资料说明
131
+  onInputText = e => {
132
+    this.setState({
133
+      documentTitle: e.detail.value
134
+    })
135
+  }
136
+  // 上传资料模块
137
+  renderUpImages() {
132 138
     return (
133
-      <View className="profile-page">
134
-        <View className="tip">
135
-          建议上传相关购房资格等相关资料,最多上传8张,
139
+      <Block>
140
+        <View className="up-btn" onClick={this.bindAlbumClick}>
141
+          <Image className="add-img" src={add} />
142
+          上传资料
136 143
         </View>
137
-        <View className="tip">
138
-          审核通过后将获取更多积分、兑换好礼~
139
-        </View>
140
-        {this.state.auditStatus == 1 &&
141
-          <View className="commit-text" >审核通过,快去查看积分吧~</View>
144
+      </Block>
145
+    )
146
+  }
147
+  // 资料审核列表模块
148
+  // 审核状态 0未审核  1审核通过  2审核不通过 verifyStatus
149
+  renderVerfyList() {
150
+    const { verfyList } = this.state
151
+    return (
152
+      <View className="verfy-list">
153
+        {
154
+          verfyList.map((item, inx) => {
155
+            return (
156
+              <View className="verfy-item" key={`verfy-${inx}`} onClick={this.toProfileDetail.bind(this, (item))}>
157
+                <View className="top">
158
+
159
+                  <Text className="title">{item.documentTitle || ' '}</Text><Text className={item.verifyStatus == 0 ? 'status0' : item.verifyStatus == 1 ? 'status1' : 'status2'}>{item.verifyStatus == 0 ? '审核中' : item.verifyStatus == 1 ? '审核通过' : '未通过'}</Text>
160
+                </View>
161
+                <View className="bottom">
162
+                  <Text className="time">{`${dayjs(item.createDate).format('YYYY年MM月DD日 HH:mm:ss')}`}</Text><Text className="handle">点击{item.verifyStatus == 2 ? '编辑' : '查看'}</Text>
163
+                </View>
164
+              </View>
165
+            )
166
+
167
+          })
142 168
         }
143 169
 
144
-        <AtImagePicker
145
-          showAddBtn={(this.state.files.length < 8 && this.state.auditStatus == 2) || (this.state.auditStatus == 3 && this.state.files.length < 8)}
146
-          length={2}
147
-          mode="scaleToFill"
148
-          files={this.state.files}
149
-          onChange={this.onChange.bind(this)}
150
-          onFail={this.onFail.bind(this)}
151
-          onImageClick={this.onImageClick.bind(this)}
152
-        />
153
-        {this.state.auditStatus == 2 &&
154
-          <View className="commit-text" >审核未通过,请重新提交!</View>
155
-        }
170
+      </View>
171
+    )
172
+  }
173
+
156 174
 
157
-        {(this.state.auditStatus == 2 || this.state.auditStatus == 3) &&
158
-          <View className="commit-btn" onClick={this.commitBtn}>提交审核</View>
159
-        }
160
-        {this.state.auditStatus == 0 &&
161
-          <View className="commit-text" >审核中</View>
162
-        }
163 175
 
176
+  render() {
177
+    const { imgList, documentTitle, verfyList, descVisible } = this.state
178
+
179
+    return (
180
+      <View className="profile-page" style={`background: url(${profileBg}) no-repeat top;background-size: 100% 100%;`}>
181
+        <ScrollView scrollY scrollWithAnimation style="height: 100vh">
182
+
183
+          {!verfyList.length &&
184
+            <View className="up-images">
185
+              {this.renderUpImages()}
186
+
187
+              <View className="tip">
188
+                建议上传相关购房资格等相关资料,审核
189
+          </View>
190
+              <View className="tip">
191
+                通过后将获取更多积分、兑换好礼~
192
+          </View>
193
+            </View>
194
+          }
195
+          {verfyList.length &&
196
+            <View>
197
+
198
+              {descVisible &&
199
+                <View>
200
+                  <View className="desc-box">
201
+                    资料说明:
202
+            <Input className='inputDesc' onInput={this.onInputText.bind(this)} type='text' placeholder='请填写资料说明' />
203
+                  </View>
204
+                  <View style="padding:10px 20px">
205
+                    {this.renderUpImages()}
206
+                  </View>
207
+                  <View className="image-box">
208
+                    {imgList.length &&
209
+                      imgList.map((item, inx) => {
210
+                        return (
211
+                          <View className="image-con" key={`img-${inx}`}>
212
+                            <Image className="close-btn" src={closeImg} onClick={this.deleteImg.bind(this, (inx))} />
213
+                            <Image className="img" onClick={this.onPreview.bind(this, (item))} src={item.img} />
214
+                          </View>
215
+                        )
216
+                      })
217
+                    }
218
+
219
+                  </View>
220
+                </View>
221
+              }
222
+              {!descVisible &&
223
+                <View>
224
+                  <View style="padding:10px 20px">
225
+                    {this.renderUpImages()}
226
+                  </View>
227
+                  {this.renderVerfyList()}
228
+                </View>}
229
+
230
+              {imgList.length && <View className="commit-btn" onClick={this.commitBtn}>提交审核</View>}
231
+
232
+            </View>
233
+          }
234
+
235
+        </ScrollView>
164 236
       </View>
165 237
     )
166 238
   }

+ 128
- 9
src/pages/person/profile/index.scss Ver arquivo

@@ -1,16 +1,135 @@
1
+@import "@styles/theme.scss";
2
+
1 3
 .profile-page{
2
-  padding: 20px 40px;
3
-  height: 100vh;
4
-  width: 100vw;
5
-  
6
-  .tip{
7
-    font-size:24px;
8
-    color:#c8c8c8;
4
+  background-color: #f4f4f4;
5
+  height: 100%;
6
+
7
+  .up-btn{
8
+    width: 670px;
9
+    height: 220px;
10
+    background-color: #fff;
11
+    border: 1px solid #E8E8E8;
12
+    border-radius: 12px;
9 13
     text-align: center;
10
-    margin-bottom: 10px;
14
+    color: $primary-color;
15
+    margin: 0 auto;
16
+    .add-img{
17
+      width: 72px;
18
+      height: 72px;
19
+      margin: 42px auto 20px auto;
20
+      display: block;
21
+
22
+    }
23
+    }
24
+  .up-images{
25
+    width: 100%;
26
+    padding: 0 40px;
27
+    position: absolute;
28
+    top: 36%;
29
+    left: 0;
30
+    .tip{
31
+      font-size:28px;
32
+      color:#999;
33
+      text-align: center;
34
+      margin-bottom: 8px;
35
+      }
36
+  }
37
+  .desc-box{
38
+    color: #666;
39
+    font-size: 32px;
40
+    display: flex;
41
+    align-items: center;
42
+    padding: 20px 40px 6px 40px;
43
+    .inputDesc{
44
+      background-color: #fff;
45
+      height:64px;
46
+      line-height:64px;
47
+      width:470px;
48
+      padding: 0 15px;
49
+      box-shadow:0px 2px 0px 0px rgba(0,0,0,0.08);
50
+    }
51
+
52
+  }
53
+  .verfy-list{
54
+    background-color: #fff;
55
+    padding: 0 40px;
56
+    .verfy-item{
57
+      padding: 30px 0 34px 0;
58
+      box-shadow:0px 1px 0px 0px rgba(0,0,0,0.08);
59
+      .top{
60
+        display: flex;
61
+        align-items: center;
62
+        justify-content: space-between;
63
+        margin-bottom: 20px;
64
+        .title{
65
+          font-size: 32px;
66
+          color: #333;
67
+    
68
+        }
69
+        .status0{
70
+          color: #666;
71
+          font-size: 28px;
72
+          margin-right: 6px;
73
+        }
74
+        .status1{
75
+          color: #999;
76
+          font-size: 28px;
77
+          margin-right: 6px;
78
+        }
79
+        .status2{
80
+          color: #E35E44;
81
+          font-size: 28px;
82
+          margin-right: 6px;
83
+        }
84
+      }
85
+      .bottom{
86
+        display: flex;
87
+        align-items: center;
88
+        justify-content: space-between;
89
+        .time{
90
+          color: #999;
91
+          font-size: 24px;
92
+        }
93
+        .handle{
94
+          font-size: 30px;
95
+          color: $primary-color;
96
+        }
97
+      }
98
+    }
99
+
100
+  }
101
+  
102
+  .image-box{
103
+    display: flex;
104
+    flex-wrap: wrap;
105
+    align-content: flex-start;
106
+    justify-content: space-between;
107
+    padding: 20px 25px;
108
+
109
+    .image-con {
110
+      flex: 0 0 50%;
111
+      height: 316px;
112
+      box-sizing: border-box;
113
+      margin-bottom: 42px;
114
+      position: relative;
115
+      .close-btn{
116
+        position: absolute;
117
+        width: 76px;
118
+        height: 48px;
119
+        right: 19px;
120
+        top:0;
121
+      }
122
+      .img{
123
+        width: 316px;
124
+        height: 316px;
125
+        border-radius: 12px;
126
+        margin: 0 17px;
127
+        background-color: #fff;
128
+      }
129
+    }
11 130
   }
12 131
   .commit-btn{
13
-    width:360px;
132
+    width:86%;
14 133
     height:100px;
15 134
     background:rgba(187,156,121,1);
16 135
     border-radius:12px;

+ 2
- 1
src/pages/person/spread/index.scss Ver arquivo

@@ -1,3 +1,4 @@
1
+@import "@styles/theme.scss";
1 2
 .page {
2 3
   position: relative;
3 4
   width: 100%;
@@ -52,6 +53,6 @@
52 53
   font-weight: bold;
53 54
   left: 20%;
54 55
   top: 85%;
55
-  background: linear-gradient(270deg, rgba(248, 68, 60, 1) 0%, rgba(254, 195, 16, 1) 100%);
56
+  background: $primary-color;
56 57
   border-radius: 10px;
57 58
 }

+ 1
- 1
src/pages/project/detail/index.scss Ver arquivo

@@ -373,7 +373,7 @@
373 373
         }
374 374
 
375 375
         .saved {
376
-          color: linear-gradient(90deg, rgba(255, 199, 12, 1) 0%, rgba(255, 65, 65, 1) 100%);
376
+          color: $primary-color;
377 377
         }
378 378
 
379 379
         .txt {

+ 2
- 1
src/pages/project/detail/poster.scss Ver arquivo

@@ -1,3 +1,4 @@
1
+@import "@styles/theme.scss";
1 2
 .poster {
2 3
   position: fixed;
3 4
   width: 100vw;
@@ -55,7 +56,7 @@
55 56
     color: white;
56 57
     border: none;
57 58
     font-size: 36px;
58
-    background: linear-gradient(90deg, rgba(255, 199, 12, 1) 0%, rgba(255, 65, 65, 1) 100%);
59
+    background: $primary-color;
59 60
     border-radius: 12px;
60 61
     margin: 20px 0;
61 62
   }

+ 1
- 1
src/pages/project/list/filter/index.js Ver arquivo

@@ -25,7 +25,7 @@ export default class Index extends Component {
25 25
       {
26 26
         name: '价格',
27 27
         id: 'price',
28
-        list: ['不限', '10000/㎡以下', '10000-20000元/㎡', '20000-30000元/㎡', '30000-50000元/㎡', '50000-70000元/㎡', '70000-100000元/㎡', '100000元/㎡以上']
28
+        list: ['不限', '10000/㎡以下', '10000-20000元/㎡', '20000-30000元/㎡', '30000-50000元/㎡', '50000-70000元/㎡', '70000-100000元/㎡', '100000元/㎡以上']
29 29
         // list: [
30 30
         //   {
31 31
         //     name: '总价',

+ 1
- 1
src/pages/project/list/filter/index.scss Ver arquivo

@@ -151,7 +151,7 @@
151 151
     }
152 152
 
153 153
     &-btn {
154
-      background: linear-gradient(90deg, rgba(255, 199, 12, 1) 0%, rgba(255, 65, 65, 1) 100%);
154
+      background: $primary-color;
155 155
       border-radius: 8px;
156 156
       color: white;
157 157
       width: 200px;

+ 1
- 1
src/pages/shop/detail/index.scss Ver arquivo

@@ -138,7 +138,7 @@
138 138
   left: 5%;
139 139
   font-size: 32px;
140 140
   line-height: 90px;
141
-  background: linear-gradient(90deg, rgba(255, 199, 12, 1) 0%, rgba(255, 65, 65, 1) 100%);
141
+  background: $primary-color;
142 142
   box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.14);
143 143
   border-radius: 10px;
144 144
 }

+ 29
- 29
src/pages/shop/index.js Ver arquivo

@@ -212,11 +212,10 @@ export default class Shop extends Component {
212 212
     const { goodsList, goodsBuilding, current } = this.state
213 213
 
214 214
     return (
215
-      <View className="list__wrap">
215
+      <View>
216 216
         {
217
-
218 217
           goodsBuilding && goodsBuilding.length < 2 &&
219
-          <View>
218
+          <View className="list__wrap">
220 219
             <View className="hot_title">热门商品</View>
221 220
             {
222 221
               goodsList.map(item => (
@@ -238,35 +237,36 @@ export default class Shop extends Component {
238 237
         }
239 238
         {
240 239
           goodsBuilding && goodsBuilding.length >= 2 &&
241
-          <AtTabs scroll tabDirection='horizontal' current={current} tabList={goodsBuilding} onClick={this.handleClick.bind(this)}>
242
-
243
-            {goodsBuilding.map((l_item, index) => (
244
-
245
-              <AtTabsPane current={current} index={index} >
246
-                <View>
247
-                  {
248
-                    goodsList.map(item => (
249
-                      <View className="item" key={item.goodsId} onClick={this.onViewDetail.bind(this, item)}>
250
-                        <Image className="item__img" src={item.imgUrl} />
251
-                        <View className="item__title">{item.goodsName}</View>
252
-                        <View className="item__des">
253
-                          <View>
254
-                            剩余数量{item.inventory}
255
-                          </View>
256
-                          <View >
257
-                            <Text className="item__jifen">{item.pointPrice}</Text>积分
240
+          <View className="list__wrap">
241
+            <AtTabs scroll tabDirection='horizontal' current={current} tabList={goodsBuilding} onClick={this.handleClick.bind(this)}>
242
+
243
+              {goodsBuilding.map((l_item, index) => (
244
+                <AtTabsPane current={current} key={index} index={index} >
245
+                  <View>
246
+                    {
247
+                      goodsList.map(item => (
248
+                        <View className="item" key={item.goodsId} onClick={this.onViewDetail.bind(this, item)}>
249
+                          <Image className="item__img" src={item.imgUrl} />
250
+                          <View className="item__title">{item.goodsName}</View>
251
+                          <View className="item__des">
252
+                            <View>
253
+                              剩余数量{item.inventory}
254
+                            </View>
255
+                            <View >
256
+                              <Text className="item__jifen">{item.pointPrice}</Text>积分
258 257
                 </View>
259
-                        </View>
258
+                          </View>
260 259
 
261
-                      </View>
262
-                    ))
263
-                  }
260
+                        </View>
261
+                      ))
262
+                    }
264 263
 
265
-                </View>
266
-              </AtTabsPane>
267
-            ))
268
-            }
269
-          </AtTabs>
264
+                  </View>
265
+                </AtTabsPane>
266
+              ))
267
+              }
268
+            </AtTabs>
269
+          </View>
270 270
         }
271 271
       </View>
272 272
 

+ 1
- 1
src/pages/shop/record/index.scss Ver arquivo

@@ -32,7 +32,7 @@
32 32
 			.title-state{
33 33
 				height: 60px;
34 34
 				width: 120px;
35
-				background:linear-gradient(57deg,rgba(255,199,12,1) 0%,rgba(255,65,65,1) 100%);
35
+				background:$primary-color;
36 36
 				color:white;
37 37
 				font-size: 26px;
38 38
 				border-radius: 0 0 0 30px;

+ 2
- 1
src/pages/toolKit/index.scss Ver arquivo

@@ -1,3 +1,4 @@
1
+@import "@styles/theme.scss";
1 2
 .list_big_box {
2 3
     width: 100%;
3 4
 
@@ -65,7 +66,7 @@
65 66
         color: white;
66 67
         margin-top: 30px;
67 68
         position: fixed;
68
-        background: linear-gradient(90deg, rgba(255, 199, 12, 1) 0%, rgba(255, 65, 65, 1) 100%);
69
+        background: $primary-color;
69 70
     }
70 71
 }
71 72
 

+ 15
- 2
src/services/user.js Ver arquivo

@@ -4,7 +4,8 @@ import {
4 4
   API_USER_PHONE,
5 5
   API_USER_SIGNIN,
6 6
   API_QUERY_USER_INFO,
7
-  API_QUERY_DOCUMENTVERIFY
7
+  API_QUERY_DOCUMENTVERIFY,
8
+  API_QUERY_DOCUMENTVERIFY_list
8 9
 } from '@constants/api'
9 10
 
10 11
 /**
@@ -30,6 +31,12 @@ export const queryUserInfo = payload => fetch({ url: API_QUERY_USER_INFO, payloa
30 31
  * @param {*} payload
31 32
  */
32 33
 export const getDocumentVerify = payload => fetch({ url: API_QUERY_DOCUMENTVERIFY, payload })
34
+
35
+/**
36
+ * 获取我的资料审核列表
37
+ * @param {*} payload
38
+ */
39
+export const getVerifyList = payload => fetch({ url: API_QUERY_DOCUMENTVERIFY_list, payload })
33 40
 /**
34 41
  * 提交我的资料 (首次)
35 42
  * @param {*} payload
@@ -39,7 +46,13 @@ export const commitDocumentVerify = payload => fetch({ url: API_QUERY_DOCUMENTVE
39 46
  * 提交我的资料 (非首次)
40 47
  * @param {*} payload
41 48
  */
42
-export const editDocumentVerify = payload => fetch({ url:`${API_QUERY_DOCUMENTVERIFY}/${payload.documentVerifyId}`, payload: payload.imgList, method: 'PUT'  })
49
+export const editDocumentVerify = payload => fetch({ url:`${API_QUERY_DOCUMENTVERIFY}/${payload.id}`, payload, method: 'PUT'  })
50
+
51
+/**
52
+ * 获取审核资料详情
53
+ *  * @param {*} payload
54
+ */
55
+export const getProfileDetail = payload => fetch({ url:`${API_QUERY_DOCUMENTVERIFY}/${payload}`, payload  })
43 56
 
44 57
 /**
45 58
  * 用户签到