['设置中心']
This commit is contained in:
359
pages/company/approve.vue
Normal file
359
pages/company/approve.vue
Normal file
@@ -0,0 +1,359 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="header">
|
||||
<view class="title">企业认证</view>
|
||||
<view class="subtitle">请如实填写认证信息,快速审核开店</view>
|
||||
</view>
|
||||
<view class="white-box">
|
||||
<view class="inputs logo">
|
||||
<label>企业LOGO</label>
|
||||
<image class="logo-cover" :src="logo.showpath || require('@/static/icons/add-icon.png')" @click="updImg('logo')" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="inputs">
|
||||
<label>企业名称</label>
|
||||
<input type="text" v-model="name" placeholder="输入企业名称" />
|
||||
</view>
|
||||
<view class="inputs">
|
||||
<label>企业行业</label>
|
||||
<picker v-if="industry.length > 0" :range="industry" :value="industryIndex" range-key="title" @change="changePicker" data-type="industry">
|
||||
<view class="picker-text nowrap">
|
||||
{{industry[industryIndex].title}}
|
||||
<uni-icons class="picker-icon" type="arrowdown"></uni-icons>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="inputs">
|
||||
<label>经营类目</label>
|
||||
<view class="picker-text nowrap" @click="opnePopup">
|
||||
<block v-if="categorys.length > 0">
|
||||
<text class="text-item" v-for="(item, index) in category" :key="index" v-if="item.check">{{item.name}}</text>
|
||||
</block>
|
||||
<block v-else>选择经营类目</block>
|
||||
<uni-icons class="picker-icon" type="arrowdown"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inputs">
|
||||
<label>法人姓名</label>
|
||||
<input type="text" v-model="corporate" placeholder="输入法人姓名" />
|
||||
</view>
|
||||
<view class="inputs">
|
||||
<label>法人身份证</label>
|
||||
<input type="text" v-model="identity" placeholder="输入法人身份证" />
|
||||
</view>
|
||||
<view class="inputs">
|
||||
<label>机构代码</label>
|
||||
<input type="text" v-model="org" placeholder="输入企业组织机构代码" />
|
||||
</view>
|
||||
<view class="inputs logo">
|
||||
<label>营业执照</label>
|
||||
<image class="license-cover" :src="license.showpath || require('@/static/icons/add-icon.png')" @click="updImg('license')" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="btns">
|
||||
<button type="default" size="default" @click="submitApplies">提交认证</button>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 经营类目 -->
|
||||
<uni-popup ref="categoryPopup">
|
||||
<view class="category-popup">
|
||||
<view class="header">
|
||||
<view class="title">经营类目</view>
|
||||
<view class="subtitle">请选择经营类目</view>
|
||||
</view>
|
||||
<view class="category-flex">
|
||||
<view class="category-flex-item" :class="{'show' : item.check}" v-for="(item, index) in category" :key="index" @click="item.check = !item.check">{{item.name}}</view>
|
||||
</view>
|
||||
<view class="btns">
|
||||
<button type="default" size="default" @click="affirmCategory">确定</button>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { appliesCreate, applies, appliesInfo, appliesCategory } from '@/apis/interfaces/company'
|
||||
import { uploads } from '@/apis/interfaces/uploading'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
formType : "",
|
||||
name : "",
|
||||
corporate : "",
|
||||
identity : "",
|
||||
org : "",
|
||||
logo : {
|
||||
showpath: '',
|
||||
path : ''
|
||||
},
|
||||
license : {
|
||||
showpath: '',
|
||||
path : ''
|
||||
},
|
||||
industry : [],
|
||||
industryIndex: 0,
|
||||
reason : '',
|
||||
category : [],
|
||||
categorys : []
|
||||
};
|
||||
},
|
||||
created(){
|
||||
// 读取配置信息
|
||||
appliesCreate().then(res=>{
|
||||
console.log(res)
|
||||
this.industry = res.industries
|
||||
this.formType = this.$Route.query.formType
|
||||
this.name = res.info.name
|
||||
this.industryIndex = res.industries.findIndex(val => val.industry_id === res.info.industry.industry_id) || 0
|
||||
if(this.formType === 'put'){
|
||||
appliesInfo().then(formValue => {
|
||||
for(let val of formValue.categories){
|
||||
if(val.check){
|
||||
this.categorys.push(val.category_id)
|
||||
}
|
||||
}
|
||||
this.category = formValue.categories
|
||||
this.corporate = formValue.certification.name
|
||||
this.identity = formValue.certification.idcard
|
||||
this.org = formValue.certification.code
|
||||
this.logo = formValue.cover
|
||||
this.license = formValue.certification.license
|
||||
}).catch(valueErr => {
|
||||
uni.showToast({
|
||||
title: valueErr.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
}else{
|
||||
this.category = res.info.categories
|
||||
}
|
||||
}).catch(err =>{
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
methods:{
|
||||
// 选择经营类目
|
||||
opnePopup(){
|
||||
this.$refs.categoryPopup.open('bottom')
|
||||
},
|
||||
// 确认选择类目
|
||||
affirmCategory(){
|
||||
this.categorys = []
|
||||
for(let val of this.category){
|
||||
if(val.check){
|
||||
this.categorys.push(val.category_id)
|
||||
}
|
||||
}
|
||||
this.$refs.categoryPopup.close()
|
||||
},
|
||||
// 提交信息
|
||||
submitApplies(){
|
||||
let method = this.formType === 'put' ? 'PUT' : 'POST'
|
||||
applies({
|
||||
name : this.name,
|
||||
cover : this.logo.path,
|
||||
license : this.license.path,
|
||||
user_name : this.corporate,
|
||||
id_card : this.identity,
|
||||
code : this.org,
|
||||
industry_id : this.industry[this.industryIndex].industry_id,
|
||||
categories : this.categorys
|
||||
}, method).then(res => {
|
||||
uni.showModal({
|
||||
title : '提示',
|
||||
content : '您的企业认证信息已提交,审核需3-7个工作日,请耐心等待',
|
||||
showCancel : false,
|
||||
confirmText : '确认',
|
||||
success : resModal => {
|
||||
this.$Router.back()
|
||||
}
|
||||
})
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 选择器
|
||||
changePicker(e){
|
||||
this.industryIndex = e.detail.value
|
||||
appliesCategory({
|
||||
industry: this.industry[e.detail.value].industry_id,
|
||||
}).then(res => {
|
||||
this.category = res
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 上传图片
|
||||
updImg(type){
|
||||
uni.chooseImage({
|
||||
count : 1,
|
||||
success : path => {
|
||||
uploads([{
|
||||
uri : path.tempFilePaths[0]
|
||||
}]).then(res => {
|
||||
this[type] = {
|
||||
showpath: res.url[0],
|
||||
path: res.path[0]
|
||||
}
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// 内容
|
||||
.content{
|
||||
.header{
|
||||
height: 15vh;
|
||||
padding-bottom: $padding * 2;
|
||||
box-sizing: border-box;
|
||||
@extend .vertical;
|
||||
.title{
|
||||
text-align: center;
|
||||
font-size: $title-size + 14;
|
||||
font-weight: bold;
|
||||
line-height: 90rpx;
|
||||
}
|
||||
.subtitle{
|
||||
font-size: $title-size-m;
|
||||
color: $text-gray;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
.white-box{
|
||||
background-color: white;
|
||||
border-radius: $radius $radius 0 0;
|
||||
min-height: 85vh;
|
||||
padding: $padding $padding * 2 $padding * 2;
|
||||
box-sizing: border-box;
|
||||
.inputs{
|
||||
position: relative;
|
||||
margin-top: $margin;
|
||||
background: white;
|
||||
border-bottom: solid 1rpx $border-color;
|
||||
padding-left: 200rpx;
|
||||
line-height: 90rpx;
|
||||
min-height: 90rpx;
|
||||
label{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 200rpx;
|
||||
font-size: $title-size;
|
||||
}
|
||||
input{
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
font-size: $title-size;
|
||||
}
|
||||
.picker-text{
|
||||
position: relative;
|
||||
padding-right: 90rpx;
|
||||
.picker-icon{
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
}
|
||||
.text-item{
|
||||
margin-left: 10rpx;
|
||||
&:first-child{
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.logo{
|
||||
min-height: 98rpx;
|
||||
padding-bottom: $padding;
|
||||
.logo-cover{
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 98rpx;
|
||||
height: 98rpx;
|
||||
background: $border-color-lg;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.license-cover{
|
||||
@extend .logo-cover;
|
||||
border-radius: 0;
|
||||
width: 131rpx;
|
||||
}
|
||||
}
|
||||
.btns{
|
||||
padding-top: $padding * 2;
|
||||
button{
|
||||
background: $text-price;
|
||||
border-radius: 0;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
font-size: $title-size;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
&::after{
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 经营类目
|
||||
.category-popup{
|
||||
background: #F5F5F5;
|
||||
padding: 0 $padding * 2 $padding * 2 $padding * 2;
|
||||
.header{
|
||||
padding-bottom: $padding;
|
||||
}
|
||||
.category-flex{
|
||||
margin: 0 -10rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
.category-flex-item{
|
||||
margin: 10rpx;
|
||||
background: white;
|
||||
width: calc(33.33% - 20rpx);
|
||||
line-height: 90rpx;
|
||||
text-align: center;
|
||||
font-size: $title-size-m;
|
||||
@extend .nowrap;
|
||||
&.show{
|
||||
color: white;
|
||||
background-color: $text-price;
|
||||
}
|
||||
}
|
||||
}
|
||||
.btns{
|
||||
padding-top: $padding * 2;
|
||||
button{
|
||||
background: $text-price;
|
||||
border-radius: 0;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
font-size: $title-size;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
&::after{
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
62
pages/company/prompt.vue
Normal file
62
pages/company/prompt.vue
Normal file
@@ -0,0 +1,62 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<image class="cover" src="@/static/dev/guide_cover_00.png" mode="widthFix"></image>
|
||||
<view class="title">恭喜您,已注册成功</view>
|
||||
<view class="sub-title">开通会员认证企业信息立即获得授信易货额,即可开始易货之旅</view>
|
||||
<button class="vip-button" type="default" @click="$Router.push({name: 'Vip'})">开通会员</button>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
},
|
||||
onNavigationBarButtonTap(e){
|
||||
this.$Router.pushTab({name: "Equity"})
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.content{
|
||||
padding: $padding * 2;
|
||||
background: white;
|
||||
height: 100vh;
|
||||
width: 100vw;
|
||||
box-sizing: border-box;
|
||||
@extend .vertical;
|
||||
text-align: center;
|
||||
.cover{
|
||||
width: 46vw;
|
||||
margin-bottom: 10vh;
|
||||
}
|
||||
.title{
|
||||
font-size: $title-size + 14;
|
||||
font-weight: bold;
|
||||
line-height: 90rpx;
|
||||
}
|
||||
.sub-title{
|
||||
font-size: $title-size-m;
|
||||
color: $text-gray;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.vip-button{
|
||||
margin-top: 10vh;
|
||||
background: $text-price;
|
||||
border-radius: 0;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
font-size: $title-size;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
&::after{
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
147
pages/company/registered.vue
Normal file
147
pages/company/registered.vue
Normal file
@@ -0,0 +1,147 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="header">
|
||||
<view class="title">企业注册</view>
|
||||
<view class="subtitle">填写企业基础行业,获取企业/商家权益</view>
|
||||
</view>
|
||||
<view class="white-box">
|
||||
<view class="inputs">
|
||||
<label>企业名称</label>
|
||||
<input type="text" v-model="name" placeholder="输入企业名称" />
|
||||
</view>
|
||||
<view class="inputs">
|
||||
<label>企业行业</label>
|
||||
<picker v-if="industry.length > 0" :range="industry" :value="industryIndex" range-key="title" @change="changePicker" data-type="industry">
|
||||
<view class="picker-text nowrap">
|
||||
{{industry[industryIndex].title}}
|
||||
<uni-icons class="picker-icon" type="arrowdown"></uni-icons>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="btns">
|
||||
<button type="default" size="default" @click="next">下一步</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { createConfig, inits } from '@/apis/interfaces/company'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
name : "",
|
||||
industry : [],
|
||||
industryIndex: 0
|
||||
};
|
||||
},
|
||||
created(){
|
||||
createConfig().then(res=>{
|
||||
this.industry = res
|
||||
})
|
||||
},
|
||||
methods:{
|
||||
// 提交信息
|
||||
next(){
|
||||
inits({
|
||||
name : this.name,
|
||||
industry_id : this.industry[this.industryIndex].industry_id
|
||||
}).then(res => {
|
||||
this.$Router.push({name: 'Prompt'})
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
//选择器
|
||||
changePicker(e){
|
||||
let changeType = e.target.dataset.type,
|
||||
changeVlae = e.detail.value
|
||||
|
||||
switch(changeType){
|
||||
case 'type':
|
||||
this.typeIndex = changeVlae
|
||||
break
|
||||
case 'industry':
|
||||
this.industryIndex = changeVlae
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.content{
|
||||
.header{
|
||||
height: 20vh;
|
||||
@extend .vertical;
|
||||
.title{
|
||||
text-align: center;
|
||||
font-size: $title-size + 14;
|
||||
font-weight: bold;
|
||||
line-height: 90rpx;
|
||||
}
|
||||
.subtitle{
|
||||
font-size: $title-size-m;
|
||||
color: $text-gray;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
.white-box{
|
||||
background-color: white;
|
||||
border-radius: $radius $radius 0 0;
|
||||
min-height: 80vh;
|
||||
padding: $padding * 2;
|
||||
box-sizing: border-box;
|
||||
.inputs{
|
||||
position: relative;
|
||||
margin-top: $margin;
|
||||
background: white;
|
||||
border-bottom: solid 1rpx $border-color;
|
||||
padding-left: 200rpx;
|
||||
line-height: 90rpx;
|
||||
min-height: 90rpx;
|
||||
label{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 200rpx;
|
||||
font-size: $title-size;
|
||||
}
|
||||
input{
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
font-size: $title-size;
|
||||
}
|
||||
.picker-text{
|
||||
position: relative;
|
||||
padding-right: 90rpx;
|
||||
.picker-icon{
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.btns{
|
||||
padding-top: $padding * 2;
|
||||
button{
|
||||
background: $text-price;
|
||||
border-radius: 0;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
font-size: $title-size;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
&::after{
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user