移出冗余代码

This commit is contained in:
唐明明
2021-09-27 14:18:19 +08:00
parent 60afd75ada
commit 90f6498207
16 changed files with 18 additions and 1359 deletions

View File

@@ -97,9 +97,6 @@
};
},
created(){
console.log(this.$Route)
// 读取配置信息
appliesCreate().then(res=>{
this.industry = res

View File

@@ -1,62 +0,0 @@
<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>

View File

@@ -1,147 +0,0 @@
<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>