Commit c62ab753 by 林家欣

联调商品全球身份证

parent 52aade3a
...@@ -36,20 +36,21 @@ ...@@ -36,20 +36,21 @@
"xss": "^1.0.6" "xss": "^1.0.6"
}, },
"devDependencies": { "devDependencies": {
"increase-memory-limit": "^1.0.3",
"cross-env": "^5.0.5",
"@vue/cli-plugin-babel": "^3.12.1", "@vue/cli-plugin-babel": "^3.12.1",
"@vue/cli-plugin-eslint": "^3.12.1", "@vue/cli-plugin-eslint": "^3.12.1",
"@vue/cli-service": "^3.12.1", "@vue/cli-service": "^3.12.1",
"axios": "^0.18.0", "axios": "^0.18.0",
"babel-eslint": "^10.0.1", "babel-eslint": "^10.0.1",
"babel-plugin-component": "^1.1.1", "babel-plugin-component": "^1.1.1",
"cross-env": "^5.0.5",
"eslint": "^5.16.0", "eslint": "^5.16.0",
"eslint-plugin-vue": "^5.0.0", "eslint-plugin-vue": "^5.0.0",
"increase-memory-limit": "^1.0.3",
"node-sass": "^4.14.1", "node-sass": "^4.14.1",
"sass-loader": "^7.1.0", "sass-loader": "^7.1.0",
"vue-cli-plugin-axios": "0.0.4", "vue-cli-plugin-axios": "0.0.4",
"vue-cli-plugin-element": "^1.0.1", "vue-cli-plugin-element": "^1.0.1",
"vue-resource": "^1.5.3",
"vue-template-compiler": "^2.6.11" "vue-template-compiler": "^2.6.11"
} }
} }
...@@ -18,8 +18,7 @@ import { ...@@ -18,8 +18,7 @@ import {
getToken getToken
} from "@/utils/cookie.js" } from "@/utils/cookie.js"
const baseUrl = process.env.BASE_URL + "gs1" const baseUrl = process.env.BASE_URL
function fetch(options) { function fetch(options) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const instance = axios.create({ const instance = axios.create({
...@@ -59,9 +58,9 @@ function fetch(options) { ...@@ -59,9 +58,9 @@ function fetch(options) {
} }
}) //响应数据的拦截 }) //响应数据的拦截
instance().then(res => { instance().then(res => {
console.log(res, '响应数据的拦截');
const resData = res.data || {} const resData = res.data || {}
const code = String(resData.code) const code = String(resData.code)
if (code === ResponseCode.success) { if (code === ResponseCode.success) {
resolve(resData) resolve(resData)
} else if (checkResponseCodeTokenError(code)) { } else if (checkResponseCodeTokenError(code)) {
......
...@@ -3,25 +3,34 @@ import { ...@@ -3,25 +3,34 @@ import {
} from "../fetch.js" } from "../fetch.js"
const Prefix = process.env.NODE_ENV === 'development' ? '/office' : '/office'; const Prefix = process.env.NODE_ENV === 'development' ? '/gs1' : '/gs1';
// 首页大轮播图 // 首页大轮播图
const homeBigImages = (params = {}) => { const homeBigImages = (params = {}) => {
return POST(`${Prefix}/indexCarouselManage/api/bigImages`, params) return POST(`${Prefix}/office/indexCarouselManage/api/bigImages`, params)
} }
// 要闻左侧图片资讯 // 要闻左侧图片资讯
const homePictureImageList = (params = {}) => { const homePictureImageList = (params = {}) => {
return POST(`${Prefix}/picture/api/pictureImageList`, params) return POST(`${Prefix}/office/picture/api/pictureImageList`, params)
} }
// 要闻右侧标题列表 // 要闻右侧标题列表
const homeImportantNewList = (params = {}) => { const homeImportantNewList = (params = {}) => {
return POST(`${Prefix}/news/api/importantNewList`, params) return POST(`${Prefix}/office/news/api/importantNewList`, params)
} }
// 党建文化新闻列表
const homeGet4PartyTopNews = (params = {}) => {
return POST(`${Prefix}/office/topicnews/api/get4PartyTopNews`, params)
}
export default { export default {
homeBigImages, homeBigImages,
homePictureImageList, homePictureImageList,
homeImportantNewList, homeImportantNewList,
homeGet4PartyTopNews,
} }
...@@ -67,6 +67,10 @@ import "nprogress/nprogress.css"; ...@@ -67,6 +67,10 @@ import "nprogress/nprogress.css";
NProgress.inc(0.3); NProgress.inc(0.3);
NProgress.configure({easing: "ease", speed: 500, showSpinner: false}); NProgress.configure({easing: "ease", speed: 500, showSpinner: false});
/*引入资源请求插件*/
import VueResource from 'vue-resource'
Vue.use(VueResource)
import moment from 'moment'; import moment from 'moment';
Vue.prototype.$moment = moment; Vue.prototype.$moment = moment;
......
...@@ -379,23 +379,23 @@ ...@@ -379,23 +379,23 @@
</div> </div>
<div class="spqqsfz-cont row"> <div class="spqqsfz-cont row">
<div class="spqqsfz-cont-left col-lg-3"> <div class="spqqsfz-cont-left col-lg-3">
<img src="../../assets/image/home/spqqsfz-tp.png" alt="" /> <img :src="spqqsfz.surl" alt="" />
</div> </div>
<div class="spqqsfz-cont-right col-lg-9"> <div class="spqqsfz-cont-right col-lg-9">
<!-- <img src="../../assets/image/home/spqqsfz-bj2.png" alt="" /> --> <!-- <img src="../../assets/image/home/spqqsfz-bj2.png" alt="" /> -->
<div class="right-cont"> <div class="right-cont">
<div class="row"> <div class="row">
<div class="col offset-2 offset-lg-3"> <div class="col offset-2 offset-lg-3">
kiddy color重彩油画棒A14018 {{ spqqsfz.name }}
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-8 offset-2 offset-lg-3"> <div class="col-8 offset-2 offset-lg-3">
<div class="pp">品牌:kiddy color</div> <div class="pp">品牌:{{ spqqsfz.pinPai }}</div>
<div class="jhl">净含量:一盒</div> <div class="jhl">净含量:{{ spqqsfz.netContent }}</div>
</div> </div>
<div class="col-8 offset-2 offset-lg-3"> <div class="col-8 offset-2 offset-lg-3">
公司名称:梁介福(广东)药业有限公司 公司名称:{{ spqqsfz.companyName }}
</div> </div>
</div> </div>
<div class="row"> <div class="row">
...@@ -568,8 +568,7 @@ export default { ...@@ -568,8 +568,7 @@ export default {
name: "要闻", name: "要闻",
link: "", link: "",
active: "yaowen", active: "yaowen",
data: [ data: [],
],
}, },
{ {
type: "zhongxin", type: "zhongxin",
...@@ -790,6 +789,7 @@ export default { ...@@ -790,6 +789,7 @@ export default {
isShow: false, isShow: false,
width: "auto", width: "auto",
}, },
spqqsfz: {}, // 商品全球身份证
djwh: { djwh: {
data: [ data: [
{ {
...@@ -924,6 +924,10 @@ export default { ...@@ -924,6 +924,10 @@ export default {
this.homePictureImageList(); this.homePictureImageList();
// 要闻右侧标题列表 // 要闻右侧标题列表
this.homeImportantNewList(); this.homeImportantNewList();
// 商品全球身份证
this.homeNewGtin();
// 党建文化新闻列表
this.homeGet4PartyTopNews();
}, },
// 首页大轮播图 // 首页大轮播图
async homeBigImages() { async homeBigImages() {
...@@ -961,9 +965,9 @@ export default { ...@@ -961,9 +965,9 @@ export default {
await this.$api.home.homeImportantNewList(); await this.$api.home.homeImportantNewList();
const { returnCode, data } = homeImportantNewListRes; const { returnCode, data } = homeImportantNewListRes;
if (returnCode === "0") { if (returnCode === "0") {
data.forEach(el => { data.forEach((el) => {
el.time = this.$moment(el.showtime).format('MM-DD'); el.time = this.$moment(el.showtime).format("MM-DD");
}) });
this.news[0].data = data; this.news[0].data = data;
} }
console.log(homeImportantNewListRes, "要闻右侧标题列表"); console.log(homeImportantNewListRes, "要闻右侧标题列表");
...@@ -971,7 +975,28 @@ export default { ...@@ -971,7 +975,28 @@ export default {
// 要闻、中心、地方、国际点击 // 要闻、中心、地方、国际点击
handelNewsTab(i) { handelNewsTab(i) {
if (this.news[i].link) { if (this.news[i].link) {
window.open(this.news[i].link, '_blank'); window.open(this.news[i].link, "_blank");
}
},
// 商品全球身份证
async homeNewGtin() {
this.$http.get("/gds/Data/NewGtin").then((res) => {
res.body.murl = `http://data-studio.gds.org.cn/${res.body.murl}`;
res.body.surl = `http://data-studio.gds.org.cn/${res.body.surl}`;
this.spqqsfz = res.body;
});
},
// 党建文化新闻列表
async homeGet4PartyTopNews() {
const params = {
count: 5,
classid: '',
}
const homeGet4PartyTopNewsRes =
await this.$api.home.homeGet4PartyTopNews(params);
const { returnCode, data } = homeGet4PartyTopNewsRes;
if (returnCode === "0") {
console.log(homeGet4PartyTopNewsRes, "党建文化新闻列表");
} }
}, },
// 我要申请商品条码 // 我要申请商品条码
...@@ -1078,6 +1103,11 @@ export default { ...@@ -1078,6 +1103,11 @@ export default {
.dzfwMessage { .dzfwMessage {
width: auto; width: auto;
} }
.jiaodiantu {
.carousel-inner {
height: 450px !important;
}
}
} }
@media screen and (max-width: 992px) { @media screen and (max-width: 992px) {
.banner { .banner {
...@@ -1207,7 +1237,7 @@ export default { ...@@ -1207,7 +1237,7 @@ export default {
} }
} }
.carousel-inner { .carousel-inner {
height: 450px; // height: 450px;
.carousel-item { .carousel-item {
height: 100%; height: 100%;
width: 100%; width: 100%;
......
...@@ -62,6 +62,14 @@ module.exports = { ...@@ -62,6 +62,14 @@ module.exports = {
pathRewrite: { pathRewrite: {
"^/gs1": "/" "^/gs1": "/"
} }
},
"/gds": {
target: 'http://data-studio.gds.org.cn', // 原地址
changeOrigin: true,
ws: true,
pathRewrite: {
"^/gds": "/"
}
} }
} }
} }
......
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