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