Commit e8d2cb22 authored by youjie's avatar youjie

no message

parent a2bbbd8a
......@@ -634,19 +634,19 @@ export default {
}
.ActInProBox.activeLv2 .ActInProCenTimeAll.active,
.ActInProBox.activeLv2 .ActInProCenTime .active{
color: #FF3166;
color: #E8AA4B;
}
.ActInProBox.activeLv3 .ActInProCenTimeAll.active,
.ActInProBox.activeLv3 .ActInProCenTime .active{
color: #1BCB8B;
color: #7D49EA;
}
.ActInProBox.activeLv4 .ActInProCenTimeAll.active,
.ActInProBox.activeLv4 .ActInProCenTime .active{
color: #FF9731;
color: #44667C;
}
.ActInProBox.activeLv5 .ActInProCenTimeAll.active,
.ActInProBox.activeLv5 .ActInProCenTime .active{
color: #9B2020;
color: #000;
}
.ActInProCenSSE{
font-weight: bold;
......
......@@ -540,19 +540,19 @@ export default {
}
.SetListBox.activeLv2 .SetListCenTimeAll.active,
.SetListBox.activeLv2 .SetListCenTime .active{
color: #FF3166;
color: #E8AA4B;
}
.SetListBox.activeLv3 .SetListCenTimeAll.active,
.SetListBox.activeLv3 .SetListCenTime .active{
color: #1BCB8B;
color: #7D49EA;
}
.SetListBox.activeLv4 .SetListCenTimeAll.active,
.SetListBox.activeLv4 .SetListCenTime .active{
color: #FF9731;
color: #44667C;
}
.SetListBox.activeLv5 .SetListCenTimeAll.active,
.SetListBox.activeLv5 .SetListCenTime .active{
color: #9B2020;
color: #000;
}
.SetListCenSSE{
font-weight: bold;
......
<template>
<view class="upImg row justify-center items-center" @click="chooseImg">
<template v-if="img">
<view v-if="img" style="width: 100%;height: 100%;">
<image @click.stop="previewImage" :src="img" mode="aspectFit"/>
<view class="row justify-center items-center">
<view>重新上传</view>
</view>
</template>
</view>
<view v-else style="width: 100%;height: 100%;opacity: 0;">
<text>1</text>
</view>
</view>
</template>
<script>
......@@ -72,68 +75,87 @@ export default {
filePath: res.tempFilePaths[0],
encoding: "base64", //编码格式
success: (ans) => {
that.getImgInfo(ans.data, that.access_token, (_res) => {
if (_res.data.direction == 1) {
//未定义,图片类型错误
wx.showToast({
title: "图片类型错误!",
icon: "none",
duration: 1000,
});
} else {
let datas = _res.data.words_result;
that.upFile(res.tempFilePaths[0], (uploadRes) => {
let BusinessLicense = JSON.parse(
uploadRes.data
).data;
let infor = {}
infor.BusinessLicense = BusinessLicense
if(that.type == '1'){
infor.CompanyName = datas.单位名称.words
infor.LegalPerson = datas.法人.words
infor.UnifiedCode = datas.社会信用代码.words
infor.Addres = datas.地址.words
}else if(that.type == '2'){
infor.LegalIdCardNumber = datas.公民身份号码.words
}else if(that.type == '3'){
let y = datas.失效日期.words.substring(0, 4)
let m = datas.失效日期.words.substring(4, 6)
let d = datas.失效日期.words.substring(6, 8)
infor.LegalIdCardTime = `${y}-${m}-${d}`
}
console.log("infor", infor);
that.$emit('onSuccess', infor);
});
}
});
if(that.type){
that.getImgInfo(ans.data, that.access_token, (_res) => {
if (_res.data.direction == 1) {
//未定义,图片类型错误
wx.showToast({
title: "图片类型错误!",
icon: "none",
duration: 1000,
});
} else {
let datas = _res.data.words_result;
that.upFile(res.tempFilePaths[0], (uploadRes) => {
let BusinessLicense = JSON.parse(
uploadRes.data
).data;
let infor = {}
infor.BusinessLicense = BusinessLicense
if(that.type == '1'){
infor.CompanyName = datas.单位名称.words
infor.LegalPerson = datas.法人.words
infor.UnifiedCode = datas.社会信用代码.words
infor.Addres = datas.地址.words
}else if(that.type == '2'){
infor.LegalIdCardNumber = datas.公民身份号码.words
}else if(that.type == '3'){
let y = datas.失效日期.words.substring(0, 4)
let m = datas.失效日期.words.substring(4, 6)
let d = datas.失效日期.words.substring(6, 8)
infor.LegalIdCardTime = `${y}-${m}-${d}`
}
console.log("infor", infor);
that.$emit('onSuccess', infor);
});
}
});
}else{
that.upFile(res.tempFilePaths[0])
console.log("res.tempFilePaths[0]",res.tempFilePaths[0]);
}
},
});
},
});
},
//图片上传
upFile(img, resCall) {
upFile(filePath) {
uni.showLoading({
title: "上传中",
});
let that = this;
uni.uploadFile({
url: this.action,
filePath: img,
name: "field",
url: that.action,
filePath: filePath,
name: 'file',
formData: {
user: "test",
user: 'tesdt'
},
success: (uploadFileRes) => {
uni.hideLoading();
resCall(uploadFileRes);
if (uploadFileRes.statusCode == 200) {
let data = JSON.parse(uploadFileRes.data)
let infor = {}
infor.BusinessLicense = data.data
that.$emit('onSuccess', infor);
uni.hideLoading()
}else{
wx.showToast({
title: uploadFileRes.message,
icon: 'none',
duration: 1000
})
}
},
fail: function (res) {
fail: function(res) {
console.log(res)
wx.showToast({
title: "上传失败!",
icon: "none",
duration: 1000,
});
},
title: '上传失败!',
icon: 'none',
duration: 1000
})
}
});
},
//提取营业执照信息
......
......@@ -133,6 +133,7 @@ export default {
}
},
goDetails(item,type){
if(item.IsSee!=1) return uni.showToast({title:'暂无查看此合同权限',icon:'none'})
let path = '';
if(type==1){
path = 'signAcontract?'
......
......@@ -167,7 +167,6 @@
this.searchObj = JSON.parse(decodeURIComponent(options.msg))
this.pageTitle = this.searchObj.CityName
}
console.log(options,'----111111111111')
if(options && options.dayObj){
this.dayObj = JSON.parse(decodeURIComponent(options.dayObj))
this.searchObj.QStartDate = this.dayObj.start;
......
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