diff --git a/src/api/index.js b/src/api/index.js index f7ea8892..ddeb3bac 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -//通讯录查询 +//新闻列表 export function newList(query) { return request({ url: '/transaction/website/newsList', @@ -8,3 +8,11 @@ export function newList(query) { params: query }) } + +//新闻详情 +export function newDetails(id) { + return request({ + url: '/transaction/website/news/'+id, + method: 'get', + }) +} diff --git a/src/api/interaction/index.js b/src/api/interaction/index.js index 4434ea13..7341e2ec 100644 --- a/src/api/interaction/index.js +++ b/src/api/interaction/index.js @@ -3,7 +3,7 @@ import request from '@/utils/request' //互动交流 export function interactionList(query) { return request({ - url: '/website/communicateList', + url: '/transaction/website/communicateList', method: 'get', params: query }) diff --git a/src/api/policy/index.js b/src/api/policy/index.js new file mode 100644 index 00000000..8f95d669 --- /dev/null +++ b/src/api/policy/index.js @@ -0,0 +1,10 @@ +import request from '@/utils/request' + +//成交公告 +export function policyList(query) { + return request({ + url: '/transaction/website/outproject/publicity', + method: 'get', + params: query + }) +} diff --git a/src/api/supply/index.js b/src/api/supply/index.js new file mode 100644 index 00000000..d46fd564 --- /dev/null +++ b/src/api/supply/index.js @@ -0,0 +1,10 @@ +import request from '@/utils/request' + +//个人供求 +export function supplyList(query) { + return request({ + url: '/transaction/website/supplyDemandList', + method: 'get', + params: query + }) +} diff --git a/src/main.js b/src/main.js index 831b00ef..9261272f 100644 --- a/src/main.js +++ b/src/main.js @@ -12,9 +12,12 @@ import store from './store/' import './permission' // permission control import { getDicts } from "@/utils/data"; -// -// //全局方法挂载 +import { selectDictLabel , onClickLeft } from "@/utils/utils"; + +//全局方法挂载 Vue.prototype.getDicts = getDicts +Vue.prototype.selectDictLabel = selectDictLabel +Vue.prototype.onClickLeft = onClickLeft // Vant 引用 import Vant from 'vant'; @@ -27,6 +30,7 @@ if ('addEventListener' in document) { FastClick.attach(document.body); }, false); } + //设置动态登录页 router.beforeEach((to, from, next) => { if (to.meta.title) { diff --git a/src/router/index.js b/src/router/index.js index 6dc2674a..db78923b 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -257,6 +257,15 @@ export const constantRoutes = [ hidden: true, }, component: (resolve) => require(['@/views/user/supply/index'], resolve) + }, + { + path: '/policy', + name: 'policy', + meta: { + title: '政策法规', + hidden: true, + }, + component: (resolve) => require(['@/views/policy/index'], resolve) } ]; diff --git a/src/utils/utils.js b/src/utils/utils.js new file mode 100644 index 00000000..5ad9b637 --- /dev/null +++ b/src/utils/utils.js @@ -0,0 +1,16 @@ + +export function selectDictLabel(datas, value) { + var actions = []; + Object.keys(datas).some((key) => { + if (datas[key].dictValue == ('' + value)) { + actions.push(datas[key].dictLabel); + return true; + } + }) + return actions.join(''); +} + +//回退 +export function onClickLeft(){ + history.back(-1); +} diff --git a/src/views/index.vue b/src/views/index.vue index 1eecc591..a89dc308 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -15,8 +15,8 @@
- -

新闻资讯

+ +

新闻资讯

@@ -26,7 +26,7 @@

项目公告

- +

政策法规

diff --git a/src/views/interaction/index.vue b/src/views/interaction/index.vue index 837b7d69..9b5c7636 100644 --- a/src/views/interaction/index.vue +++ b/src/views/interaction/index.vue @@ -11,32 +11,16 @@ :finished="finished" finished-text="没有更多了" style="margin-top: 10px;" + @load="getList()" > - + - - - - - - - - @@ -46,7 +30,7 @@ + + diff --git a/src/views/policy/policyDetail.vue b/src/views/policy/policyDetail.vue new file mode 100644 index 00000000..eba82971 --- /dev/null +++ b/src/views/policy/policyDetail.vue @@ -0,0 +1,410 @@ + + + + + diff --git a/src/views/supply/index.vue b/src/views/supply/index.vue index b6c13f6e..35814323 100644 --- a/src/views/supply/index.vue +++ b/src/views/supply/index.vue @@ -14,20 +14,14 @@ :finished="finished" finished-text="没有更多了" style="margin-top: 10px;" + @load="getList" > - - - - -