提交 552ea8565e6548e8259871a09577cdce708fefa5

作者 wangyu
1 个父辈 ebe14b56

优化

1 1 {
2 2 "pages": [
3   - "pages/main/home/home",
  3 + "pages/main/home/home",
  4 +
4 5 "pages/getPhone/getPhone",
5 6 "pages/main/editinfo/editinfo",
6 7 "pages/main/addinfo/addinfo",
... ...
... ... @@ -162,7 +162,7 @@ Page({
162 162 onChange: 'birthdayChange',
163 163 },
164 164 startDate: {
165   - label: '职受雇日期',
  165 + label: '职受雇日期',
166 166 bindtype: 'startday',
167 167 selected: '',
168 168 placeholder: '请选择受雇日期',
... ... @@ -616,7 +616,7 @@ Page({
616 616 // var profession_datas = this.data.professionData.values[pro_index[pro_index[0]]][0]
617 617 // console.log('profession_datas', profession_datas)
618 618 // var regMoney = /^[0-9]*(/.[0-9]{1,2})?$/;
619   - var regMoney = /^[0-9]*(\.[0,9]{1,2})?$/;
  619 + var regMoney = /^[0-9]*(\.[0,10]{1,2})?$/;
620 620 var regMobile = /^1[3|4|5|7|8][0-9]{9}$/;
621 621 var regname = /^[\u4E00-\u9FA5\uf900-\ufa2d·s]{2,20}$/;
622 622 var regEmail = new RegExp("^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$");
... ... @@ -704,7 +704,7 @@ Page({
704 704 "family_ties": that.data.relativeData.selected,
705 705 "native": "中国",
706 706 "id_card_type": that.data.cardtypeData.selected,
707   - "id_card_no": that.data.card_number,
  707 + "id_card_no": formdata.id_card_no ? formdata.id_card_no : that.data.card_number,
708 708 "gender": that.data.genderData.selected,
709 709 "birth_date": Date.parse(new Date(this.data.birthday)) / 1000,
710 710 "profession": {
... ...
... ... @@ -221,7 +221,7 @@
221 221 <view class="divide_line"></view>
222 222 <view class='item_body'>
223 223 <text class='text_666_28 float_left'>电子邮箱</text>
224   - <input class='input_wrap float_right' name='email' placeholder-class='text_999_28' placeholder='请输入电子邮箱'></input>
  224 + <input class='input_wrap float_right' name='email' placeholder-class='text_999_28' placeholder='请输入电子邮箱' maxlength='24'></input>
225 225 </view>
226 226 <view class="divide_line"></view>
227 227 <!-- <view class='item_body'>
... ... @@ -294,7 +294,7 @@
294 294 <view class="divide_line"></view>
295 295 <view class='item_body'>
296 296 <text class='text_666_28 float_left'>公司股本总额</text>
297   - <input class='input_wrap float_right' name='company_equity_total' type='digit' placeholder-class='text_999_28' placeholder='请输入公司股本总额' maxlength='20'></input>
  297 + <input class='input_wrap float_right' name='company_equity_total' type='digit' placeholder-class='text_999_28' placeholder='请输入公司股本总额' maxlength='13'></input>
298 298 </view>
299 299 <view class="divide_line"></view>
300 300 <!-- <view class='item_body'>
... ... @@ -326,7 +326,7 @@
326 326 <view class="divide_line" ></view>
327 327 <view class='item_body' >
328 328 <text class='text_666_28 float_left'>个人投资总额</text>
329   - <input class='input_wrap float_right' name='personal_equity_total' type='digit' placeholder-class='text_999_28' placeholder='请输入个人投资总额' maxlength='20'></input>
  329 + <input class='input_wrap float_right' name='personal_equity_total' type='digit' placeholder-class='text_999_28' placeholder='请输入个人投资总额' maxlength='13'></input>
330 330 </view>
331 331 <view class="divide_line"></view>
332 332 </view>
... ...
... ... @@ -170,7 +170,7 @@ Page({
170 170 onChange: 'birthdayChange',
171 171 },
172 172 startDate: {
173   - label: '职受雇日期',
  173 + label: '职受雇日期',
174 174 bindtype: 'startday',
175 175 placeholder: '请选择受雇日期',
176 176 selected: '',
... ... @@ -758,7 +758,8 @@ Page({
758 758 console.log("date", Date.parse(new Date(this.data.birthday)) / 1000)
759 759 var regEmail = new RegExp("^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$");
760 760 var regname = /^[\u4E00-\u9FA5\uf900-\ufa2d·s]{2,20}$/;
761   - var regMoney = /^[0-9]*(\.[0,9]{1,2})?$/;
  761 + // var regMoney = /^[0-9]*(\.[0,9]{1,2})?$/;
  762 + var regMoney = /^([1-9][\d]{0,10}|0)(\.[\d]{1,2})?$/
762 763 var formdata = e.detail.value;
763 764 console.log("formdata", formdata)
764 765 console.log("card_number", this.data.card_number)
... ... @@ -837,7 +838,7 @@ Page({
837 838 "family_ties": that.data.relativeData.selected,
838 839 "native": "中国",
839 840 "id_card_type": that.data.cardtypeData.selected,
840   - "id_card_no": that.data.card_number,
  841 + "id_card_no": formdata.id_card_no ?formdata.id_card_no:that.data.card_number,
841 842 "gender": that.data.genderData.selected,
842 843 "birth_date": that.data.long_birth_date,
843 844 "profession": request_profession,
... ...
... ... @@ -294,7 +294,7 @@
294 294 <view class="divide_line"></view>
295 295 <view class='item_body '>
296 296 <text class='text_666_28 float_left'>公司股本总额</text>
297   - <input class='input_wrap float_right ' name='company_equity_total' type='digit' value='{{taxInfo.company_equity_total}}' placeholder-class='text_999_28' placeholder='请输入股本总额' maxlength='20'></input>
  297 + <input class='input_wrap float_right ' name='company_equity_total' type='digit' value='{{taxInfo.company_equity_total}}' placeholder-class='text_999_28' placeholder='请输入股本总额' maxlength='13'></input>
298 298 </view>
299 299 <view class="divide_line"></view>
300 300 <!-- <view class='item_body '>
... ... @@ -327,7 +327,7 @@
327 327 <view class="divide_line" ></view>
328 328 <view class='item_body' >
329 329 <text class='text_666_28 float_left '>个人投资总额</text>
330   - <input class='input_wrap float_right ' name='personal_equity_total' type='digit' value='{{taxInfo.personal_equity_total}}' placeholder-class='text_999_28' placeholder='请输入个人投资总额' maxlength='20'></input>
  330 + <input class='input_wrap float_right ' name='personal_equity_total' type='digit' value='{{taxInfo.personal_equity_total}}' placeholder-class='text_999_28' placeholder='请输入个人投资总额' maxlength='13'></input>
331 331 </view>
332 332 <view class="divide_line"></view>
333 333 </view>
... ...
... ... @@ -96,12 +96,13 @@ Page({
96 96 wx.showLoading({
97 97 title: '上传图片中...',
98 98 })
  99 + console.log('key', 'imagepath_' + path.substring(path.length - 10, path.length))
99 100 wx.uploadFile({
100 101 url: OSSUrl,
101 102 filePath: path,
102 103 name: 'file',
103 104 formData: {
104   - 'key': 'imagepath_' + path.substring(path.length - 10, path.length),
  105 + 'key': 'imagepath_' + path.substring(path.length - 10, path.length)+".png",
105 106 'OSSAccessKeyId': OSSInit.access_key_id,
106 107 'policy': OSSInit.policy,
107 108 'signature': OSSInit.signature,
... ... @@ -185,23 +186,20 @@ Page({
185 186 },
186 187 success: function(res) {
187 188 console.log('suc', res)
188   - if (res.statusCode < 300) {
  189 + if (res.statusCode == 300) {
189 190 that.setData({
190 191 idInfo: res.data.item
191 192 })
192 193 console.log('suc', that.data.idInfo)
193 194 } else {
194   - wx.showToast({
195   - image: "/images/error.png",
196   - duration: 2000,
197   - title: res.data.message ? res.data.message : "数据错误"
198   - });
  195 + wx.showModal({
  196 + title: '',
  197 + content: res.data.message ? res.data.message : "数据错误",
  198 + })
199 199 }
200   - wx.hideLoading()
201 200 },
202 201 fail(res) {
203 202 console.log('fail', res.data)
204   - wx.hideLoading()
205 203 },
206 204 complete(res){
207 205 console.log('complete', res.data)
... ...
注册登录 后发表评论