Commit a4c6cecf authored by tyn's avatar tyn

前台end

parent eeafcbfb
import network from "@/utils/network";
export const getAuthenticationDetailApi = () => network({
url: "/attestation/information",
method: "post"
});
// 获取供应商类型
export const getSupplierTypeApi = () => network({
url : "/category/list/tree",
method : "post"
})
\ No newline at end of file
......@@ -42,7 +42,7 @@ export const checkUser = (data) => network({
});
export const loginApi = (data) => network({
url: "",
url: "/login",
method: "post",
data
});
......@@ -54,5 +54,5 @@ export const loginOutApi = () => network({
export const getUserInfoApi = () => network({
url: "/getInfo",
method: "post"
method: "get"
});
<template>
<div class="hello">
<h1>{{ msg }}</h1>
<p>
For a guide and recipes on how to configure / customize this project,<br>
check out the
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
</p>
<h3>Installed CLI Plugins</h3>
<ul>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-router" target="_blank" rel="noopener">router</a></li>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-vuex" target="_blank" rel="noopener">vuex</a></li>
</ul>
<h3>Essential Links</h3>
<ul>
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
</ul>
<h3>Ecosystem</h3>
<ul>
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
</ul>
</div>
</template>
<script>
export default {
name: 'HelloWorld',
props: {
msg: String
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="scss">
h3 {
margin: 40px 0 0;
}
ul {
list-style-type: none;
padding: 0;
}
li {
display: inline-block;
margin: 0 10px;
}
a {
color: #42b983;
}
</style>
<template>
<div class="side-bar">
<!-- 顶部系统名 -->
<div class="top-title">
<img src="@/assets/images/logo.png" alt="">
</div>
<!-- 菜单 -->
<div class="menu">
<el-menu mode="vertical" default-active="/home/index" :collapse="collapseStatus" :unique-opened="true" @select="selectMenu">
<template v-for="(item, subIndex) of menus">
<el-menu-item v-if="item.show" :index="item.path" :key="item.path">
{{item.title}}
</el-menu-item>
</template>
<el-submenu v-for="(subItem, index) of subMenu" :index="subItem.path" :key="subItem.path">
<template slot="title">{{subItem.meta.title}}</template>
<template v-if="subItem.children">
<el-menu-item v-for="(item, subIndex) of subItem.children" :index="item.path" :key="item.path">
{{item.meta.title}}
</el-menu-item>
</template>
</el-submenu>
</el-menu>
</div>
</div>
</template>
<script>
import { routes } from "@/router/";
export default {
name: "sideBar",
data() {
return {
menus: [],
subMenu: [],
collapseStatus: false
};
},
//可访问data属性
created() {
this.createMenu();
},
//计算集
computed: {
},
//方法集
methods: {
createMenu() {
routes.forEach(item => {
if (item.path === "/home") {
if (item.children && item.children.length > 0) {
let temp = item.children;
temp.forEach(child => {
if (child.children && child.children.length > 0) {
this.subMenu.push(child);
} else {
this.menus.push({
path: child.path,
name: child.name,
title: child.meta?.title,
show: child.meta?.show
});
}
});
}
}
});
},
selectMenu(path, pathName) {
if (this.$route.path === path) return;
this.$router.push({ path });
}
},
}
</script>
<style lang="scss" scoped>
.side-bar {
width: 100%;
height: 100%;
border-right: 1px solid #eeeeee;
// 顶部系统名
.top-title {
width: 100%;
height: 70px;
display: flex;
justify-content: center;
align-items: center;
background: #fff;
border-bottom: 1px solid #eeeeee;
}
// 菜单
.menu {
width: 100%;
height: calc(100% - 60px);
}
}
</style>
<template>
<div class="home-container">
<!-- 左侧菜单 -->
<div class="side-bar">
<side-bar></side-bar>
</div>
<!-- 主体 -->
<div class="main-container">
<div class="nav-bar">
</div>
<div class="content-container">
<router-view></router-view>
</div>
</div>
</div>
</template>
<script>
import SideBar from "@/components/SideBar";
export default {
name: "home",
components: {
SideBar
},
data() {
return {
};
},
//可访问data属性
created() {
},
//计算集
computed: {
},
//方法集
methods: {
},
}
</script>
<style lang="scss" scoped>
.home-container {
position: relative;
width: 100%;
height: 100%;
display: flex;
overflow: hidden;
.side-bar {
width: 260px;
height: 100%;
}
.main-container {
position: relative;
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
.nav-bar {
width: 100%;
height: 70px;
border-bottom: 1px solid #EEEEEE;
box-sizing: border-box;
}
.content-container {
width: 100%;
height: calc(100% - 70px);
padding: 16px;
box-sizing: border-box;
overflow-y: auto;
overflow-x: hidden;
}
}
}
</style>
......@@ -26,9 +26,9 @@
<el-input placeholder="请输入登录密码" show-password v-model="mimaparam.password"></el-input>
</div>
<div class="inputs">
<el-input width="191px" class="small" placeholder="请输入验证码" v-model="mimaparam.code" ></el-input>
<el-input width="191px" class="small" placeholder="请输入验证码" v-model="mimaparam.code"></el-input>
<div class="login-code">
<img :src="codeUrl" @click="getCode" class="login-code-img"/>
<img :src="codeUrl" @click="getCode" class="login-code-img" />
</div>
</div>
<div class="loginin" @click="login">登录</div>
......@@ -65,7 +65,7 @@
<div class="inputs">
<el-input class="small" v-model="resetparam.code" placeholder="请输入验证码"></el-input>
<div class="login-code">
<img :src="codeUrl" @click="getCode" class="login-code-img"/>
<img :src="codeUrl" @click="getCode" class="login-code-img" />
</div>
</div>
<div class="loginin" @click="yzSmscode">下一步</div>
......@@ -76,10 +76,10 @@
<!-- 提交重置的密码-->
<div class="logoncont" v-if="type=='tjmm'">
<div class="inputs">
<el-input v-model="resetparam.passWord" placeholder="请输入密码" show-password ></el-input>
<el-input v-model="resetparam.passWord" placeholder="请输入密码" show-password></el-input>
</div>
<div class="inputs">
<el-input v-model="resetparam.passWord1" placeholder="请再次输入密码" show-password ></el-input>
<el-input v-model="resetparam.passWord1" placeholder="请再次输入密码" show-password></el-input>
</div>
<div class="loginin" @click="resetpwd">提交</div>
<div class="loginzc" style="justify-content: center">
......@@ -152,7 +152,8 @@
<br>
<br>2、用户应对其在交易平台及产品上发布的任何信息承担全部责任。
<br>
<br>3、用户应遵守国家相关法律和规定,不得利用交易平台、产品从事任何有违法律和社会公德的活动;不得传输任何非法的、骚扰性的、中伤他人的、辱骂性的、恐吓性的、伤害性的、庸俗的,淫秽的等信息;不得传输助长国内不利条件和涉及国家安全的资料;不得干扰交易平台的服务秩序;否则,交易平台有权取消其账号,相关的系统记 录有可能作为证据提交司法机关。
<br>3、用户应遵守国家相关法律和规定,不得利用交易平台、产品从事任何有违法律和社会公德的活动;不得传输任何非法的、骚扰性的、中伤他人的、辱骂性的、恐吓性的、伤害性的、庸俗的,淫秽的等信息;不得传输助长国内不利条件和涉及国家安全的资料;不得干扰交易平台的服务秩序;否则,交易平台有权取消其账号,相关的系统记
录有可能作为证据提交司法机关。
<br>
<br>4、用户不得将帐号、密码及相关服务销售、转让、或赠与任何第三方,由此造成的一切后果和责任均由用户承担。如遇以上情形,交易平台有权通过电话、邮件或传真方式 告知,经警告无效后交易平台有权停止服务,并有权单方终止对用户提供的服务。
<br>
......@@ -237,9 +238,7 @@
<el-input v-model="ruleForm.amount" placeholder="请输入注册资本"></el-input>
</el-form-item>
<el-form-item label="成立日期" prop="date" class="left-title">
<el-date-picker v-model="ruleForm.date"
type="date"
placeholder="请输入成立日期">
<el-date-picker v-model="ruleForm.date" type="date" placeholder="请输入成立日期">
</el-date-picker>
</el-form-item>
<el-form-item label="企业注册地" prop="region">
......@@ -249,21 +248,16 @@
</el-select>
</el-form-item>
<el-form-item label="办公地址" prop="address" class="left-title">
<el-input type="textarea" :autosize="{ minRows: 2, maxRows: 2}" placeholder="请输入办公地址" v-model="ruleForm.address" style="width: 670px;"></el-input>
<el-input type="textarea" :autosize="{ minRows: 2, maxRows: 2}" placeholder="请输入办公地址" v-model="ruleForm.address"
style="width: 670px;"></el-input>
</el-form-item>
<el-form-item label="企业简介" prop="detail" class="left-title">
<el-input type="textarea" :autosize="{ minRows: 3, maxRows: 3}" placeholder="请输入企业简介" v-model="ruleForm.detail" style="width: 670px;"></el-input>
<el-input type="textarea" :autosize="{ minRows: 3, maxRows: 3}" placeholder="请输入企业简介" v-model="ruleForm.detail" style="width: 670px;">
</el-input>
</el-form-item>
<el-form-item label="营业执照扫描件" prop="detail" class="upload-image" style="margin-bottom: 34px;">
<el-upload ref="upload"
:auto-upload="false"
:data="ruleForm"
class="avatar-uploader"
action="#"
:show-file-list="false"
:on-success="handleAvatarSuccess"
:on-change='changeUpload'
:before-upload='beforeAvatarUpload'>
<el-upload ref="upload" :auto-upload="false" :data="ruleForm" class="avatar-uploader" action="#" :show-file-list="false"
:on-success="handleAvatarSuccess" :on-change='changeUpload' :before-upload='beforeAvatarUpload'>
<img v-if="ruleForm.imageUrl" :src="ruleForm.imageUrl" class="avatar" style=" height: 100%;">
<div v-else>
......@@ -274,15 +268,8 @@
</el-upload>
</el-form-item>
<el-form-item label="法人代表身份证扫描件" prop="detail" class="upload-image" style="width: 375px; margin-bottom: 34px;">
<el-upload ref="upload"
:auto-upload="false"
:data="ruleForm"
class="avatar-uploader"
action="#"
:show-file-list="false"
:on-success="handleAvatarSuccess"
:on-change='changeUpload'
:before-upload='beforeAvatarUpload'>
<el-upload ref="upload" :auto-upload="false" :data="ruleForm" class="avatar-uploader" action="#" :show-file-list="false"
:on-success="handleAvatarSuccess" :on-change='changeUpload' :before-upload='beforeAvatarUpload'>
<img v-if="ruleForm.imageUrl" :src="ruleForm.imageUrl" class="avatar" style=" height: 100%;">
<div v-else>
......@@ -311,13 +298,14 @@
</el-form>
<div class="line-box"></div>
<el-button type="primary" class="checkBtn" @click="registerType = 3">提交审核</el-button>
<div class="agreement">提交即表示已阅读并同意 <el-button type="text" style=" padding: 0;">《服务协议》</el-button><el-button type="text" style="margin-left: 0; padding: 0;">《隐私协议》</el-button></div>
<div class="agreement">提交即表示已阅读并同意 <el-button type="text" style=" padding: 0;">《服务协议》</el-button><el-button type="text"
style="margin-left: 0; padding: 0;">《隐私协议》</el-button>
</div>
</template>
<template v-if="registerType == 3">
<div class="register-results">
<img src="@/assets/images/successbg.png"/>
<img src="@/assets/images/successbg.png" />
<p>供应商入驻提交成功</p>
<span>您的认证申请已成功提交,审核结果将会在24小时内短信通知,请耐心等待。</span>
</div>
......@@ -330,19 +318,19 @@
</template>
<script>
import footers from '@/components/foots'
import {login,smsLogin,validateSmsCode,validateCaptcha,forgotPassword,captchaImage,checkUser} from "./api/login"
import footers from '@/components/foots';
import { login, smsLogin, validateSmsCode, validateCaptcha, forgotPassword, captchaImage, checkUser } from "./api/login";
export default {
components: {footers},
components: { footers },
data() {
return {
codeUrl:'',//图形验证码
uuid:'',//图形验证码唯一凭证
codeUrl: '',//图形验证码
uuid: '',//图形验证码唯一凭证
dialogVisible: false,
agreeRegister: false,
registerType: 2,
form: {
phone:"",
phone: "",
code: "",
sex: 0,
name: "",
......@@ -350,7 +338,7 @@ export default {
passwordCheck: "",
email: "",
},
ruleForm:{
ruleForm: {
companyName: "",
code: "",
name: "",
......@@ -387,151 +375,145 @@ export default {
{ required: true, message: '请输入企业简介', trigger: 'change' }
],
},
type:"mima",//登录方式 密码:mima 验证码:yzm 忘记密码:wjmm 提交密码:tjmm
yzmparam:{
phone:'',
smsCode:''
} ,
mimaparam:{
userName:'',
password:'',
code:'',
uuid:''
type: "mima",//登录方式 密码:mima 验证码:yzm 忘记密码:wjmm 提交密码:tjmm
yzmparam: {
phone: '',
smsCode: ''
},
mimaparam: {
userName: '',
password: '',
code: '',
uuid: ''
},
resetparam:{
phone:'',
passWord:'',
passWord1:'',
code:'',
smsCode:''
resetparam: {
phone: '',
passWord: '',
passWord1: '',
code: '',
smsCode: ''
},
timer:'获取验证码',//倒计时
timer: '获取验证码',//倒计时
};
},
computed: {
},
mounted() {
this.getCode()
this.getCode();
},
watch:{
type(val){
this.cleardata()
watch: {
type(val) {
this.cleardata();
}
},
methods: {
//清空填写的登录数据
cleardata(){
cleardata() {
},
//登录
login(){
this.mimaparam.uuid = this.uuid
if(!(this.mimaparam.username || this.mimaparam.code || this.mimaparam.code)){
login() {
this.mimaparam.uuid = this.uuid;
if (!(this.mimaparam.username || this.mimaparam.code || this.mimaparam.code)) {
this.$message.error('账号、密码、验证码不能为空!');
return false;
}
// this.$store.dispatch("/login",this.mimaparam).then((res) => {
// // })
login(this.mimaparam).then(res=>{
if(res.code == 200){
let token = res.token
this.$store.commit("user/SET_TOKEN",token)
this.toList()
}else{
this.$message.error(res.msg);
}
})
this.$store.dispatch("user/userLogin", this.mimaparam).then((res) => {
this.toList();
});
},
//验证码登录
yzmlogin(){
if(!(this.yzmparam.phone || this.yzmparam.smsCode)){
yzmlogin() {
if (!(this.yzmparam.phone || this.yzmparam.smsCode)) {
this.$message.error('账号、验证码不能为空!');
return false;
}
smsLogin(this.yzmparam).then(res=>{
if(res.code == 200){
let token = res.token
this.$store.commit("user/SET_TOKEN",token)
this.toList()
}else{
smsLogin(this.yzmparam).then(res => {
if (res.code == 200) {
let token = res.token;
this.$store.commit("user/SET_TOKEN", token);
this.toList();
} else {
this.$message.error(res.msg);
}
})
});
},
//验证短信验证码、图形验证码
yzSmscode(){
if(!(this.resetparam.phone || this.resetparam.smsCode || this.resetparam.code)){
yzSmscode() {
if (!(this.resetparam.phone || this.resetparam.smsCode || this.resetparam.code)) {
this.$message.error('账号、验证码不能为空!');
return false;
}
let param = {
phone:this.resetparam.phone,
code:this.resetparam.smsCode
}
phone: this.resetparam.phone,
code: this.resetparam.smsCode
};
//校验短信验证码
validateSmsCode(param).then(res=>{
if (res.code == 200){
validateSmsCode(param).then(res => {
if (res.code == 200) {
let params = {
uuid:this.uuid,
code:this.resetparam.code
}
校验图形验证码
validateCaptcha(params).then(res=>{
if(res.code == 200){
this.type='tjmm'
}else{
uuid: this.uuid,
code: this.resetparam.code
};
校验图形验证码;
validateCaptcha(params).then(res => {
if (res.code == 200) {
this.type = 'tjmm';
} else {
this.$message.error(res.msg);
}
})
}else{
});
} else {
this.$message.error(res.msg);
}
})
});
},
//重置密码
resetpwd(){
let pwd = this.resetparam.passWord
let pwd1 = this.resetparam.passWord1
if(pwd!=pwd1){
resetpwd() {
let pwd = this.resetparam.passWord;
let pwd1 = this.resetparam.passWord1;
if (pwd != pwd1) {
this.$message.error('两次输入密码不一致');
}else{
} else {
//重置
let param = {phone:this.resetparam.phone,passWord:this.resetparam.passWord}
forgotPassword(param).then(res=>{
if(res.code == 200){
this.type = 'mima'
this.getCode()
let param = { phone: this.resetparam.phone, passWord: this.resetparam.passWord };
forgotPassword(param).then(res => {
if (res.code == 200) {
this.type = 'mima';
this.getCode();
this.$message({
message: res.msg,
type: 'success'
});
}else{
} else {
this.$message.error(res.msg);
}
})
});
}
},
//获取验图形证码
getCode(){
captchaImage().then(res=>{
this.codeUrl = 'data:image/gif;base64,'+res.img
this.uuid = res.uuid
})
getCode() {
captchaImage().then(res => {
this.codeUrl = 'data:image/gif;base64,' + res.img;
this.uuid = res.uuid;
});
},
//获取手机验证码
getSmsCode(type){
if(type == 1){//短信登录
if(this.yzmparam.phone)
this.yzPohne(this.yzmparam.phone)
getSmsCode(type) {
if (type == 1) {//短信登录
if (this.yzmparam.phone)
this.yzPohne(this.yzmparam.phone);
else
this.$message({
message: '请输入手机号!',
type: 'warning'
});
}
if(type == 2){//忘记密码
if(this.resetparam.phone)
this.yzPohne(this.resetparam.phone)
if (type == 2) {//忘记密码
if (this.resetparam.phone)
this.yzPohne(this.resetparam.phone);
else
this.$message({
message: '请输入手机号!',
......@@ -540,59 +522,59 @@ export default {
}
},
// 验证手机号发送验证码
yzPohne(phone){
yzPohne(phone) {
var param = {
phone:phone,
type:1 //0:注册,1:短信登录/忘记密码
}
phone: phone,
type: 1 //0:注册,1:短信登录/忘记密码
};
//验证账户发送短信
checkUser(param).then(res=>{
if(res.code == 200){
this.getTimer()
}else{
checkUser(param).then(res => {
if (res.code == 200) {
this.getTimer();
} else {
this.$message.error(res.msg);
}
})
});
},
getTimer(){//倒计时
let num = 60
var timers = setInterval(()=>{
if(num>0){
getTimer() {//倒计时
let num = 60;
var timers = setInterval(() => {
if (num > 0) {
num--;
this.timer = num+'s重新发送'
}else{
clearInterval(timers)
this.timer = '发送验证码'
timers = null
this.timer = num + 's重新发送';
} else {
clearInterval(timers);
this.timer = '发送验证码';
timers = null;
}
},1000)
}, 1000);
},
wjmm(){
this.type='wjmm'
this.getCode()
wjmm() {
this.type = 'wjmm';
this.getCode();
},
//登录成功跳转
toList(){
toList() {
this.$router.push("/home");
},
handleAvatarSuccess(res, file) {
console.log("上传成功")
this.ruleForm.imageUrl = URL.createObjectURL(file.raw)
console.log("上传成功");
this.ruleForm.imageUrl = URL.createObjectURL(file.raw);
},
changeUpload: function (file) {
let fileName = file.name;
console.log(fileName)
let regex = /(.jpg|.jpeg)$/
console.log(fileName);
let regex = /(.jpg|.jpeg)$/;
if (regex.test(fileName.toLowerCase())) {
this.ruleForm.imageUrl = URL.createObjectURL(file.raw)
this.ruleForm.imageUrl = URL.createObjectURL(file.raw);
}
},
beforeAvatarUpload(file) {
const isJPG = file.type === 'image/jpeg';
const isLt2M = file.size / 1024 / 1024 < 2;
console.log(isJPG)
console.log(isJPG);
if (!isJPG) {
this.$message.error('上传头像图片只能是 JPG 格式!');
}
......@@ -610,10 +592,10 @@ export default {
position: relative;
height: 100%;
width: 100%;
.loginbox{
.loginbox {
margin-bottom: 24px;
.logionhead {
border-bottom: 1px solid #F0F0F0;
border-bottom: 1px solid #f0f0f0;
text-align: center;
margin-bottom: 32px;
.title {
......@@ -625,14 +607,14 @@ export default {
cursor: pointer;
}
.title.on {
color: #0081FF;
color: #0081ff;
position: relative;
}
.title.on::after {
content: ' ';
content: " ";
width: 42px;
height: 3px;
background: #0081FF;
background: #0081ff;
border-radius: 1px 1px 1px 1px;
position: absolute;
bottom: 0;
......@@ -641,17 +623,17 @@ export default {
}
}
}
.loginzc{
.loginzc {
font-size: 12px;
margin-top: 24px;
display: flex;
justify-content: space-between;
padding: 0 52px 32px;
>p{
> p {
line-height: 20px;
color: #999999;
cursor: pointer;
>span{
> span {
cursor: pointer;
color: #0081ff;
}
......@@ -661,7 +643,7 @@ export default {
position: absolute;
width: 100vw;
height: 75px;
background: #FFFFFF;
background: #ffffff;
}
.login-video {
......@@ -700,12 +682,12 @@ export default {
.login {
width: 426px;
/*height: 451px;*/
background: #FFFFFF;
background: #ffffff;
border-radius: 8px;
opacity: 1;
position: absolute;
top: 50%;
transform: translate(0,-50%);
transform: translate(0, -50%);
right: 61px;
.logintop {
position: absolute;
......@@ -716,7 +698,7 @@ export default {
> h3 {
font-size: 24px;
font-weight: bold;
color: #0081FF;
color: #0081ff;
text-align: center;
margin-top: 60px;
margin-bottom: 40px;
......@@ -731,7 +713,7 @@ export default {
width: 100%;
height: 48px;
border-radius: 8px;
border: 1px solid #E3E3E3;
border: 1px solid #e3e3e3;
text-indent: 16px;
outline: none;
font-size: 14px;
......@@ -754,12 +736,12 @@ export default {
text-align: center;
color: #0081ff;
font-size: 14px;
border-left: 1px solid #D8D8D8;
border-left: 1px solid #d8d8d8;
}
}
input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
color: #9E9E9E;
color: #9e9e9e;
}
.small {
......@@ -770,10 +752,10 @@ export default {
float: right;
width: 131px;
height: 46px;
background: #FFFFFF;
background: #ffffff;
border-radius: 8px;
border: 1px solid #F1F1F1;
>img{
border: 1px solid #f1f1f1;
> img {
width: 100%;
height: 100%;
}
......@@ -783,14 +765,14 @@ export default {
.loginin {
width: 340px;
height: 48px;
background: #0081FF;
background: #0081ff;
border-radius: 4px;
margin: 0 auto;
line-height: 48px;
font-size: 16px;
font-family: Microsoft YaHei-Bold, Microsoft YaHei;
font-weight: bold;
color: #FFFFFF;
color: #ffffff;
text-align: center;
}
......@@ -820,14 +802,14 @@ export default {
.el-steps {
padding: 0;
background: #FFFFFF;
background: #ffffff;
margin-left: -8px;
.el-step__title {
width: 226px;
max-width: 226px;
padding: 8px 0 8px 16px;
background: #F2F2F2;
background: #f2f2f2;
height: 18px;
font-size: 14px;
font-weight: 400;
......@@ -837,12 +819,13 @@ export default {
.el-step__title.is-finish {
font-weight: bold;
color: #FFFFFF;
background: #0081FF;
color: #ffffff;
background: #0081ff;
}
.el-step__title::before, .el-step__title::after {
content: '';
.el-step__title::before,
.el-step__title::after {
content: "";
display: block;
position: absolute;
top: 0;
......@@ -853,27 +836,27 @@ export default {
.el-step__title::before {
left: 0;
border-top: 17px solid transparent;
border-left: 8px solid #FFFFFF;
border-left: 8px solid #ffffff;
border-bottom: 17px solid transparent;
z-index: 9;
}
.el-step__title::after {
right: -8px;
border-top: 17px solid transparent;
border-left: 8px solid #F2F2F2;
border-left: 8px solid #f2f2f2;
border-bottom: 17px solid transparent;
}
.el-step__title.is-finish::after {
right: -8px;
border-top: 17px solid transparent;
border-left: 8px solid #0081FF;
border-left: 8px solid #0081ff;
border-bottom: 17px solid transparent;
}
.el-step:first-child .el-step__title::before, .el-step:last-child .el-step__title::after {
.el-step:first-child .el-step__title::before,
.el-step:last-child .el-step__title::after {
display: none;
}
......@@ -905,7 +888,7 @@ export default {
right: 16px;
padding: 0;
padding-left: 16px;
border-left: 1px solid #D8D8D8;
border-left: 1px solid #d8d8d8;
margin: 12px 0;
}
}
......@@ -937,7 +920,7 @@ export default {
position: relative;
width: 100vw;
height: 1px;
background: #EEEEEE;
background: #eeeeee;
}
.checkBtn {
......@@ -951,13 +934,12 @@ export default {
width: 345px;
height: 18px;
font-size: 14px;
color: #9E9E9E;
color: #9e9e9e;
line-height: 18px;
margin: auto;
}
.company-detail {
.el-input {
width: 240px;
}
......@@ -974,10 +956,10 @@ export default {
.el-form-item__content {
width: 287px;
height: 176px;
background: #F4F4F4;
background: #f4f4f4;
border-radius: 8px 8px 8px 8px;
opacity: 1;
border: 1px solid #DCDCDC;
border: 1px solid #dcdcdc;
margin-left: 0 !important;
.avatar-uploader {
......@@ -1011,7 +993,7 @@ export default {
.el-upload__tip {
height: 18px;
font-size: 14px;
color: #9E9E9E;
color: #9e9e9e;
line-height: 18px;
margin-left: 7px;
margin-top: 16px;
......@@ -1078,7 +1060,7 @@ export default {
overflow-y: auto;
padding: 16px 16px 3px;
margin: 10px 16px 0;
background: #F9F9F9;
background: #f9f9f9;
}
.el-dialog__footer {
......
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import "@/router/permission";
Vue.use(ElementUI);
Vue.config.productionTip = false
Vue.config.productionTip = false;
new Vue({
router,
store,
render: h => h(App)
}).$mount('#app')
}).$mount('#app');
......@@ -3,21 +3,24 @@ import VueRouter from 'vue-router';
Vue.use(VueRouter);
const routes = [
];
//replace报错
const originalReplace = VueRouter.prototype.replace;
VueRouter.prototype.replace = function replace(location) {
return originalReplace.call(this, location).catch(err => err);
};
//push报错
const originalPush = VueRouter.prototype.push;
VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err);
};
const router = new VueRouter({
mode: 'history',
base: process.env.BASE_URL,
routes: [
const routes = [
{
path: '/',
redirect: '/login',
},
{
path: '/login',
// redirect: '/login',
name: 'login',
component: () => import('@/login'),
meta: {
......@@ -25,7 +28,36 @@ const router = new VueRouter({
needToken: false
}
},
{
path: '/home',
redirect : "/home/index",
name: 'Home',
component: () => import(/* webpackChunkName: "Home" */"@/home"),
meta: {
title: "首页",
needToken: true
},
children: [
{
path: '/home/index',
name: 'HomeIndex',
component: () => import(/* webpackChunkName: "Home" */"@/views/certificationManagement"),
meta: {
title: "认证管理",
needToken: true,
show: true
},
}
]
},
];
const router = new VueRouter({
mode: 'history',
base: process.env.BASE_URL,
routes
});
export default router;
export { routes };
......@@ -20,7 +20,7 @@ router.beforeEach((to, from, next) => {
// 跳转拉取用户基本信息
if (!store.state.user.userInfo?.userId) {
store.dispatch("user/getUserInfo").then(() => {
next();
next({path : "/home"});
})
.catch(err => {
Message.error(err.msg || "获取用户信息失败!");
......
......@@ -21,7 +21,7 @@ const actions = {
* @param {Object} payload 参数
* @param {Function} commit 提交同步处理数据
*/
userLogin(payload, { commit }) {
userLogin({ commit },payload) {
return new Promise((resolve, reject) => {
// 登录api调用
......@@ -43,7 +43,7 @@ const actions = {
* @param {Object} payload 参数
* @param {Function} commit 提交同步处理数据
*/
getUserInfo(payload, { commit }) {
getUserInfo({ commit },payload) {
return new Promise((resolve, reject) => {
// 用户信息api调用
......
......@@ -9,7 +9,7 @@ const getToken = () => {
const setToken = (token) => {
try {
if (token) {
localStorage.setItem("userToken", toekn);
localStorage.setItem("userToken", token);
}
} catch (error) {
console.log(error);
......
<template>
<div class="about">
<h1>This is an about page</h1>
</div>
</template>
<template>
<div class="home">
<img alt="Vue logo" src="../assets/logo.png">
<HelloWorld msg="Welcome to Your Vue.js App"/>
</div>
</template>
<script>
// @ is an alias to /src
import HelloWorld from '@/components/HelloWorld.vue'
export default {
name: 'HomeView',
components: {
HelloWorld
}
}
</script>
<template>
<div class="certification-management">
<el-form :model="form" ref="form" :rules="rules" disabled class="certification-form" label-width="160px" :show-message="false">
<div class="registry-info">
<div class="title">
注册信息
</div>
<div class="content">
<div class="inner">
<el-form-item label="账号:" prop="phone">
<el-input v-model="form.phone"></el-input>
</el-form-item>
<el-form-item label="手机号码:" prop="phone">
<el-input v-model="form.phone"></el-input>
</el-form-item>
<el-form-item label="姓名:" prop="userName">
<el-input v-model="form.userName"></el-input>
</el-form-item>
<el-form-item label="性别:" prop="sex">
<el-radio v-model="form.sex" label="0"></el-radio>
<el-radio v-model="form.sex" label="1"></el-radio>
</el-form-item>
<el-form-item label="邮箱:" prop="email" style="margin:0px">
<el-input v-model="form.email"></el-input>
</el-form-item>
</div>
</div>
</div>
<div class="authentication-info">
<div class="title">
认证信息
</div>
<div class="content">
<div class="inner">
<el-form-item label="公司名称:" prop="companyName">
<el-input v-model="form.companyName"></el-input>
</el-form-item>
<el-form-item label="统一社会信用代码:" prop="creditCode">
<el-input v-model="form.creditCode"></el-input>
</el-form-item>
<el-form-item label="法定代表人:" prop="legalPerson">
<el-input v-model="form.legalPerson"></el-input>
</el-form-item>
<el-form-item label="注册资本:" prop="registeredCapital" class="registered-capital">
<el-input v-model="form.registeredCapital"></el-input>
<span>万元</span>
</el-form-item>
<el-form-item label="成立日期:" prop="registeredDate">
<el-input v-model="form.registeredDate"></el-input>
</el-form-item>
<el-form-item label="企业注册地:" prop="registeredAddress">
<el-input v-model="form.registeredAddress"></el-input>
</el-form-item>
<el-form-item label="企业注册地:" prop="addressDetail" style="width:100%">
<el-input v-model="form.addressDetail"></el-input>
</el-form-item>
<el-form-item label="营业执照扫描件:" prop="licenseUrl">
<img v-if="form.licenseUrl" :src="form.licenseUrl" alt="">
</el-form-item>
<el-form-item label="法人代表身份证扫描件:" prop="cardUrl">
<img v-if="form.licenseUrl" :src="form.cardUrl" alt="">
</el-form-item>
<el-form-item label="供应商类型选择:" prop="catId">
<el-cascader v-model="form.catId" :options="options" disabled placeholder=""></el-cascader>
</el-form-item>
</div>
</div>
</div>
</el-form>
</div>
</template>
<script>
import { getAuthenticationDetailApi, getSupplierTypeApi } from "@/api/authentication";
import { mapState } from "vuex";
export default {
name: "certificationManagement",
data() {
return {
form: {
account: "",
userName: "",
sex: "",
email: "",
companyName: "",
creditCode: "",
legalPerson: "",
registeredCapital: "",
registeredDate: "",
addressDetail: "",
registeredAddress: "",
licenseUrl: "",
cardUrl: "",
catId: "",
},
rules: {
"account": [{ required: true }],
"userName": [{ required: true }],
"sex": [{ required: true }],
"email": [{ required: true }],
"companyName": [{ required: true }],
"creditCode": [{ required: true }],
"legalPerson": [{ required: true }],
"registeredCapital": [{ required: true }],
"registeredDate": [{ required: true }],
"addressDetail": [{ required: true }],
"registeredAddress": [{ required: true }],
"licenseUrl": [{ required: true }],
"cardUrl": [{ required: true }],
"catId": [{ required: true }],
},
options: [],
props: {
emitPath: false,
value : "catId",
label : "name"
}
};
},
//可访问data属性
created() {
this.getDetail();
},
//计算集
computed: {
...mapState("user", {
userInfo: state => state.userInfo
})
},
//方法集
methods: {
async getDetail() {
try {
let type = await getSupplierTypeApi();
if (type) {
this.options = type?.data;
}
let res = await getAuthenticationDetailApi();
if (res) {
this.form = { ...this.form, ...this.userInfo, ...res.data };
}
} catch (error) {
console.log(error);
}
}
},
}
</script>
<style lang="scss" scoped>
.certification-management {
width: 100%;
height: 100%;
.certification-form {
// 注册信息
.authentication-info,
.registry-info {
.title {
color: #0081ff;
font-size: 14px;
font-weight: bold;
height: 40px;
line-height: 40px;
padding: 0px 16px;
box-sizing: border-box;
border: 1px solid #eeeeee;
}
.content {
border: 1px solid #eeeeee;
border-top: none;
display: flex;
justify-content: center;
padding: 16px;
box-sizing: border-box;
.inner {
width: 80%;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
::v-deep .el-form-item {
display: flex;
width: 45%;
.el-form-item__label {
white-space: nowrap;
min-width: 160px;
}
.el-form-item__content {
flex: 1;
margin: 0px !important;
img {
width: 100%;
max-height: 200px;
}
}
}
}
}
}
// 认证信息
.authentication-info {
.title {
border-top: none;
}
.registered-capital {
::v-deep .el-form-item__content {
& > span {
position: absolute;
right: 0;
height: 100%;
background: #aaaaaa;
width: 20%;
text-align: center;
}
.el-input__inner {
padding-right: 20%;
}
}
}
}
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment