Commit 2ae63e68 by heshihao

feat: 修改项目适配

parent 2ba19b90
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -21,6 +21,7 @@
"pizzip": "^3.1.4",
"postcss-px2rem": "^0.3.0",
"px2rem-loader": "^0.1.9",
"v-scale-screen": "^2.2.0",
"vue": "^3.0.0",
"vue-router": "^4.0.0-0",
"vuex": "^4.0.0-0"
......
......@@ -4,10 +4,11 @@
<router-link to="/about">About</router-link>
</div>
<router-view/> -->
<router-view/>
</template>
<v-scale-screen width="1920" height="960">
<router-view />
</v-scale-screen>
</template>
<style lang="less">
#app {
......@@ -27,7 +28,6 @@
font-style: normal;
}
::-webkit-scrollbar {
width: 10px;
}
......
import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import Antd from 'ant-design-vue';
import './utils/rem'
import 'ant-design-vue/dist/antd.css';
import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import Antd from "ant-design-vue";
// import "./utils/rem";
import "ant-design-vue/dist/antd.css";
import VScaleScreen from "v-scale-screen";
createApp(App)
.use(store)
.use(Antd)
.use(router)
.mount('#app')
createApp(App).use(store).use(Antd).use(router).use(VScaleScreen).mount("#app");
......@@ -8,16 +8,8 @@
<!-- 搜索部分 -->
<div class="home_search">
<div class="search_tab">
<span
:class="[tab_id == '1' ? 'patent_active' : 'patent']"
@click="changetab('1')"
>查专利</span
>
<span
:class="[tab_id == '1' ? 'company' : 'company_active']"
@click="changetab('2')"
>查企业</span
>
<span :class="[tab_id == '1' ? 'patent_active' : 'patent']" @click="changetab('1')">查专利</span>
<span :class="[tab_id == '1' ? 'company' : 'company_active']" @click="changetab('2')">查企业</span>
</div>
<div class="search" v-if="tab_id == 1">
<a-input-search
......@@ -29,19 +21,11 @@
@focus="onFocus(tab_id)"
>
<template #enterButton>
<img
style="padding-right: 5px"
src="@/static/home/index/icon-search.png"
alt=""
/>搜索
<img style="padding-right: 5px" src="@/static/home/index/icon-search.png" alt="" />搜索
</template>
</a-input-search>
<div class="search_result" v-show="search_result_show">
<div
class="search_result_item"
v-for="(item, index) in search_result"
:key="item"
>
<div class="search_result_item" v-for="(item, index) in search_result" :key="item">
<div style="position: relative">
<div
v-if="patent_cate == 'title'"
......@@ -61,12 +45,8 @@
v-html="item.gkh"
@click="lenovnoPatentDetails(item)"
></div>
<a-tag class="cate" color="blue" v-if="patent_cate == 'title'"
>专利名称</a-tag
>
<a-tag class="cate" color="blue" v-else-if="patent_cate == 'fmr'"
>发明人</a-tag
>
<a-tag class="cate" color="blue" v-if="patent_cate == 'title'">专利名称</a-tag>
<a-tag class="cate" color="blue" v-else-if="patent_cate == 'fmr'">发明人</a-tag>
<a-tag class="cate" color="blue" v-else>专利号</a-tag>
</div>
</div>
......@@ -82,20 +62,12 @@
@focus="onFocus(tab_id)"
>
<template #enterButton>
<img
style="padding-right: 5px"
src="@/static/home/index/icon-search.png"
alt=""
/>搜索
<img style="padding-right: 5px" src="@/static/home/index/icon-search.png" alt="" />搜索
</template>
</a-input-search>
<!-- 联想搜索结果 -->
<div class="search_result" v-show="search_result_show">
<div
class="search_result_item"
v-for="(item, index) in search_result"
:key="item"
>
<div class="search_result_item" v-for="(item, index) in search_result" :key="item">
<div style="position: relative">
<div
v-if="company_cate == 'company_name'"
......@@ -109,12 +81,7 @@
v-html="item.company_name"
@click="lenovnoCompanyDetails(item)"
></div>
<a-tag
class="cate"
color="blue"
v-if="company_cate == 'company_name'"
>公司名称</a-tag
>
<a-tag class="cate" color="blue" v-if="company_cate == 'company_name'">公司名称</a-tag>
<a-tag class="cate" color="blue" v-else>法人信息匹配</a-tag>
</div>
</div>
......@@ -153,11 +120,7 @@
</div>
<!-- 判断是否有数据 -->
<div v-if="scientificInnovation.length !== 0">
<div
class="rank_item"
v-for="item in scientificInnovation"
@click="openCompany(item)"
>
<div class="rank_item" v-for="item in scientificInnovation" @click="openCompany(item)">
<div class="doat"></div>
<div>{{ item.company_name }}</div>
</div>
......@@ -175,11 +138,7 @@
<span class="more" @click="openmore('2')">更多</span>
</div>
<div v-if="innovateList.length !== 0">
<div
class="rank_item"
v-for="item in innovateList"
@click="openCompany(item)"
>
<div class="rank_item" v-for="item in innovateList" @click="openCompany(item)">
<div class="doat"></div>
<div>{{ item.company_name }}</div>
</div>
......@@ -196,11 +155,7 @@
<span class="more" @click="openHistory">更多</span>
</div>
<MenuDivider v-if="historyList.length !== 0">
<div
class="rank_item"
v-for="item in historyList"
@click="openDetails(item)"
>
<div class="rank_item" v-for="item in historyList" @click="openDetails(item)">
<div class="doat"></div>
<div>{{ item.name }}</div>
</div>
......@@ -217,11 +172,7 @@
<span class="more" @click="openFollow">更多</span>
</div>
<div v-if="followList.length !== 0">
<div
class="rank_item"
v-for="item in followList"
@click="openDetails(item)"
>
<div class="rank_item" v-for="item in followList" @click="openDetails(item)">
<div class="doat"></div>
<div>{{ item.name }}</div>
</div>
......@@ -236,12 +187,7 @@
</template>
<script>
import { followList, userBrowse } from "../../utils/userAPI";
import {
technicalCooperation,
scientificEvaluationTop,
enterpriseLenovo,
patentLenovo,
} from "../../utils/indexApi";
import { technicalCooperation, scientificEvaluationTop, enterpriseLenovo, patentLenovo } from "../../utils/indexApi";
export default {
name: "home",
......@@ -495,14 +441,15 @@ export default {
// height: calc(100% - 80px);
.home_main {
// height: 100%;
width: 100%;
// width: 100%;
background-color: #ebebeb;
display: flex;
.home_con {
background-color: #ebebeb;
padding-left: 30px;
width: calc(100% -80px);
width: calc(100% - 80px);
flex: 1;
box-sizing: border-box;
.nav_bread {
height: 50px;
padding: 20px 3px;
......@@ -534,27 +481,23 @@ export default {
margin-right: 10px;
}
.patent {
background: url("../../static/home/index/icon-czl-normal.png")
no-repeat;
background: url("../../static/home/index/icon-czl-normal.png") no-repeat;
background-size: 100% 100%;
cursor: pointer;
}
.patent_active {
background: url("../../static/home/index/icon-czl-select.png")
no-repeat;
background: url("../../static/home/index/icon-czl-select.png") no-repeat;
background-size: 100% 100%;
color: #fff;
cursor: pointer;
}
.company {
background: url("../../static/home/index/icon-cqy-normal.png")
no-repeat;
background: url("../../static/home/index/icon-cqy-normal.png") no-repeat;
background-size: 100% 100%;
cursor: pointer;
}
.company_active {
background: url("../../static/home/index/icon-cqy-select.png")
no-repeat;
background: url("../../static/home/index/icon-cqy-select.png") no-repeat;
background-size: 100% 100%;
color: #fff;
cursor: pointer;
......
const path = require('path')
const path = require("path");
function resolve(dir) {
return path.join(__dirname, dir)
return path.join(__dirname, dir);
}
// 引入等比适配插件
const px2rem = require('postcss-px2rem')
const px2rem = require("postcss-px2rem");
// 配置基本大小
const postcss = px2rem({
// 基准大小 baseSize,需要和rem.js中相同
remUnit: 16
})
remUnit: 16,
});
module.exports = {
devServer: {
......@@ -17,39 +17,38 @@ module.exports = {
port: 8080,
// 配置不同的后台API地址
proxy: {
'/api': {
target: 'http://39.98.37.63:5089/api',
"/api": {
target: "http://39.98.37.63:5089/api",
ws: false,
changeOrigin: true,
pathRewrite: {
'^/api': ''
}
}
}
"^/api": "",
},
},
},
},
configureWebpack: {
resolve: {
alias: {
// eslint-disable-next-line no-undef
'@': resolve('src'),
"@": resolve("src"),
},
},
},
chainWebpack: config => {
config.plugin('html')
.tap(args => {
args[0].title = '太原理工大学专利成果转移转化智能推荐系统';
return args;
})
chainWebpack: (config) => {
config.plugin("html").tap((args) => {
args[0].title = "太原理工大学专利成果转移转化智能推荐系统";
return args;
});
},
css: {
loaderOptions: {
postcss: {
plugins: [
postcss
]
}
}
// postcss
],
},
},
},
lintOnSave: true,
}
};
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