Commit 67cce7f2 authored by 吴冠's avatar 吴冠

周五

parent effe99de
...@@ -120,7 +120,7 @@ export function getListContent(params){ ...@@ -120,7 +120,7 @@ export function getListContent(params){
return request({ return request({
url:"/news/list-content", url:"/news/list-content",
method:'get', method:'get',
params:params params
}) })
} }
//分类列表 //分类列表
...@@ -166,3 +166,10 @@ export function getLoopPic(params){ ...@@ -166,3 +166,10 @@ export function getLoopPic(params){
params:params params:params
}) })
} }
//二次验证
export function getSecond(){
return request({
url:'/sys/user/userInfo',
method:'get',
})
}
\ No newline at end of file
...@@ -8,10 +8,10 @@ ...@@ -8,10 +8,10 @@
<nuxt-link to="/" class="head-title t1">首页</nuxt-link> <nuxt-link to="/" class="head-title t1">首页</nuxt-link>
</div> </div>
<div class="welcome t1"> <div class="welcome t1">
<span>欢迎来到捷安采,请 </span> <span>欢迎 {{userName}}</span>
<nuxt-link to="/login/user" class="login">登录</nuxt-link> <nuxt-link to="/login/user" class="login" v-show="isshow">登录</nuxt-link>
<span>商家免费入住</span> <span>商家免费入住</span>
<span @click="jump">跳转后台</span> <span @click="jump" v-show="!isshow">跳转后台</span>
</div> </div>
</div> </div>
<div class="flex-item t1 collection"> <div class="flex-item t1 collection">
...@@ -21,15 +21,23 @@ ...@@ -21,15 +21,23 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
/*接受user传值
import User from '@/login/user.vue
@header= "receiveH"
receive(data){
this.isshow = data.changeStatus
}
*/
data() { data() {
return { return {
input: '' input: '',
userName:'来到捷安采',
isshow: true
} }
}, },
methods: { methods: {
......
...@@ -4,17 +4,16 @@ ...@@ -4,17 +4,16 @@
<div class="banner"> <div class="banner">
<el-carousel trigger="click" height="5.41rem"> <el-carousel trigger="click" height="5.41rem">
<el-carousel-item v-for="(item,index) in picArr" :key="index"> <el-carousel-item v-for="(item,index) in picArr" :key="index">
<!-- <img class="small" :src = "item.picUrl"/> -->
<img :src="item.picUrl" alt=""> <img :src="item.picUrl" alt="">
</el-carousel-item> </el-carousel-item>
</el-carousel> </el-carousel>
</div> </div>
<div class="login" @mouseover="changeActive" @mouseout="remActive"> <div class="login" @mouseover="changeOver" >
<div class="author"></div> <div class="author"></div>
<div class="login-title">Hi~欢迎来到</div> <div class="login-title">{{userName}}</div>
<div class="login-button">用户登录</div> <div class="login-button" @click="loginuser" v-show="showDefault">用户登录</div>
<div class="login-button">商家入驻</div> <div class="login-button">商家入驻</div>
<div class="login-button" v-if="isshow">退出</div> <div class="login-button" v-if="!showDefault">退出</div>
</div> </div>
</div> </div>
<div class="content message"> <div class="content message">
...@@ -58,22 +57,34 @@ import {getLoopPic} from '@/common/list.js' ...@@ -58,22 +57,34 @@ import {getLoopPic} from '@/common/list.js'
this.getLoopPic() this.getLoopPic()
}, },
methods:{ methods:{
loginuser(){
this.$router.push("/login/user")
},
async getLoopPic(){ async getLoopPic(){
let message = {} let message = {}
message.status =1 message.status =1
const {data} = await getLoopPic(message) const {data} = await getLoopPic(message)
this.picArr = data this.picArr = data
}, },
changeActive(){ //移入显示退出按钮
changeOver(){
this.isshow = true this.isshow = true
}, },
remActive(){
this.isshow = false /*接受user传值
import User from '@/login/user.vue
@index= "receiveI"
receiveI(data){
this.showDefault = data.changeStatus
this.userName = data.user
} }
*/
}, },
data() { data() {
return { return {
isshow:false, showDefault:true,
userName:'Hi~欢迎来到捷安彩',
userHeader: '',
picList:[], picList:[],
picArr:[], picArr:[],
messageList: [{ messageList: [{
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class='sidebar'> <div class='sidebar'>
<div class="sidebar-title">信息公告</div> <div class="sidebar-title">信息公告</div>
<el-col :span="12"> <el-col :span="12">
<el-menu :default-active="activeIndex" class="el-menu-vertical-demo" v-for="item in artList" :key="item.id" @select="handleSelect" <el-menu :default-active="activeName" class="el-menu-vertical-demo" v-for="item in artList" :key="item.id" @select="handleSelect"
router > router >
<el-menu-item :index="`?id=${item.id}`"> <el-menu-item :index="`?id=${item.id}`">
<i class="el-icon-menu"></i> <i class="el-icon-menu"></i>
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</div> </div>
<ul v-if="isList"> <ul v-if="isList">
<li v-for="item in messageList" :key="item.id" @click="urlChage"> <li v-for="item in messageList" :key="item.id" @click="urlChage">
<nuxt-link :to="`/messsage/news/newsdetails?id=${item.id}`" class="flex-between"> <nuxt-link :to="`/messsage/newsdetails?id=${item.id}`" :messageContext="item" class="flex-between">
<div class="t2">{{item.title}}</div> <div class="t2">{{item.title}}</div>
<div class="t1">发布时间:{{item.createTime}}</div> <div class="t1">发布时间:{{item.createTime}}</div>
</nuxt-link> </nuxt-link>
...@@ -30,10 +30,10 @@ ...@@ -30,10 +30,10 @@
:total="total"> :total="total">
</el-pagination style="postion:relative;transform:translateX(-50%)"> </el-pagination style="postion:relative;transform:translateX(-50%)">
</div> </div>
<div v-for="item in contentList" :key="item.id" class="content" v-if="!isList"> <div v-for="item in messageList" :key="item.id" class="content" v-if="!isList">
<h1>{{item.title}}</h1> <h1>{{item.title}}</h1>
<div class="flex"> <div class="flex">
<span>发布时间:{{createTime}}</span> <span>发布时间:{{item.createTime}}</span>
<span>作者:{{item.author}}</span> <span>作者:{{item.author}}</span>
</div> </div>
<div>{{item.content}}</div> <div>{{item.content}}</div>
...@@ -63,6 +63,7 @@ import { ...@@ -63,6 +63,7 @@ import {
artId:0, artId:0,
artList:[], artList:[],
currentPage:1, currentPage:1,
messageContext:'',
messageList: [{ messageList: [{
title: "工程招投标活动的突出问题与对策思路", title: "工程招投标活动的突出问题与对策思路",
time: "2020-09-09 18:12" time: "2020-09-09 18:12"
...@@ -80,8 +81,8 @@ import { ...@@ -80,8 +81,8 @@ import {
}, },
created(){ created(){
let message = {} let message = {}
message.currentPage = 10 message.currentPage = 1
message.size = 1 message.size = 10
this.getListContent(message) this.getListContent(message)
this.getCategoryList() this.getCategoryList()
}, },
...@@ -104,9 +105,10 @@ import { ...@@ -104,9 +105,10 @@ import {
}, },
//文章列表 //文章列表
async getListContent(params){ async getListContent(params){
const {data,title} = await getListContent(params) const {data} = await getListContent(params)
console.log(data)
this.messageList = data this.messageList = data
this.contentList = data // this.contentList = data
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.getListContent(this.currentPage,val) this.getListContent(this.currentPage,val)
......
<template> <template>
<div> <div>
xxxxxxxxxxxxx
</div> </div>
</template> </template>
......
...@@ -200,7 +200,7 @@ export default { ...@@ -200,7 +200,7 @@ export default {
this.getData = '' this.getData = ''
}, },
async getInquiryList(params) { async getInquiryList(params) {
const { data, total,} = await getInquiryList(params); const { data, total} = await getInquiryList(params);
console.log(data); console.log(data);
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
if (data[i].auditStatus === 0) { if (data[i].auditStatus === 0) {
......
...@@ -631,6 +631,7 @@ ...@@ -631,6 +631,7 @@
} }
let message={} let message={}
message.phone=this.adminform.phonenumber; message.phone=this.adminform.phonenumber;
message.type = 1
const { const {
msg, msg,
code code
......
...@@ -58,9 +58,14 @@ ...@@ -58,9 +58,14 @@
<script> <script>
import {powerLogin} from '~/api/bid/login'; import {powerLogin} from '~/api/bid/login';
import {getSecond} from '@/common/list.js'
export default { export default {
data: function() { data: function() {
return { return {
change:{
changeStatus:false,
user:''
},
changemessage: "手机验证码登录", changemessage: "手机验证码登录",
message: "密码登录", message: "密码登录",
type: "0", type: "0",
...@@ -101,9 +106,12 @@ ...@@ -101,9 +106,12 @@
}; };
}, },
created() { created() {
}, },
methods: { methods: {
/* await getSecond(){
const {data} = await getSecond()
console.log(data+'------------------------')
}, */
async submitForm() { async submitForm() {
try { try {
const valid = await this.$refs['param'].validate() const valid = await this.$refs['param'].validate()
...@@ -114,7 +122,16 @@ ...@@ -114,7 +122,16 @@
data data
} = await powerLogin(this.param) } = await powerLogin(this.param)
if (code == 200) { if (code == 200) {
localStorage.setItem("token",data) localStorage.setItem("token",data);
/* 逻辑 :向组件index、header传改变状态的值*/
/* if(code ===200){
const {data,userInfo} = await getSecond()
this.change.user = userInfo
console.log(data+'------------------------')
this.$emit("index",this.change)
this.$emit("header",this.changeStatus)
},
} */
this.$message({ this.$message({
message: msg, message: msg,
type: 'success', type: 'success',
......
...@@ -6,8 +6,7 @@ import axios from 'axios' ...@@ -6,8 +6,7 @@ import axios from 'axios'
// 创建axios实例 // 创建axios实例
const service = axios.create({ const service = axios.create({
baseURL: 'http://192.168.200.201:8082/apis', // api的base_url baseURL: 'http://192.168.200.201:8082/apis', // api的base_url
// baseURL: 'http://192.168.3.35:8085/apis', /* baseURL: 'http://192.168.3.35:8085/apis', */
// baseURL: 'http://192.168.3.35:8085/apis',
timeout: 35000 // 请求超时时间 timeout: 35000 // 请求超时时间
}) })
......
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