Commit 37e6c6d2 authored by youjie's avatar youjie

no message

parent fcfd4cc7
......@@ -75,6 +75,9 @@ export default {
filePath: res.tempFilePaths[0],
encoding: "base64", //编码格式
success: (ans) => {
uni.showLoading({
title: "上传中",
});
if(that.type){
that.getImgInfo(ans.data, that.access_token, (_res) => {
if (_res.data.direction == 1) {
......@@ -111,7 +114,15 @@ export default {
}
});
}else{
that.upFile(res.tempFilePaths[0])
that.upFile(res.tempFilePaths[0], (uploadRes) => {
let BusinessLicense = JSON.parse(
uploadRes.data
).data;
let infor = {}
infor.BusinessLicense = BusinessLicense
console.log("infor", infor);
that.$emit('onSuccess', infor);
});
console.log("res.tempFilePaths[0]",res.tempFilePaths[0]);
}
},
......@@ -120,10 +131,7 @@ export default {
});
},
//图片上传
upFile(filePath) {
uni.showLoading({
title: "上传中",
});
upFile(filePath,resCall) {
let that = this;
uni.uploadFile({
url: that.action,
......@@ -134,11 +142,8 @@ export default {
},
success: (uploadFileRes) => {
if (uploadFileRes.statusCode == 200) {
let data = JSON.parse(uploadFileRes.data)
let infor = {}
infor.BusinessLicense = data.data
that.$emit('onSuccess', infor);
uni.hideLoading()
resCall(uploadFileRes);
}else{
wx.showToast({
title: uploadFileRes.message,
......
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