From 4ccdc4e8661cb3d1354286ad8f76bd6c52c8c2f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BA=9E=E4=B8=9C=E6=97=AD?= <850374051@qq.com> Date: Thu, 17 Jun 2021 17:32:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E7=AB=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 42 ++++++++++++------------- static/css/index.css | 5 +++ static/js/api/items.js | 7 +++++ static/js/common/tools.js | 4 +-- static/js/project/index.js | 21 +++++++++++++ static/js/project/listingItems/items.js | 36 +++++++++++++++++++-- static/js/project/policy/policy.js | 37 ++++++++++++++++++---- static/js/project/user/login.js | 1 + view/listingItems/itemsDetail.html | 9 +++--- 9 files changed, 126 insertions(+), 36 deletions(-) diff --git a/index.html b/index.html index feb7efe..ad04fbf 100644 --- a/index.html +++ b/index.html @@ -117,7 +117,7 @@
- 政策法规更多> + 政策法规更多>
@@ -530,12 +530,12 @@- 交易规则更多> + 交易规则更多>
@@ -677,12 +677,12 @@- 资料下载更多> + 资料下载更多>
diff --git a/static/css/index.css b/static/css/index.css index d309f90..01310ba 100644 --- a/static/css/index.css +++ b/static/css/index.css @@ -267,6 +267,11 @@ .centerLeft-center .centerleft-center-tit01 span:last-child { float: right; + cursor: pointer; +} + +.centerLeft-center .centerleft-center-tit01 span:last-child:hover { + color: #007b76; } .centerLeft-center-middle { diff --git a/static/js/api/items.js b/static/js/api/items.js index db93141..426c7cc 100644 --- a/static/js/api/items.js +++ b/static/js/api/items.js @@ -69,3 +69,10 @@ var signup = '/transaction/signup/getSignupByMemberIdAndProId'//判断当前登 id: 主键ID */ var signupSubmit = '/transaction/signup'//项目报名接口 + +/* +@purl /transaction/bidding +@param + id: 主键ID +*/ +var biddingSubmit = '/transaction/bidding'//出价 diff --git a/static/js/common/tools.js b/static/js/common/tools.js index 952e633..7b52d8c 100644 --- a/static/js/common/tools.js +++ b/static/js/common/tools.js @@ -341,8 +341,8 @@ define(['jquery', 'dialog'], function ($, dialog) { } }, /** - * skip 页面跳转 - * @param url 跳转页面链接 + * skip 获取时间 + * @param */ getNowFormatDate:function () { var date = new Date(); diff --git a/static/js/project/index.js b/static/js/project/index.js index eba2a67..2a195c6 100644 --- a/static/js/project/index.js +++ b/static/js/project/index.js @@ -218,6 +218,7 @@ define(['jquery', "template", "Tools", "echarts", 'swiper'], function ($, templa module.NewsInformation = function (data) { if (data.code == 200) { var content = data.data; + console.log(content) module.data.newsInformationList = content; var NewsInformationData = template('NewsInformationData', module.data); $("#NewsInformationContent").html(NewsInformationData); @@ -473,5 +474,25 @@ define(['jquery', "template", "Tools", "echarts", 'swiper'], function ($, templa document.getElementById(type).style.display = 'inline-table'; document.getElementById(type+'Btn').className = 'active'; } + + goDetail = function (id) { + tools.skip('view/listingItems/itemsDetail.html?id='+id); + } + + goListing = function () { + tools.skip('view/listingItems/itemsList.html'); + } + + goAnnouncementList = function (type) { + tools.skip('view/announcement/announcement.html?type='+type+'&searchKeyWord='); + } + + goNewList = function () { + tools.skip('view/new/newList.html'); + } + + goPolicy = function (type) { + tools.skip('view/policy/policy.html?type='+type); + } return module; }); \ No newline at end of file diff --git a/static/js/project/listingItems/items.js b/static/js/project/listingItems/items.js index ea5b2f7..72c22fb 100644 --- a/static/js/project/listingItems/items.js +++ b/static/js/project/listingItems/items.js @@ -19,8 +19,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi'], function ($, templ //项目基本信息 tools.doGet(showImg + '/'+getQueryVariable('id'), {}, module.showImgInformation,true); - //挂牌项目竞价记录 - tools.doGet(biddinglist, {projectId:getQueryVariable('id')}, module.biddinglistInformation,true); + }; @@ -55,7 +54,8 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi'], function ($, templ var outProjectInformationData = template('outProjectInformationData', module.data); $("#outProjectInformationContent").html(outProjectInformationData); - + //挂牌项目竞价记录 + tools.doGet(biddinglist, {projectId:getQueryVariable('id')}, module.biddinglistInformation,true); //挂牌价格字典 tools.doGet(Dictionaries+'/price_unit', {}, module.unitDictionaries,true); @@ -92,6 +92,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi'], function ($, templ //判断是否报名 tools.doGet(signup, {projectId:getQueryVariable('id'),depositStatus:'1',memberId:tools.getCookie('memberId')}, module.signup); + //焦点图 module.swiperBanner(); } @@ -126,6 +127,11 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi'], function ($, templ module.data.biddinglistInformationDetail = content; var biddinglistInformationData = template('biddinglistInformationData', module.data); $("#tabDetail4").html(biddinglistInformationData); + console.log(module.data.outProjectInformationDetail) + if(module.data.outProjectInformationDetail.biddingType != '拍卖'){ + document.getElementById('biddingTable').style.display = 'none'; + document.getElementById('biddingTitle').style.display = 'block'; + } } } @@ -198,6 +204,30 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi'], function ($, templ } } + //出价 + biddingSubmitMethod = function (data) { + var data = {}; + var projectId = getQueryVariable('id'); + var memberId = tools.getCookie('memberId'); + var userId = tools.getCookie('userId'); + var userAccount = tools.getCookie('phone'); + var userName = tools.getCookie('userName'); + var money = $('#money').val(); + var loginTime = tools.getNowFormatDate(); + data['projectId'] = projectId; + data['memberId'] = memberId; + data['userId'] = userId; + data['userAccount'] = userAccount; + data['userName'] = userName; + data['money'] = money; + data['loginTime'] = loginTime; + tools.doPost(biddingSubmit, data, module.biddingSubmitOpen); + } + + module.biddingSubmitOpen = function(){ + tools.initError('出价成功'); + } + //经济类型 module.economicTypeDictionaries = function (data) { if (data.code == 200 && module.data.outProjectInformationDetail.economicType!='') { diff --git a/static/js/project/policy/policy.js b/static/js/project/policy/policy.js index d5545d2..514ac6d 100644 --- a/static/js/project/policy/policy.js +++ b/static/js/project/policy/policy.js @@ -25,18 +25,43 @@ define(['jquery', "template", "Tools", "policyApi", "paging"], function ($, temp module.init = function (page) { - //政策法规 - tools.doGet(newList, {number:3,deptId:100,pageNum:module.data.pageNum,pageSize:module.data.pageSize}, module.policyInformation,true); + var type = getQueryVariable('type'); + if(type != undefined && type != ''){ + console.log('搜索进入') + tabList(type); + //政策法规 + tools.doGet(newList, {number:3,deptId:100,pageNum:module.data.pageNum,pageSize:module.data.pageSize}, module.policyInformation,true); - //交易规则 - tools.doGet(newList, {number:4,deptId:100,pageNum:module.data.pageNum,pageSize:module.data.pageSize}, module.ruleInformation,true); + //交易规则 + tools.doGet(newList, {number:4,deptId:100,pageNum:module.data.pageNum,pageSize:module.data.pageSize}, module.ruleInformation,true); - //资料下载 - tools.doGet(newList, {number:5,deptId:100,pageNum:module.data.pageNum,pageSize:module.data.pageSize}, module.downloadInformation,true); + //资料下载 + tools.doGet(newList, {number:5,deptId:100,pageNum:module.data.pageNum,pageSize:module.data.pageSize}, module.downloadInformation,true); + }else{ + console.log('正常进入') + //政策法规 + tools.doGet(newList, {number:3,deptId:100,pageNum:module.data.pageNum,pageSize:module.data.pageSize}, module.policyInformation,true); + //交易规则 + tools.doGet(newList, {number:4,deptId:100,pageNum:module.data.pageNum,pageSize:module.data.pageSize}, module.ruleInformation,true); + + //资料下载 + tools.doGet(newList, {number:5,deptId:100,pageNum:module.data.pageNum,pageSize:module.data.pageSize}, module.downloadInformation,true); + } }; + //获取地址栏参数 + function getQueryVariable(variable){ + var query = window.location.search.substring(1); + var vars = query.split("&"); + for (var i=0;i立即出价