| @@ -1,24 +1,39 @@ | |||
| <template> | |||
| <div id="app"> | |||
| <router-view></router-view> | |||
| <custom-service v-show="!doBotNeedCustomerService.includes(path)"></custom-service> | |||
| </div> | |||
| </template> | |||
| <script> | |||
| import CustomService from "@components/CustomService.vue"; | |||
| // @ is an alias to /src | |||
| export default { | |||
| name: "Home", | |||
| components: {}, | |||
| components: { CustomService }, | |||
| computed: {}, | |||
| watch: {}, | |||
| watch: { | |||
| $route(to, from) { | |||
| this.path = to.path; | |||
| }, | |||
| }, | |||
| data() { | |||
| return {}; | |||
| return { | |||
| doBotNeedCustomerService: ["/login"], // 不需要引用客服的页面 | |||
| path: "", | |||
| }; | |||
| }, | |||
| created() { | |||
| this.$store.dispatch("getUserInfo"); | |||
| this.$store.dispatch("getAllPickListByEntity"); | |||
| this.path = this.$route.path; | |||
| }, | |||
| methods: {}, | |||
| }; | |||
| </script> | |||
| <style lang="scss" scoped></style> | |||
| <style lang="scss" scoped> | |||
| #app { | |||
| position: relative; | |||
| } | |||
| </style> | |||
| @@ -1,6 +1,6 @@ | |||
| <!-- 客服 --> | |||
| <template> | |||
| <div class="customer_service_box pointer"> | |||
| <div class="customer_service_box pointer" @click="linkCustomerService"> | |||
| <img src="@assets/image/common/icon_customer_service.png" alt="客服" /> | |||
| </div> | |||
| </template> | |||
| @@ -8,20 +8,55 @@ | |||
| <script> | |||
| //这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等) | |||
| //例如:import 《组件名称》 from '《组件路径》'; | |||
| import { mapGetters } from "vuex"; | |||
| export default { | |||
| //import引入的组件需要注入到对象中才能使用 | |||
| components: {}, | |||
| data() { | |||
| //这里存放数据 | |||
| return {}; | |||
| return { | |||
| queryParams: { | |||
| token: "bd5e24809b0db963271f14e2167c4fb3", // 与后台交互的凭证 | |||
| noCanClose: 0, // PC端是否显示广告 | |||
| uid: "", // 用户ID | |||
| nickName: "", //用户昵称 | |||
| phone: "", //用户手机号 | |||
| }, | |||
| }; | |||
| }, | |||
| //监听属性 类似于data概念 | |||
| computed: {}, | |||
| computed: { | |||
| ...mapGetters({ | |||
| currentAccount: "currentAccount", | |||
| }), | |||
| }, | |||
| //监控data中的数据变化 | |||
| watch: {}, | |||
| //方法集合 | |||
| methods: {}, | |||
| methods: { | |||
| linkCustomerService() { | |||
| // 是否登录 | |||
| console.log(this.currentAccount, "this.currentAccount"); | |||
| if (this.currentAccount) { | |||
| this.queryParams.uid = this.currentAccount.accountId; | |||
| this.queryParams.nickName = this.currentAccount.accountName; | |||
| this.queryParams.phone = this.currentAccount.mobilePhone; | |||
| } | |||
| let url = `http://parkkf.test.hhrchina.com/chat/index?`; | |||
| for (let key in this.queryParams) { | |||
| if ( | |||
| this.queryParams[key] !== "" && | |||
| this.queryParams[key] !== undefined && | |||
| this.queryParams[key] !== null | |||
| ) { | |||
| url += `&${key}=${this.queryParams[key]}`; | |||
| } | |||
| } | |||
| console.log(url); | |||
| window.open(url); | |||
| }, | |||
| }, | |||
| //生命周期 - 创建完成(可以访问当前this实例) | |||
| created() {}, | |||
| //生命周期 - 挂载完成(可以访问DOM元素) | |||
| @@ -36,7 +71,7 @@ export default { | |||
| bottom: 40px; | |||
| z-index: 3; | |||
| img { | |||
| @include size(160px, auto); | |||
| @include size(120px, auto); | |||
| } | |||
| } | |||
| </style> | |||
| @@ -10,7 +10,6 @@ | |||
| <Footer></Footer> | |||
| <slide-nav :navLists="indexTab"></slide-nav> | |||
| </div> | |||
| <custom-service></custom-service> | |||
| </div> | |||
| </template> | |||
| @@ -24,7 +23,6 @@ import ParkMap from "./ParkMap.vue"; | |||
| import Footer from "@components/Footer.vue"; | |||
| import SlideNav from "./SlideNav.vue"; | |||
| import { getRegisterArea } from "@api/index"; | |||
| import CustomService from "@/components/CustomService.vue"; | |||
| export default { | |||
| metaInfo: { | |||
| @@ -39,7 +37,6 @@ export default { | |||
| ParkMap, | |||
| Footer, | |||
| SlideNav, | |||
| CustomService, | |||
| }, | |||
| data() { | |||
| return { | |||
| @@ -71,79 +68,7 @@ export default { | |||
| }, | |||
| ], | |||
| parkInfo: null, | |||
| leadingIndustryArr: [ | |||
| { | |||
| leadingIndustryName: "装备制造", | |||
| companyProfile: | |||
| "1园区旨在鼓励和吸引国内外装备制造产业,促进装备制造产业高科技发展化,重点加强水资源、工业废弃物、废气、生活垃圾的循环利用系统构建,引入先进的生产模式,根据产业特点,制定装备制造发展政策,促进产业发展升级,服务经济,为区域内装备制造产业的长远发展提供充分的技术支撑和项目支撑、人才支撑。建立港口机械、石油钻探机械、冶金设备、工程机械和汽车、船只修造产业基地。", | |||
| companyList: [ | |||
| "上海xxx网络科技有限公司", | |||
| "上海xxx网络科技有限公司", | |||
| "上海xxx网络科技有限公司", | |||
| "上海xxx网络科技有限公司", | |||
| "上海xxx网络科技有限公司", | |||
| "上海xxx网络科技有限公司", | |||
| "上海xxx网络科技有限公司", | |||
| ], | |||
| }, | |||
| { | |||
| leadingIndustryName: "科技研发", | |||
| companyProfile: | |||
| "2园区旨在鼓励和吸引国内外装备制造产业,促进装备制造产业高科技发展化,重点加强水资源、工业废弃物、废气、生活垃圾的循环利用系统构建,引入先进的生产模式,根据产业特点,制定装备制造发展政策,促进产业发展升级,服务经济,为区域内装备制造产业的长远发展提供充分的技术支撑和项目支撑、人才支撑。建立港口机械、石油钻探机械、冶金设备、工程机械和汽车、船只修造产业基地。", | |||
| companyList: [ | |||
| "上海xxx网络科技有限公司", | |||
| "上海xxx网络科技有限公司", | |||
| "上海xxx网络科技有限公司", | |||
| "上海xxx网络科技有限公司", | |||
| "上海xxx网络科技有限公司", | |||
| "上海xxx网络科技有限公司", | |||
| "上海xxx网络科技有限公司", | |||
| ], | |||
| }, | |||
| { | |||
| leadingIndustryName: "生物医药", | |||
| companyProfile: | |||
| "3园区旨在鼓励和吸引国内外装备制造产业,促进装备制造产业高科技发展化,重点加强水资源、工业废弃物、废气、生活垃圾的循环利用系统构建,引入先进的生产模式,根据产业特点,制定装备制造发展政策,促进产业发展升级,服务经济,为区域内装备制造产业的长远发展提供充分的技术支撑和项目支撑、人才支撑。建立港口机械、石油钻探机械、冶金设备、工程机械和汽车、船只修造产业基地。", | |||
| companyList: [ | |||
| "上海xxx网络科技有限公司", | |||
| "上海xxx网络科技有限公司", | |||
| "上海xxx网络科技有限公司", | |||
| "上海xxx网络科技有限公司", | |||
| "上海xxx网络科技有限公司", | |||
| "上海xxx网络科技有限公司", | |||
| "上海xxx网络科技有限公司", | |||
| ], | |||
| }, | |||
| { | |||
| leadingIndustryName: "视频制造", | |||
| companyProfile: | |||
| "4园区旨在鼓励和吸引国内外装备制造产业,促进装备制造产业高科技发展化,重点加强水资源、工业废弃物、废气、生活垃圾的循环利用系统构建,引入先进的生产模式,根据产业特点,制定装备制造发展政策,促进产业发展升级,服务经济,为区域内装备制造产业的长远发展提供充分的技术支撑和项目支撑、人才支撑。建立港口机械、石油钻探机械、冶金设备、工程机械和汽车、船只修造产业基地。", | |||
| companyList: [ | |||
| "上海xxx网络科技有限公司", | |||
| "上海xxx网络科技有限公司", | |||
| "上海xxx网络科技有限公司", | |||
| "上海xxx网络科技有限公司", | |||
| "上海xxx网络科技有限公司", | |||
| "上海xxx网络科技有限公司", | |||
| "上海xxx网络科技有限公司", | |||
| ], | |||
| }, | |||
| { | |||
| leadingIndustryName: "电子信息", | |||
| companyProfile: | |||
| "5园区旨在鼓励和吸引国内外装备制造产业,促进装备制造产业高科技发展化,重点加强水资源、工业废弃物、废气、生活垃圾的循环利用系统构建,引入先进的生产模式,根据产业特点,制定装备制造发展政策,促进产业发展升级,服务经济,为区域内装备制造产业的长远发展提供充分的技术支撑和项目支撑、人才支撑。建立港口机械、石油钻探机械、冶金设备、工程机械和汽车、船只修造产业基地。", | |||
| companyList: [ | |||
| "上海xxx网络科技有限公司", | |||
| "上海xxx网络科技有限公司", | |||
| "上海xxx网络科技有限公司", | |||
| "上海xxx网络科技有限公司", | |||
| "上海xxx网络科技有限公司", | |||
| "上海xxx网络科技有限公司", | |||
| "上海xxx网络科技有限公司", | |||
| "上海xxx网络科技有限公司上海xxx网络科技有限公司", | |||
| ], | |||
| }, | |||
| ], | |||
| leadingIndustryArr: [], | |||
| address: null, | |||
| }; | |||
| }, | |||
| @@ -163,6 +88,7 @@ export default { | |||
| lng: this.parkInfo.map.lng, | |||
| lat: this.parkInfo.map.lat, | |||
| }; | |||
| this.leadingIndustryArr = this.parkInfo.leadingIndustryList; | |||
| } else { | |||
| this.$message.error(`获取数据失败,请刷新重试!`); | |||
| } | |||
| @@ -9,7 +9,7 @@ | |||
| <el-tabs v-model="activeTab" @click="changeTab"> | |||
| <el-tab-pane | |||
| v-for="(item, index) in leadingIndustryArr" | |||
| :key="item.title" | |||
| :key="item.leadingIndustryId" | |||
| :label="item.leadingIndustryName" | |||
| :name="index + ''" | |||
| ></el-tab-pane> | |||
| @@ -47,11 +47,11 @@ | |||
| </div> | |||
| <ul class="company_ul"> | |||
| <li | |||
| v-for="(item, index) in leadingIndustryArr[activeTab].companyList" | |||
| :key="index" | |||
| v-for="item in leadingIndustryArr[activeTab].companyList" | |||
| :key="item.id" | |||
| > | |||
| <div> | |||
| {{ item }} | |||
| {{ item.text }} | |||
| </div> | |||
| </li> | |||
| </ul> | |||