Commit 66790f40 by Jianli Ou

Merge branch 'master' of https://gitee.com/gs1-office-web-sit/gs1

parents 0a89bd98 5e787238
...@@ -16,13 +16,17 @@ const getCaptcha = (query = {}) => { ...@@ -16,13 +16,17 @@ const getCaptcha = (query = {}) => {
} }
import home from "./module/home.js" import home from "./module/home.js"
import org from "./module/org.js"
import business from "./module/business.js" import business from "./module/business.js"
import search from "./module/search.js" import search from "./module/search.js"
import service from "./module/service.js"
const api = { const api = {
home, home,
org,
business, business,
search, search,
service,
getCaptcha, getCaptcha,
} }
......
import { import {
POST POST, POSTFORM, UPLOAD
} from "../fetch.js" } from "../fetch.js"
...@@ -32,6 +32,17 @@ const homeSmallImages = (params = {}) => { ...@@ -32,6 +32,17 @@ const homeSmallImages = (params = {}) => {
return POST(`${Prefix}/office/indexCarouselManage/api/smallImages`, params) return POST(`${Prefix}/office/indexCarouselManage/api/smallImages`, params)
} }
// 获取定制服务
const customService = (params = {}) => {
return POST(`${Prefix}/office/userfunctionbinding/api/find`, params)
}
// 更新定制服务
const updateCustomService = (params = {}) => {
return POSTFORM(`${Prefix}/office/userfunctionbinding/api/update`, params)
}
export default { export default {
homeBigImages, homeBigImages,
...@@ -39,4 +50,6 @@ export default { ...@@ -39,4 +50,6 @@ export default {
homeImportantNewList, homeImportantNewList,
homeGet4PartyTopNews, homeGet4PartyTopNews,
homeSmallImages, homeSmallImages,
customService,
updateCustomService,
} }
import {
POST
} from "../fetch.js"
const Prefix = process.env.NODE_ENV === 'development' ? '/gs1' : '';
// 获取编码机构详情
const orgGetBranchDetail = (params = {}) => {
return POST(`${Prefix}/office/branch/api/getBranchDetail`, params)
}
export default {
orgGetBranchDetail,
}
import {
POST
} from "../fetch.js"
const Prefix = process.env.NODE_ENV === 'development' ? '/gs1' : '';
// 获取条码图书
const getCodeBook = (params = {}) => {
return POST(`${Prefix}/office/product/api/findPage`, params)
}
export default {
getCodeBook,
}
...@@ -69,7 +69,7 @@ export function handleResponseSuccess(res = {}) { ...@@ -69,7 +69,7 @@ export function handleResponseSuccess(res = {}) {
success: true, success: true,
returnCode: res.code || ResponseCode.success, returnCode: res.code || ResponseCode.success,
returnMsg: res.msg, returnMsg: res.msg,
data: res.data || null data: res.data || res.page || null
} }
} }
......
...@@ -22,9 +22,9 @@ ...@@ -22,9 +22,9 @@
</div> </div>
</div> </div>
</div> </div>
<!-- <div class="d-none d-lg-block banner-tp">--> <!-- <div class="d-none d-lg-block banner-tp">-->
<!-- <img :src="el.picIndexPath" alt="" class="container"/>--> <!-- <img :src="el.picIndexPath" alt="" class="container"/>-->
<!-- </div>--> <!-- </div>-->
<div class="banner-bg"> <div class="banner-bg">
<img :src="el.picIndexPath" alt=""/> <img :src="el.picIndexPath" alt=""/>
</div> </div>
...@@ -993,34 +993,52 @@ export default { ...@@ -993,34 +993,52 @@ export default {
}, },
mounted() { mounted() {
this.getCustomService() this.getCustomService()
// 从后端获取最新的定制服务
this.getCustomServiceFromServer()
}, },
methods: { methods: {
getCustomService() { getCustomService() {
let service = localStorage.getItem('gs-custom-service') || '' let service = localStorage.getItem('gs-custom-service') || ''
console.log('getCustomService-----------', service) console.log('getCustomService-----------', service)
if(service) { if (service) {
service = JSON.parse(service) service = JSON.parse(service)
this.updateCustomService(service) this.showCustomService(service)
}
},
async getCustomServiceFromServer() {
const searchGlnRes = await this.$api.home.customService();
const {returnCode, data} = searchGlnRes;
if (returnCode === "0") {
localStorage.setItem('gs-custom-service', JSON.stringify(data))
this.showCustomService(data)
} }
}, },
updateCustomService(list){
this.dzfw.forEach(item=>{ showCustomService(list) {
this.dzfw.forEach(item => {
item.isChecked = item.name === "更多定制" item.isChecked = item.name === "更多定制"
list.forEach(_item=>{ list.forEach(_item => {
if(_item==item.id){ if (_item == item.id) {
item.isChecked = true item.isChecked = true
} }
}) })
}) })
}, },
setCustomService() { setCustomService() {
const service = [] const service = []
this.dzfw.forEach(item=>{ this.dzfw.forEach(item => {
if(item.isChecked && item.name !== "更多定制"){ if (item.isChecked && item.name !== "更多定制") {
service.push(parseInt(item.id,10)) service.push(parseInt(item.id, 10))
} }
}) })
localStorage.setItem('gs-custom-service',JSON.stringify(service)) localStorage.setItem('gs-custom-service', JSON.stringify(service))
this.updateCustomService(service)
},
async updateCustomService(service) {
const searchGlnRes = await this.$api.home.updateCustomService({service});
}, },
// 初始化 // 初始化
init() { init() {
...@@ -1187,7 +1205,7 @@ export default { ...@@ -1187,7 +1205,7 @@ export default {
setTimeout(() => { setTimeout(() => {
this.messageDialog.isShow = false; this.messageDialog.isShow = false;
}, 2000); }, 2000);
}else{ } else {
this.setCustomService() this.setCustomService()
} }
console.log(this.dzfw[i], "newValue"); console.log(this.dzfw[i], "newValue");
...@@ -1667,6 +1685,7 @@ export default { ...@@ -1667,6 +1685,7 @@ export default {
@media screen and (max-width: 992px) { @media screen and (max-width: 992px) {
z-index: -1 z-index: -1
} }
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;
......
...@@ -74,83 +74,224 @@ export default { ...@@ -74,83 +74,224 @@ export default {
id: "huabei", id: "huabei",
name: "华北", name: "华北",
list: [ list: [
"北京分中心", {
"天津分中心", name: '北京分中心',
"河北分中心", branchCode: '1105',
"山西分中心", },
"内蒙古分中心", {
name: '天津分中心',
branchCode: '1201',
},
{
name: '河北分中心',
branchCode: '1301',
},
{
name: '山西分中心',
branchCode: '1405',
},
{
name: '内蒙古分中心',
branchCode: '1505',
},
], ],
}, },
{ {
id: "dongbei", id: "dongbei",
name: "东北", name: "东北",
list: [ list: [
"辽宁分中心", {
"沈阳分中心", name: '辽宁分中心',
"大连分中心", branchCode: '2101',
"吉林分中心", },
"长春分中心", {
"黑龙江分中心", name: '沈阳分中心',
"哈尔滨分中心", branchCode: '2105',
},
{
name: '大连分中心',
branchCode: '2106',
},
{
name: '吉林分中心',
branchCode: '2201',
},
{
name: '长春分中心',
branchCode: '2205',
},
{
name: '黑龙江分中心',
branchCode: '2301',
},
{
name: '哈尔滨分中心',
branchCode: '',
},
], ],
}, },
{ {
id: "huadong", id: "huadong",
name: "华东", name: "华东",
list: [ list: [
"上海分中心", {
"江苏分中心", name: '上海分中心',
"南京办事处", branchCode: '3101',
"浙江分中心", },
"杭州分中心", {
"宁波分中心", name: '江苏分中心',
"安徽分中心", branchCode: '3201',
"福建分中心", },
"厦门办事处", {
"江西分中心", name: '南京办事处',
"山东分中心", branchCode: '3205',
"青岛办事处", },
"烟台办事处", {
name: '浙江分中心',
branchCode: '3301',
},
{
name: '杭州分中心',
branchCode: '3302',
},
{
name: '宁波分中心',
branchCode: '3302',
},
{
name: '安徽分中心',
branchCode: '3405',
},
{
name: '福建分中心',
branchCode: '3501',
},
{
name: '厦门办事处',
branchCode: '3505',
},
{
name: '江西分中心',
branchCode: '3605',
},
{
name: '山东分中心',
branchCode: '3701',
},
{
name: '青岛办事处',
branchCode: '3705',
},
{
name: '烟台办事处',
branchCode: '3706',
},
], ],
}, },
{ {
id: "huazhongnan", id: "huazhongnan",
name: "华中、华南", name: "华中、华南",
list: [ list: [
"河南分中心", {
"湖北分中心", name: '河南分中心',
"武汉分中心", branchCode: '4101',
"湖南分中心", },
"广东分中心", {
"深圳分中心", name: '湖北分中心',
"广州分中心", branchCode: '4201',
"珠海分中心", },
"广西分中心", {
"海南分中心", name: '武汉分中心',
branchCode: '4202',
},
{
name: '湖南分中心',
branchCode: '4305',
},
{
name: '广东分中心',
branchCode: '4401',
},
{
name: '深圳分中心',
branchCode: '4402',
},
{
name: '广州分中心',
branchCode: '4404',
},
{
name: '珠海分中心',
branchCode: '4405',
},
{
name: '广西分中心',
branchCode: '4505',
},
{
name: '海南分中心',
branchCode: '4605',
},
], ],
}, },
{ {
id: "xinan", id: "xinan",
name: "西南", name: "西南",
list: [ list: [
"四川分中心", {
"成都办事处", name: '四川分中心',
"重庆分中心", branchCode: '5101',
"贵州分中心", },
"云南分中心", {
"西藏分中心", name: '成都办事处',
branchCode: '5105',
},
{
name: '重庆分中心',
branchCode: '5106',
},
{
name: '贵州分中心',
branchCode: '5205',
},
{
name: '云南分中心',
branchCode: '5305',
},
{
name: '西藏分中心',
branchCode: '5405',
},
], ],
}, },
{ {
id: "xibei", id: "xibei",
name: "西北", name: "西北",
list: [ list: [
"陕西分中心", {
"西安分中心", name: '陕西分中心',
"甘肃分中心", branchCode: '6106',
"青海分中心", },
"宁夏分中心", {
"新疆分中心", name: '西安分中心',
branchCode: '6107',
},
{
name: '甘肃分中心',
branchCode: '6201',
},
{
name: '青海分中心',
branchCode: '6305',
},
{
name: '宁夏分中心',
branchCode: '6405',
},
{
name: '新疆分中心',
branchCode: '6501',
},
], ],
}, },
], ],
......
...@@ -6,16 +6,11 @@ ...@@ -6,16 +6,11 @@
<div class="branchMsg-message"> <div class="branchMsg-message">
<div class="row"> <div class="row">
<div class="col-lg-6"></div> <div class="col-lg-6"></div>
<div class="tip col-lg-6 col-12"> <div class="tip col-lg-6 col-12" v-show="msg.addressDescription">
<div class="tip-title"><span>重要提示</span></div> <div class="tip-title"><span>重要提示</span></div>
<div class="tip-text"> <div class="tip-text">
<p></p> <p></p>
<p> <p v-html="msg.addressDescription"></p>
湖北编码分支机构办理武汉所辖市以外的湖北省内企业的条码申办及相关业务,武汉市企业欲办理的,请联系<a
href="/org/article.aspx?code_id=4202"
>武汉编码分支机构</a
>
</p>
<p></p> <p></p>
</div> </div>
</div> </div>
...@@ -25,36 +20,36 @@ ...@@ -25,36 +20,36 @@
<ul class="branchMsg-ul"> <ul class="branchMsg-ul">
<li class="row"> <li class="row">
<div class="col-lg-2 col-4">联系人:</div> <div class="col-lg-2 col-4">联系人:</div>
<div class="col-lg-10 col-8">吴永飞</div> <div class="col-lg-10 col-8">{{msg.branchSimname}}</div>
</li> </li>
<li class="row"> <li class="row">
<div class="col-lg-2 col-4">&nbsp;&nbsp;&nbsp;&nbsp;话:</div> <div class="col-lg-2 col-4">&nbsp;&nbsp;&nbsp;&nbsp;话:</div>
<div class="col-lg-10 col-8">027-88224190</div> <div class="col-lg-10 col-8">{{msg.tel1}}</div>
</li> </li>
<li class="row"> <li class="row">
<div class="col-lg-2 col-4">&nbsp;&nbsp;&nbsp;&nbsp;真:</div> <div class="col-lg-2 col-4">&nbsp;&nbsp;&nbsp;&nbsp;真:</div>
<div class="col-lg-10 col-8">010-64298962</div> <div class="col-lg-10 col-8">{{msg.fax}}</div>
</li> </li>
<li class="row"> <li class="row">
<div class="col-lg-2 col-4">&nbsp;&nbsp;&nbsp;&nbsp;箱:</div> <div class="col-lg-2 col-4">&nbsp;&nbsp;&nbsp;&nbsp;箱:</div>
<div class="col-lg-10 col-8">tiaomabj@126.com</div> <div class="col-lg-10 col-8">{{msg.mail}}</div>
</li> </li>
<li class="row"> <li class="row">
<div class="col-lg-2 col-4">&nbsp;&nbsp;&nbsp;&nbsp;址:</div> <div class="col-lg-2 col-4">&nbsp;&nbsp;&nbsp;&nbsp;址:</div>
<div class="col-lg-10 col-8">http://tiaoma.12365.net.cn</div> <div class="col-lg-10 col-8">{{msg.website}}</div>
</li> </li>
<li class="row"> <li class="row">
<div class="col-lg-2 col-4">&nbsp;&nbsp;&nbsp;&nbsp;址:</div> <div class="col-lg-2 col-4">&nbsp;&nbsp;&nbsp;&nbsp;址:</div>
<div class="col-lg-10 col-8">北京市东城区和平里东街20号</div> <div class="col-lg-10 col-8">{{msg.branchAddress}}</div>
</li> </li>
<li class="row"> <li class="row">
<div class="col-lg-2 col-4">&nbsp;&nbsp;&nbsp;&nbsp;编:</div> <div class="col-lg-2 col-4">&nbsp;&nbsp;&nbsp;&nbsp;编:</div>
<div class="col-lg-10 col-8">100013</div> <div class="col-lg-10 col-8">{{msg.branchPostcode}}</div>
</li> </li>
<li class="row"> <li class="row">
<div class="col-lg-2 col-4">&nbsp;&nbsp;&nbsp;&nbsp;介:</div> <div class="col-lg-2 col-4">&nbsp;&nbsp;&nbsp;&nbsp;介:</div>
<div class="col-lg-10 col-8"> <div class="col-lg-10 col-8">
我们是中国物品编码中心设在北京的分支机构,负责北京地区企业申请使用商品条码及管理工作。负责初审本地区商品条码注册、变更、续展和注销;负责本地区商品条码技术培训,条码质检站的日常检测和管理及市场抽查检测,提供商品条码技术咨询与服务。 {{msg.description}}
</div> </div>
</li> </li>
</ul> </ul>
...@@ -78,8 +73,27 @@ export default { ...@@ -78,8 +73,27 @@ export default {
tip: { tip: {
show: true, show: true,
}, },
msg: {},
}; };
}, },
created() {
this.orgGetBranchDetail();
},
methods: {
// 获取编码机构详情
async orgGetBranchDetail() {
const params = {
branchCode: this.$route.query.branchCode,
};
const orgGetBranchDetailRes =
await this.$api.org.orgGetBranchDetail(params);
const { returnCode, data } = orgGetBranchDetailRes;
if (returnCode === "0") {
console.log(orgGetBranchDetailRes, "获取编码机构详情");
this.msg = data;
}
},
},
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div class="fzzx-list"> <div class="fzzx-list">
<div class="row" v-for="(tmpA, i) in newList" :key="i"> <div class="row" v-for="(tmpA, i) in newList" :key="i">
<div class="col-6" v-for="(tmpB, ii) in tmpA" :key="ii"> <div class="col-6" v-for="(tmpB, ii) in tmpA" :key="ii">
<span @click="openMsg(ii)">{{ tmpB }}</span> <span @click="openMsg(tmpB.branchCode)">{{ tmpB.name }}</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -24,10 +24,12 @@ export default { ...@@ -24,10 +24,12 @@ export default {
}, },
}, },
methods: { methods: {
openMsg(i) { openMsg(branchCode) {
console.log(i, "i");
this.$router.push({ this.$router.push({
path: "/Org/BranchMsg", path: "/Org/BranchMsg",
query: {
branchCode,
},
}); });
}, },
}, },
......
...@@ -6,16 +6,17 @@ ...@@ -6,16 +6,17 @@
<el-tab-pane label="条码图书" name="first"> <el-tab-pane label="条码图书" name="first">
<div class="book-card" :key="i" v-for="(item,i) in bookList"> <div class="book-card" :key="i" v-for="(item,i) in bookList">
<div class="book-img"> <div class="book-img">
<img :src="item.img" alt=""> <img :src="item.graph" alt="">
</div> </div>
<div class="book-content"> <div class="book-content">
<div class="title">{{ item.name }}</div> <div class="title">{{ item.prename }}</div>
<div class="price">¥{{ item.price }}</div> <div class="price">¥{{ item.price }}</div>
<div class="desc"> <div class="desc">
<span>{{ item.author }}</span><span>{{ item.date }}</span><span>{{ item.press }}</span> <span>{{ item.author }}</span><span>{{ item.predate }}</span><span>{{ item.company }}</span>
</div> </div>
</div> </div>
</div> </div>
<pages :pages="page" @toPagesFather="getBooks"></pages>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="软件下载" name="second"> <el-tab-pane label="软件下载" name="second">
...@@ -52,7 +53,10 @@ ...@@ -52,7 +53,10 @@
</template> </template>
<script> <script>
import pages from "../comps/pages.vue";
export default { export default {
components: {pages},
data() { data() {
return { return {
activeName: 'second', activeName: 'second',
...@@ -96,27 +100,27 @@ export default { ...@@ -96,27 +100,27 @@ export default {
}, },
], ],
bookList: [], bookList: [],
page: {
currentPage: 1,
pageSize: 10,
pageCount: 1,
total: 10,
},
} }
}, },
created() { created() {
this.getBooks() this.getBooks()
}, },
methods: { methods: {
getBooks() { async getBooks(page = 1) {
for (let i = 0; i < 10; ++i) { const res = await this.$api.service.getCodeBook({page: page, size: this.page.pageSize})
this.bookList.push( const {returnCode, data} = res;
{ if (returnCode === "0") {
id: i, this.bookList = data.list
name: '条码小达人', this.page.currentPage = data.currPage
img:require('./img/5d1d4969-956a-4a85-9631-e45605b0c221.jpg'), this.page.total = data.totalCount
price: 30.00, this.page.pageCount = data.totalPage
author: '张海成 张铎',
date: '2010.1',
press: '武汉大学出版社'
},
)
} }
console.log(this.bookList)
} }
} }
}; };
...@@ -132,9 +136,11 @@ export default { ...@@ -132,9 +136,11 @@ export default {
border: 1px solid rgba(197, 216, 238, 0.5); border: 1px solid rgba(197, 216, 238, 0.5);
margin-bottom: 30px; margin-bottom: 30px;
cursor: pointer; cursor: pointer;
&:hover{
&:hover {
box-shadow: 0 4px 15px 2px rgba(4, 64, 141, 0.08); box-shadow: 0 4px 15px 2px rgba(4, 64, 141, 0.08);
} }
.book-img { .book-img {
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -151,26 +157,27 @@ export default { ...@@ -151,26 +157,27 @@ export default {
.book-content { .book-content {
padding: 16px 20px; padding: 16px 20px;
.title { > .title {
font-size: 21px; font-size: 21px;
font-weight: 500; font-weight: 500;
color: #454545; color: #454545;
margin-bottom: 46px; height: 70px;
overflow: hidden;
} }
.price { > .price {
font-size: 32px; font-size: 32px;
font-weight: 500; font-weight: 500;
color: #F23535; color: #F23535;
line-height: 45px; line-height: 45px;
margin-bottom: 20px; margin-bottom: 15px;
} }
.desc { > .desc {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: #666666; color: #666666;
line-height: 20px; line-height: 18px;
} }
} }
} }
...@@ -183,9 +190,11 @@ export default { ...@@ -183,9 +190,11 @@ export default {
border: 1px solid rgba(197, 216, 238, 0.5); border: 1px solid rgba(197, 216, 238, 0.5);
margin-bottom: 25px; margin-bottom: 25px;
cursor: pointer; cursor: pointer;
&:hover{
&:hover {
box-shadow: 0px 4px 15px 2px rgba(4, 64, 141, 0.08); box-shadow: 0px 4px 15px 2px rgba(4, 64, 141, 0.08);
} }
.app-img { .app-img {
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -253,7 +262,7 @@ export default { ...@@ -253,7 +262,7 @@ export default {
} }
} }
.el-tabs__content{ .el-tabs__content {
padding-top: 14px; padding-top: 14px;
} }
} }
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
<el-pagination <el-pagination
:current-page="pages.currentPage" :current-page="pages.currentPage"
:page-size="pages.pageSize" :page-size="pages.pageSize"
:pager-count="pages.pageCount"
layout="prev, pager, next" layout="prev, pager, next"
:total="pages.total" :total="pages.total"
background background
......
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