Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
web-site
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张冬
web-site
Commits
937f9a74
Commit
937f9a74
authored
Sep 21, 2020
by
吴冠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CA取消
parent
bc7f9688
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
70 additions
and
38 deletions
+70
-38
list.js
common/list.js
+8
-0
header.vue
components/header.vue
+8
-4
index.vue
pages/index/index.vue
+39
-10
news.vue
pages/index/message/news.vue
+1
-2
user.vue
pages/login/user.vue
+14
-22
No files found.
common/list.js
View file @
937f9a74
...
...
@@ -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
({
...
...
components/header.vue
View file @
937f9a74
...
...
@@ -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"
);
}
},
...
...
pages/index/index.vue
View file @
937f9a74
...
...
@@ -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-betwee
n"
>
<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-co
n"
>
<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
>
pages/index/message/news.vue
View file @
937f9a74
...
...
@@ -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
{
...
...
pages/login/user.vue
View file @
937f9a74
...
...
@@ -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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment