|
@@ -2,105 +2,13 @@ import '../../css/news/appCognizance.css';
|
|
|
|
|
|
$(function(){
|
|
|
var colorArr=['#e22e2e','#2542ef','#10d4f1','#f9750b','#0bf964'];
|
|
|
- //获取id
|
|
|
- var https=window.location.href;
|
|
|
- var index=https.indexOf('id=');
|
|
|
- var idtt = https.substr(index+3);
|
|
|
- var ids=idtt.split('#tt');
|
|
|
- //数据获取
|
|
|
- function DataList(){
|
|
|
- if(idtt){
|
|
|
- $.ajax({
|
|
|
- type:"get",
|
|
|
- dataType:'json',
|
|
|
- url: globalConfig.context + "/app/service/ProjectDetail",
|
|
|
- data:{
|
|
|
- id:ids[0]
|
|
|
- },
|
|
|
- success:function(data){
|
|
|
- var theData=data.data;
|
|
|
- var describeList=[]; //需求描述
|
|
|
- var dataList=[]; //所需资料
|
|
|
- var specificationList=[]; //服务规格
|
|
|
- var promiseLsit=[];
|
|
|
- if(data.data){
|
|
|
- var urls;
|
|
|
- if(theData.maxLogo&&theData.maxLogo!=null){
|
|
|
- urls=globalConfig.avatarHost+'/upload'+theData.maxLogo;
|
|
|
- $('#imgs').attr('src',urls)
|
|
|
- };
|
|
|
- $('#dataName').html(theData.name)
|
|
|
- var desArr=[];
|
|
|
- var dataArr=[];
|
|
|
- var proArr=[];
|
|
|
- //项目描述
|
|
|
- if(theData.introduce!=null){
|
|
|
- if(theData.introduce.match(/\n/g)){
|
|
|
- desArr=theData.introduce.split(/\n/g)
|
|
|
- }else{
|
|
|
- desArr.push(theData.introduce)
|
|
|
- };
|
|
|
- for (var i=0;i<desArr.length;i++){
|
|
|
- describeList.push([
|
|
|
- "<p>"+desArr[i]+"</p>",
|
|
|
- ].join(','));
|
|
|
- };
|
|
|
- }
|
|
|
-
|
|
|
- //项目价值
|
|
|
- if(theData.valueEffect!=null){
|
|
|
- if(theData.valueEffect.match(/\n/g)){
|
|
|
- dataArr=theData.valueEffect.split(/\n/g)
|
|
|
- }else{
|
|
|
- dataArr.push(theData.valueEffect)
|
|
|
- };
|
|
|
- for (var i=0;i<dataArr.length;i++){
|
|
|
- dataList.push([
|
|
|
- "<p>"+dataArr[i]+"</p>",
|
|
|
- ].join(','));
|
|
|
- };
|
|
|
- }
|
|
|
-
|
|
|
- //规格
|
|
|
- if(theData.projectSize.length){
|
|
|
- for (var i=0;i<theData.projectSize.length;i++){
|
|
|
- specificationList.push([
|
|
|
- "<div>"+theData.projectSize[i]+"</div>",
|
|
|
- ].join(','));
|
|
|
- };
|
|
|
- }else{
|
|
|
- specificationList=[];
|
|
|
- }
|
|
|
- //所需资料
|
|
|
- if(theData.clientSize!=null){
|
|
|
- if(theData.clientSize.match(/\n/g)){
|
|
|
- proArr=theData.clientSize.split(/\n/g)
|
|
|
- }else{
|
|
|
- proArr.push(theData.clientSize)
|
|
|
- };
|
|
|
- for (var i=0;i<proArr.length;i++){
|
|
|
- promiseLsit.push([
|
|
|
- "<p>"+proArr[i]+"</p>",
|
|
|
- ].join(','));
|
|
|
- };
|
|
|
- }
|
|
|
- $('#describe').html(describeList);
|
|
|
- $('#data').html(dataList);
|
|
|
- $('.specifications').html(specificationList);
|
|
|
- $('#promise').html(promiseLsit);
|
|
|
- //规格添加颜色
|
|
|
- for(var i=0;i<$('.specifications div').length;i++){
|
|
|
- if(i>colorArr.length){
|
|
|
- i=0
|
|
|
- };
|
|
|
- $('.specifications div').eq(i).css({color:colorArr[i]})
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- };
|
|
|
- DataList();
|
|
|
+ //规格添加颜色
|
|
|
+ for(var i=0;i<$('.specifications div').length;i++){
|
|
|
+ if(i>colorArr.length){
|
|
|
+ i=0
|
|
|
+ };
|
|
|
+ $('.specifications div').eq(i).css({color:colorArr[i]})
|
|
|
+ }
|
|
|
})
|
|
|
|
|
|
|