[内网]文化云交易前端H5
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

919 lines
31 KiB

let animateDate = 300; // 滑动时间
let resourceData = []; // 文化资源数据
let digitalData = []; // 文化数字内容
let hotData = []; // 热门标的推荐
let recomend_data = {
goodsType: "", //1.文化资源数据,2.文化数字内容
lbdSet: "", //1 热门标的推荐 2 交易(销售) 3 点击
pageIndex: 1,
pageRows: 10,
typeStatus: 0 //0 门户首页 1 商城首页
}
// let new_TIME=new Date();
// let recomendTIME = {
// pay_type: "", // 付费类型 1:免费;2:付费
// authorization: , //授权方式(1:转让;2:授权)
// record_type: , // 数据类型
// entrust_name: , // 委托数据名称
// entrust_user_name: , // 委托方名称
// source_type: "",
// order_type: "createtime", //排序 createtime:时间;price:价格
// order: "desc", //desc:降序;asc:升序
// goods_status: 1,
// entrust_time:[]
// }
// //委托数据查询接口
// function getListMsg(data) {
// var ajaxSearchGoods = new AJAX_OBJ(AgencyAddress + "order/searchGoods", entrustSearchGoods, onUrlError);
// ajaxSearchGoods.postRequestData(JSON.stringify(data));
// }
// function entrustSearchGoods(xmlHttp) {
// var res = eval('(' + xmlHttp.responseText + ')');
// if (res.resultCode === "00000000") {
// console.log(res,"KKKKK")
// }
// }
// 热门标的推荐渲染
function render(res) {
hotData = res.data.slice(0, 8);
let supstr = ''
hotData.myForEach(function (item, index, arr) {
supstr += '<div class="p-item sup-item" style="background-image: url(' + background_img(item
.rankingDetails.goodsImage) +
');" onclick="detils(\'' + item.goods_islicode + '\',\'' + item.rankingDetails.goods_type +
'\',\'' + goods_image_url + '\',\'' + item.rankingDetails.username +
'\')"><div class="p-item-top">' + item.goodsName +
'</div><div class="p-item-bottom">' + item.rankingDetails.username +
'</div></div>'
})
$('#supitem').html(supstr)
hotData.myForEach(function (item, index, arr) {
let Index = index + 1
if (Index % 4 !== 0) {
$(".sup-item:nth-child(" + Index + ")").css("margin-right", "28px")
}
if (index >= hotData.length - 4) {
$(".sup-item:nth-child(" + Index + ")").css("margin-bottom", "0")
}
$(".sup-item:nth-child(" + Index + ")").hover(function () {
$(".sup-item:nth-child(" + Index + ") > .p-item-top").animate({
top: '0'
}, animateDate);
$(".sup-item:nth-child(" + Index + ") > .p-item-bottom").animate({
bottom: '0'
}, animateDate);
}, function () {
$(".sup-item:nth-child(" + Index + ") > .p-item-top").animate({
top: '-140px'
}, animateDate);
$(".sup-item:nth-child(" + Index + ") > .p-item-bottom").animate({
bottom: '-40px'
}, animateDate);
});
})
};
// 排行榜切换
let ranking = function (data, callback) {
let rankingstr = ''
data.myForEach(function (item, index, arr) {
background_img(item.rankingDetails.goodsImage)
rankingstr += '<div class="list-item" onclick="detils(\'' + item.goods_islicode + '\',\'' + item
.rankingDetails.goods_type + '\',\'' + goods_image_url + '\',\'' + item.rankingDetails
.username + '\')"><a class="list_name" title="' +
item.goodsName + '">' + item.goodsName + '</a><div>' + item.sort + '</div></div>'
})
$('.ranking-list').html(rankingstr)
callback()
};
//进入详情
function detils(list_isli, type, img, username) {
$(location).prop('href', './superDetails.html?list_isli=' + list_isli + '&goods_type=' + type + '&img=' + img +
'&username=' + username + '&time=' + new Date().getTime())
}
// 委托类型过滤
function entrust(data) {
if (data == "1") {
return "转让"
} else if (data == "2") {
return "授权"
} else {
return ""
}
};
// 数据类型过滤
function filters(data) {
if (data === "全部") {
return ""
} else if (data === "文化资源数据") {
return 1
} else if (data === "文化数字内容") {
return 2
}
};
// 渲染服务商
function serviceProviders(res) {
let provider = []
let prohtml = ''
let procolor = ['#7370cc', '#48c0c1', '#dc6464', '#e0c558']
res.data.myForEach(function (item, index, arr) {
provider.push({
name: item.name,
type: item.type,
doorHeadPhoto: item.doorHeadPhoto,
background: procolor[index % 4]
})
})
provider.myForEach(function (item, index, arr) {
prohtml += '<div class="pro-content-item" onclick="subcharge_Detil(\'' + item.name + '\')"><div class="pro-content-img"><img src="' + item
.doorHeadPhoto + '" alt="暂无图片"></div><div class="pro-content-text">' + item.name + '</div></div>'
})
$('.pro-content').html(prohtml)
provider.myForEach(function (item, index, arr) {
let Index = index + 1
$(".pro-content-item:nth-child(" + Index + ")").css("background-color", item.background)
if (Index % 4 !== 0) {
$(".pro-content-item:nth-child(" + Index + ")").css("margin-right", "24px")
}
if (index >= provider.length - 4) {
$(".pro-content-item:nth-child(" + Index + ")").css("margin-bottom", "0")
}
})
};
function subcharge_Detil(name) {
if (name == "深圳国夏文化数字科技有限公司") {
window.open("http://10.24.4.90:9000/");
}
}
// 公示信息表格渲染
function publicity(row) {
// let tablestr =
// '<div class="tr"><div class="td">标的名称</div><div class="td">标的ISLI标志码</div><div class="td">委托方</div><div class="td">委托日期</div><div class="td">标的价款</div><div class="td">交易方式</div></div>'
// res.data.data.myForEach(function(item, index, arr) {
// tablestr += '<div class="tr pub-tr"><div class="td"><a class="pub-text1" title="' + item.goods_name +
// '">' + item.goods_name +
// '</a></div><div class="td">' + item.goods_islicode +
// '</div><div class="td"><a class="pub-text3" title="' + item.username +
// '">' + item.username +
// '</a></div><div class="td">' + item.createtime.split(" ")[0] +
// '</div><div class="td">¥' + item.price +
// '</div><div class="td">' + entrust(item.goods_entrust) +
// '</div></div>'
// })
// $('#table-javascript').html(tablestr)
// let last = $(".pub-tr").length + 1
// if (last > 4) {
// $(".pub-tr:nth-child(" + last + ") > .td").css("border-bottom", "none")
// $(".pub-table").css("border-right", "none")
// } else {
// $(".pub-text1").css("width", "326px")
// $(".table-box .td:nth-child(1)").css("width", "326px")
// $(".pub-tr:nth-child(" + last + ") > .td").css("border-bottom", "1px solid #e5e6eb")
// $(".pub-table").css("border-right", "1px solid #e5e6eb")
// $(".tr > .td:nth-child(6)").css("border-right", "none")
// }
// if (last === 5) {
// $(".pub-text1").css("width", "326px")
// $(".table-box .td:nth-child(1)").css("width", "326px")
// }
$('#table-javascript').bootstrapTable('destroy');
$("#table-javascript").bootstrapTable({
url: AgencyAddress + "order/searchGoods",
responseHandler: function (res) {
return row.data.data
},
columns: [{
title: '标的名称',
field: 'goods_name',
align: 'center',
valign: 'middle'
},
{
title: '标的ISLI标志码',
field: 'goods_islicode',
align: 'center',
valign: 'middle'
},
{
title: '委托方',
field: 'username',
align: 'center',
valign: 'middle'
},
{
title: '委托日期',
field: 'updatetime',
align: 'center',
valign: 'middle',
formatter: function (value, row, index) {
return value.split(" ")[0]
}
},
{
title: '标的价款',
field: 'price',
align: 'center',
valign: 'middle',
formatter: function (value, row, index) {
return row.username == "中国数字文化集团有限公司" || row.username == "国家图书馆出版社有限公司" || row.username == "深圳国夏文化数字科技有限公司" ?
"<span style='color:red'>" + "可议价" + "</span>" : '¥' + value
}
},
{
title: '交易方式',
field: 'goods_entrust',
align: 'center',
valign: 'middle',
formatter: function (value, row, index) {
if (value == "1") {
return "转让"
} else if (value == "2") {
return "授权"
}
}
},
]
})
};
let listQuery = {
pay_type: 2, // 付费类型 1:免费;2:付费
authorization: '', //授权方式(1:转让;2:授权)
record_type: "", // 数据类型
entrust_name: "", // 委托数据名称
entrust_user_name: "", // 委托方名称
order_type: "", //排序 createtime:时间;price:价格
order: '', //desc:降序;asc:升序
goods_status: 1
};
//进入公共数据详情
function detilss(list_isli, type, img, username) {
$(location).prop('href', './PublicDetails.html?list_isli=' + list_isli + '&goods_type=' + type + '&img=' + img +
'&username=' + username + '&time=' + new Date().getTime())
}
function readtext(value, contextConsultingId) {
window.location.href = "../html/InforDetails.html?userId=" + value + '&new_userid=' + contextConsultingId +
'&time=' + new Date().getTime();
}
$(document).ready(function () {
$(".publicmore").bind("click", function (data) {
$(location).prop('href', './PublicData.html?record_type=' + data.target.title + '&time=' +
new Date().getTime())
});
$(".pub-btn-right").bind("click", function (data) {
if ($(".btns").text() !== "全部") {
listQuery.record_type = $(".btns").text() === "文化资源数据" ? 1 : 2
} else {
listQuery.record_type = "";
}
$(location).prop('href', './SuperMarketList.html?authorization=' + listQuery.authorization +
'&record_type=' + listQuery.record_type + '&entrust_user_name=' + listQuery
.entrust_user_name + '&entrust_name=' + listQuery.entrust_name + '&time=' + new Date()
.getTime())
});
recomend_data.lbdSet = 2;
searchOrder(); //买入订单接口
phb_date(recomend_data); //排行榜
// 公共数据共享
var postList1 = new AJAX_OBJ(AgencyAddress + "order/searchGoods", searchGoods1, onUrlError);
postList1.postRequestData(JSON.stringify({
pay_type: 1,
record_type: 1,
goods_status: 1,
page: 1,
limit: 6,
}));
function searchGoods1(xmlHttp) {
let res = eval('(' + xmlHttp.responseText + ')');
if (res.resultCode === "00000000") {
resourceData = res.data.data;
// 渲染文化资源数据
let itemlist1 = ''
resourceData.myForEach(function (item, index, arr) {
itemlist1 += '<div class="p-item p-itema" style="background-image: url(' +
background_img(item.goods_image) +
');" onclick="detilss(\'' + item.goods_islicode + '\',\'' + item.goods_type +
'\',\'' + goods_image_url + '\',\'' + item.username +
'\')"><div class="p-item-top">' + item.goods_name +
'</div><div class="p-item-bottom">' + item.username +
'</div></div>'
})
$('#itemlist1').html(itemlist1);
resourceData.myForEach(function (item, index, arr) {
let Index = index + 1
if (Index % 3 !== 0) {
$(".p-itema:nth-child(" + Index + ")").css("margin-right", "24px")
}
if (index >= resourceData.length - 3) {
$(".p-itema:nth-child(" + Index + ")").css("margin-bottom", "0")
}
$(".p-itema:nth-child(" + Index + ")").hover(function () {
$(".p-itema:nth-child(" + Index + ") > .p-item-top").animate({
top: '0'
}, animateDate);
$(".p-itema:nth-child(" + Index + ") > .p-item-bottom").animate({
bottom: '0'
}, animateDate);
}, function () {
$(".p-itema:nth-child(" + Index + ") > .p-item-top").animate({
top: '-140px'
}, animateDate);
$(".p-itema:nth-child(" + Index + ") > .p-item-bottom").animate({
bottom: '-40px'
}, animateDate);
});
})
// resourceData.forEach((item, index) => {
// let Index = index + 1
// if (Index % 3 !== 0) {
// $(".p-itema:nth-child(" + Index + ")").css("margin-right", "24px")
// }
// if (index >= resourceData.length - 3) {
// $(".p-itema:nth-child(" + Index + ")").css("margin-bottom", "0")
// }
// $(".p-itema:nth-child(" + Index + ")").hover(function() {
// $(".p-itema:nth-child(" + Index + ") > .p-item-top").animate({
// top: '0'
// }, animateDate);
// $(".p-itema:nth-child(" + Index + ") > .p-item-bottom").animate({
// bottom: '0'
// }, animateDate);
// }, function() {
// $(".p-itema:nth-child(" + Index + ") > .p-item-top").animate({
// top: '-140px'
// }, animateDate);
// $(".p-itema:nth-child(" + Index + ") > .p-item-bottom").animate({
// bottom: '-40px'
// }, animateDate);
// });
// })
}
};
// 公共数据共享
var postList2 = new AJAX_OBJ(AgencyAddress + "order/searchGoods", searchGoods2, onUrlError);
postList2.postRequestData(JSON.stringify({
pay_type: 1,
record_type: 2,
goods_status: 1,
page: 1,
limit: 6,
}));
function searchGoods2(xmlHttp) {
let res = eval('(' + xmlHttp.responseText + ')');
if (res.resultCode === "00000000") {
digitalData = res.data.data;
// 渲染文化数字内容
let itemlist2 = ''
digitalData.myForEach(function (item, index, arr) {
itemlist2 += '<div class="p-item p-itemb" style="background-image: url(' +
background_img(item.goods_image) +
');" onclick="detilss(\'' + item.goods_islicode + '\',\'' + item.goods_type +
'\',\'' + goods_image_url + '\',\'' + item.username +
'\')"><div class="p-item-top">' + item.goods_name +
'</div><div class="p-item-bottom">' + item.username +
'</div></div>'
})
// digitalData.forEach(item => {
// itemlist2 += '<div class="p-item p-itemb" style="background-image: url(' +
// background_img(item.goods_image) +
// ');" onclick="detilss(\'' + item.goods_islicode + '\',\'' + item.goods_type +
// '\',\'' + goods_image_url + '\')"><div class="p-item-top">' + item.goods_name +
// '</div><div class="p-item-bottom">' + item.username +
// '</div></div>'
// })
$('#itemlist2').html(itemlist2);
digitalData.myForEach(function (item, index, arr) {
let Index = index + 1
if (Index % 3 !== 0) {
$(".p-itemb:nth-child(" + Index + ")").css("margin-right", "24px")
}
if (index >= digitalData.length - 3) {
$(".p-itemb:nth-child(" + Index + ")").css("margin-bottom", "0")
}
$(".p-itemb:nth-child(" + Index + ")").hover(function () {
$(".p-itemb:nth-child(" + Index + ") > .p-item-top").animate({
top: '0'
}, animateDate);
$(".p-itemb:nth-child(" + Index + ") > .p-item-bottom").animate({
bottom: '0'
}, animateDate);
}, function () {
$(".p-itemb:nth-child(" + Index + ") > .p-item-top").animate({
top: '-140px'
}, animateDate);
$(".p-itemb:nth-child(" + Index + ") > .p-item-bottom").animate({
bottom: '-40px'
}, animateDate);
});
})
// digitalData.forEach((item, index) => {
// let Index = index + 1
// if (Index % 3 !== 0) {
// $(".p-itemb:nth-child(" + Index + ")").css("margin-right", "24px")
// }
// if (index >= digitalData.length - 3) {
// $(".p-itemb:nth-child(" + Index + ")").css("margin-bottom", "0")
// }
// $(".p-itemb:nth-child(" + Index + ")").hover(function() {
// $(".p-itemb:nth-child(" + Index + ") > .p-item-top").animate({
// top: '0'
// }, animateDate);
// $(".p-itemb:nth-child(" + Index + ") > .p-item-bottom").animate({
// bottom: '0'
// }, animateDate);
// }, function() {
// $(".p-itemb:nth-child(" + Index + ") > .p-item-top").animate({
// top: '-140px'
// }, animateDate);
// $(".p-itemb:nth-child(" + Index + ") > .p-item-bottom").animate({
// bottom: '-40px'
// }, animateDate);
// });
// })
}
};
// 热门标的推荐
var postList5 = new AJAX_OBJ(AgencyAddress + "ranking/queryList?goods_type=" + recomend_data.goodsType +
"&lbdSet=" + 1 +
"&pageIndex=" + recomend_data.pageIndex + "&pageRows=" + recomend_data.pageRows + "&typeStatus=" +
recomend_data.typeStatus, getTypeGoods1, onUrlError);
postList5.getRequestData();
function getTypeGoods1(xmlHttp) {
let res = eval('(' + xmlHttp.responseText + ')');
if (res.resultCode === "00000000") {
render(res)
}
};
$(".Jump>span").bind("click", function (data) {
$(this).addClass("current");
$(this).siblings().removeClass("current");
recomend_data.goodsType = data.currentTarget.innerText === "文化资源数据" ? 1 : 2
phb_date(recomend_data);
});
let listQuery_market = {
pay_type: 2, // 付费类型 1:免费;2:付费
authorization: '', //授权方式 1:转让;2:授权
record_type: "", // 数据类型
entrust_name: "", // 委托数据名称
entrust_user_name: "", // 委托方名称
order_type: "", //排序 createtime:时间;price:价格
order: '', //desc:降序;asc:升序
goods_status: 1
};
//数据超市点击查看更多
$(".examine_market").bind("click", function (data) {
location.href = "SuperMarketList.html?authorization=" + listQuery_market.authorization +
'&record_type=' + listQuery_market.record_type +
'&entrust_user_name=' + listQuery_market.entrust_user_name +
'&entrust_name=' + listQuery_market.entrust_name +
'&time=' + new Date().getTime();
});
// 获取首页排行榜数据
function phb_date(recomend_data) {
if (recomend_data.lbdSet == 2) {
recomend_data.lbdSet = 2;
} else {
recomend_data.lbdSet = 3;
}
var postList6 = new AJAX_OBJ(AgencyAddress + "ranking/queryList?goods_type=" + recomend_data.goodsType +
"&lbdSet=" + recomend_data.lbdSet +
"&pageIndex=" + recomend_data.pageIndex + "&pageRows=" + recomend_data.pageRows +
"&typeStatus=" + recomend_data.typeStatus, getTypeGoods2, onUrlError);
postList6.getRequestData();
}
function getTypeGoods2(xmlHttp) {
let res = eval('(' + xmlHttp.responseText + ')');
if (res.resultCode === "00000000") {
ranking(res.data.slice(0, 10), function () { })
}
};
// 销售量
$("#salesVolume").css({
"background-color": "#fff",
"color": "#f18914"
});
$("#salesVolume").bind("click", function () {
$(".Jump>span").removeClass();
recomend_data.goodsType = "";
let postList = new AJAX_OBJ(AgencyAddress + "ranking/queryList?goods_type=" + recomend_data
.goodsType + "&lbdSet=" + 2 +
"&pageIndex=" + recomend_data.pageIndex + "&pageRows=" + recomend_data.pageRows +
"&typeStatus=" + recomend_data.typeStatus, getTypeGoods3, onUrlError);
postList.getRequestData();
function getTypeGoods3(xmlHttp) {
let res = eval('(' + xmlHttp.responseText + ')');
if (res.resultCode === "00000000") {
$(".ranking-list").fadeOut(100, function () {
ranking(res.data.slice(0, 10), function () {
$("#salesVolume").css({
"background-color": "#fff",
"color": "#f18914"
});
$("#hits").css({
"background-color": "#eaeaea",
"color": "#0b0b0b"
});
$(".ranking-list").fadeIn(100);
})
});
}
};
});
// 点击量
$("#hits").bind("click", function () {
$(".Jump>span").removeClass();
recomend_data.goodsType = "";
recomend_data.lbdSet = 3;
let postList = new AJAX_OBJ(AgencyAddress + "ranking/queryList?goods_type=" + recomend_data
.goodsType + "&lbdSet=" + recomend_data.lbdSet +
"&pageIndex=" + recomend_data.pageIndex + "&pageRows=" + recomend_data.pageRows +
"&typeStatus=" + recomend_data.typeStatus, getTypeGoods4, onUrlError);
postList.getRequestData();
function getTypeGoods4(xmlHttp) {
let res = eval('(' + xmlHttp.responseText + ')');
if (res.resultCode === "00000000") {
$(".ranking-list").fadeOut(100, function () {
ranking(res.data.slice(0, 10), function () {
$("#hits").css({
"background-color": "#fff",
"color": "#f18914"
});
$("#salesVolume").css({
"background-color": "#eaeaea",
"color": "#0b0b0b"
});
$(".ranking-list").fadeIn(100);
})
});
}
};
});
// 获取资讯中心列表
function getList(data) {
let getList2 = new AJAX_OBJ(AgencyAddress +
"ConsultingContext/getList?pageRows=5&contextConsultingId=" + data, getSelection2, onUrlError);
getList2.getRequestData();
function getSelection2(xmlHttp) {
let res = eval('(' + xmlHttp.responseText + ')');
if (res.resultCode === "00000000") {
let infstr = ''
res.data.pageDataList.myForEach(function (item, index, arr) {
infstr +=
'<div class="inf-content-item"><div class="inf-content-date"><div class="inf-date-box"><div class="inf-date-day">' +
item.contextCreationTime.split(" ")[0].split("-")[2] +
'</div><div class="inf-date-years">' + item.contextCreationTime.split(" ")[0]
.substr(0, 7) +
'</div></div></div><div class="inf-content-item-content" onclick="readtext(\'' +
item.contextId + '\',\'' + item.contextConsultingId + '\')">' + item
.contextTitle + '</div></div>'
});
//
// res.data.pageDataList.forEach((item, index) => {
// infstr +=
// '<div class="inf-content-item"><div class="inf-content-date"><div class="inf-date-box"><div class="inf-date-day">' +
// item.contextCreationTime.split(" ")[0].split("-")[2] +
// '</div><div class="inf-date-years">' + item.contextCreationTime.split(" ")[0]
// .substr(0, 7) + '</div></div></div><div class="inf-content-item-content" id="' +
// item.contextId + '">' + item.contextTitle + '</div></div>'
// })
$('.inf-content-right').html(infstr)
}
};
};
// 资讯中心
var getList1 = new AJAX_OBJ(AgencyAddress + "ConsultingContext/getSelection", getSelection1, onUrlError);
getList1.getRequestData();
function getSelection1(xmlHttp) {
let res = eval('(' + xmlHttp.responseText + ')');
if (res.resultCode === "00000000") {
let infhtml = ''
res.data.myForEach(function (item, index, arr) {
let infClass = index === 0 ? " inf-tabs" : ""
if (index <= 3) {
infhtml += '<div class="inf-tab-item' + infClass + '" id="' + item.consultingId +
'">/ ' + item.consultingName + ' /</div>'
}
});
$('.inf-tab-box').html(infhtml)
if (res.data.length) {
getList($(".inf-tab-item")[0].id)
$(".inf-tab-item").bind("click", function (data) {
$(".inf-tab-item").removeClass("inf-tabs")
data.target.className = "inf-tab-item inf-tabs"
getList(data.target.id)
});
}
}
};
//资 讯 中 心 点击更多
$('.mesMore').bind('click', function () {
location.href = "InfoCenterList.html?time=" + new Date().getTime();
});
// 公示信息
var postList3 = new AJAX_OBJ(AgencyAddress + "order/searchGoods", searchGoods3, onUrlError);
postList3.postRequestData(JSON.stringify({
pay_type: 2,
record_type: "",
goods_status: 1,
}));
function searchGoods3(xmlHttp) {
let res = eval('(' + xmlHttp.responseText + ')');
if (res.resultCode === "00000000") {
publicity(res)
}
};
$(".pub-btn-left-item").bind("click", function (data) {
$(".pub-btn-left-item").removeClass("btns")
data.target.className = "pub-btn-left-item btns"
let postList4 = new AJAX_OBJ(AgencyAddress + "order/searchGoods", searchGoods4, onUrlError);
postList4.postRequestData(JSON.stringify({
pay_type: 2,
record_type: filters(data.target.innerText),
goods_status: 1,
}));
function searchGoods4(xmlHttp) {
let res = eval('(' + xmlHttp.responseText + ')');
if (res.resultCode === "00000000") {
publicity(res)
}
}
});
// 服务商
var getList3 = new AJAX_OBJ(AgencyAddress + "order/serviceProviders?type=" + "", serviceProviders1,
onUrlError);
getList3.getRequestData();
function serviceProviders1(xmlHttp) {
let res = eval('(' + xmlHttp.responseText + ')');
if (res.resultCode === "00000000") {
serviceProviders(res)
}
};
$(".pro-tab").bind("click", function (data) {
$(".pro-tab").removeClass("tabs")
data.target.className = "pro-tab tabs"
if (data.target.innerText === '全部') {
let getList = new AJAX_OBJ(AgencyAddress + "order/serviceProviders?type=" + "",
serviceProviders2, onUrlError);
getList.getRequestData();
function serviceProviders2(xmlHttp) {
let res = eval('(' + xmlHttp.responseText + ')');
if (res.resultCode === "00000000") {
serviceProviders(res)
}
};
} else {
let getList = new AJAX_OBJ(AgencyAddress + "order/serviceProviders?type=" + data.target
.innerText, serviceProviders3, onUrlError);
getList.getRequestData();
function serviceProviders3(xmlHttp) {
let res = eval('(' + xmlHttp.responseText + ')');
if (res.resultCode === "00000000") {
serviceProviders(res)
}
};
}
});
// 交易中心
let transaction = [{
name: '深圳市新大鹿文化有限公司'
},
{
name: '深圳市极光新空科技有限公司'
},
{
name: '北京千禧星辰文化科技有限公司'
},
{
name: '深圳国夏文化数字科技有限公司'
},
{
name: '熵链科技(福建)有限公司'
},
{
name: '华科文创(深圳)有限公司(骨干节点)'
},
{
name: '国家图书馆出版社'
},
{
name: '中国数字文化集团有限公司'
},
{
name: '深圳市插画协会'
},
{
name: '深圳掌酷软件有限公司'
},
{
name: '上海青壁磐石文化传媒有限公司'
},
{
name: '深圳幸福道投资发展集团有限公司'
},
{
name: '幸福姓氏文化传播(深圳)有限公司'
},
{
name: '狮凰文化(北京)股份有限公司'
},
{
name: '深圳美术馆'
},
{
name: '新华智云科技有限公司'
},
{
name: '北京玖扬博文文化发展有限公司'
},
// {
// name: '深文投(深圳)发展有限公司'
// },
// {
// name: '珠海喜岳昊天创意信息有限公司'
// },
// {
// name: '览真堂(深圳)文化发展有限公司'
// },
// {
// name: '深圳市麦迪英杰文化发展有限公司'
// },
// {
// name: '深圳华融文化科技服务企业(有限合伙)'
// },
// {
// name: '中一投资集团有限公司'
// },
// {
// name: '玥德文化管理(深圳)有限公司'
// },
// {
// name: '熙西里遇(深圳)企业服务管理有限公司'
// },
{
name: '江苏共信宝数字科技有限公司'
},
{
name: '广东省粤数文数字科技有限公司'
},
{
name: '中关村京能(广东)产业投资有限公司'
},
{
name: '华链店商(广州)信息科技有限公司'
},
{
name: '上海恒润数字科技集团股份有限公司'
},
{
name: '华储艺术品中心(深圳)有限公司'
},
{
name: '天津图谱科技有限公司'
},
{
name: '成都九天星空科技有限公司'
},
{
name:'浙江香叶资产管理有限公司'
},
{
name:'深圳市三品园文化发展有限公司'
},
{
name:'北京永大天成科技有限公司'
},
{
name:'南方国投(广东)投资有限公司'
},
{
name:'南昌埃克斯爱慕科技有限公司'
},
{
name:'上海名媛藏宝阁文化艺术品中心'
},
{
name:'深圳市雅昌艺术网有限公司'
},
{
name:'成都时代出版社'
}
]
let transtr = ''
transaction.myForEach(function (item, index, arr) {
// transtr += '<div class="tran-content-item"><div class="tran-content-name" title="' + item.name +
// '">' + item.name + '</div>' + '</div>'
transtr += '<div class="tran-content-item tran-content-name" title="' + item.name +
'">' + item.name + '</div>'
});
$('.tran-content').html(transtr);
transaction.myForEach(function (item, index, arr) {
let Index = index + 1
if (Index % 6 !== 0) {
$(".tran-content-item:nth-child(" + Index + ")").css("margin-right", "24px")
}
if (index >= transaction.length - 6) {
$(".tran-content-item:nth-child(" + Index + ")").css("margin-bottom", "0")
}
});
var _default = 18; //默认显示图片个数
var _loading = 6; //每次点击按钮后加载的个数
var _content = []; //用来存储li循环内容
function init() {
var lis = $(".tran-content div");
$(".transaction .lanList").html("");
for (var n = 0; n < _default; n++) {
lis.eq(n).appendTo(".transaction .lanList");
}
for (var i = _default; i < lis.length; i++) {
_content.push(lis.eq(i));
}
$(".transaction .tran-content").html("");
}
init();
// //点击加载更多
$('.ipbut').bind('click', function () {
var k = 0,
t, i;
var mLis = $(".transaction .lanList div").length;
for (i = mLis - _default; i < mLis - _loading; i++) {
if (i == _content.length) {
$(".ipbut").css("display", "none");
break;
}
_content[i].appendTo(".transaction .lanList ");
t = mLis + k;
k++;
}
});
});
function searchOrder() {
let data = {
user_role: '2',
order_status: "",
pay_status: '2'
}
let OrderList = new AJAX_OBJ(AgencyAddress + 'order/queryRrder?pay_status=' + data.pay_status + '&user_role=' + data
.user_role + '&order_status=' + data.order_status, succesOrder, onUrlError);
OrderList.postRequestData();
}
function succesOrder(xmlHttp) {
let res = eval('(' + xmlHttp.responseText + ')');
if (res.resultCode === "00000000") {
if (res.data) {
let new_shopList = '';
res.data.myForEach(function (item, index, arr) {
item.order_detail.myForEach(function (i, id, arr) {
new_shopList +=
'<div class="swiper-slide order_shop">' +
'<div>' + i.goods_name + '</div><div>¥' + i.price +
'</div><div style="height: 30px;border-right: 2px solid #fff;"></div></div>'
})
});
$('.freetitle_box .swiper-wrapper').html(new_shopList);
var mySwiper = new Swiper('.freetitle_box', {
loop: true,
freeMode: true,
slidesPerView: 'auto',
freeModeSticky: true,
autoplay: 3000,
});
$('.swiper').mouseover(function () {
mySwiper.stopAutoplay();
}).mouseleave(function () {
mySwiper.startAutoplay();
})
}
}
}