小程序编译0.0.0
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
<template>
|
||||
<view class="Box">
|
||||
<navseat :opacity='false' :title='"完善商户信息"' :titleshow='true' :iconshow='false' :namecolor='"#fff"' iconcolor='#fff'></navseat>
|
||||
<view class="Box_box_O">
|
||||
<view class="Box_box flex-between">
|
||||
<view>公司名字</view>
|
||||
<view>公司名称</view>
|
||||
<view class="Box_box_input"><input type="text" :disabled="disabled" v-model="form.title"
|
||||
placeholder="请填写公司名字" data-key="mobile" /></view>
|
||||
placeholder="请填写公司名称" data-key="mobile" /></view>
|
||||
</view>
|
||||
<view class="Box_box flex-between">
|
||||
<view>法人姓名</view>
|
||||
@@ -115,9 +116,12 @@
|
||||
</template>
|
||||
<script>
|
||||
import selectaddress from '@/components/yixuan-selectAddress/yixuan-selectAddress.vue';
|
||||
import navseat from '@/components/navseat.vue'
|
||||
import uploadImage from "@/js_sdk/yushijie-ossutil/ossutil/uploadFile.js";
|
||||
export default {
|
||||
components: {
|
||||
selectaddress
|
||||
selectaddress,
|
||||
navseat
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -374,66 +378,44 @@
|
||||
if (this.disabled) {
|
||||
return false;
|
||||
} else {
|
||||
uni.showLoading({
|
||||
title: '上传中',
|
||||
mask: true
|
||||
})
|
||||
this.Uploadurlnumber = i;
|
||||
uni.chooseImage({
|
||||
count: 1, //默认9
|
||||
sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['album', 'camera'], //从相册选择,和摄像头功能,默认二者都有
|
||||
success: res => {
|
||||
uni.pro.showLoading({
|
||||
title: '上传中',
|
||||
mask: true
|
||||
});
|
||||
var thisimgUrlcaca = res.tempFilePaths[0];
|
||||
var that = this;
|
||||
uni.uploadFile({
|
||||
url: 'https://cashieradmin.sxczgkj.cn' + '/api/qiNiuContent',
|
||||
filePath: thisimgUrlcaca,
|
||||
name: 'file', // 后端接收的文件名
|
||||
header: {
|
||||
userId: uni.cache.get('userId'),
|
||||
token: uni.cache.get('token'),
|
||||
myLoginName: uni.cache.get('myLoginName')
|
||||
},
|
||||
success: res => {
|
||||
console.log(res)
|
||||
var thisdata_ = JSON.parse(res.data);
|
||||
uploadImage(thisimgUrlcaca, 'merchantinformation/',
|
||||
result => {
|
||||
uni.showToast({
|
||||
title: '上传成功',
|
||||
icon: 'none',
|
||||
success: () => {
|
||||
uni.pro.hideLoading();
|
||||
console.log(thisdata_.data[0]);
|
||||
if (this.Uploadurlnumber == 0) {
|
||||
this.$set(this.form,
|
||||
'id_card_straight', thisdata_
|
||||
.data[0])
|
||||
} else if (this.Uploadurlnumber == 1) {
|
||||
this.$set(this.form, 'id_card_reverse',
|
||||
thisdata_.data[0])
|
||||
} else {
|
||||
this.$set(this.form,
|
||||
'business_license', thisdata_
|
||||
.data[0])
|
||||
this.storerecog() //营业执照图片
|
||||
|
||||
}
|
||||
console.log(this.form)
|
||||
}
|
||||
});
|
||||
},
|
||||
fail: err => {
|
||||
uni.pro.hideLoading();
|
||||
if (this.Uploadurlnumber == 0) {
|
||||
this.$set(this.form,
|
||||
'id_card_straight', result)
|
||||
} else if (this.Uploadurlnumber == 1) {
|
||||
this.$set(this.form, 'id_card_reverse', result)
|
||||
} else {
|
||||
this.$set(this.form,
|
||||
'business_license', result)
|
||||
this.storerecog() //营业执照图片
|
||||
}
|
||||
uni.hideLoading()
|
||||
}, result => {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: thisdata_.message || thisdata_.msg,
|
||||
title: result.message || result.msg,
|
||||
icon: 'none',
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
async storerecog() {
|
||||
let res = await this.api.storerecog({
|
||||
@@ -511,7 +493,7 @@
|
||||
background: #ffffff;
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx dashed #707070;
|
||||
background: url(@/static/my2.png) no-repeat;
|
||||
background: url(https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/my2.png) no-repeat;
|
||||
background-position: 50% 50%;
|
||||
background-size: 50%;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user