Commit 0a8b5acb authored by 郑秀明's avatar 郑秀明

Merge commit '32826774' into develop

parents 27c11114 32826774
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
<view class="apply_desc">支持(zip/rar)格式</view> <view class="apply_desc">支持(zip/rar)格式</view>
</view> </view>
<view class="apply_data_item"> <view class="apply_data_item">
<view class="apply_upload" v-if="!params.bank_card_record" @click="uploadZip('bank_card_record')"> <view class="apply_upload" v-if="!params.bank_card_record" ref="compress">
<text class="eosfont icons">&#xe60d;</text> <text class="eosfont icons">&#xe60d;</text>
<text class="upload_font">企业半年银行流水</text> <text class="upload_font">企业半年银行流水</text>
</view> </view>
...@@ -140,33 +140,17 @@ ...@@ -140,33 +140,17 @@
} }
}); });
}, },
methods: { mounted() {
uploadImage(key) {
uni.chooseImage({
success: (res) => {
uni.showLoading({
title: '上传中'
})
const tempFilePaths = res.tempFilePaths;
uni.uploadFile({
url: '/uni/api/resources',
filePath: tempFilePaths[0],
name: 'file',
success: (uploadFileRes) => {
const data = JSON.parse(uploadFileRes.data)
this.params[key] = data.data;
uni.hideLoading();
}
});
}
})
},
uploadZip(key) {
// #ifdef H5 // #ifdef H5
const _input = document.createElement('input'); const _input = document.createElement('input');
_input.type = 'file'; _input.type = 'file';
_input.accept = 'application/x-zip-compressed,application/x-rar-compressed'; _input.accept = 'application/x-zip-compressed,application/x-rar-compressed';
_input.click(); _input.style.position = 'absolute';
_input.style.top = '0';
_input.style.width = '100%';
_input.style.height = '100%';
_input.style.opacity = '0';
this.$refs.compress.$el.append(_input);
_input.onchange = (e) => { _input.onchange = (e) => {
let file = e.target.files[0]; let file = e.target.files[0];
let fileName = file.name; let fileName = file.name;
...@@ -203,7 +187,7 @@ ...@@ -203,7 +187,7 @@
}, },
success: (uploadFileRes) => { success: (uploadFileRes) => {
const data = JSON.parse(uploadFileRes.data) const data = JSON.parse(uploadFileRes.data)
this.params[key] = data.data; this.params['bank_card_record'] = data.data;
this.compressName = fileName; this.compressName = fileName;
uni.hideLoading(); uni.hideLoading();
} }
...@@ -211,6 +195,29 @@ ...@@ -211,6 +195,29 @@
} }
// #endif // #endif
}, },
methods: {
uploadImage(key) {
uni.chooseImage({
sizeType: ['compress'],
count:1,
success: (res) => {
const tempFilePaths = res.tempFilePaths;
uni.showLoading({
title: '上传中'
})
uni.uploadFile({
url: '/uni/api/resources',
filePath: tempFilePaths[0],
name: 'file',
success: (uploadFileRes) => {
const data = JSON.parse(uploadFileRes.data)
this.params[key] = data.data;
uni.hideLoading();
}
});
}
})
},
clearParams(key) { clearParams(key) {
this.params[key] = ''; this.params[key] = '';
}, },
...@@ -274,6 +281,7 @@ ...@@ -274,6 +281,7 @@
qualification_id: this.qualification_id qualification_id: this.qualification_id
}, },
success: (res) => { success: (res) => {
this.submitFlag = true;
if(res.data.code === 0) { if(res.data.code === 0) {
uni.setStorage({ uni.setStorage({
key: 'installment', key: 'installment',
...@@ -288,7 +296,6 @@ ...@@ -288,7 +296,6 @@
} }
}) })
} else { } else {
this.submitFlag = true;
uni.hideToast(); uni.hideToast();
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
<view class="apply_desc">支持(zip/rar)格式</view> <view class="apply_desc">支持(zip/rar)格式</view>
</view> </view>
<view class="apply_data_item"> <view class="apply_data_item">
<view class="apply_upload" @click="uploadZip('legal_card_record')" v-if="!params.legal_card_record"> <view class="apply_upload" v-if="!params.legal_card_record">
<text class="eosfont icons">&#xe60d;</text> <text class="eosfont icons">&#xe60d;</text>
<text class="upload_font">法人半年银行流水</text> <text class="upload_font">法人半年银行流水</text>
</view> </view>
...@@ -111,35 +111,17 @@ ...@@ -111,35 +111,17 @@
} }
}); });
}, },
methods: { mounted() {
uploadImage(key) {
uni.chooseImage({
success: (res) => {
uni.showLoading({
title: '上传中',
icon: 'none',
duration:90000
})
const tempFilePaths = res.tempFilePaths
uni.uploadFile({
url: '/uni/api/resources',
filePath: tempFilePaths[0],
name: 'file',
success: (uploadFileRes) => {
const data = JSON.parse(uploadFileRes.data)
this.params[key] = data.data;
uni.hideLoading();
}
});
}
})
},
uploadZip(key) {
// #ifdef H5 // #ifdef H5
const _input = document.createElement('input'); const _input = document.createElement('input');
_input.type = 'file'; _input.type = 'file';
_input.accept = 'application/x-zip-compressed,application/x-rar-compressed'; _input.accept = 'application/x-zip-compressed,application/x-rar-compressed';
_input.click(); _input.style.position = 'absolute';
_input.style.top = '0';
_input.style.width = '100%';
_input.style.height = '100%';
_input.style.opacity = '0';
this.$refs.compress.$el.append(_input);
_input.onchange = (e) => { _input.onchange = (e) => {
let file = e.target.files[0]; let file = e.target.files[0];
let fileName = file.name; let fileName = file.name;
...@@ -176,7 +158,7 @@ ...@@ -176,7 +158,7 @@
}, },
success: (uploadFileRes) => { success: (uploadFileRes) => {
const data = JSON.parse(uploadFileRes.data) const data = JSON.parse(uploadFileRes.data)
this.params[key] = data.data; this.params['legal_card_record'] = data.data;
this.compressName = fileName; this.compressName = fileName;
uni.hideLoading(); uni.hideLoading();
} }
...@@ -184,6 +166,31 @@ ...@@ -184,6 +166,31 @@
} }
// #endif // #endif
}, },
methods: {
uploadImage(key) {
uni.chooseImage({
sizeType: ['compress'],
count:1,
success: (res) => {
uni.showLoading({
title: '上传中',
icon: 'none',
duration:90000
})
const tempFilePaths = res.tempFilePaths
uni.uploadFile({
url: '/uni/api/resources',
filePath: tempFilePaths[0],
name: 'file',
success: (uploadFileRes) => {
const data = JSON.parse(uploadFileRes.data)
this.params[key] = data.data;
uni.hideLoading();
}
});
}
})
},
clearParams(key) { clearParams(key) {
this.params[key] = ''; this.params[key] = '';
}, },
...@@ -233,12 +240,12 @@ ...@@ -233,12 +240,12 @@
...this.data ...this.data
}, },
success: (res) => { success: (res) => {
this.submitFlag = true;
if(res.data.code === 0) { if(res.data.code === 0) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/apply/applypage3' url: '/pages/apply/applypage3'
}); });
} else { } else {
this.submitFlag = true;
uni.hideToast(); uni.hideToast();
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
......
...@@ -89,6 +89,8 @@ ...@@ -89,6 +89,8 @@
methods: { methods: {
uploadImage(key) { uploadImage(key) {
uni.chooseImage({ uni.chooseImage({
sizeType: ['compress'],
count:1,
success: (res) => { success: (res) => {
uni.showLoading({ uni.showLoading({
title: '上传中' title: '上传中'
...@@ -128,12 +130,12 @@ ...@@ -128,12 +130,12 @@
...this.data ...this.data
}, },
success: (res) => { success: (res) => {
this.submitFlag = true;
if(res.data.code === 0) { if(res.data.code === 0) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/signcontract/signcontract' url: '/pages/signcontract/signcontract'
}); });
} else { } else {
this.submitFlag = true;
uni.hideToast(); uni.hideToast();
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
......
...@@ -98,6 +98,8 @@ ...@@ -98,6 +98,8 @@
}, },
uploadImage(key) { uploadImage(key) {
uni.chooseImage({ uni.chooseImage({
sizeType: ['compress'],
count:1,
success: (res) => { success: (res) => {
uni.showLoading({ uni.showLoading({
title: '上传中' title: '上传中'
......
...@@ -505,15 +505,16 @@ ...@@ -505,15 +505,16 @@
.installment_table_box { .installment_table_box {
padding: 0 28rpx 40rpx; padding: 0 28rpx 40rpx;
background: #fff; background: #fff;
overflow: scroll;
.installment_table { .installment_table {
background: #FBFBFB; background: #FBFBFB;
border-radius:16rpx; border-radius:16rpx;
border:1px solid rgba(236,236,236,1); border:1px solid rgba(236,236,236,1);
padding: 40rpx 40rpx 16rpx; padding: 40rpx 40rpx 16rpx;
display: flex; display: flex;
overflow: scroll;
.table_title { .table_title {
margin-right: 20rpx; margin-right: 20rpx;
min-width: 160rpx;
view { view {
height:36rpx; height:36rpx;
line-height: 36rpx; line-height: 36rpx;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment