|
@@ -13,6 +13,9 @@
|
|
|
<view v-if="consentStatus == true">
|
|
|
<view>
|
|
|
<button type="default" @click="license">上传营业执照</button>
|
|
|
+ <view style="width: 100px;margin: 0 auto;" v-if="license1 != ''">
|
|
|
+ <image v-bind:src = "license1" style="width: 100px;height: 100px;"></image>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<view class="c-row b-b">
|
|
|
<text class="tit">公司名称</text>
|
|
@@ -28,8 +31,14 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view>
|
|
|
- <button type="default">上传身份证正面</button>
|
|
|
- <button type="default">上传身份证反面</button>
|
|
|
+ <button type="default" @click="idUp">上传身份证正面</button>
|
|
|
+ <view style="width: 100px;margin: 0 auto;" v-if="id1 != ''">
|
|
|
+ <image v-bind:src = "id1" style="width: 100px;height: 100px;"></image>
|
|
|
+ </view>
|
|
|
+ <button type="default" @click="idLow">上传身份证反面</button>
|
|
|
+ <view style="width: 100px;margin: 0 auto;" v-if="id2 != ''">
|
|
|
+ <image v-bind:src = "id2" style="width: 100px;height: 100px;"></image>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<view class="c-row b-b">
|
|
|
<text class="tit">姓名</text>
|
|
@@ -45,8 +54,14 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view>
|
|
|
- <button type="default">上传银行卡正面</button>
|
|
|
- <button type="default">上传银行卡反面</button>
|
|
|
+ <button type="default" @click="bankUp()">上传银行卡正面</button>
|
|
|
+ <view style="width: 100px;margin: 0 auto;" v-if="bank1 != ''">
|
|
|
+ <image v-bind:src = "bank1" style="width: 100px;height: 100px;"></image>
|
|
|
+ </view>
|
|
|
+ <button type="default" @click="bankLow()">上传银行卡反面</button>
|
|
|
+ <view style="width: 100px;margin: 0 auto;" v-if="bank2 != ''">
|
|
|
+ <image v-bind:src = "bank2" style="width: 100px;height: 100px;"></image>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<view class="c-row b-b">
|
|
|
<text class="tit">银行卡号</text>
|
|
@@ -89,8 +104,14 @@
|
|
|
</view>
|
|
|
<view v-else>
|
|
|
<view>
|
|
|
- <button type="default">上传身份证正面</button>
|
|
|
- <button type="default">上传身份证反面</button>
|
|
|
+ <button type="default" @click="idUp">上传身份证正面</button>
|
|
|
+ <view style="width: 100px;margin: 0 auto;" v-if="id1 != ''">
|
|
|
+ <image v-bind:src = "id1" style="width: 100px;height: 100px;"></image>
|
|
|
+ </view>
|
|
|
+ <button type="default" @click="idLow">上传身份证反面</button>
|
|
|
+ <view style="width: 100px;margin: 0 auto;" v-if="id2 != ''">
|
|
|
+ <image v-bind:src = "id2" style="width: 100px;height: 100px;"></image>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<view class="c-row b-b">
|
|
|
<text class="tit">姓名</text>
|
|
@@ -106,8 +127,14 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view>
|
|
|
- <button type="default">上传银行卡正面</button>
|
|
|
- <button type="default">上传银行卡反面</button>
|
|
|
+ <button type="default" @click="bankUp()">上传银行卡正面</button>
|
|
|
+ <view style="width: 100px;margin: 0 auto;" v-if="bank1 != ''">
|
|
|
+ <image v-bind:src = "bank1" style="width: 100px;height: 100px;"></image>
|
|
|
+ </view>
|
|
|
+ <button type="default" @click="bankLow()">上传银行卡反面</button>
|
|
|
+ <view style="width: 100px;margin: 0 auto;" v-if="bank2 != ''">
|
|
|
+ <image v-bind:src = "bank2" style="width: 100px;height: 100px;"></image>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<view class="c-row b-b">
|
|
|
<text class="tit">银行卡号</text>
|
|
@@ -170,10 +197,14 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import {
|
|
|
+ mapState
|
|
|
+ } from 'vuex';
|
|
|
export default {
|
|
|
name: "buy",
|
|
|
data() {
|
|
|
return {
|
|
|
+ tupian:"",
|
|
|
inputContent: null,
|
|
|
customerPhone: '',
|
|
|
consentStatus: true,
|
|
@@ -184,6 +215,13 @@
|
|
|
sendText: '获取验证码',
|
|
|
platform: '',
|
|
|
sendDisabled: false,
|
|
|
+ id:[],
|
|
|
+ id1:"",
|
|
|
+ id2:"",
|
|
|
+ license1:"",
|
|
|
+ bank1:"",
|
|
|
+ bank2:"",
|
|
|
+ bankid:[],
|
|
|
|
|
|
identityAuthenticationInfo: {
|
|
|
customerPhone: '',
|
|
@@ -192,13 +230,16 @@
|
|
|
tempFilePaths: [],
|
|
|
businessLicenseAddressUrl:"",
|
|
|
|
|
|
- userInfo:{
|
|
|
- phone: ''
|
|
|
- },
|
|
|
+ // userInfo:{
|
|
|
+ // phone: ''
|
|
|
+ // },
|
|
|
identityAuthenticationInfo: {},
|
|
|
};
|
|
|
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ ...mapState(['hasLogin','userInfo'])
|
|
|
+ },
|
|
|
methods: {
|
|
|
consent() {
|
|
|
if (this.consentStatus == false && this.consentStatus1 == true) {
|
|
@@ -211,6 +252,61 @@
|
|
|
},
|
|
|
|
|
|
license() {
|
|
|
+ var that = this
|
|
|
+ wx.chooseImage({
|
|
|
+ success: function(res) {
|
|
|
+ wx.uploadFile({
|
|
|
+ url: 'https://www.zthymaoyi.com/upload/admin',
|
|
|
+ filePath: res.tempFilePaths[0],
|
|
|
+ name: 'file',
|
|
|
+ success(res) {
|
|
|
+ var data = res.data
|
|
|
+ var strToObj = JSON.parse(data)
|
|
|
+ that.identityAuthenticationInfo.businessLicenseAddressUrl = strToObj.url
|
|
|
+ that.license1 = strToObj.url
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ idUp(){
|
|
|
+ var that = this
|
|
|
+ wx.chooseImage({
|
|
|
+ success: function(res) {
|
|
|
+ wx.uploadFile({
|
|
|
+ url: 'https://www.zthymaoyi.com/upload/admin',
|
|
|
+ filePath: res.tempFilePaths[0],
|
|
|
+ name: 'file',
|
|
|
+ success(res) {
|
|
|
+ var data = res.data
|
|
|
+ var strToObj = JSON.parse(data)
|
|
|
+ that.id[0] = strToObj.url
|
|
|
+ that.id1 = strToObj.url
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ idLow(){
|
|
|
+ var that = this
|
|
|
+ wx.chooseImage({
|
|
|
+ success: function(res) {
|
|
|
+ wx.uploadFile({
|
|
|
+ url: 'https://www.zthymaoyi.com/upload/admin',
|
|
|
+ filePath: res.tempFilePaths[0],
|
|
|
+ name: 'file',
|
|
|
+ success(res) {
|
|
|
+ var data = res.data
|
|
|
+ var strToObj = JSON.parse(data)
|
|
|
+ that.id[1] = strToObj.url
|
|
|
+ that.id2 = strToObj.url
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ bankUp(){
|
|
|
+ var that = this
|
|
|
wx.chooseImage({
|
|
|
success: function(res) {
|
|
|
wx.uploadFile({
|
|
@@ -218,16 +314,54 @@
|
|
|
filePath: res.tempFilePaths[0],
|
|
|
name: 'file',
|
|
|
success(res) {
|
|
|
- const data = res.data
|
|
|
- const strToObj = JSON.parse(data)
|
|
|
-
|
|
|
- this.businessLicenseAddressUrl = strToObj.url
|
|
|
- console.log(this.businessLicenseAddressUrl)
|
|
|
+ var data = res.data
|
|
|
+ var strToObj = JSON.parse(data)
|
|
|
+ that.bankid[0] = strToObj.url
|
|
|
+ that.bank1 = strToObj.url
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ bankLow(){
|
|
|
+ var that = this
|
|
|
+ wx.chooseImage({
|
|
|
+ success: function(res) {
|
|
|
+ wx.uploadFile({
|
|
|
+ url: 'https://www.zthymaoyi.com/upload/admin',
|
|
|
+ filePath: res.tempFilePaths[0],
|
|
|
+ name: 'file',
|
|
|
+ success(res) {
|
|
|
+ var data = res.data
|
|
|
+ var strToObj = JSON.parse(data)
|
|
|
+ that.bankid[1] = strToObj.url
|
|
|
+ that.bank2 = strToObj.url
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ commit() {
|
|
|
+ this.identityAuthenticationInfo.commonId = this.userInfo.id
|
|
|
+ this.identityAuthenticationInfo.cardAddressUrl = this.id.toString()
|
|
|
+ this.identityAuthenticationInfo.payeeAddressUrl = this.bankid.toString()
|
|
|
+ if(this.consentStatus1 == true){
|
|
|
+ this.identityAuthenticationInfo.customerTypeFlag = "个人"
|
|
|
+ }else if(this.consentStatus == true){
|
|
|
+ this.identityAuthenticationInfo.customerTypeFlag = "企业"
|
|
|
+ }
|
|
|
+ this.$api.doRequest('post', '/identityAuthenticationInfo/api/addIdentityAuthenticationInfo', this
|
|
|
+ .identityAuthenticationInfo)
|
|
|
+ .then(res => {
|
|
|
+ console.log(12545645)
|
|
|
+ }).catch(res => {
|
|
|
+ uni.showToast({
|
|
|
+ title: res.data.message,
|
|
|
+ icon: 'none',
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
|
|
|
getcode() {
|
|
|
var that = this
|
|
@@ -283,24 +417,7 @@
|
|
|
this.inputStatus = 'none'
|
|
|
this.isPhone = false
|
|
|
},
|
|
|
- commit() {
|
|
|
- this.identityAuthenticationInfo.businessLicenseAddressUrl = 111
|
|
|
- console.log(this.businessLicenseAddressUrl,"好了")
|
|
|
- console.log(this.identityAuthenticationInfo.businessLicenseAddressUrl,"好了吗")
|
|
|
- console.log(this.identityAuthenticationInfo,"对象")
|
|
|
- return
|
|
|
- this.$api.doRequest('post', '/identityAuthenticationInfo/api/addIdentityAuthenticationInfo', this
|
|
|
- .identityAuthenticationInfo)
|
|
|
- .then(res => {
|
|
|
- console.log(12545645)
|
|
|
- }).catch(res => {
|
|
|
- uni.showToast({
|
|
|
- title: res.data.message,
|
|
|
- icon: 'none',
|
|
|
- duration: 2000
|
|
|
- })
|
|
|
- })
|
|
|
- },
|
|
|
+
|
|
|
},
|
|
|
}
|
|
|
</script>
|