companyshenhe.vue 4.8 KB
<template>
	<view class="content">

		<view class="writebox commnonpadding">
			<view class="companyitem flextwo">
				<view class="companyitemleft">企业名称</view>
				<view class="cright">
					<input type="text" placeholder="请填写企业名称" placeholder-class="entercom" @input="enterword" :data-name="'company_name'"/>
				</view>
			</view>
			<view class="companyitem flextwo">
				<view class="companyitemleft">企业联系人</view>
				<view class="cright">
					<input type="text" placeholder="请填写企业联系人" placeholder-class="entercom" @input="enterword" :data-name="'name'"/>
				</view>
			</view>
			<view class="companyitem flextwo">
				<view class="companyitemleft">联系电话</view>
				<view class="cright">
					<input type="text" placeholder="请填写联系电话" placeholder-class="entercom" @input="enterword" :data-name="'mobile'"/>
				</view>
			</view>
			<view class="companyitem">
				<view class="companyitemleft">营业执照</view>
				<view class="compantphoto" @click="chooseImage">
					<image :src="image==''?'../../static/picadd.png':image" mode=""></image>
				</view>
			</view>
			<view class="companyitem flextwo">
				<view class="companyitemleft">注册地址</view>
				<view class="cright">
					<input type="text" placeholder="请填写注册地址" placeholder-class="entercom" @input="enterword" :data-name="'site'"/>
				</view>
			</view>
			<view class="companyitem flextwo">
				<view class="companyitemleft">社会统一信用代码</view>
				<view class="cright">
					<input type="text" placeholder="请填写社会统一信用代码" placeholder-class="entercom" @input="enterword" :data-name="'code'"/>
				</view>
			</view>
			<view class="companyitem flextwo">
				<view class="companyitemleft">账单结算周期</view>
				<view class="cright">
					<input type="text" placeholder="请填写账单结算周期" placeholder-class="entercom" @input="enterword" :data-name="'period'"/>
				</view>
			</view>
			<view class="companyitem flextwo">
				<view class="companyitemleft">邀请码</view>
				<view class="cright">
					<input type="text" placeholder="请填写邀请码" placeholder-class="entercom" @input="enterword" :data-name="'salesman_number'"/>
				</view>
			</view>
		</view>


		<view class="flexone xieyibox commnonpadding">
			<view class='agreeimg' @click="attencheck">
				<image src="../../static/nosel.png" mode="" v-if="atten==false"></image>
				<image src="../../static/selright.png" mode="" v-else></image>
				
			</view>
			<view class="agreetext">我已阅读 <text class="xieyitext">《某某某服务协议 》</text></view>

		</view>



		<view class="huiyuanbot boxsizing shenhe">
			<view class="behuiyuanbtn" @click="submitshen">提交审核</view>
		</view>
	</view>
</template>

<script>
	import app from "../../App.vue";
	    export default {
	        data() {
	            return {
	                showbanben: false,
					obj:{},
					image:'',
					atten:false,
	            }
	        },
	        onLoad() {
	
	
	
	        },
	        methods: {
				// 是否同意协议
				attencheck(){
					this.atten=!this.atten
				},
	           enterword(e){
				   let name=e.currentTarget.dataset.name;
				   console.log(name);
				   this.obj[name]=e.detail.value;
				   
			   },
			   // 选择上传照片
			   chooseImage() {
			      let that = this;
			      uni.chooseImage({
			        count: 1,
			        sizeType: ['original', 'compressed'],
			        success: function (res) {
			          console.log(res.tempFilePaths[0])
			          app.upload('image', res.tempFilePaths[0],"post").then((res) => {
			            console.log('上传文件', res);
						console.log(app.globalData.baseUrl)
			            that.image=app.globalData.imgurl+res.url;
						console.log(that.image)
			            // that.cimage.push(res.kurl)
			          
			   				   
			   				   
			          }).catch((err) => {
			            console.log(err)
			          })
			        },
			        fail: function (res) { }
			      })
			    },
				// 提交审核
				submitshen(){
					let that = this;
					var url = 'member/submit_company_vip_audit';
					var params = {
						company_name:that.obj.company_name,
						name:that.obj.name,
						mobile:that.obj.mobile,
						image:that.image,
						site:that.obj.site,
						code:that.obj.code,
						period:that.obj.period,
						salesman_number:that.obj.salesman_number
					}
					console.log('7766554', params)
					app.post(url, params).then((res) => {
						console.log(res);		
					}).catch((err) => {
						console.log(err)
						uni.showToast({
							title:err.msg,
							icon:'none'
						})
								
					})
				},
	      
	        }
	
	    }
</script>

<style>
	@import url('../../base/usercenter');

	page {
		background: #F9F9FB;
	}

	.shenhe {
		/* bottom:10rpx; */
		position: unset;
	}

	.writebox {
		background: #fff;
	}
</style>