From d00db223ba670f951c384d803bdb04afc16c6d2d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BA=9E=E4=B8=9C=E6=97=AD?= <850374051@qq.com>
Date: Mon, 28 Jun 2021 09:17:20 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E9=97=AE=E9=A2=98=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
index.html | 13 +-
static/css/index.css | 13 +-
static/css/listingItems/items.css | 33 ++++-
static/css/main.css | 5 +-
static/js/api/items.js | 7 +
static/js/api/user.js | 20 ++-
static/js/common/tools.js | 53 +++++++-
static/js/lib/cupload/cupload.js | 65 ++++-----
static/js/project/demand/demand.js | 3 +
static/js/project/index.js | 75 ++++++-----
static/js/project/interact/interact.js | 53 +++++++-
static/js/project/listingItems/bond.js | 70 ++++++++--
static/js/project/listingItems/items.js | 146 ++++++++++++++++----
static/js/project/user/index.js | 171 ++++++++++++++++++------
view/bidding/biddingList.html | 4 +-
view/demand/demand.html | 2 +-
view/interact/interactList.html | 52 +++++--
view/listingItems/bond.html | 16 ++-
view/listingItems/itemsDetail.html | 66 +++++----
view/user/user.html | 17 ++-
20 files changed, 663 insertions(+), 221 deletions(-)
diff --git a/index.html b/index.html
index 11057df..85b3fdc 100644
--- a/index.html
+++ b/index.html
@@ -247,6 +247,7 @@
{{value.projectName}} |
{{value.biddingType}} |
- {{value.signupStopTime.substr(0,10)}} |
- {{value.biddingStartTime.substr(0,10)}} |
+ {{value.signupStopTime}} |
+ {{value.biddingStartTime}} |
{{value.price}} |
{{value.money}} |
进行中 |
@@ -605,7 +606,7 @@
个人供求项目推荐
-
+
更多>
@@ -677,7 +678,7 @@
互动交流
-
+
更多>
diff --git a/static/css/index.css b/static/css/index.css
index 9f8e311..35e60be 100644
--- a/static/css/index.css
+++ b/static/css/index.css
@@ -342,14 +342,23 @@
.centerLeft-center-bottom p:first-child {
background: url("../images/icon3.png") 0px no-repeat;
padding-left: 16px;
- width: 70%;
+ width: 66%;
border-right: 1px solid #e3e3e3;
+ white-space:nowrap;
+ text-overflow:ellipsis;
+ overflow:hidden;
+ float: left;
+}
+.centerLeft-center-bottom p:nth-child(2) {
+ width: 30%;
+ float: right;
+ text-align: center;
}
.centerLeft-center-bottom p {
font-size: 12px;
color: #adadad;
- display: inline-block;
+ display: block;
}
.centerLeft-center-bottom {
diff --git a/static/css/listingItems/items.css b/static/css/listingItems/items.css
index 3aee17a..61ad3b7 100644
--- a/static/css/listingItems/items.css
+++ b/static/css/listingItems/items.css
@@ -294,10 +294,25 @@
.swiperTit{
font-size: 24px;
margin-top: 18px;
+ margin-bottom: 20px;
+}
+.swiperTable{
+ border-collapse: collapse;
}
-
.swiperTable tr:first-child td{
- color: #737373!important;
+ color: #FFF!important;
+ padding: 0 15px;
+ line-height: 60px;
+}
+
+.swiperTable tr:first-child td:nth-child(1){
+ text-align: center;
+ width: 12%;
+ background: #c71622;
+}
+
+.swiperTable tr:first-child td:nth-child(2){
+ background-image: linear-gradient(to right, #e82d2d , #f6a4ab);
}
.swiperTable tr td{
@@ -306,7 +321,7 @@
.swiperTable tr td:nth-child(2){
color:#c21f3a;
- padding-left: 28px;
+ /*padding-left: 28px;*/
}
.swiperTable tr td:nth-child(2) span{
@@ -315,7 +330,7 @@
.swiperInput{
padding: 12px 14px;
- background-color: #f3f3f3;
+ background-color: #f3f3f3;margin-top: 20px;
}
nput::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
@@ -390,6 +405,10 @@ input::-webkit-inner-spin-button {
margin-left: 10px;
}
+.tableTime{
+ margin-top: 20px;
+}
+
.tableTime tr td{
padding: 6px 0px;
}
@@ -545,12 +564,13 @@ input::-webkit-inner-spin-button {
padding: 5px 0px;
}
.bondTable tr td:nth-child(odd){
+ width: 10%;
text-align: right;
}
.bondTable input[type='text']{
border: 1px solid #e3e3e3;
- width: 90%;
+ width: 30%;
height: 30px;
margin-left: 10px;
padding-left: 10px;
@@ -564,10 +584,11 @@ input::-webkit-inner-spin-button {
color: #ffffff;
background: #007b76;
border-radius: 0;
- width: 20%;
+ width: 30%;
margin: 0 auto;
border: none;
padding: 8px;
+ margin-left: 10px;
}
.rule p{
diff --git a/static/css/main.css b/static/css/main.css
index 36d60a7..faa50a6 100644
--- a/static/css/main.css
+++ b/static/css/main.css
@@ -286,8 +286,9 @@ body {
.clear {
clear: both;
- height: 0;
- !important;
+ height: 0 !important;
+ padding: 0 !important;
+ margin: 0 !important;
}
/*三角形*/
diff --git a/static/js/api/items.js b/static/js/api/items.js
index 426c7cc..0ecbbdd 100644
--- a/static/js/api/items.js
+++ b/static/js/api/items.js
@@ -76,3 +76,10 @@ var signupSubmit = '/transaction/signup'//项目报名接口
id: 主键ID
*/
var biddingSubmit = '/transaction/bidding'//出价
+
+/*
+@purl /common/base64Attach
+@param
+ id: 主键ID
+*/
+var base64Upload = '/common/base64Attach'//上传凭证
diff --git a/static/js/api/user.js b/static/js/api/user.js
index 7abe8f9..b41c511 100644
--- a/static/js/api/user.js
+++ b/static/js/api/user.js
@@ -66,4 +66,22 @@ var userDemandUpdate = '/transaction/demand' //通过ID查询个人供求
@purl /transaction/website/data/type
@param
*/
-var dictionaries = '/transaction/website/data/type' //数据字典
\ No newline at end of file
+var dictionaries = '/transaction/website/data/type' //数据字典
+
+/*
+@purl /common/base64Attach
+@param
+*/
+var base64Attach = '/common/base64Attach' //数据字典
+
+/*
+@purl /common/base64Attach
+@param
+*/
+var showUserImg = 'transaction/member/showImg/memberId' //用户图片展示
+
+/*
+@purl /common/base64Attach
+@param
+*/
+var deleteUserImg = 'transaction/member/deleteImg/attachId' //用户图片展示
\ No newline at end of file
diff --git a/static/js/common/tools.js b/static/js/common/tools.js
index 0ef9f34..8ba8bb2 100644
--- a/static/js/common/tools.js
+++ b/static/js/common/tools.js
@@ -1,4 +1,4 @@
-var serverApi = ''
+var serverApi = '';
define(['jquery', 'dialog'], function ($, dialog) {
// 工具类
function Tool() {
@@ -18,7 +18,7 @@ define(['jquery', 'dialog'], function ($, dialog) {
doPost: function (url, data, cb, Bearer) {
var _this = this;
// data.deptId = 100 ;
- // console.log(JSON.stringify(data))
+ // console.log(data)
var headAttribute = '';
if (Bearer && Bearer == true || _this.getCookie('Admin-Token') == '') {
headAttribute = function (xhr) {
@@ -56,6 +56,55 @@ define(['jquery', 'dialog'], function ($, dialog) {
}
});
},
+ /**
+ * ajax post
+ * @param url (String)
+ * @param data (Json) 需要提交的数据
+ * @param cb(Function) 回调函数
+ * @param Bearer(Boolean) 是否需要Bearer,不需要传true
+ */
+ doPostImg: function (url, data, cb, Bearer) {
+ var _this = this;
+ // data.deptId = 100 ;
+ // console.log(data)
+ var headAttribute = '';
+ if (Bearer && Bearer == true || _this.getCookie('Admin-Token') == '') {
+ headAttribute = function (xhr) {
+ xhr.setRequestHeader("Content-Type", 'application/json;charset=utf-8');
+ }
+ } else {
+ headAttribute = function (xhr) {
+ xhr.setRequestHeader("Content-Type", 'application/json;charset=utf-8');
+ xhr.setRequestHeader('Authorization', 'Bearer ' + _this.getCookie('Admin-Token'))
+ }
+ }
+ $.ajax({
+ url: ajaxJsUrl + url + '?=' + Math.random(),
+ type: 'POST',
+ data: JSON.stringify(data),
+ dataType: 'json',
+ traditional:true,
+ contentType: "application/json",
+ beforeSend: headAttribute,
+ success: function (data) {
+ var code = data.code;
+ var msg = data.msg;
+ if (code === 401) {
+ _this.removeAllCookie();
+ _this.initDialog('系统提示', '登录状态已过期,您可以继续留在该页面,或者重新登录', function () {
+ _this.skip('/view/login/login.html')
+ }, '重新登录', function () { }, "取消")
+ } else if (code === 500) {
+ _this.initError(msg)
+ cb(data);
+ } else if (code != 200) {
+ _this.initError(msg)
+ } else {
+ cb(data);
+ }
+ }
+ });
+ },
/**
* ajax put
* @param url (String)
diff --git a/static/js/lib/cupload/cupload.js b/static/js/lib/cupload/cupload.js
index c1874ff..62a0310 100644
--- a/static/js/lib/cupload/cupload.js
+++ b/static/js/lib/cupload/cupload.js
@@ -1,3 +1,4 @@
+var deleteNum = 0;
(function(window, document) {
//定义上传类
@@ -567,41 +568,43 @@
//删除图片
deleteImage: function(n) {
this.imageBox[n].remove()
+ deleteNum = n ;
this.removeUploadBox()
if (this.imageList.children.length < this.opt.num) {
this.createUploadBox()
}
- if(this.opt.deleteUrl) {
- var xhr = null;
- var key = this.opt.name
- var data = {}
- data[key] = this.imageArr[n]
- if(window.XMLHttpRequest){
- xhr = new XMLHttpRequest()
- } else {
- xhr = new ActiveXObject('Microsoft.XMLHTTP')
- }
- if(typeof data == 'object'){
- var str = '';
- for(var key in data){
- str += key+'='+data[key]+'&';
- }
- data = str.replace(/&$/, '');
- }
- xhr.open('POST', this.opt.deleteUrl, true);
- xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
- xhr.send(data);
- xhr.onreadystatechange = function(){
- if(xhr.readyState == 4){
- if(xhr.status == 200){
- console.log(xhr.response)
- } else {
- alert(((xhr.responseText).split("")[0]).split("")[1])
- return false
- }
- }
- }
- }
+ deleteList()
+ // if(this.opt.deleteUrl) {
+ // var xhr = null;
+ // var key = this.opt.name
+ // var data = {}
+ // data[key] = this.imageArr[n]
+ // if(window.XMLHttpRequest){
+ // xhr = new XMLHttpRequest()
+ // } else {
+ // xhr = new ActiveXObject('Microsoft.XMLHTTP')
+ // }
+ // if(typeof data == 'object'){
+ // var str = '';
+ // for(var key in data){
+ // str += key+'='+data[key]+'&';
+ // }
+ // data = str.replace(/&$/, '');
+ // }
+ // xhr.open('POST', this.opt.deleteUrl, true);
+ // xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
+ // xhr.send(data);
+ // xhr.onreadystatechange = function(){
+ // if(xhr.readyState == 4){
+ // if(xhr.status == 200){
+ // console.log(xhr.response)
+ // } else {
+ // alert(((xhr.responseText).split("
")[0]).split("")[1])
+ // return false
+ // }
+ // }
+ // }
+ // }
},
sortLeft: function(event, n) {
diff --git a/static/js/project/demand/demand.js b/static/js/project/demand/demand.js
index ab8eead..2414bfe 100644
--- a/static/js/project/demand/demand.js
+++ b/static/js/project/demand/demand.js
@@ -149,5 +149,8 @@ define(['jquery', "template", "Tools", "demandApi", "paging"], function ($, temp
);
}
}
+ goUserDemand = function () {
+ tools.skip('../user/user.html?type=goDemand')
+ }
return module;
});
\ No newline at end of file
diff --git a/static/js/project/index.js b/static/js/project/index.js
index cd7ae1d..6358e67 100644
--- a/static/js/project/index.js
+++ b/static/js/project/index.js
@@ -162,8 +162,12 @@ define(['jquery', "template", "Tools", "echarts", 'swiper'], function ($, templa
//土地挂牌价格走势统计图
tools.doGet(statistics, {deptId: 100}, module.statisticsContent, true);
+ setTimeout(function(){
+ module.supplyImages();
+ },2000)
+
//竞价大厅-滚动
- //module.hallRolling();
+ module.hallRolling();
};
@@ -413,22 +417,6 @@ define(['jquery', "template", "Tools", "echarts", 'swiper'], function ($, templa
if (data.code == 200) {
console.log(data)
var content = data.data;
- var focusListNext = module.data.focusListNext;
- for (var i = 0; i < content.length; i++) {
- var imgStrs = content[i].projectContent.match(//g)
- var title = content[i].projectName
- if (imgStrs != null && imgStrs != '') {
- focusListNext.push({img:imgStrs[0],title:title})
- }
- }
- module.data.focusListNext = focusListNext;
- var bannerFocusBottomData = template('bannerFocusBottomData', module.data);
- $("#bannerFocusNextContent").html(bannerFocusBottomData);
- new Swiper('#bannerFocusNextWrap', {
- pagination: '.page-pagination1',
- paginationClickable: true
- })
-
module.data.supplyDemandList = content;
var supplyDemandData = template('supplyDemandData', module.data);
$("#supply").html(supplyDemandData);
@@ -440,28 +428,37 @@ define(['jquery', "template", "Tools", "echarts", 'swiper'], function ($, templa
if (data.code == 200) {
console.log(data)
var content = data.data;
- var focusListNext = module.data.focusListNext;
- for (var i = 0; i < content.length; i++) {
- var imgStrs = content[i].projectContent.match(//g)
- var title = content[i].projectName
- if (imgStrs != null && imgStrs != '') {
- focusListNext.push({img:imgStrs[0],title:title})
- }
- }
- module.data.focusListNext = focusListNext;
- var bannerFocusBottomData = template('bannerFocusBottomData', module.data);
- $("#bannerFocusNextContent").html(bannerFocusBottomData);
- new Swiper('#bannerFocusNextWrap', {
- pagination: '.page-pagination1',
- paginationClickable: true
- })
-
module.data.supplyDemand2List = content;
var supplyDemand2Data = template('supplyDemand2Data', module.data);
$("#demand").html(supplyDemand2Data);
}
}
+ module.supplyImages = function(){
+ var focusListNext = module.data.focusListNext;
+ for (var i = 0; i < module.data.supplyDemandList.length; i++) {
+ var imgStrs = module.data.supplyDemandList[i].projectContent.match(//g)
+ var title = module.data.supplyDemandList[i].projectName
+ if (imgStrs != null && imgStrs != '') {
+ focusListNext.push({img:imgStrs[0],title:title})
+ }
+ }
+ for (var i = 0; i < module.data.supplyDemand2List.length; i++) {
+ var imgStrs = module.data.supplyDemand2List[i].projectContent.match(//g)
+ var title = module.data.supplyDemand2List[i].projectName
+ if (imgStrs != null && imgStrs != '') {
+ focusListNext.push({img:imgStrs[0],title:title})
+ }
+ }
+ module.data.focusListNext = focusListNext;
+ var bannerFocusBottomData = template('bannerFocusBottomData', module.data);
+ $("#bannerFocusNextContent").html(bannerFocusBottomData);
+ new Swiper('#bannerFocusNextWrap', {
+ pagination: '.page-pagination1',
+ paginationClickable: true
+ })
+ }
+
module.timeInter = function (divScroll) {
time = setInterval(function () {
var oldTop = divScroll.scrollTop;
@@ -536,5 +533,17 @@ define(['jquery', "template", "Tools", "echarts", 'swiper'], function ($, templa
goPolicy = function (type) {
tools.skip('view/policy/policy.html?type='+type);
}
+
+ goBidding = function(){
+ tools.skip('view/bidding/biddingList.html');
+ }
+
+ goDemand = function(){
+ tools.skip('view/demand/demand.html');
+ }
+
+ goInteraction = function(){
+ tools.skip('view/interact/interactList.html');
+ }
return module;
});
\ No newline at end of file
diff --git a/static/js/project/interact/interact.js b/static/js/project/interact/interact.js
index e36e223..b0d4eb3 100644
--- a/static/js/project/interact/interact.js
+++ b/static/js/project/interact/interact.js
@@ -7,6 +7,8 @@ define(['jquery', "template", "Tools", "interactApi", "paging"], function ($, te
data: {
//互动交流列表
interactInformationList:'',
+ //搜索结果列表
+ searchInformationList:'',
//页码
pageNum: 1,
//页码集合
@@ -37,14 +39,16 @@ define(['jquery', "template", "Tools", "interactApi", "paging"], function ($, te
if (pageCount < 1){
pageCount = 1;
}
+ console.log(module.data.interactInformationList)
if(module.data.interactInformationList == ''){
+ console.log('aaa')
// 初始化 分页器
var page_s1=createPage('.page_s1');
// 设置分页
setPage(page_s1,{
pageTotal: data.total, // 数据总条数
pageSize: module.data.pageSize, // 每页显示条数
- pageCurrent: 1, // 当前页
+ pageCurrent: module.data.pageNum, // 当前页
maxBtnNum: 5, // 最多按钮个数 (最少5个)
})
$('#page_s1').html('共'+pageCount+'页')
@@ -55,18 +59,57 @@ define(['jquery', "template", "Tools", "interactApi", "paging"], function ($, te
$("#interactInformationContent").html(interactInformationData);
}
}
+ //新闻资讯数据
+ module.searchInteractInformation = function (data) {
+ if (data.code == 200) {
+ var content = data.rows;
+ var pageCount = (data.total/module.data.pageSize).toFixed(0);
+ if (pageCount < 1){
+ pageCount = 1;
+ }
+ console.log(module.data.searchInformationList)
+ if(module.data.searchInformationList == ''){
+ // 初始化 分页器
+ var page_s1=createPage('.page_s2');
+ // 设置分页
+ setPage(page_s1,{
+ pageTotal: data.total, // 数据总条数
+ pageSize: module.data.pageSize, // 每页显示条数
+ pageCurrent: module.data.pageNum, // 当前页
+ maxBtnNum: 5, // 最多按钮个数 (最少5个)
+ })
+ $('#page_s2').html('共'+pageCount+'页')
+ }
+ module.data.pageCount = pageCount;
+ module.data.searchInformationList = content;
+ var searchInformationData = template('searchInformationData', module.data);
+ $("#searchInformationContent").html(searchInformationData);
+ }
+ }
goSearch = function () {
var searchTitle = $('#searchTitle').val();
var searchContent = $('#searchContent').val();
- console.log(searchContent)
- console.log(searchTitle)
- tools.doGet(interactSearch, {deptId:100,title:searchTitle,content:searchContent,pageNum:module.data.pageNum,pageSize:module.data.pageSize}, module.interactInformation,true)
+ module.data.searchTitle = searchTitle ;
+ module.data.searchContent = searchContent ;
+ module.data.pageNum = 1 ;
+ document.getElementById('interact').style.display = 'none';
+ document.getElementById('search').style.display = 'block';
+ tools.doGet(interactSearch, {deptId:100,title:searchTitle,content:searchContent,pageNum:1,pageSize:module.data.pageSize}, module.searchInteractInformation,true)
}
turnThePage = function (pageNum) {
module.data.pageNum = pageNum ;
- tools.doGet(interactList, {deptId:100,pageNum:pageNum,pageSize:module.data.pageSize}, module.interactInformation,true);
+ console.log(pageNum)
+ if (module.data.searchType == 'YES'){
+ tools.doGet(interactSearch, {deptId:100,title:module.data.searchTitle,content:module.data.searchContent,pageNum:pageNum,pageSize:module.data.pageSize}, module.interactInformation,true)
+ }else{
+ tools.doGet(interactList, {deptId:100,pageNum:pageNum,pageSize:module.data.pageSize}, module.interactInformation,true);
+ }
+ }
+
+ goUserInteract = function () {
+ tools.skip('../user/user.html?type=goInteract')
}
return module;
});
\ No newline at end of file
diff --git a/static/js/project/listingItems/bond.js b/static/js/project/listingItems/bond.js
index aaaec1d..99cd053 100644
--- a/static/js/project/listingItems/bond.js
+++ b/static/js/project/listingItems/bond.js
@@ -1,7 +1,7 @@
/**
* Created by Administrator on 2021/4/5.
*/
-define(['jquery', "template", "Tools", 'swiper', 'itemsApi'], function ($, template, Tools, swiper) {
+define(['jquery', "template", "Tools", 'swiper', 'itemsApi',"cupload"], function ($, template, Tools, swiper) {
//数据存储
var module = {
data: {
@@ -16,6 +16,8 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi'], function ($, templ
document.getElementById('userBank').value = tools.getCookie('bankAddress');
document.getElementById('bankId').value = tools.getCookie('bankCardNum');
document.getElementById('idCard').value = tools.getCookie('idCardNum');
+ //项目基本信息
+ tools.doGet(outProject + '/id/'+getQueryVariable('id'), {}, module.outProjectInformation,true);
//网站配置信息(网站名称 底部联系方式 公安备案号 网站备案号)
tools.getWebConfig();
};
@@ -31,10 +33,54 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi'], function ($, templ
return(false);
}
+ //获取上传图片list
+ module.upLoadAction = function(data){
+ console.log(data)
+ if (data.msg != '操作成功'){
+ tools.initError(data.msg);
+ return;
+ }else{
+ var upLoadList = [];
+ var dataList = {};
+ $('#cupload-3').find('input').each(function() {
+ if($(this).val()!=''){
+ upLoadList.push($(this).val())
+ }
+ });
+ dataList["files"] = upLoadList;
+ dataList["tableId"] = data.data;
+ dataList["fileType"] = '';
+ dataList["bizPath"] = 'transaction';
+ dataList["tableName"] = 't_transaction_signup';
+ console.log(dataList)
+ tools.doPostImg(base64Upload, dataList, module.upLoadOver);
+ }
+ }
+
+ module.upLoadOver = function(data){
+ tools.initError('提交申请,等待审核')
+ setTimeout(function () {
+ tools.skip('itemsDetail.html?id='+getQueryVariable('id'))
+ },2000)
+ }
+
+ module.outProjectInformation = function (data) {
+ if (data.code == 200) {
+ console.log(data)
+ var content = data.data;
+ $("#projectTitle").html('项目名称:'+content.projectName);
+ $("#projectNum").html('需缴纳保证新:'+content.deposit+'元');
+ var cupload2 = new Cupload ({
+ ele: '#cupload-3',
+ num: 5,
+ });
+ }
+ }
+
submit = function(){
var data = {};
- var realName = $('#realname').val();
+ var realName = $('#realName').val();
var userNum = $('#userNum').val();
var userBank = $('#userBank').val();
var bankId = $('#bankId').val();
@@ -46,17 +92,23 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi'], function ($, templ
data['idCardNum'] = idCard;
data['phone'] = userNum;
data['address'] = tools.getCookie('address');
- data['banlAdress'] = userBank;
- data['banlCardName'] = tools.getCookie('userName');
- data['banlCardNum'] = bankId;
+ data['bankAddress'] = userBank;
+ data['bankCardName'] = tools.getCookie('userName');
+ data['bankCardNum'] = bankId;
data['status'] = 'Y';
- tools.doPost(signupSubmit, data, tools.initError('提交申请,等待审核'));
+ tools.doPost(signupSubmit, data, module.upLoadAction);
+
- setTimeout(function () {
- tools.skip('itemsDetail.html?id='+getQueryVariable('id'))
- },2000)
}
+ module.toTips = function(data){
+ console.log(data)
+ if(data.msg != '操作成功'){
+ tools.initError(data.msg)
+ }else{
+ tools.initError('提交申请,等待审核')
+ }
+ }
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 2603bc3..f9f7686 100644
--- a/static/js/project/listingItems/items.js
+++ b/static/js/project/listingItems/items.js
@@ -5,13 +5,14 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi'], function ($, templ
//数据存储
var module = {
data: {
- showImgInformationDetail:''
+ showImgInformationDetail:'',
+ loginNow:''
},
};
var tools = new Tools();
module.init = function (page) {
-
+ module.data.loginNow = tools.getCookie('Admin-Token');
//浏览次数
tools.doGet(outProject, {id:getQueryVariable('id')}, module.projectNum,true);
@@ -27,7 +28,8 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi'], function ($, templ
//焦点图
setTimeout(function () {
module.swiperBanner();
- },200)
+ },2000)
+
};
@@ -42,6 +44,86 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi'], function ($, templ
return(false);
}
+ module.dataCompare = function(signupStartTime,signupStopTime,biddingStartTime,biddingStopTime){
+ var signupStartTime = signupStartTime;
+ var signupStopTime = signupStopTime;
+ var biddingStartTime = biddingStartTime;
+ var biddingStopTime = biddingStopTime;
+ var nowTime = Date.parse(new Date());
+
+ var beginTimes=signupStartTime.substring(0,10).split('-');
+ var endTimes=signupStopTime.substring(0,10).split('-');
+
+ var biddingBeginTimes=biddingStartTime.substring(0,10).split('-');
+ var biddingEndTimes=biddingStopTime.substring(0,10).split('-');
+
+ signupStartTime=beginTimes[1]+'/'+beginTimes[2]+'/'+beginTimes[0]+' '+signupStartTime.substring(10,19);
+ signupStopTime=endTimes[1]+'/'+endTimes[2]+'/'+endTimes[0]+' '+signupStopTime.substring(10,19);
+
+ biddingStartTime=biddingBeginTimes[1]+'/'+biddingBeginTimes[2]+'/'+biddingBeginTimes[0]+' '+biddingStartTime.substring(10,19);
+ biddingStopTime=biddingEndTimes[1]+'/'+biddingEndTimes[2]+'/'+biddingEndTimes[0]+' '+biddingStopTime.substring(10,19);
+
+
+ //时间差
+ var leftTime = Date.parse(biddingStopTime)-nowTime;
+ //报名开始时间差
+ var signupLeftTime = Date.parse(signupStartTime)-nowTime;
+ //报名结束时间差
+ var signDownLeftTime = Date.parse(signupStopTime)-nowTime;
+ //定义变量 d,h,m,s保存倒计时的时间
+ var d,h,m,s;
+ if(Date.parse(biddingStartTime)Date.parse(biddingStopTime)){
+ console.log("竞价结束");
+ $('#countDown').html('竞价结束')
+ module.data.biddingTimeType = 2;
+ }else if (nowTime距报名结束还有:'+d+'天'+h+'时'+m+'分'+s+'秒')
+ }else if (nowTime>Date.parse(signupStopTime)){
+ console.log("报名结束");
+ module.data.signupTimeType = 2;
+ }else if (nowTime距报名开始还有:'+d+'天'+h+'时'+m+'分'+s+'秒')
+ }
+ if(module.data.outProjectInformationDetail.biddingType != '拍卖'){
+ document.getElementById('biddingTable').style.display = 'none';
+ document.getElementById('biddingTitle').style.display = 'block';
+ }
+ if(module.data.biddingTimeType == 1){
+ document.getElementById('biddingTitle').innerHTML = '竞价进行中...';
+ }
+ if(module.data.biddingTimeType == 3){
+ document.getElementById('biddingTitle').innerHTML = '竞价暂未开始...';
+ }
+ }
+
module.projectNum = function(data){
console.log(data)
}
@@ -60,15 +142,24 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi'], function ($, templ
//项目基本信息
module.outProjectInformation = function (data) {
if (data.code == 200) {
- console.log(data)
+ console.log(serverApi)
var content = data.data;
+
+ //倒计时
+ var timer = setInterval(function(){
+ module.dataCompare(content.signupStartTime,content.signupStopTime,content.biddingStartTime,content.biddingStopTime);
+ },1000)
+
+ for(var i = 0 ; i < content.fileUrlList.length ; i++){
+ content.fileUrlList[i].fileUrl = serverApi+content.fileUrlList[i].fileUrl;
+ }
module.data.outProjectInformationDetail = content;
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);
@@ -102,11 +193,11 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi'], function ($, templ
//期满处理字典
tools.doGet(Dictionaries+'/expire_type', {}, module.expireTypeDictionaries,true);
- //判断是否报名
- tools.doGet(signup, {projectId:getQueryVariable('id'),depositStatus:'1',memberId:tools.getCookie('memberId')}, module.signup);
-
-
+ if(module.data.loginNow){
+ //判断是否报名
+ tools.doGet(signup, {projectId:getQueryVariable('id'),depositStatus:'1',memberId:tools.getCookie('memberId')}, module.signup);
+ }
}
}
@@ -114,7 +205,13 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi'], function ($, templ
module.showImgInformation = function (data) {
if (data.code == 200) {
var content = data.data;
- module.data.showImgInformationDetail = content;
+ console.log(content)
+ var contentList = [];
+ for(var i = 0 ; i < content.length ; i++){
+ contentList[i] = serverApi+content[i].fileUrl;
+ }
+ module.data.showImgInformationDetail = contentList;
+ console.log(contentList)
var showImgInformationData = template('showImgInformationData', module.data);
$("#tabDetail2").html(showImgInformationData);
}
@@ -139,11 +236,8 @@ 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';
- }
+ console.log(module.data.biddingTimeType)
+
}
}
@@ -370,12 +464,8 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi'], function ($, templ
module.data.outProjectInformationDetail.money = module.data.outProjectInformationDetail.price;
}
module.data.outProjectInformationDetail.money += module.data.outProjectInformationDetail.ladderPrice ;
- var outProjectInformationData = template('outProjectInformationData', module.data);
- $("#outProjectInformationContent").html(outProjectInformationData);
- //焦点图
- setTimeout(function () {
- module.swiperBanner();
- },200)
+ document.getElementById('money').value = module.data.outProjectInformationDetail.money;
+
}
//向下降价
@@ -384,12 +474,14 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi'], function ($, templ
return;
}
module.data.outProjectInformationDetail.money -= module.data.outProjectInformationDetail.ladderPrice ;
- var outProjectInformationData = template('outProjectInformationData', module.data);
- $("#outProjectInformationContent").html(outProjectInformationData);
- //焦点图
- setTimeout(function () {
- module.swiperBanner();
- },200)
+ document.getElementById('money').value = module.data.outProjectInformationDetail.money;
+ }
+
+ //登陆跳转
+ goLogin = function(){
+ tools.initDialog('登陆提示', '登陆后可参与竞价,是否登录?', function () {
+ tools.skip('../login/login.html')
+ }, '登录', function () { }, "取消")
}
return module;
});
\ No newline at end of file
diff --git a/static/js/project/user/index.js b/static/js/project/user/index.js
index a19473f..aa181f1 100644
--- a/static/js/project/user/index.js
+++ b/static/js/project/user/index.js
@@ -42,13 +42,44 @@ define(['jquery', "template", "Tools", "user", "paging","cupload","kindeditor"],
window.KindEditor.create('#editor_id')
+ console.log(tools.getParam('type'))
+
+ var type = tools.getParam('type');
+
+ module.getType(type);
+
};
+ //获取类型
+ module.getType = function(type){
+ if (type == 'info'){
+ document.getElementById("icon-list1").click();
+ }
+ if (type == 'demand'){
+ document.getElementById("icon-list2").click();
+ }
+ if (type == 'interact'){
+ document.getElementById("icon-list3").click();
+ }
+ if (type == 'bidding'){
+ document.getElementById("icon-list4").click();
+ }
+ if (type == 'goDemand'){
+ document.getElementById("icon-list2").click();
+ document.getElementById("goSupply").click();
+ }
+ if (type == 'goInteract'){
+ document.getElementById("icon-list3").click();
+ document.getElementById("goRelease").click();
+ }
+ }
+
//个人中心用户信息
module.userData = function(data){
if (data.code == 200) {
var content = data.user;
console.log(content)
+ module.data.userId = content.userId;
tools.doGet(userMember + '/' + content.userId, {}, module.userMember);//memberType 1个人 2单位
}
}
@@ -60,24 +91,18 @@ define(['jquery', "template", "Tools", "user", "paging","cupload","kindeditor"],
console.log(data)
module.data.userInformationDetail = content;
module.data.memberType = content.memberType;
+
+
if(content.memberType == '1'){
document.getElementById('companyInformationContent').style.display = 'none';
document.getElementById('userInformationContent').style.display = 'block';
var userInformationData = template('userInformationData', module.data);
$("#userInformationContent").html(userInformationData);
- var cupload2 = new Cupload ({
- ele: '#cupload-3',
- num: 5,
- });
}else{
document.getElementById('companyInformationContent').style.display = 'block';
document.getElementById('userInformationContent').style.display = 'none';
var companyInformationData = template('companyInformationData', module.data);
$("#companyInformationContent").html(companyInformationData);
- var cupload2 = new Cupload ({
- ele: '#cupload-2',
- num: 5,
- });
}
document.getElementById('bankAddress').value = content.bankAddress;
document.getElementById('bankCardName').value = content.bankCardName;
@@ -85,7 +110,10 @@ define(['jquery', "template", "Tools", "user", "paging","cupload","kindeditor"],
document.getElementById('phone').innerHTML = content.phone;
module.data.memberId = content.id;
- console.log(content.memberType)
+ console.log(module.data.userId)
+
+ //用户图片
+ tools.doGet(showUserImg+'/'+module.data.memberId, {}, module.showUserImage);
//我的供求
tools.doGet(userSupply, {memberId:content.id,pageNum:module.data.pageNum,pageSize:module.data.pageSize}, module.userSupply);
//我的咨询
@@ -95,24 +123,82 @@ define(['jquery', "template", "Tools", "user", "paging","cupload","kindeditor"],
//个人资料提交
$('#supplyAction').on('click', module.supplyAction)
$('#releaseAction').on('click', module.releaseAction)
+
//获取附件的值
- $('#upLoadBtn').on('click',module.upLoadAction)
+ //$('#upLoadBtn').on('click',module.upLoadAction)
//document.getElementById('userAction').addEventListener('click',module.formAction);
}
}
+ module.showUserImage = function(data){
+ console.log(data)
+ if (data.code == 200) {
+ var content = data.data;
+ var fileUrlList = [];
+ var fileNum = [];
+ for (var i = 0 ; i < content.length ; i++){
+ fileUrlList[i] = serverApi + content[i].fileUrl ;
+ fileNum[i] = content[i].id;
+ }
+ if (fileUrlList.length == 0){
+ fileUrlList = '';
+ }
+ console.log(fileUrlList)
+ module.data.fileNum = fileNum;
+ if(module.data.memberType == '1'){
+ var cupload2 = new Cupload ({
+ ele: '#cupload-3',
+ num: 5,
+ data:fileUrlList
+ });
+ }else{
+ var cupload2 = new Cupload ({
+ ele: '#cupload-2',
+ num: 5,
+ data:fileUrlList
+ });
+ }
+ }
+ }
+
+ deleteList = function(){
+ console.log(module.data.fileNum[deleteNum])
+ tools.doDelete(deleteUserImg+'/'+module.data.fileNum[deleteNum], {}, module.Tips);
+ }
+
//获取上传图片list
- module.upLoadAction = function(){
+ upLoadAction = function(){
var upLoadList = [];
- $('#cupload-3').find('input').each(function() {
- if($(this).val()!=''){
- upLoadList.push($(this).val())
- }
- })
+ var data = {};
+ if(module.data.memberType == '1'){
+ $('#cupload-3').find('input').each(function() {
+ if($(this).val()!=''&&$(this).val().indexOf('http') == -1){
+ upLoadList.push($(this).val())
+ }
+ })
+ }else{
+ $('#cupload-2').find('input').each(function() {
+ if($(this).val()!=''&&$(this).val().indexOf('http') == -1){
+ upLoadList.push($(this).val())
+ }
+ })
+ }
+
console.log(upLoadList)
+ data["files"] = upLoadList;
+ data["fileType"] = '';
+ data["bizPath"] = 'transaction';
+ data["tableName"] = 't_transaction_member';
+ data["tableId"] = module.data.memberId;
+
+ console.log(data)
+ tools.doPostImg(base64Attach, data, module.upLoadOver);//memberType 1个人 2单位
}
+ module.upLoadOver = function(){
+
+ }
//删除供求
deleteUserSupply = function(ids){
@@ -129,18 +215,17 @@ define(['jquery', "template", "Tools", "user", "paging","cupload","kindeditor"],
if (pageCount < 1){
pageCount = 1;
}
- if(module.data.userSupplyInformationList == '') {
- // 初始化 分页器
- var page_s1 = createPage('.page_s1');
- // 设置分页
- setPage(page_s1, {
- pageTotal: data.total, // 数据总条数
- pageSize: module.data.pageSize, // 每页显示条数
- pageCurrent: 1, // 当前页
- maxBtnNum: 5, // 最多按钮个数 (最少5个)
- })
- $('#page_s1').html('共' + pageCount + '页')
- }
+ $('.page_s1').html('');
+ // 初始化 分页器
+ var page_s1 = createPage('.page_s1');
+ // 设置分页
+ setPage(page_s1, {
+ pageTotal: data.total, // 数据总条数
+ pageSize: module.data.pageSize, // 每页显示条数
+ pageCurrent: 1, // 当前页
+ maxBtnNum: 5, // 最多按钮个数 (最少5个)
+ })
+ $('#page_s1').html('共' + pageCount + '页')
module.data.userSupplyInformationList = content;
var userSupplyInformationData = template('userSupplyInformationData', module.data);
$("#userSupplyInformationContent").html(userSupplyInformationData);
@@ -155,17 +240,16 @@ define(['jquery', "template", "Tools", "user", "paging","cupload","kindeditor"],
if (pageCount < 1){
pageCount = 1;
}
- if(module.data.consultingInformationList == '') {
- // 初始化 分页器
- var page_s1 = createPage('.page_s2');
- // 设置分页
- setPage(page_s1, {
- pageTotal: data.total, // 数据总条数
- pageSize: module.data.pageSize, // 每页显示条数
- pageCurrent: 1, // 当前页
- maxBtnNum: 5, // 最多按钮个数 (最少5个)
- })
- }
+ $('.page_s2').html('');
+ // 初始化 分页器
+ var page_s1 = createPage('.page_s2');
+ // 设置分页
+ setPage(page_s1, {
+ pageTotal: data.total, // 数据总条数
+ pageSize: module.data.pageSize, // 每页显示条数
+ pageCurrent: 1, // 当前页
+ maxBtnNum: 5, // 最多按钮个数 (最少5个)
+ })
module.data.consultingInformationList = content;
$('#page_s2').html('共'+pageCount+'页')
var consultingInformationData = template('consultingInformationData', module.data);
@@ -324,6 +408,7 @@ define(['jquery', "template", "Tools", "user", "paging","cupload","kindeditor"],
tools.setCookie('userName',realname,24 * 60 * 60)
tools.setCookie('idCardNum',idCardNum,24 * 60 * 60)
tools.setCookie('address',address,24 * 60 * 60)
+ upLoadAction();
}
if(type == 'user'){
//个人用户信息
@@ -337,6 +422,7 @@ define(['jquery', "template", "Tools", "user", "paging","cupload","kindeditor"],
tools.setCookie('userName',userFormRealName,24 * 60 * 60)
tools.setCookie('idCardNum',userFormIdCard,24 * 60 * 60)
tools.setCookie('address',userFormAddress,24 * 60 * 60)
+ upLoadAction();
}
if(type == 'bank'){
//银行卡信息
@@ -401,8 +487,6 @@ define(['jquery', "template", "Tools", "user", "paging","cupload","kindeditor"],
data['phone'] = releasePhone;
data['logintime'] = logintime;
data['deptId'] = 100;
-
-
data['memberId'] = module.data.memberId;
tools.doPost(userCommunicate, data, module.Tips)
@@ -441,6 +525,7 @@ define(['jquery', "template", "Tools", "user", "paging","cupload","kindeditor"],
}
return true;
}
+
//个人中心选项卡鼠标悬浮
module.userListHover = function(){
document.getElementById('icon-list1').onmouseout = function(){
@@ -478,7 +563,9 @@ define(['jquery', "template", "Tools", "user", "paging","cupload","kindeditor"],
var searchTitle = $('#searchTitle').val();
var searchContent = $('#searchContent').val();
console.log(searchTitle)
- tools.doGet(userConsulting, {title:searchTitle,content:searchContent,memberId:module.data.memberId,pageNum:module.data.pageNum,pageSize:module.data.pageSize}, module.interactInformation);
+ module.data.searchType = 'YES';
+ tools.doGet(userConsulting,{title:searchTitle,content:searchContent,memberId:module.data.memberId,pageNum:module.data.pageNum,pageSize:module.data.pageSize},module.consulting);
}
+
return module;
});
\ No newline at end of file
diff --git a/view/bidding/biddingList.html b/view/bidding/biddingList.html
index ba20fba..e67f3b7 100644
--- a/view/bidding/biddingList.html
+++ b/view/bidding/biddingList.html
@@ -245,8 +245,8 @@
{{value.projectName}} |
{{value.biddingType}} |
- {{value.signupStopTime.substr(0,10)}} |
- {{value.biddingStartTime.substr(0,10)}} |
+ {{value.signupStopTime}} |
+ {{value.biddingStartTime}} |
{{value.price}} |
{{value.money}} |
进行中 |
diff --git a/view/demand/demand.html b/view/demand/demand.html
index 21f4dda..4d6a5c7 100644
--- a/view/demand/demand.html
+++ b/view/demand/demand.html
@@ -128,7 +128,7 @@
diff --git a/view/listingItems/bond.html b/view/listingItems/bond.html
index e0881ef..62fd77e 100644
--- a/view/listingItems/bond.html
+++ b/view/listingItems/bond.html
@@ -127,8 +127,8 @@
1.竞买人请确认以下事项并勾选
@@ -139,9 +139,9 @@
· 已阅读并知晓:已阅读并同意《竞拍服务协议》
本人已知晓并同意以上所有事项
-
+
2.竞买人身份确认
-
+
-
+
diff --git a/view/listingItems/itemsDetail.html b/view/listingItems/itemsDetail.html
index c022b87..8bc7f7f 100644
--- a/view/listingItems/itemsDetail.html
+++ b/view/listingItems/itemsDetail.html
@@ -132,11 +132,12 @@
-
挂牌项目>产权交易>三屯乡黄家村土地经营权流转
-
重要提示:竞买人在竞价前请务必遵照左云县农村产权交易网的《平台竞价交易规则》、《左云县农村产权交易网平台农村产权交易操作指南》的要求,了解的情况、竞买资格、注册报名、保证金缴纳、竞买操作及款项支付方式等内容。如未全面了解相关内容,违反相关规定,您将承担无法参与项目竞买、保证金不予退还等不利后果,请审慎参与竞买。
diff --git a/view/user/user.html b/view/user/user.html
index 766e249..910180e 100644
--- a/view/user/user.html
+++ b/view/user/user.html
@@ -86,17 +86,17 @@
- 我的供求
+ 我的供求
- 我的咨询
+ 我的咨询
- 我的竞价
+ 我的竞价
@@ -189,8 +189,7 @@
* 身份证照片、本人和身份证的合影
-
-
+
|
@@ -301,7 +300,7 @@