|
|
@@ -41,19 +41,45 @@
|
|
|
<div class="head-box">
|
|
|
<div v-for="(item, index) in AdList" :key="index" class="head-item" @click="onPath('/plan?id=' + item.id)">
|
|
|
<img :src="item.imageUrl" alt="" />
|
|
|
- <!-- <div class="head-title">
|
|
|
- <div class="head1">{{ item.title }}</div>
|
|
|
- <div class="head2 flex-row-center">
|
|
|
- <div>查看方案</div>
|
|
|
- <el-icon><ArrowRight /></el-icon>
|
|
|
- </div>
|
|
|
- </div> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 右边 -->
|
|
|
<div class="head-right">
|
|
|
- <div class="login-bos">
|
|
|
+ <div v-if="userInfo.userId" class="order-bos flex-column-between">
|
|
|
+ <div class="flex-row-start">
|
|
|
+ <img src="@/assets/images/logo2.png" alt="" />
|
|
|
+ <div class="ellipsis">{{ userInfo.nickName }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="flex-row-start">
|
|
|
+ <div class="flex-1 flex-column-center">
|
|
|
+ <div>待付款</div>
|
|
|
+ <div class="order-num">{{ countData.pendingPaymentCount }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="flex-1 flex-column-center">
|
|
|
+ <div>待发货</div>
|
|
|
+ <div class="order-num">{{ countData.pendingShipmentCount }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="flex-1 flex-column-center">
|
|
|
+ <div>待收货</div>
|
|
|
+ <div class="order-num">{{ countData.pendingReceiptCount }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="login-bos" v-else>
|
|
|
+ <div class="login-box">
|
|
|
+ <img src="@/assets/images/logo2.png" alt="" />
|
|
|
+ <div>
|
|
|
+ <div class="login1">您好,欢迎来到优易达</div>
|
|
|
+ <div class="login2">请先登录</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="loginBtn-bos flex-row-center">
|
|
|
+ <div @click="onPath('/login')" class="login-bnt1 flex-row-center">登录</div>
|
|
|
+ <div @click="onPath('/breg')" class="login-bnt2 flex-row-center">注册</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- <div class="login-bos">
|
|
|
<div class="login-box">
|
|
|
<img :src="userInfo.avatar ? userInfo.avatar : profile" alt="" />
|
|
|
<div>
|
|
|
@@ -63,19 +89,18 @@
|
|
|
</div>
|
|
|
<div class="login-btn">
|
|
|
<el-button v-if="!userInfo.nickName" type="primary" round size="small" style="width: 64px" @click="onPath('/login')">登录</el-button>
|
|
|
- <!-- @click="onPath('/reg')" -->
|
|
|
<el-button v-if="!userInfo.nickName" type="primary" plain round size="small" style="width: 64px">注册</el-button>
|
|
|
<el-button v-if="userInfo.nickName" type="primary" plain round size="small" style="width: 64px" @click="onlogout()">退出</el-button>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
<div class="real-time">
|
|
|
<div class="real-title flex-row-between">
|
|
|
<div class="real1">优易资讯</div>
|
|
|
<div class="real2 flex-row-start">
|
|
|
- <div>更多</div>
|
|
|
+ <!-- <div>更多</div>
|
|
|
<el-icon :size="13" color="#83899F">
|
|
|
<ArrowRight />
|
|
|
- </el-icon>
|
|
|
+ </el-icon> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
<template v-for="(item, index) in realList" :key="index">
|
|
|
@@ -145,7 +170,7 @@
|
|
|
<span class="title1">{{ bigbrandTitle.title }}</span>
|
|
|
<span class="title2">{{ bigbrandTitle.subtitle }}</span>
|
|
|
</div>
|
|
|
- <div class="title-more flex-row-start">
|
|
|
+ <div class="title-more flex-row-start" @click="onPath(hotTitle.linkUrl ? hotTitle.linkUrl : '/search/brand')">
|
|
|
<div style="margin-right: 5px">{{ bigbrandTitle.linkWord }}</div>
|
|
|
<el-icon :size="13" color="#83899F">
|
|
|
<ArrowRight />
|
|
|
@@ -349,8 +374,10 @@ import {
|
|
|
getClassificationFloorLabel,
|
|
|
getClassificationFloorDetail2,
|
|
|
getProjectCaseTitle,
|
|
|
- getProjectCaseList
|
|
|
+ getProjectCaseList,
|
|
|
+ countOrder
|
|
|
} from '@/api/home/index';
|
|
|
+import Cookies from 'js-cookie';
|
|
|
|
|
|
const userInfo = ref<any>({});
|
|
|
const classifyList = ref<any>([]);
|
|
|
@@ -366,16 +393,16 @@ const hotList = ref<any>([]);
|
|
|
const sceneTitle = ref<any>('');
|
|
|
const sceneList = ref<any>([]);
|
|
|
const expertTitle = ref<any>('');
|
|
|
-const expertList = ref<any>([{}, {}, {}, {}, {}]);
|
|
|
+const expertList = ref<any>([]);
|
|
|
const procureTitle = ref<any>('');
|
|
|
-const procureList = ref<any>([{}, {}, {}, {}, {}]);
|
|
|
+const procureList = ref<any>([]);
|
|
|
const projectTitle = ref<any>('');
|
|
|
-const projectList = ref<any>([{}, {}, {}, {}, {}]);
|
|
|
+const projectList = ref<any>([]);
|
|
|
|
|
|
const bigbrandTitle = ref<any>('');
|
|
|
const bigbrandList = ref<any>([]);
|
|
|
const bigbrandOne = ref<any>({});
|
|
|
-
|
|
|
+const countData = ref<any>({});
|
|
|
const homeList = ref<any>([]);
|
|
|
const router = useRouter();
|
|
|
|
|
|
@@ -385,10 +412,17 @@ getPlatformIndexDiyPcPage({}).then((res) => {
|
|
|
});
|
|
|
|
|
|
onMounted(() => {
|
|
|
- if (getToken()) {
|
|
|
+ const token = Cookies.get('Authorization');
|
|
|
+ if (token) {
|
|
|
getInfo().then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
userInfo.value = res.data.user;
|
|
|
+
|
|
|
+ countOrder({}).then((res1) => {
|
|
|
+ if (res1.code == 200) {
|
|
|
+ countData.value = res1.data;
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
@@ -724,21 +758,21 @@ const onlogout = () => {
|
|
|
|
|
|
// 头部中间
|
|
|
.head-bos {
|
|
|
- width: 756px;
|
|
|
+ flex: 1;
|
|
|
|
|
|
.carousel {
|
|
|
- width: 756px;
|
|
|
+ width: 100%;
|
|
|
height: 407px;
|
|
|
background: #ffffff;
|
|
|
|
|
|
img {
|
|
|
- width: 756px;
|
|
|
+ width: 100%;
|
|
|
height: 407px;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
.head-box {
|
|
|
- width: 756px;
|
|
|
+ width: 100%;
|
|
|
height: 122px;
|
|
|
margin-top: 10px;
|
|
|
display: flex;
|
|
|
@@ -787,8 +821,7 @@ const onlogout = () => {
|
|
|
|
|
|
//右边
|
|
|
.head-right {
|
|
|
- flex: 1;
|
|
|
- width: 0;
|
|
|
+ width: 230px;
|
|
|
height: 540px;
|
|
|
background: #ffffff;
|
|
|
display: flex;
|
|
|
@@ -815,10 +848,6 @@ const onlogout = () => {
|
|
|
border-radius: 40px;
|
|
|
}
|
|
|
|
|
|
- .login-btn {
|
|
|
- width: 100%;
|
|
|
- }
|
|
|
-
|
|
|
.login1 {
|
|
|
font-size: 13px;
|
|
|
color: #444444;
|
|
|
@@ -830,6 +859,87 @@ const onlogout = () => {
|
|
|
color: #6a7282;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ .loginBtn-bos {
|
|
|
+ width: 100%;
|
|
|
+
|
|
|
+ .login-bnt1 {
|
|
|
+ width: 64px;
|
|
|
+ height: 24px;
|
|
|
+ background-color: #e7000b;
|
|
|
+ color: #ffffff;
|
|
|
+ border-radius: 24px;
|
|
|
+ font-size: 12px;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+
|
|
|
+ .login-bnt2 {
|
|
|
+ width: 64px;
|
|
|
+ height: 24px;
|
|
|
+ border: 1px solid #e7000b;
|
|
|
+ color: #e7000b;
|
|
|
+ border-radius: 24px;
|
|
|
+ font-size: 12px;
|
|
|
+ margin-left: 10px;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // .login-bos {
|
|
|
+ // width: calc(100% - 20px);
|
|
|
+ // height: 110px;
|
|
|
+ // border-bottom: 1px solid #e5e7eb;
|
|
|
+ // margin: 0 10px;
|
|
|
+ // display: flex;
|
|
|
+ // flex-direction: column;
|
|
|
+ // justify-content: space-between;
|
|
|
+ // padding: 16px 0;
|
|
|
+
|
|
|
+ // .login-box {
|
|
|
+ // display: flex;
|
|
|
+ // align-items: center;
|
|
|
+
|
|
|
+ // img {
|
|
|
+ // width: 40px;
|
|
|
+ // height: 40px;
|
|
|
+ // margin-right: 8px;
|
|
|
+ // border-radius: 40px;
|
|
|
+ // }
|
|
|
+
|
|
|
+ // .login-btn {
|
|
|
+ // width: 100%;
|
|
|
+ // }
|
|
|
+
|
|
|
+ // .login1 {
|
|
|
+ // font-size: 13px;
|
|
|
+ // color: #444444;
|
|
|
+ // }
|
|
|
+
|
|
|
+ // .login2 {
|
|
|
+ // margin-top: 2px;
|
|
|
+ // font-size: 12px;
|
|
|
+ // color: #6a7282;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+
|
|
|
+ .order-bos {
|
|
|
+ width: calc(100% - 20px);
|
|
|
+ height: 110px;
|
|
|
+ font-size: 14px;
|
|
|
+ padding: 16px 0;
|
|
|
+ border-bottom: 1px solid #e5e7eb;
|
|
|
+ margin: 0 10px;
|
|
|
+ img {
|
|
|
+ width: 28px;
|
|
|
+ height: 28px;
|
|
|
+ }
|
|
|
+ .order-num {
|
|
|
+ color: #e7000b;
|
|
|
+ font-size: 14px;
|
|
|
+ margin-top: 2px;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.real-time {
|
|
|
@@ -869,7 +979,7 @@ const onlogout = () => {
|
|
|
|
|
|
.real-list {
|
|
|
width: 100%;
|
|
|
- font-size: 14px;
|
|
|
+ font-size: 12px;
|
|
|
color: #1d2129;
|
|
|
margin-bottom: 12px;
|
|
|
cursor: pointer;
|