Commit 19539476 by 尹亚亭

Merge branch 'channel-access' of gitlab.gongsibao.com:jiangyong/zhichan into channel-access

parents 68414eee 39669a05
<template>
<!-- 根组件 -->
<div id="app" ref="app">
<Globalheader title="" url="/jdtrademark" name="首页" />
<!-- <Globalheader title="" url="/jdtrademark" name="首页" /> -->
<router-view />
<Globalfooter />
<!-- <Globalfooter /> -->
</div>
</template>
<script>
import Globalheader from "@/components/globalheader";
import Globalfooter from "@/components/globalfooter";
// import Globalheader from "@/components/globalheader";
// import Globalfooter from "@/components/globalfooter";
export default {
components: {
Globalheader,
Globalfooter
// Globalheader,
// Globalfooter
}
};
</script>
......
......@@ -60,5 +60,25 @@ export function getCompanyInfoByLikeName(name) {
actionBody: {
likestr: name
}
})
});
}
//图片转pdf
export function pic2pdf(url) {
return http.post(baseUrl, {
actionType: "pic2pdf",
actionBody: {
key: url
}
});
}
//企业注册信息查询
export function getEntregistryByCompanyName(name) {
return http.post(baseUrl, {
actionType: "getEntregistryByCompanyName",
actionBody: {
companyName: name
}
});
}
\ No newline at end of file
......@@ -8,8 +8,21 @@
<div class="from-main">
<div class="from-items">
<div class="from-item-title"><span>*</span>上传材料:营业执照</div>
<div class="upload-box">
<div class="upload-box" v-loading="loading1">
<img v-if="imgUrl1" :src="imgUrl1" alt="" />
<div v-else class="imgs">
<i class="el-icon-plus"></i>
<span>(需盖公章)</span>
</div>
<!-- 1 -->
<UploadImg
:action="action"
:data="dataone"
ref="upImg"
flag="picUrl"
:num="1"
@getsuccess="getImgUrl"
/>
</div>
<div class="upload-box-next">
<img src="@/assets/imgs/sbzc/yyzz1.png" alt="" />
......@@ -26,8 +39,21 @@
>下载委托书模板</a
>
</div>
<div class="upload-box">
<div class="upload-box" v-loading="loading2">
<img v-if="imgUrl2" :src="imgUrl2" alt="" />
<div v-else class="imgs">
<i class="el-icon-plus"></i>
<span>(需盖公章)</span>
</div>
<!-- 2 -->
<UploadImg
:action="action"
:data="datatwo"
ref="upImg"
flag="picUrl"
:num="2"
@getsuccess="getImgUrl"
/>
</div>
<div class="upload-box-next">
<img src="@/assets/imgs/sbzc/wts1.png" alt="" />
......@@ -44,8 +70,21 @@
>下载优先权证明</a
>
</div>
<div class="upload-box">
<div class="upload-box" v-loading="loading3">
<img v-if="imgUrl3" :src="imgUrl3" alt="" />
<div v-else class="imgs">
<i class="el-icon-plus"></i>
<span>(需盖公章)</span>
</div>
<!-- 3 -->
<UploadImg
:action="action"
:data="datathree"
ref="upImg"
flag="picUrl"
:num="3"
@getsuccess="getImgUrl"
/>
</div>
<div class="upload-box-next">
<img src="@/assets/imgs/sbzc/yxq.png" alt="" />
......@@ -81,15 +120,101 @@
import imgUrl1 from "@/assets/imgs/sbzc/yyzzD.png";
import imgUrl2 from "@/assets/imgs/sbzc/wtsD.png";
import imgUrl3 from "@/assets/imgs/sbzc/yxqD.png";
//
import UploadImg from "./uploadImg";
//
import { getOss, uploadStandardTm, pic2pdf } from "@/api/tmTools.js";
export default {
components: {
UploadImg
},
data() {
return {
chakanKey: null,
toViewImgType: false,
toViewImgSrc: ""
toViewImgSrc: "",
action: "",
dataone: {},
datatwo: {},
datathree: {},
loading1: false,
loading2: false,
loading3: false,
imgUrl: "",
imgUrl1: "",
imgUrl2: "",
imgUrl3: ""
};
},
mounted() {
this.getOss();
},
methods: {
getImgUrl(msg, num) {
console.log(num, msg);
this.imgUrl = msg;
if (num == 1) {
this.loading1 = true;
this.imgUrl1 = msg;
}
if (num == 2) {
this.loading2 = true;
this.imgUrl2 = msg;
}
if (num == 3) {
this.loading3 = true;
this.imgUrl3 = msg;
}
uploadStandardTm(this.imgUrl).then(res => {
if (res.status == 0) {
//图片转pdf
pic2pdf(res.data.url).then(re => {
this.loading1 = false;
this.loading2 = false;
this.loading3 = false;
if (re.status == 0) {
this.$message({
type: "success",
message: "上传成功"
});
} else {
this.$message.error("上传失败,请重新上传!");
}
});
} else {
this.$message.error("上传失败,请重新上传!");
}
//上传后重新获取偶oss
this.getOss();
});
},
getOss() {
getOss().then(re => {
this.dataone = re.data;
this.datatwo = re.data;
this.datathree = re.data;
this.dataone.key = this.setKey();
this.datatwo.key = this.setKey();
this.datathree.key = this.setKey();
this.action = re.data.url;
});
},
setKey(name, flag) {
// name = name.substring(name.length - 5);
var myDate = new Date();
var key =
"zc_" +
flag +
Math.round(Math.random() * 10000) +
myDate.getTime() +
myDate.getFullYear() +
myDate.getMonth() +
myDate.getDate() +
".jpg";
// this.$refs[flag].data.key = key;
return key;
},
//
enter(index) {
this.chakanKey = index;
},
......@@ -180,6 +305,27 @@ export default {
position: relative;
border: 3px dashed #ccc;
margin-left: 20px;
img {
width: 100%;
height: 100%;
}
.imgs {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
i {
font-size: 30px;
color: #b8b8b8;
}
span {
color: #0f8ee9;
font-size: 12px;
margin-top: 20px;
}
}
}
.upload-box-next {
width: 98px;
......
......@@ -14,7 +14,7 @@
<script>
export default {
props:["action","data"],
props: ["action", "data", "num"],
data() {
return {
imageUrl: ""
......@@ -22,9 +22,9 @@ export default {
},
methods: {
handleAvatarSuccess(res) {
var doc = (new DOMParser()).parseFromString(res,'text/xml');
let url = doc.getElementsByTagName('Location')[0].innerHTML;
this.$emit("getsuccess",url)
var doc = new DOMParser().parseFromString(res, "text/xml");
let url = doc.getElementsByTagName("Location")[0].innerHTML;
this.$emit("getsuccess", url, this.num);
},
beforeAvatarUpload(file) {
const isJPG = file.type === "image/jpeg" || file.type === "image/png";
......@@ -49,7 +49,8 @@ export default {
position: absolute;
top: 0;
left: 0;
.avatar-uploader,.el-upload {
.avatar-uploader,
.el-upload {
border-radius: 6px;
cursor: pointer;
position: relative;
......
......@@ -22,7 +22,7 @@ service.interceptors.request.use(
config.url != "/api/web/action/tmOrder/springBoard" &&
config.url != "/api/web/auth/accessAuth/springBoard"
) {
Message("请重新登录");
// Message("请重新登录");
}
} else {
config.headers["userpin"] = userpin; // 让每个请求携带自定义token 请根据实际情况自行修改
......
import Vue from "vue";
import VueRouter from "vue-router";
import { getCookie } from "@/utils/getToken.js";
// import { getCookie } from "@/utils/getToken.js";
Vue.use(VueRouter);
const routes = [{
path: "/home",
name: "home",
component: () =>
import ("@/views/pages/home")
},
{
path: "/companyinformation",
name: "companyinformation",
component: () =>
import ("@/views/pages/companyinformation")
},
{
path: "/",
redirect: "/jdtrademark"
redirect: "/home"
},
{
path: "/user",
......@@ -108,22 +120,22 @@ const router = new VueRouter({
routes
});
router.beforeEach((to, from, next) => {
let userpin = getCookie("userpin");
if (
to.path == "/user/login" ||
to.path == "/user/register" ||
to.path == "/user/forgetPassword" ||
to.path == "/jdtrademark"
) {
next();
} else {
if (userpin == "" || userpin == null) {
next("/user/login");
} else {
next();
}
}
});
// router.beforeEach((to, from, next) => {
// let userpin = getCookie("userpin");
// if (
// to.path == "/user/login" ||
// to.path == "/user/register" ||
// to.path == "/user/forgetPassword" ||
// to.path == "/jdtrademark"
// ) {
// next();
// } else {
// if (userpin == "" || userpin == null) {
// next("/user/login");
// } else {
// next();
// }
// }
// });
export default router;
\ No newline at end of file
<template>
<div class="home">
<div class="home-header">
<div class="home-header-main">
<img src="@/assets/imgs/logo.png" alt="" />
</div>
</div>
<div class="home-banner">
<div class="home-banner-logo">
<img src="@/assets/imgs/logo2.png" alt="" />
</div>
<div class="home-banner-title">——— 智能评估企业潜在需求 ———</div>
<div class="home-banner-search">
<div class="autocomplete">
<el-autocomplete
v-model="state"
:fetch-suggestions="querySearchAsync"
placeholder="请输入公司名称"
@select="handleSelect"
clearable
:debounce="500"
></el-autocomplete>
<el-button @click="search"
><i class="el-icon-search"></i>分析</el-button
>
</div>
<div class="hotsearch">
<p>
热搜:<span>阿里</span><span>阿里</span><span>阿里</span
><span>阿里</span><span>阿里</span><span>阿里</span>
</p>
<div class="batch"><i class="el-icon-refresh">换一批</i></div>
</div>
</div>
</div>
<div class="home-container">
<div class="home-container-title">一站式企业证照服务</div>
<div class="home-container-tabs">
<div class="home-container-tabs-header">
<div
:class="
tabsIndex == index
? 'tabs-header-item tabs-header-item-active'
: 'tabs-header-item'
"
v-for="(item, index) in tabsHeaderList"
:key="index"
@click="tabsHeaderClick(index)"
>
{{ item }}
</div>
</div>
<div class="home-container-tabs-main">
<div class="tabs-main-item" v-for="item in 8" :key="item">
<img src="@/assets/imgs/yingyezhizhao.png" alt="" />
<span>公司营业执照</span>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import { getCompanyInfoByLikeName } from "@/api/tmTools.js";
export default {
data() {
return {
state: "",
tabsIndex: 0,
tabsHeaderList: [
"工商服务",
"知产服务",
"财税服务",
"资质审批",
"交易服务",
"特许资质"
]
};
},
methods: {
//查询公司详情
search() {
if (this.state) {
this.$router.push({
path: "/companyinformation",
query: { name: this.state }
});
this.saveLocalStorage();
}
},
//将搜索过的内容存入localStorage
saveLocalStorage() {
let companyInfo = JSON.parse(window.localStorage.getItem("companyInfo"));
if (companyInfo) {
let index = companyInfo.findIndex(item => {
return item.value == this.state;
});
if (index == -1) {
companyInfo.unshift({ value: this.state });
window.localStorage.setItem(
"companyInfo",
JSON.stringify(companyInfo)
);
}
} else {
let companyInfo1 = [];
companyInfo1.unshift({ value: this.state });
window.localStorage.setItem(
"companyInfo",
JSON.stringify(companyInfo1)
);
}
},
tabsHeaderClick(index) {
this.tabsIndex = index;
},
//模糊查询
querySearchAsync(queryString, cb) {
if (this.state == "") {
//如果没有输入值,则从本地获取数据
let companyInfo = JSON.parse(
window.localStorage.getItem("companyInfo")
);
if (companyInfo) {
cb(companyInfo);
} else {
cb([]);
}
} else {
//请求企业近似商标数据
getCompanyInfoByLikeName(this.state).then(res => {
res.data.map(item => {
item.value = item.domainEntName;
});
cb(res.data);
});
}
},
handleSelect(item) {
console.log(item);
if (this.state) {
this.saveLocalStorage();
}
}
}
};
</script>
<style lang="scss">
.home {
width: 100%;
.home-header {
width: 100%;
height: 70px;
position: absolute;
top: 0;
left: 0;
.home-header-main {
width: 1200px;
height: 100%;
margin: 0 auto;
display: flex;
align-items: center;
}
}
.home-banner {
width: 100%;
height: 460px;
background: url("../../../assets/imgs/homebanner.png") no-repeat;
background-size: 100% 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.home-banner-logo {
width: 100%;
display: flex;
justify-content: center;
margin-bottom: 23px;
}
.home-banner-title {
font-size: 30px;
font-family: SourceHanSansCN-ExtraLight, SourceHanSansCN;
font-weight: 200;
color: rgba(255, 255, 255, 1);
letter-spacing: 1px;
margin-bottom: 43px;
}
.home-banner-search {
width: 848px;
height: 100px;
}
}
.tabs-header-item-active {
background: #ffffff !important;
box-shadow: -1px -1px 4px 0px rgba(20, 120, 240, 0.27);
color: #333333;
}
}
.home-banner-search {
.autocomplete {
width: 100%;
height: 50px;
display: flex;
border-radius: 2px;
overflow: hidden;
margin-bottom: 20px;
.el-autocomplete {
flex: 1;
.el-input {
width: 100%;
height: 100%;
.el-input__inner {
width: 100%;
height: 100%;
border-radius: 0;
}
}
}
.el-button {
width: 135px;
height: 100%;
border-radius: 0;
background: #1478f0;
color: #fff;
border: #1478f0;
}
}
.hotsearch {
width: 100%;
color: #fff;
display: flex;
justify-content: space-between;
p {
font-size: 16px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
line-height: 22px;
letter-spacing: 1px;
span {
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(255, 255, 255, 1);
line-height: 17px;
padding: 0 13px;
border-radius: 100px;
border: 1px solid #fff;
margin-right: 10px;
cursor: pointer;
}
}
.batch {
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
line-height: 17px;
cursor: pointer;
}
}
}
.home-container {
width: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 50px 0 110px;
.home-container-title {
font-size: 32px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(40, 40, 40, 1);
line-height: 45px;
letter-spacing: 1px;
margin-bottom: 50px;
}
.home-container-tabs {
width: 1200px;
.home-container-tabs-header {
width: 100%;
display: flex;
.tabs-header-item {
padding: 12px 60px;
background: #ebeef4;
display: flex;
justify-content: center;
align-items: center;
font-size: 18px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #666666;
line-height: 25px;
letter-spacing: 1px;
border-right: 1px solid #fff;
cursor: pointer;
}
}
.home-container-tabs-main {
width: 100%;
display: flex;
flex-wrap: wrap;
.tabs-main-item {
width: 25%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 47px 0 3px;
cursor: pointer;
img {
height: 44px;
}
span {
font-size: 18px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: rgba(70, 72, 81, 1);
line-height: 25px;
margin-top: 12px;
}
}
}
}
}
</style>
......@@ -185,6 +185,11 @@ export default {
type: "success",
message: "上传成功"
});
getOss().then(res => {
this.data = res.data;
this.data.key = this.setKey();
this.action = res.data.url;
});
} else {
this.$message.error("上传失败,请重新上传!");
}
......
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