diff --git a/config/request.js b/config/request.js index ec962e7..c7a55e0 100644 --- a/config/request.js +++ b/config/request.js @@ -6,8 +6,8 @@ export default { // baseURL: 'https://huorantech.cn/', - baseURL: 'http://192.168.31.217:10010/', - // baseURL: '124.71.79.122/', + // baseURL: 'http://192.168.31.217:10010/', + baseURL: 'http://124.71.79.122/', headers: { 'Content-Type': 'application/json;charset=UTF-8' }, diff --git a/libs/Oss/upload.js b/libs/Oss/upload.js index 473055a..0ea2fde 100644 --- a/libs/Oss/upload.js +++ b/libs/Oss/upload.js @@ -41,7 +41,8 @@ var OSS={ policyBase64:config.policyBase64, } export default function(tempFilePaths, callback) { - const fileName = Date.now() + '.' + Util.getFileExt(tempFilePaths) + const ext = Util.getFileExt(tempFilePaths) + const fileName = Date.now() + '.' + ext uni.uploadFile({    url: OSS.host,    filePath: tempFilePaths, @@ -56,7 +57,11 @@ export default function(tempFilePaths, callback) { signature: OSS.signature, // 输入你获取的的signature }, success: (res) => { - callback(OSS.host + '/' + fileName) + callback({ + name: fileName, + url: OSS.host + '/' + fileName, + ext + }) }, fail: (res) => { console.log(res); diff --git a/pages.json b/pages.json index 433dc1d..3b0b2e2 100644 --- a/pages.json +++ b/pages.json @@ -161,6 +161,14 @@ "navigationBarTitleText" : "实名认证", "enablePullDownRefresh" : false } + }, + { + "path" : "rePersonAuth/rePersonAuth", + "style" : + { + "navigationBarTitleText" : "实名认证", + "enablePullDownRefresh" : false + } } ] } diff --git a/pages/login/login.vue b/pages/login/login.vue index 1412ae2..67cfb45 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -124,6 +124,7 @@ const e = data.sessionKey uni.setStorageSync('token', data.token) uni.setStorageSync('platformId', data.platformId) + uni.setStorageSync('openId', e.openid) this.toIndex() } }).catch(e => { @@ -204,6 +205,7 @@ }) uni.setStorageSync('token', data.token) uni.setStorageSync('platformId', platformId) + uni.setStorageSync('openId', data.sessionKey.openid) this.toIndex() }, toAgreement(id) { diff --git a/pages/person/person.vue b/pages/person/person.vue index 1a23aa2..8c86fec 100644 --- a/pages/person/person.vue +++ b/pages/person/person.vue @@ -193,7 +193,9 @@ }, }, onShow() { + // #ifdef MP-WEIXIN this.headerTop = uni.getMenuButtonBoundingClientRect().top + 8 + 'px' + // #endif this.per = true this.getAuthOrNot() this.platformId === 7 || this.getTeams() @@ -287,7 +289,7 @@ }, // 跳转实名认证 toAuth() { - this.isAuth || this.toPage('/team/personAuth/personAuth') + this.toPage(this.isAuth ? '/team/rePersonAuth/rePersonAuth' : '/team/personAuth/personAuth') }, // 提示暂未开放 tips() { diff --git a/styles/common.scss b/styles/common.scss index 793e155..eb03ee6 100644 --- a/styles/common.scss +++ b/styles/common.scss @@ -6,7 +6,7 @@ button[type=primary] { } page { height: 100%; - background-color: #f5f5f5; + background-color: #f5f6f9; } ul { padding-left: 0; @@ -94,10 +94,13 @@ ul { align-items: center; padding: 28rpx 0; border-bottom: 1px solid #E6E8ED; - &:last-child { + &:last-child, &.no-bd { border-bottom: 0; } } + .py { + padding: 28rpx 0; + } .ph { font-size: 28rpx; color: #999; @@ -119,7 +122,7 @@ ul { } .val { font-size: 26rpx; - color: #a9a9a9; + color: #232323; } input, textarea { flex: 1; @@ -132,6 +135,12 @@ ul { textarea { height: 150rpx; } + .mul-right { + flex: 1; + textarea { + width: 100%; + } + } .req { .name:after { content: '*'; diff --git a/team/auth/auth.vue b/team/auth/auth.vue index a254939..a09f8db 100644 --- a/team/auth/auth.vue +++ b/team/auth/auth.vue @@ -2,19 +2,19 @@ 上传营业执照 - + 上传办学许可证 - + - {{ platformName }}名称 - + {{ isPreschool ? '幼儿园' : '企业' }}名称 + @@ -43,12 +43,13 @@ data() { return { form: { - comapnyName: '', + companyName: '', creditCode: '', legalPerson: '', }, platformId: uni.getStorageSync('platformId'), - businessLicense: 'https://occupationlab.com/images/preschoolEdu/credentials1.png' + businessLicensePicture: 'https://occupationlab.com/images/preschoolEdu/credentials1.png', + licenseForRunningSchool: 'https://occupationlab.com/images/preschoolEdu/credentials2.png' } }, computed: { @@ -71,20 +72,21 @@ uni.chooseImage({ success: (res) => { const file = res.tempFilePaths[0]; - OSS(file, async (name) => { - that.businessLicense = name - const { data } = await businessLicensePictureVerification(name) + OSS(file, async ({ url }) => { + that.businessLicensePicture = url + const { data } = await businessLicensePictureVerification(url) if (data) { that.form = { - comapnyName: data.name, + companyName: data.name, creditCode: data.reg_num, legalPerson: data.person, address: data.address, business: data.business, capital: data.capital, - establish_date: data.establish_date, + establishDate: data.establish_date, type: data.type, - valid_period: data.valid_period, + validPeriod: data.valid_period, + platformsOurce: uni.getStorageSync('platformId'), } } }) @@ -92,23 +94,27 @@ }); }, // 上传办学许可证 - uploadBack() { + uploadSchoolLicense() { const that = this uni.chooseImage({ success: (res) => { const file = res.tempFilePaths[0]; OSS(file, async (name) => { - that.reverseOfIDCard = name + that.licenseForRunningSchool = name }) } }); }, submit() { const { form } = this - if (!form.comapnyName) return this.$util.errMsg(`请输入${platformName}名称!`) + if (!form.companyName) return this.$util.errMsg(`请输入${platformName}名称!`) if (!form.creditCode) return this.$util.errMsg('请输入统一社会信用代码!') if (!form.legalPerson) return this.$util.errMsg('请输入法人!') - creditCodeAuthentication(form).then(res => { + creditCodeAuthentication({ + ...form, + businessLicensePicture: this.businessLicensePicture, + licenseForRunningSchool: this.licenseForRunningSchool, + }).then(res => { this.$util.sucMsg('认证成功!') setTimeout(() => { uni.switchTab({ diff --git a/team/infoEdit/infoEdit.vue b/team/infoEdit/infoEdit.vue index 45704c3..e4fb383 100644 --- a/team/infoEdit/infoEdit.vue +++ b/team/infoEdit/infoEdit.vue @@ -1,13 +1,10 @@