companyshenhe.vue
4.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<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>