Commit 937f9a74 authored by 吴冠's avatar 吴冠

CA取消

parent bc7f9688
......@@ -123,6 +123,14 @@ export function getListContent(params){
params
})
}
//文章列表首页
export function getListSSS(params){
return request({
url:"/news/list-content",
method:'get',
params:params
})
}
//分类列表
export function getCategoryList(){
return request({
......
......@@ -26,13 +26,14 @@
<script>
export default {
created(){
},
mounted(){
let tokenStr = window.localStorage.getItem("token")
if(!tokenStr){
console.log('1111')
}else{
if(tokenStr){
this.showDefault = false
this.userName = window.localStorage.getItem("userInfo")
this.userName = window.localStorage.getItem("companyName")
}
},
data() {
......@@ -53,6 +54,9 @@
let token=localStorage.getItem("token")
window.location.href=`http://192.168.200.201:8082/purchaser/Home?token=${token}`
// window.location.href=`http://localhost:8080/purchaser/Home?token=${token}`
},
getUserName(){
return window.localStorage.getItem("companyName");
}
},
......
......@@ -28,15 +28,15 @@
</div>
</div>
<div class="content flex-between">
<div v-for="(item,index) in dynamicList" :key="index" class="dynamic-item">
<div v-for="(item,index) in dynamicList" :key="index" v-if="index<3" class="dynamic-item">
<div class="flex-between">
<div class="t3">{{item.title}}</div>
<div class="more t1">更多 ></div>
<div class="more t1 list-con" >更多 ></div>
</div>
<ul>
<li v-for="(item,index) in item.list" :key="index" class="flex-between">
<nuxt-link tag="div" to="/about">{{item}}</nuxt-link>
<div class="time">07-08</div>
<li v-for="(item,index) in dynamicList.list" :key="index" v-if="index<5" class="flex-between list-con">
<nuxt-link tag="div" to="#">{{item.title}}</nuxt-link>
<div class="time">{{item.createTime.slice(5,10)}}</div>
</li>
</ul>
</div>
......@@ -54,21 +54,46 @@
<script>
import {getLoopPic} from '@/common/list.js'
import {getSecond} from '@/common/list.js'
import {getSecond,getCategoryList,getListSSS} from '@/common/list.js'
export default {
/* computed:{
//取出特定的三项值
dynamicList(){
return this.dynamicList.slice(3,3)
}
}, */
created(){
this.getLoopPic()
this.getSecond()
//文章列表
this.getCategoryList()
this.getListSSS()
},
methods:{
async getCategoryList(){
const {data} = await getCategoryList()
this.dynamicList = data
console.log(data,'-------------')
},
async getListSSS(){
let message = {}
message.cateId = this.id
const {data} = await getListSSS(message)
console.log(data,'++++++++++++++++++++++++')
this.dynamicList.list = data
},
//添加验证方法
async getSecond(){
let tokenStr = window.localStorage.getItem('token')
if(tokenStr){
this.showDefault = false
const {data:res} = await getSecond()
console.log(res)
window.localStorage.setItem("companyName",res.companyName)
const {data,code} = await getSecond()
//code为401,失效 清空并返回至登录页
if(code ==401){
window.localStorage.clear()
this.$router.push("/login/user")
}
window.localStorage.setItem("companyName",data.companyName)
this.userName = window.localStorage.getItem("companyName")
}
/* const {data} = await getSecond()
......@@ -95,6 +120,7 @@ import {getSecond} from '@/common/list.js'
},
data() {
return {
dyname:[],
showDefault:true,
userName:'Hi~欢迎来到捷安彩',
userHeader: '',
......@@ -220,7 +246,7 @@ import {getSecond} from '@/common/list.js'
height: 2.78rem;
border: 1px solid rgba(151, 152, 153, 1);
box-sizing: border-box;
padding: 0.2rem
padding: 0.2rem;
}
.dynamic-item>div {
......@@ -260,4 +286,7 @@ import {getSecond} from '@/common/list.js'
.cooperation{
margin-bottom:1.21rem;
}
.list-con{
cursor: pointer;
}
</style>
......@@ -146,8 +146,7 @@ import {
.sidebar {
width: 2.4rem;
border: 1px solid rgba(219, 219, 219, 1);
position: absolute;
left:-193px;
position: relative;
}
.el-menu {
......
......@@ -2,8 +2,7 @@
<div class="user">
<div class="user-login">
<div class="login-type flex">
<div @click="change" :class='[type==0?"active":""]'>{{message}}</div>
<div @click="change" :class='[type==1?"active":""]' style="color:#000000">CA登录</div>
<div class="pos">{{message}}</div>
</div>
<div class="el-form">
<!-- 密码登录 -->
......@@ -20,17 +19,6 @@
<el-button type="primary" @click="submitForm()" style="width: 100%;">登录</el-button>
</div>
</el-form>
<!-- CA登录 -->
<el-form ref="ca" :model="ca" :rules="rules" class="ms-content" v-if="type==1">
<el-form-item prop="ca" style="width:3rem;height: 0.45rem;">
<el-select v-model="ca.type" placeholder="请选择CA">
<el-option label="USB" value="usb"></el-option>
</el-select>
</el-form-item>
<div class="login-btn">
<el-button type="primary" @click="submitForm()" style="width: 100%;">检测CA并登录</el-button>
</div>
</el-form>
<!-- 手机验证码验证 -->
<el-form ref="phone" :model="phone" :rules="rules" class="ms-content" v-if="type==2">
<el-form-item prop="phone" class="item">
......@@ -40,17 +28,17 @@
<el-form-item prop="phonecode" class="item">
<el-input v-model="phone.phonecode" placeholder="请输入短信验证码" style="width:1.8rem" maxlength="30"></el-input>
</el-form-item>
<div class="phonecode">获取短信验证码</div>
<div class="phonecode handle">获取短信验证码</div>
</div>
<div class="login-btn">
<el-button type="primary" @click="submitForm()" style="width: 100%;">登录</el-button>
</div>
</el-form>
<div class="login-font flex-between">
<div @click="forget">忘记密码</div>
<div @click="examine">我要注册</div>
<div @click="forget" class="handle">忘记密码</div>
<div @click="examine" class="handle">我要注册</div>
</div>
<div class="code-login" @click="changephone">{{changemessage}}</div>
<div class="code-login handle" @click="changephone">{{changemessage}}</div>
</div>
</div>
</div>
......@@ -58,9 +46,9 @@
<script>
import {powerLogin} from '~/api/bid/login';
import {getSecond} from '@/common/list.js'
import {getSecond} from '@/common/list.js';
export default {
data: function() {
data() {
return {
changemessage: "手机验证码登录",
message: "密码登录",
......@@ -70,9 +58,6 @@
account: "",
password: ""
},
ca: {
type: ""
},
phone: {
phone: "",
phonecode: ""
......@@ -169,6 +154,13 @@
</script>
<style scoped>
.handle{
cursor: pointer;
}
.pos{
position: absolute;
left:25%;
}
.getphonecode {
position: relative;
}
......
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