|
|
|
@ -1,5 +1,5 @@ |
|
|
|
// pages/home/authory/index.js
|
|
|
|
import { ocrLicense } from "../../api/user" |
|
|
|
import { ocrLicense, checkLicense } from "../../api/user" |
|
|
|
import { zconfig } from'../../api/ztb' |
|
|
|
import { updateUserInfo, identifyEnterprise } from '../../api/ztb' |
|
|
|
const util = require('../../../utils/util') |
|
|
|
@ -15,6 +15,7 @@ Page({ |
|
|
|
form: { }, |
|
|
|
flag: false, // 是否不可以编辑, false:可编辑;true:不可编辑
|
|
|
|
disabled: true, |
|
|
|
editable: true, |
|
|
|
imgList: [null] |
|
|
|
}, |
|
|
|
onLoad: function (options) { |
|
|
|
@ -128,7 +129,18 @@ Page({ |
|
|
|
['form.legalPersonName']: result.data.legalPersonName, |
|
|
|
['form.locDetail']: result.data.locDetail, |
|
|
|
}) |
|
|
|
wx.hideLoading() |
|
|
|
result.data.enterpriseName = result.data.name |
|
|
|
checkLicense(result.data).then(res => { |
|
|
|
if(res.data.checkStatus != 0){ |
|
|
|
this.setData({ editable : false }) |
|
|
|
} |
|
|
|
wx.hideLoading() |
|
|
|
util.showToast(res.data.checkStatusExplain) |
|
|
|
}).catch(error => { |
|
|
|
wx.hideLoading() |
|
|
|
this.setData({ editable : false }) |
|
|
|
util.showToast(error) |
|
|
|
}) |
|
|
|
}).catch(error => { |
|
|
|
wx.hideLoading() |
|
|
|
util.showToast(error) |
|
|
|
@ -187,6 +199,14 @@ Page({ |
|
|
|
deleteImg: function(e) { |
|
|
|
var index = e.currentTarget.dataset.index |
|
|
|
this.data.imgList[index] = null; |
|
|
|
this.setData({ imgList: this.data.imgList }) |
|
|
|
this.data.form.businessLicenseImg = null |
|
|
|
this.data.form.locDetail = null |
|
|
|
this.setData({ |
|
|
|
imgList: this.data.imgList, |
|
|
|
['form.name']: '', |
|
|
|
['form.uniformSocialCreditCode']: null, |
|
|
|
['form.legalPersonName']: null, |
|
|
|
editable: true |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |