|
@@ -1,49 +1,54 @@
|
|
|
<template>
|
|
|
<view class="container">
|
|
|
<u-cell-group class="form-info" :border="false">
|
|
|
- <u-field label="商家名称" placeholder="请输入商家名称" label-width="180" v-model="shopInfo.name"></u-field>
|
|
|
- <u-cell-item title="请上传商家图标" :arrow="false">
|
|
|
- <view slot="label">
|
|
|
- <u-upload :action="uploadUrl" :file-list="defaultList1" :form-data="uploadData" @on-success="logoUploadSuccess"
|
|
|
- @on-error="uploadError" max-count="1"></u-upload>
|
|
|
- </view>
|
|
|
- </u-cell-item>
|
|
|
- <u-cell-item :title="'请上传店铺主图' + (fileList.length?`(${fileList.length}/3)`:'')" :arrow="false" class="all-width">
|
|
|
- <view slot="label">
|
|
|
- <u-upload :action="uploadUrl" :file-list="defaultList2" :form-data="uploadData" @on-success="uploadSuccess"
|
|
|
- @on-error="uploadError" @on-remove="uploadRemove" max-count="3"></u-upload>
|
|
|
- </view>
|
|
|
- </u-cell-item>
|
|
|
- <u-cell-item title="请上传身份证正反面" :arrow="false" class="all-width">
|
|
|
- <view slot="label" class="id-card-box">
|
|
|
- <u-upload :action="uploadUrl" :file-list="defaultList3" :form-data="uploadData" @on-success="uploadIdCardSuccess1"
|
|
|
- @on-error="uploadError" :custom-btn="true" max-count="1" style="margin-right: 16px;" :style="{width: cWidth + 'px', height: (cWidth * 0.66 + 30) + 'px'}">
|
|
|
- <view slot="addBtn" class="id-card card-img1" :style="{width: cWidth + 'px', height: (cWidth * 0.66 + 30) + 'px', paddingTop: (cWidth * 0.66) + 'px', backgroundSize: '100% ' + (cWidth * 0.66) + 'px'}">拍摄正面</view>
|
|
|
- </u-upload>
|
|
|
- <u-upload :action="uploadUrl" :file-list="defaultList4" :form-data="uploadData" @on-success="uploadIdCardSuccess2"
|
|
|
- @on-error="uploadError" :custom-btn="true" max-count="1" :style="{width: cWidth + 'px', height: (cWidth * 0.66 + 30) + 'px'}">
|
|
|
- <view slot="addBtn" class="id-card card-img2" :style="{width: cWidth + 'px', height: (cWidth * 0.66 + 30) + 'px', paddingTop: (cWidth * 0.66) + 'px', backgroundSize: '100% ' + (cWidth * 0.66) + 'px'}">拍摄反面</view>
|
|
|
- </u-upload>
|
|
|
- </view>
|
|
|
- </u-cell-item>
|
|
|
- <u-cell-item title="请上传营业执照照片" :arrow="false" class="all-width">
|
|
|
- <view slot="label" class="license-box">
|
|
|
- <u-upload :action="uploadUrl" :file-list="defaultList5" :form-data="uploadData" @on-success="uploadLicenseSuccess"
|
|
|
- @on-error="uploadError" :custom-btn="true" max-count="1" class="diy-upload">
|
|
|
- <image slot="addBtn" class="license-img" src="../../static/images/license-img.png"></image>
|
|
|
- </u-upload>
|
|
|
- <view class="license-text"> 营业执照</view>
|
|
|
- </view>
|
|
|
- </u-cell-item>
|
|
|
- <u-field label="法人姓名" placeholder="请输入法人姓名" label-width="180" v-model="shopInfo.duty"></u-field>
|
|
|
- <u-cell-item title="所在城市" @click="regionShow = true">
|
|
|
- <text v-show="shopInfo.companyAddressProvince">{{shopInfo.companyAddressProvince}}-{{shopInfo.companyAddressCity}}-{{shopInfo.companyAddressDistrict}}</text>
|
|
|
- </u-cell-item>
|
|
|
- <u-field label="联系方式" placeholder="请输入联系方式" label-width="180" v-model="shopInfo.contactTel"></u-field>
|
|
|
- <u-field label="收款人姓名" placeholder="请输入收款人姓名" label-width="180" v-model="shopInfo.collectionName"></u-field>
|
|
|
- <u-field label="户名" placeholder="请输入户名" label-width="180" v-model="shopInfo.bankAccountName"></u-field>
|
|
|
- <u-field label="银行名称" placeholder="请输入银行名称" label-width="180" v-model="shopInfo.bankAllName"></u-field>
|
|
|
- <u-field label="银行卡号" placeholder="请输入银行卡号" label-width="180" v-model="shopInfo.bankNumber"></u-field>
|
|
|
+ <!-- <u-form :model="shopInfo" ref="shopInfo"> -->
|
|
|
+ <!-- <u-form-item label="商家名称" prop="name">
|
|
|
+ <u-input placeholder="请输入商家名称" label-width="180" v-model="shopInfo.name" /> -->
|
|
|
+ <u-field label="商家名称" placeholder="请输入商家名称" label-width="180" v-model="shopInfo.name"></u-field>
|
|
|
+ <!-- </u-form-item> -->
|
|
|
+ <u-cell-item title="请上传商家图标" :arrow="false">
|
|
|
+ <view slot="label">
|
|
|
+ <u-upload :action="uploadUrl" :file-list="defaultList1" :form-data="uploadData" @on-success="logoUploadSuccess"
|
|
|
+ @on-error="uploadError" max-count="1"></u-upload>
|
|
|
+ </view>
|
|
|
+ </u-cell-item>
|
|
|
+ <u-cell-item :title="'请上传店铺主图' + (fileList.length?`(${fileList.length}/3)`:'')" :arrow="false" class="all-width">
|
|
|
+ <view slot="label">
|
|
|
+ <u-upload :action="uploadUrl" :file-list="defaultList2" :form-data="uploadData" @on-success="uploadSuccess"
|
|
|
+ @on-error="uploadError" @on-remove="uploadRemove" max-count="3"></u-upload>
|
|
|
+ </view>
|
|
|
+ </u-cell-item>
|
|
|
+ <u-cell-item title="请上传身份证正反面" :arrow="false" class="all-width">
|
|
|
+ <view slot="label" class="id-card-box">
|
|
|
+ <u-upload :action="uploadUrl" :file-list="defaultList3" :form-data="uploadData" @on-success="uploadIdCardSuccess1"
|
|
|
+ @on-error="uploadError" :custom-btn="true" max-count="1" style="margin-right: 16px;" :style="{width: cWidth + 'px', height: (cWidth * 0.66 + 30) + 'px'}">
|
|
|
+ <view slot="addBtn" class="id-card card-img1" :style="{width: cWidth + 'px', height: (cWidth * 0.66 + 30) + 'px', paddingTop: (cWidth * 0.66) + 'px', backgroundSize: '100% ' + (cWidth * 0.66) + 'px'}">拍摄正面</view>
|
|
|
+ </u-upload>
|
|
|
+ <u-upload :action="uploadUrl" :file-list="defaultList4" :form-data="uploadData" @on-success="uploadIdCardSuccess2"
|
|
|
+ @on-error="uploadError" :custom-btn="true" max-count="1" :style="{width: cWidth + 'px', height: (cWidth * 0.66 + 30) + 'px'}">
|
|
|
+ <view slot="addBtn" class="id-card card-img2" :style="{width: cWidth + 'px', height: (cWidth * 0.66 + 30) + 'px', paddingTop: (cWidth * 0.66) + 'px', backgroundSize: '100% ' + (cWidth * 0.66) + 'px'}">拍摄反面</view>
|
|
|
+ </u-upload>
|
|
|
+ </view>
|
|
|
+ </u-cell-item>
|
|
|
+ <u-cell-item title="请上传营业执照照片" :arrow="false" class="all-width">
|
|
|
+ <view slot="label" class="license-box">
|
|
|
+ <u-upload :action="uploadUrl" :file-list="defaultList5" :form-data="uploadData" @on-success="uploadLicenseSuccess"
|
|
|
+ @on-error="uploadError" :custom-btn="true" max-count="1" class="diy-upload">
|
|
|
+ <image slot="addBtn" class="license-img" src="../../static/images/license-img.png"></image>
|
|
|
+ </u-upload>
|
|
|
+ <view class="license-text"> 营业执照</view>
|
|
|
+ </view>
|
|
|
+ </u-cell-item>
|
|
|
+ <u-field label="法人姓名" placeholder="请输入法人姓名" label-width="180" v-model="shopInfo.duty"></u-field>
|
|
|
+ <u-cell-item title="所在城市" @click="regionShow = true">
|
|
|
+ <text v-show="shopInfo.companyAddressProvince">{{shopInfo.companyAddressProvince}}-{{shopInfo.companyAddressCity}}-{{shopInfo.companyAddressDistrict}}</text>
|
|
|
+ </u-cell-item>
|
|
|
+ <u-field label="联系方式" placeholder="请输入联系方式" label-width="180" v-model="shopInfo.contactTel"></u-field>
|
|
|
+ <u-field label="收款人姓名" placeholder="请输入收款人姓名" label-width="180" v-model="shopInfo.collectionName"></u-field>
|
|
|
+ <u-field label="户名" placeholder="请输入户名" label-width="180" v-model="shopInfo.bankAccountName"></u-field>
|
|
|
+ <u-field label="银行名称" placeholder="请输入银行名称" label-width="180" v-model="shopInfo.bankAllName"></u-field>
|
|
|
+ <u-field label="银行卡号" placeholder="请输入银行卡号" label-width="180" v-model="shopInfo.bankNumber"></u-field>
|
|
|
+ <!-- </u-form> -->
|
|
|
</u-cell-group>
|
|
|
<view class="form-handle">
|
|
|
<u-button type="success" shape="circle" :ripple="true" @click="submitData" class="handle-custom">提交</u-button>
|
|
@@ -88,8 +93,22 @@
|
|
|
defaultList3: [],
|
|
|
defaultList4: [],
|
|
|
defaultList5: [],
|
|
|
+ rules: {
|
|
|
+ name: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: '请输入姓名',
|
|
|
+ // 可以单个或者同时写两个触发验证方式
|
|
|
+ trigger: 'blur',
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
+ // 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕
|
|
|
+ onReady() {
|
|
|
+ this.$refs.shopInfo.setRules(this.rules);
|
|
|
+ },
|
|
|
onLoad(options) {
|
|
|
this.cWidth = (uni.upx2px(750) - 40) / 2;
|
|
|
this.uploadUrl = API.uploadFile
|