浏览代码

update code

master
guzhenfu 2 年前
父节点
当前提交
eb3020c49e
共有 14 个文件被更改,包括 444 次插入83 次删除
  1. +10
    -2
      package-lock.json
  2. +1
    -0
      package.json
  3. +7
    -0
      src/api/data.js
  4. 二进制
      src/assets/images/logo--.jpg
  5. 二进制
      src/assets/images/logo.jpg
  6. +1
    -1
      src/config/index.js
  7. +2
    -1
      src/libs/api.request.js
  8. +1
    -1
      src/libs/axios.js
  9. +8
    -0
      src/main.js
  10. +53
    -12
      src/view/about.vue
  11. +52
    -3
      src/view/exchange.vue
  12. +237
    -53
      src/view/overview.vue
  13. +48
    -5
      src/view/vip-service.vue
  14. +24
    -5
      vue.config.js

+ 10
- 2
package-lock.json 查看文件

@@ -2984,6 +2984,7 @@
"resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz",
"integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=",
"dev": true,
"optional": true,
"requires": {
"hoek": "2.x.x"
}
@@ -6629,7 +6630,8 @@
"version": "2.16.3",
"resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz",
"integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=",
"dev": true
"dev": true,
"optional": true
},
"hoopy": {
"version": "0.1.4",
@@ -9056,6 +9058,11 @@
"commander": "*"
}
},
"moment": {
"version": "2.29.1",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz",
"integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ=="
},
"move-concurrently": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz",
@@ -9936,7 +9943,8 @@
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz",
"integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==",
"dev": true
"dev": true,
"optional": true
},
"pify": {
"version": "2.3.0",


+ 1
- 0
package.json 查看文件

@@ -27,6 +27,7 @@
"iview-area": "^1.5.17",
"js-cookie": "^2.2.0",
"js-md5": "^0.7.3",
"moment": "^2.29.1",
"node-sass": "^4.9.4",
"pdfjs": "^2.4.1",
"pdfjs-dist": "^2.2.228",


+ 7
- 0
src/api/data.js 查看文件

@@ -848,3 +848,10 @@ export const getDetailRequest = (id) => {
method: 'get'
})
}

export const getPositionRequest = () => {
return axios.request({
url: 'api/cms/open/api/infor/position',
method: 'get'
})
}

二进制
src/assets/images/logo--.jpg 查看文件

之前 之后
宽度: 312  |  高度: 85  |  大小: 3.2 KiB

二进制
src/assets/images/logo.jpg 查看文件

之前 之后
宽度: 312  |  高度: 85  |  大小: 3.2 KiB 宽度: 6234  |  高度: 1151  |  大小: 135 KiB

+ 1
- 1
src/config/index.js 查看文件

@@ -31,7 +31,7 @@ export default {
* @description api请求基础路径
*/
baseUrl: {
dev: 'http://localhost:9001',
dev: 'http://183.162.252.100:9012',
pro: 'https://oss.console.ingenuity.top'
}
}

+ 2
- 1
src/libs/api.request.js 查看文件

@@ -1,6 +1,7 @@
import HttpRequest from '@/libs/axios'
import config from '@/config'
const baseUrl = process.env.NODE_ENV === 'development' ? config.baseUrl.dev : config.baseUrl.pro
// const baseUrl = process.env.NODE_ENV === 'development' ? config.baseUrl.dev : config.baseUrl.pro
const baseUrl = '/api'

const axios = new HttpRequest(baseUrl)
export default axios

+ 1
- 1
src/libs/axios.js 查看文件

@@ -63,7 +63,7 @@ class HttpRequest {
// 响应拦截
instance.interceptors.response.use(res => {
this.distroy(url)
console.log(res)
// console.log(res)
if (res.status === 200 || res.data.success) {
return Promise.resolve(res.data)
} else {


+ 8
- 0
src/main.js 查看文件

@@ -17,6 +17,14 @@ import '@/assets/editor/font/iconfont.css'
import 'vue2-toast/lib/toast.css'
import 'element-ui/lib/theme-chalk/index.css';
import Toast from 'vue2-toast'
import Moment from 'moment'

// 定义全局时间戳过滤器
Vue.filter('formatDate', function(value) {
return Moment(value).format('MM-DD')
})
Vue.prototype.$moment = Moment;//赋值使用

// import ElementUI from 'element-ui'
// import { ElementTiptapPlugin } from 'element-tiptap'
// import ElementUI's styles


+ 53
- 12
src/view/about.vue 查看文件

@@ -11,25 +11,22 @@
<div slot="header">
<span>关于我们</span>
</div>
<div class="menu-item active">SICA简介</div>
<div class="menu-item">SICA章程</div>
<!-- <div class="menu-item active">SICA简介</div> -->
<div class="menu-item" v-for="(item, index) in titleList" :key="index"
:class="{'active' : (index == activeIndex)}" @click="changeType(index)">
{{item.title}}</div>
</el-card>
</el-col>
<el-col :span="20">
<el-card shadow="never" style="margin: 0 10px">
<el-row>
<el-col :span="12">
<el-col :span="12" v-for="(item, index) in dataList" :key="index" >
<el-card class="box-card" shadow="never" style="margin: 0 10px" :body-style="{ padding: '0px'}">
<img src="//lanhu.oss-cn-beijing.aliyuncs.com/pspflh4kuvfymaezxzegpy9k9nn4pd3qmzbdcdf1a27-2222-41cc-be5e-5ab2e6a6bac5" style="border-radius: 10px;margin: 10px 0 10px 0;height: 100%;width: 100%"/>
<p style="color: #333">Brief Introduction of Shanghai Integrated Circuit Industry Ass</p>
</el-card>
</el-col>
<el-col :span="12">
<el-card class="box-card" shadow="never" style="margin: 0 10px" :body-style="{ padding: '0px'}">
<img src="//lanhu.oss-cn-beijing.aliyuncs.com/pspflh4kuvfymaezxzegpy9k9nn4pd3qmzbdcdf1a27-2222-41cc-be5e-5ab2e6a6bac5" style="border-radius: 10px;margin: 10px 0 10px 0;height: 100%;width: 100%"/>
<p style="color: #333">上海市集成电路行业协会简介</p>
<img :src="item.aboutImgUrl" style="border-radius: 10px;margin: 10px 0 10px 0;height: 100%;width: 100%"/>
<p style="color: #333">{{item.title}}</p>
</el-card>
</el-col>

</el-row>
</el-card>
</el-col>
@@ -38,11 +35,55 @@
</template>

<script>
import {getChannelInformationsRequest, getChannelsRequest,
getDetailRequest} from "../api/data";

export default {
data () {
return {

titleList: [],
activeIndex: 0,
dataList: []
}
},
methods: {
async getChannelsRequest(){
let res = await getChannelsRequest({current:1,size:15})
if(res.code == 200){
res.data.records.map((item) => {
if(item.channelName == '关于我们'){
this.getChannelInformationsRequest(item.id)
}
})
}
},

async getChannelInformationsRequest(id){
let res = await getChannelInformationsRequest({current:1,size:15,channelId: id})
if(res.code == 200){
this.titleList = res.data.records
if(this.titleList){
this.getDetailRequest(this.titleList[0].id)
}
}
},

async getDetailRequest(id){
let res = await getDetailRequest(id)
if(res.code == 200){
this.dataList = res.data.records
}
},

changeType(index){
this.activeIndex = index;
console.log(this.titleList[index].id)
this.getDetailRequest(this.titleList[index].id)
}
},
mounted() {
this.getChannelsRequest()
}
}
</script>

+ 52
- 3
src/view/exchange.vue 查看文件

@@ -11,9 +11,14 @@
<div slot="header">
<span>合作交流</span>
</div>
<div class="menu-item"><router-link to="/vip-service">年度活动一览表</router-link></div>
<!-- <div class="menu-item"><router-link to="/vip-service">年度活动一览表</router-link></div>
<div class="menu-item">活动新闻</div>
<div class="menu-item active">活动预告</div>
<div class="menu-item active">活动预告</div> -->

<div class="menu-item" v-for="(item, index) in titleList" :key="index"
:class="{'active' : (index == activeIndex)}" @click="changeType(index)">
{{item.title}}</div>

</el-card>
</el-col>
<el-col :span="20">
@@ -40,11 +45,55 @@
</template>

<script>
import {getChannelInformationsRequest, getChannelsRequest,
getDetailRequest} from "../api/data";

export default {
data () {
return {

titleList: [],
activeIndex: 0,
dataList: []
}
},
methods: {
async getChannelsRequest(){
let res = await getChannelsRequest({current:1,size:20})
if(res.code == 200){
res.data.records.map((item) => {
if(item.channelName == '合作交流'){
this.getChannelInformationsRequest(item.id)
}
})
}
},

async getChannelInformationsRequest(id){
let res = await getChannelInformationsRequest({current:1,size:15,channelId: id})
if(res.code == 200){
this.titleList = res.data.records
if(this.titleList){
this.getDetailRequest(this.titleList[0].id)
}
}
},

async getDetailRequest(id){
let res = await getDetailRequest(id)
if(res.code == 200){
this.dataList = res.data.records
}
},

changeType(index){
this.activeIndex = index;
console.log(this.titleList[index].id)
this.getDetailRequest(this.titleList[index].id)
}
},
mounted() {
this.getChannelsRequest()
}
}
</script>


+ 237
- 53
src/view/overview.vue 查看文件

@@ -1,8 +1,8 @@
<template>
<div>
<el-carousel trigger="click" height="400px">
<el-carousel-item v-for="item in 3" :key="item">
<img src="//lanhu.oss-cn-beijing.aliyuncs.com/pso3qae4u2g8lb8tie1nc2mweul0p5j5i81ef68b8f-e805-4d9f-9c5d-5679d724f7c3"/>
<el-carousel-item v-for="(item,index) in lunBoList" :key="index">
<img :src="item.aboutImg"/>
</el-carousel-item>
</el-carousel>
<el-main style="width: 960px;margin: 0 auto">
@@ -13,14 +13,17 @@
<span><el-divider direction="vertical"></el-divider>重要信息</span>
<el-button style="float: right; padding: 3px 0;color: #fff;font-size: 12px" type="text">更多&gt;&gt;</el-button>
</div>
<div v-for="o in 10" :key="o" class="text item">
{{'List item ' + o }}
<div v-for="(o, index) in importList" :key="index" class="text item">
{{index+1}}、{{o.title}}
</div>
</el-card>
</el-col>
<el-col :span="12"><div class="grid-content bg-purple-light"></div>
<el-card class="box-card" shadow="never" style="margin: 0 10px" :body-style="{ padding: '0px',height:'418px' }">
<img src="../assets/img/ps33zrxsxe75je6fyz0ieqako59448zdwo2b864170-7f1e-4bcb-9a87-f19996c6d605.png"/>
<el-card class="box-card" shadow="never" style="margin: 0 10px; position: relative;" :body-style="{ padding: '0px',height:'418px' }">
<img :src="imgObj.aboutImg"/>
<div class="img_info">
<span class="img_text">2021中国国际汽车电子高峰论坛将于11月25日在上海举行</span>
</div>
</el-card>
</el-col>
<el-col :span="6"><div class="grid-content bg-purple"></div>
@@ -29,8 +32,8 @@
<span><el-divider direction="vertical"></el-divider>新闻资讯</span>
<el-button style="float: right; padding: 3px 0;color: #fff;font-size: 12px" type="text">更多&gt;&gt;</el-button>
</div>
<div v-for="o in 10" :key="o" class="text item">
{{'List item ' + o }}
<div v-for="(item, index) in newsList" :key="index" class="text item">
{{index+1}}、{{item.title}}
</div>
</el-card>
</el-col>
@@ -43,9 +46,9 @@
<span><el-divider direction="vertical"></el-divider>行业动态</span>
<el-button style="float: right; padding: 3px 0;color: #999999;font-size: 12px" type="text">更多&gt;&gt;</el-button>
</div>
<h2>半导体产业的分工,芯片设计服务公司大有可为</h2>
<p>回顾历史,半导体产业模式在不断随着市场需求而变化。像一个帝国模式的演变,以1980年作为分界线,往前则是IDM(Integra</p>
<img src="../assets/img/ps33zrxsxe75je6fyz0ieqako59448zdwo2b864170-7f1e-4bcb-9a87-f19996c6d605.png" style="border-radius: 10px;margin: 10px 0" width="100%"/>
<h2>{{hangDamic.title}}</h2>
<p v-html="hangDamic.content"></p>
<img :src="hangDamic.aboutImg" style="border-radius: 10px;margin: 10px 0" width="100%"/>
</el-card>
</el-col>
<el-col :span="12">
@@ -54,9 +57,12 @@
<span><el-divider direction="vertical"></el-divider>产业政策</span>
<el-button style="float: right; padding: 3px 0;color: #999999;font-size: 12px" type="text">更多&gt;&gt;</el-button>
</div>
<div class="list" v-for="o in 4">
<h2>半导体产业的分工,芯片设计服务公司大有可为</h2>
<p>回顾历史,半导体产业模式在不断随着市场需求而变化。像一个帝国模式的演变,以1980年作为分界线,往前则是IDM(Integra</p>
<div class="list" v-for="(item, index) in chanList" :key="index">
<h2 style="display: flex; flex-direction: row">
<span style="flex: 1">{{item.title}}</span>
<span class="time">{{item.publishTime}}</span>
</h2>
<p v-html="item.content"></p>
</div>
</el-card>
</el-col>
@@ -70,14 +76,12 @@
<span><el-divider direction="vertical"></el-divider>合作交流</span>
<el-button style="float: right; padding: 3px 0;color: #999999;font-size: 12px" type="text">更多&gt;&gt;</el-button>
</div>
<h2>半导体产业的分工,芯片设计服务公司大有可为</h2>
<p>回顾历史,半导体产业模式在不断随着市场需求而变化。像一个帝国模式的演变,以1980年作为分界线,往前则是IDM(Integra</p>
<img src="../assets/img/ps33zrxsxe75je6fyz0ieqako59448zdwo2b864170-7f1e-4bcb-9a87-f19996c6d605.png" style="border-radius: 10px;margin: 10px 0" width="100%"/>
</el-card>
<el-card class="box-card" shadow="never" :body-style="{ padding: '0px 20px' }">
<h2>半导体产业的分工,芯片设计服务公司大有可为</h2>
<p>回顾历史,半导体产业模式在不断随着市场需求而变化。像一个帝国模式的演变,以1980年作为分界线,往前则是IDM(Integra</p>
<img src="../assets/img/ps33zrxsxe75je6fyz0ieqako59448zdwo2b864170-7f1e-4bcb-9a87-f19996c6d605.png" style="border-radius: 10px;margin: 10px 0" width="100%"/>
<el-card class="box-card" shadow="never" v-for="(item, index) in hezuoList" :key="index"
:body-style="{ padding: '0px 20px' }">
<h2>{{item.title}}</h2>
<p v-html="item.content"></p>
<img :src="item.aboutImg" style="border-radius: 10px;margin: 10px 0" width="100%"/>
</el-card>
</el-col>
<el-col :span="8">
@@ -86,14 +90,15 @@
<span><el-divider direction="vertical"></el-divider>知识产权</span>
<el-button style="float: right; padding: 3px 0;color: #999999;font-size: 12px" type="text">更多&gt;&gt;</el-button>
</div>
<h2>半导体产业的分工,芯片设计服务公司大有可为</h2>
<!-- <h2>半导体产业的分工,芯片设计服务公司大有可为</h2>
<p>回顾历史,半导体产业模式在不断随着市场需求而变化。像一个帝国模式的演变,以1980年作为分界线,往前则是IDM(Integra</p>
<img src="../assets/img/ps33zrxsxe75je6fyz0ieqako59448zdwo2b864170-7f1e-4bcb-9a87-f19996c6d605.png" style="border-radius: 10px;margin: 10px 0" width="100%"/>
<img src="../assets/img/ps33zrxsxe75je6fyz0ieqako59448zdwo2b864170-7f1e-4bcb-9a87-f19996c6d605.png" style="border-radius: 10px;margin: 10px 0" width="100%"/> -->
</el-card>
<el-card class="box-card" shadow="never" :body-style="{ padding: '0px 20px' }">
<h2>半导体产业的分工,芯片设计服务公司大有可为</h2>
<p>回顾历史,半导体产业模式在不断随着市场需求而变化。像一个帝国模式的演变,以1980年作为分界线,往前则是IDM(Integra</p>
<img src="../assets/img/ps33zrxsxe75je6fyz0ieqako59448zdwo2b864170-7f1e-4bcb-9a87-f19996c6d605.png" style="border-radius: 10px;margin: 10px 0" width="100%"/>
<el-card class="box-card" shadow="never" v-for="(item, index) in zhishiList" :key="index"
:body-style="{ padding: '0px 20px' }">
<h2>{{item.title}}</h2>
<p v-html="item.content"></p>
<img :src="item.aboutImg" style="border-radius: 10px;margin: 10px 0" width="100%"/>
</el-card>
</el-col>
<el-col :span="8">
@@ -102,14 +107,15 @@
<span><el-divider direction="vertical"></el-divider>会员产品</span>
<el-button style="float: right; padding: 3px 0;color: #999999;font-size: 12px" type="text">更多&gt;&gt;</el-button>
</div>
<h2>半导体产业的分工,芯片设计服务公司大有可为</h2>
<!-- <h2>半导体产业的分工,芯片设计服务公司大有可为</h2>
<p>回顾历史,半导体产业模式在不断随着市场需求而变化。像一个帝国模式的演变,以1980年作为分界线,往前则是IDM(Integra</p>
<img src="../assets/img/ps33zrxsxe75je6fyz0ieqako59448zdwo2b864170-7f1e-4bcb-9a87-f19996c6d605.png" style="border-radius: 10px;margin: 10px 0" width="100%"/>
<img src="../assets/img/ps33zrxsxe75je6fyz0ieqako59448zdwo2b864170-7f1e-4bcb-9a87-f19996c6d605.png" style="border-radius: 10px;margin: 10px 0" width="100%"/> -->
</el-card>
<el-card class="box-card" shadow="never" :body-style="{ padding: '0px 20px' }">
<h2>半导体产业的分工,芯片设计服务公司大有可为</h2>
<p>回顾历史,半导体产业模式在不断随着市场需求而变化。像一个帝国模式的演变,以1980年作为分界线,往前则是IDM(Integra</p>
<img src="../assets/img/ps33zrxsxe75je6fyz0ieqako59448zdwo2b864170-7f1e-4bcb-9a87-f19996c6d605.png" style="border-radius: 10px;margin: 10px 0" width="100%"/>
<el-card class="box-card" shadow="never" v-for="(item, index) in huiyuanList" :key="index"
:body-style="{ padding: '0px 20px' }">
<h2>{{item.title}}</h2>
<p v-html="item.content"></p>
<img :src="item.aboutImg" style="border-radius: 10px;margin: 10px 0" width="100%"/>
</el-card>
</el-col>
</el-row>
@@ -122,9 +128,12 @@
<span><el-divider direction="vertical"></el-divider>合作交流</span>
<el-button style="float: right; padding: 3px 0;color: #999999;font-size: 12px" type="text">更多&gt;&gt;</el-button>
</div>
<div class="list" v-for="o in 4">
<h2>半导体产业的分工,芯片设计服务公司大有可为</h2>
<p>回顾历史,半导体产业模式在不断随着市场需求而变化。像一个帝国模式的演变,以1980年作为分界线,往前则是IDM(Integra</p>
<div class="list" v-for="(item, index) in hezuoList" :key="index">
<h2 style="display: flex; flex-direction: row">
<span style="flex: 1">{{item.title}}</span>
<span class="time">{{item.publishTime}}</span>
</h2>
<p v-html="item.content"></p>
</div>
</el-card>
<div style="border-right: 1px solid #eee;width:1px;height: 320px;position: absolute;top:15px;right: 0"></div>
@@ -135,14 +144,55 @@
<span><el-divider direction="vertical"></el-divider>企业认定</span>
<el-button style="float: right; padding: 3px 0;color: #999999;font-size: 12px" type="text">更多&gt;&gt;</el-button>
</div>
<div class="list" v-for="o in 4">
<h2>半导体产业的分工,芯片设计服务公司大有可为</h2>
<p>回顾历史,半导体产业模式在不断随着市场需求而变化。像一个帝国模式的演变,以1980年作为分界线,往前则是IDM(Integra</p>
<div class="list" v-for="(item, index) in qiyeList" :key="index">
<h2 style="display: flex; flex-direction: row">
<span style="flex: 1">{{item.title}}</span>
<span class="time">{{item.publishTime}}</span>
</h2>
<p v-html="item.content"></p>
</div>
</el-card>
</el-col>
</el-row>
</el-card>

<el-card class="box-card" shadow="never" :body-style="{ padding: '0px' }" style="margin-top: 10px">
<el-row class="card_style2">
<el-col :span="12">
<el-card class="box-card" shadow="never" :body-style="{ padding: '0px 20px' }">
<div slot="header">
<span><el-divider direction="vertical"></el-divider>行业管理</span>
<el-button style="float: right; padding: 3px 0;color: #999999;font-size: 12px" type="text">更多&gt;&gt;</el-button>
</div>
<div class="list" v-for="(item, index) in hangyeList" :key="index">
<h2 style="display: flex; flex-direction: row">
<span style="flex: 1">{{item.title}}</span>
<span class="time">{{item.title}}</span>
</h2>
<p v-html="item.content"></p>
<img :src="item.aboutImg" style="border-radius: 10px;margin: 10px 0" width="100%"/>
</div>
</el-card>
</el-col>
<el-col :span="12">
<el-card class="box-card" shadow="never" :body-style="{ padding: '0px 20px' }">
<div slot="header">
<span><el-divider direction="vertical"></el-divider>人力资源</span>
<el-button style="float: right; padding: 3px 0;color: #999999;font-size: 12px" type="text">更多&gt;&gt;</el-button>
</div>
<div class="list" v-for="(item, index) in renliList" :key="index">
<h2 style="display: flex; flex-direction: row">
<span style="flex: 1">{{item.title}}</span>
<span class="time">{{item.title}}</span>
</h2>
<p v-html="item.content"></p>
<img :src="item.aboutImg" style="border-radius: 10px;margin: 10px 0" width="100%"/>
</div>
</el-card>
</el-col>
</el-row>
</el-card>

<el-card class="box-card" shadow="never" :body-style="{ padding: '0px' }" style="margin-top: 10px">
<el-row class="card_style2">
<el-col :span="24">
@@ -150,8 +200,9 @@
<div slot="header">
<span><el-divider direction="vertical"></el-divider>会员企业</span>
</div>
<div v-for="o in 10" style="display: inline-table;width: 135px;height: 62px;border: 1px solid #eee;margin: 10px 20px;text-align: center">
<img src="../assets/img/psbgg7t8t6t7ljqxtsg9h7ly4mpk83p6f1c4592a0-a2cd-41a9-bb83-8feb2ffe175e.png"/>
<div v-for="(item, index) in huiyuanQiList" :key="index"
style="display: inline-table;width: 135px;height: 62px;border: 1px solid #eee;margin: 10px 20px;text-align: center">
<img :src="item.aboutImgUrl"/>
</div>
</el-card>
<el-card class="box-card" shadow="never" :body-style="{ padding: '0px 20px' }">
@@ -159,7 +210,12 @@
<span><el-divider direction="vertical"></el-divider>友情链接</span>
</div>
<div >
<el-button type="text" style="color: #255089">国家发改委 | 国家工信部 | 国家财政部 | 国家税务机关 | 中国海关 </el-button>
<el-button type="text" style="color: #255089">
<a href="" v-for="(item, index) in youqingList" :key="index" >
{{item.title}}
</a>
<!-- 国家发改委 | 国家工信部 | 国家财政部 | 国家税务机关 | 中国海关 -->
</el-button>
</div>
</el-card>
</el-col>
@@ -170,29 +226,157 @@
</template>

<script>
import {getChannelInformationsRequest, getChannelsRequest, getDetailRequest} from "../api/data";
import {getChannelInformationsRequest, getChannelsRequest,
getDetailRequest, getPositionRequest} from "../api/data";

export default {
data () {
return {

importList: [],
newsList: [],
hangDamic: {},
chanList: [],
hezuoList: [],
zhishiList: [],
huiyuanList: [],
hezuoList: [],
qiyeList: [],
hangyeList: [],
renliList: [],
huiyuanQiList: [],
youqingList: [],
lunBoList: [],
imgObj: {}
}
},
methods: {
async getPositionRequest(){
let res = await getPositionRequest()
if(res.code == 200){
res.data.map((item) => {
this.getChannelInformationsRequest(item.zhanshilanmu, item.weizhi)
})
}
},

async getChannelInformationsRequest(id, weizhi){
let res = await getChannelInformationsRequest({channelId: id});
if(res.code == 200){
if(weizhi){
if(weizhi == "A"){
// 重要信息
this.importList = res.data.records.slice(0, 10)
}else if(weizhi == "O"){
let img = res.data.records.slice(0, 1)
if(img){
this.imgObj = img[0]
}
}else if(weizhi == "B"){
// 新闻资讯
this.newsList = res.data.records.slice(0, 10)
}else if(weizhi == "C"){
// 行业动态
let damic = res.data.records.slice(0, 1)
if(damic){
this.hangDamic = damic[0]
}
}else if(weizhi == "D"){
// 产业政策
this.chanList = res.data.records.slice(0, 4)
this.chanList.map((ite) => {
ite.publishTime = this.$moment().format("MM-DD")
})
}else if(weizhi == "E"){
// 合作交流
this.hezuoList = res.data.records.slice(0, 4)
this.hezuoList.map((ite) => {
ite.publishTime = this.$moment().format("MM-DD")
})
}else if(weizhi == "F"){
// 知识产权
this.zhishiList = res.data.records.slice(0, 2)
}else if(weizhi == "G"){
// 会员产品
this.huiyuanList = res.data.records.slice(0, 2)
}else if(weizhi == "H"){

}else if(weizhi == "I"){
// 企业认定
this.qiyeList = res.data.records.slice(0, 4)
this.qiyeList.map((ite) => {
ite.publishTime = this.$moment().format("MM-DD")
})
}else if(weizhi == "J"){
// 行业管理
this.hangyeList = res.data.records.slice(0, 1)
}else if(weizhi == "K"){
// 人力资源
this.renliList = res.data.records.slice(0, 1)
}else if(weizhi == "L"){
// 会员企业
this.huiyuanQiList = res.data.records
}else if(weizhi == "M"){
// 友情链接
this.youqingList = res.data.records
}else if(weizhi == "N"){
// 轮播
this.lunBoList = res.data.records
console.log(JSON.stringify(this.hezuoList))
console.log(id)
}
}
}
},

async getData(){
getChannelsRequest({current:1,size:15}).then(res=>{
console.log(JSON.stringify(res))
getChannelInformationsRequest({channelId:res.data.records[0].id}).then(res=>{
console.log(JSON.stringify(res))
getDetailRequest('1498921672646979585').then(res=>{
console.log(JSON.stringify(res))
})
})
})
}

},
mounted() {
getChannelsRequest({current:1,size:15}).then(res=>{
console.log(JSON.stringify(res))
getChannelInformationsRequest({channelId:res.data.records[0].id}).then(res=>{
console.log(JSON.stringify(res))
getDetailRequest('1498921672646979585').then(res=>{
console.log(JSON.stringify(res))
})
})
})
// this.getData()
this.getPositionRequest()
}
}
</script>
<style>
.item{
padding: 10px 0;
font-weight: bold;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}

.time{
color: #475D7B;
font-size: 16px;
}

.img_info{
position: absolute;
bottom: 0px;
left: 0px;
background-color: rgba(0, 0, 0, 0.6);
height: 40px;
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
padding-left: 20px;
}

.img_text{
color: #FFFFFF;
font-size: 11px;
}

</style>

+ 48
- 5
src/view/vip-service.vue 查看文件

@@ -64,16 +64,59 @@
</template>

<script>
import {getChannelInformationsRequest, getChannelsRequest,
getDetailRequest} from "../api/data";

export default {
data () {
return {
tableData:[
{

}
]
titleList: [],
activeIndex: 0,
dataList: [],
tableData:[]
}
},

methods: {
async getChannelsRequest(){
let res = await getChannelsRequest({current:1,size:100})
if(res.code == 200){
res.data.records.map((item) => {
if(item.channelName == '会员企业'){
this.getChannelInformationsRequest(item.id)
}
})
}
},

async getChannelInformationsRequest(id){
let res = await getChannelInformationsRequest({current:1,size:15,channelId: id})
if(res.code == 200){
this.titleList = res.data.records
// if(this.titleList){
// this.getDetailRequest(this.titleList[0].id)
// }
}
},

async getDetailRequest(id){
let res = await getDetailRequest(id)
if(res.code == 200){
this.dataList = res.data.records
}
},

changeType(index){
this.activeIndex = index;
console.log(this.titleList[index].id)
this.getDetailRequest(this.titleList[index].id)
}
},
mounted() {
this.getChannelsRequest()
}

}
</script>
<style>


+ 24
- 5
vue.config.js 查看文件

@@ -21,7 +21,7 @@ module.exports = {
// sub-path here. For example, if your app is deployed at
// https://www.foobar.com/my-app/
// then change this to '/my-app/'
baseUrl: BASE_URL,
// baseUrl: BASE_URL,
// tweak internal webpack configuration.
// see https://github.com/vuejs/vue-cli/blob/dev/docs/webpack.md
chainWebpack: config => {
@@ -31,9 +31,28 @@ module.exports = {
.set('_conf', resolve('config'))
},
// 打包时不生成.map文件
productionSourceMap: false
productionSourceMap: false,
// 这里写你调用接口的基础路径,来解决跨域,如果设置了代理,那你本地开发环境的axios的baseUrl要写为 '' ,即空字符串
// devServer: {
// proxy: 'localhost:3000'
// }
devServer: {
overlay: { // 让浏览器 overlay 同时显示警告和错误
warnings: true,
errors: true
},
host: "localhost",
port: 8080, // 端口号
https: false, // https:{type:Boolean}
open: false, //配置自动启动浏览器
hotOnly: true,
proxy: {
'/api': {
target: 'http://47.100.188.195:7006',
ws: true,
changeOrigin: true,
secure: false,
pathRewrite: {
"^/api": "/"
}
}
}
}
}

正在加载...
取消
保存