123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153 |
- <template>
- <view>
- <u-card :border="false" padding="30" box-shadow="0px 1px 10px rgba(0,0,0,0.2)" border-radius="20" :show-foot="false">
- <view slot="head">
- <view class="u-flex">
- <view style="width: 8rpx;height: 34rpx;background: #0292FD;margin-right:20rpx;"></view>
- 请按照要求上传您的营业执照和门头照片
- </view>
- </view>
- <view slot="body">
- <u-upload :custom-btn="true" max-count="1" class="u-flex u-row-center" :action="action" :form-data="licensepicType"
- @on-change="getLicensedata" @on-remove="licenseRemove">
- <view slot="addBtn" hover-class="slot-btn__hover" hover-stay-time="150">
- <u-image width="475rpx" height="303rpx" src="../../static/sailun/upload_preview.png"></u-image>
- </view>
- </u-upload>
- <view class="u-flex u-row-center" style="color: #787878;margin: 20rpx 0 60rpx 0;">
- 请上传营业执照
- </view>
- <u-upload :custom-btn="true" max-count="1" class="u-flex u-row-center" :action="action" :form-data="storepicType"
- @on-change="getStoredata" @on-remove="storeRemove">
- <view slot="addBtn" hover-class="slot-btn__hover" hover-stay-time="150">
- <u-image width="475rpx" height="303rpx" src="../../static/sailun/upload_preview.png"></u-image>
- </view>
- </u-upload>
- <view class="u-flex u-row-center" style="color: #787878;margin: 20rpx 0;">
- 请上传门头照片
- </view>
- </view>
- </u-card>
- <view style="color: #787878;margin: 0 40rpx;">
- 注:请确保系统识别的营业执照名称和法人信息与营业执照上的信息保持一致
- </view>
- <view style="margin: 30rpx;">
- <u-button type="primary" @click="nextStep" v-if="showLicense&&showStore">下一步</u-button>
- <!-- <u-button type="primary" @click="nextStep">下一步</u-button> -->
- </view>
- <u-modal v-model="modalShow" :content="storecontent" :show-cancel-button="true" confirm-text="同意" cancel-text="不同意" @cancel="cancelModal"></u-modal>
- </view>
- </template>
- <script>
- import {
- request
- } from '../../common/request/request'
- require("promise.prototype.finally").shim()
- export default {
- data() {
- return {
- action: "http://b2bcnapi.sailuntire.com/allstell/test/app/sailun/appStoreBasicInfo/storeupload",
- licensepicType: {
- "pictype": "license"
- },
- storepicType: {
- "pictype": "store"
- },
- showLicense:false,
- showStore:false,
- modalShow:false,
- storecontent:"此操作需要上传正规的营业执照照片,并确保系统识别出来的信息与营业执照一致,是否同意?",
- Analyse:"正在识别,请稍等"
- };
- },
- created() {
- uni.getSystemInfo({
- success:res=>{
- this.SystemInfo=res
- }
- });
- if(this.SystemInfo.platform=='ios'){
- uni.showModal({
- title: "温馨提示",
- content: "此操作需要上传正规的营业执照照片,并确保系统识别出来的信息与营业执照一致,是否同意?",
- cancelText: "不同意",
- confirmText: "同意",
- success:res=> {
- if (res.cancel) {
- uni.navigateBack({})
- }
- }
- })
- }else{
- this.modalShow=true
- }
- },
- methods: {
- nextStep() {
- if(this.Analyse!="success"){
- this.$u.toast(this.Analyse);
- return
- }
- this.$u.route({
- url: 'pages/login/register_2',
- })
- if(this.licenseDate){
- uni.$emit('licenseData',this.licenseDate)
- }
- uni.$emit('dataUrl',{licenseUrl:this.licenseUrl,storeUrl:this.storeUrl})
- },
- getLicensedata(res, index, lists, name) {
- if (res.statusCode == 200) {
- this.$u.toast('上传成功');
- this.showLicense=true
- uni.hideLoading();
- this.licenseUrl = JSON.parse(res.data).data
- request({
- url: '/sailun/appStoreBasicInfo/licenseAnalyse',
- method: 'post',
- data: {
- "fileBox": this.licenseUrl,
- }
- }).then(res => {
- if (res.data.code == 0) {
- this.$u.toast('识别成功');
- this.licenseDate = res.data.data.wordsResultQuery
- this.Analyse=res.data.msg
- }
- if (res.data.code == 500) {
- this.$u.toast(res.data.msg);
- this.Analyse=res.data.msg
- }
- }).catch(err => {
- this.$u.toast('识别失败');
- }).finally(() => {})
- }
- },
- getStoredata(res, index, lists, name) {
- if (res.statusCode == 200) {
- this.$u.toast('上传成功');
- this.storeUrl = JSON.parse(res.data).data
- this.showStore=true
- }
- },
- cancelModal(){
- uni.navigateBack({
- })
- },
- licenseRemove(){
- this.showLicense=false
- this.Analyse="正在识别,请稍等"
- },
- storeRemove(){
- this.showStore=false
- }
- },
- }
- </script>
- <style lang="scss" scoped>
- .slot-btn__hover {
- background-color: rgb(235, 236, 238);
- }
- </style>
|