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

周五

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