瀏覽代碼

前台处理和页面动态绑定数据

dongbw 8 年之前
父節點
當前提交
13c0fdf9eb
共有 20 個文件被更改,包括 2391 次插入2590 次删除
  1. 1 1
      donate-service/src/main/webapp/WEB-INF/views/project.html
  2. 181 1
      donate-service/src/main/webapp/WEB-INF/views/userCenter.html
  3. 4 4
      donate-service/src/main/webapp/resources/js/activity/controllers/ActivityDetailCtrl.js
  4. 13 1476
      donate-service/src/main/webapp/resources/js/common/controllers/commonCtrls.js
  5. 36 0
      donate-service/src/main/webapp/resources/js/common/directives.js
  6. 51 3
      donate-service/src/main/webapp/resources/js/common/query/Project.js
  7. 31 0
      donate-service/src/main/webapp/resources/js/common/query/User.js
  8. 2 2
      donate-service/src/main/webapp/resources/js/project/app.js
  9. 48 3
      donate-service/src/main/webapp/resources/js/project/controllers/ProjectDetailCtrl.js
  10. 76 7
      donate-service/src/main/webapp/resources/js/project/controllers/ProjectListCtrl.js
  11. 9 13
      donate-service/src/main/webapp/resources/js/user/app.js
  12. 29 17
      donate-service/src/main/webapp/resources/js/user/controllers/UserCtrl.js
  13. 1 1
      donate-service/src/main/webapp/resources/js/user/main.js
  14. 1 1
      donate-service/src/main/webapp/resources/view/activity/activity_detail.html
  15. 1 1
      donate-service/src/main/webapp/resources/view/activity/activity_list.html
  16. 50 0
      donate-service/src/main/webapp/resources/view/common/project_detail_side.html
  17. 0 398
      donate-service/src/main/webapp/resources/view/person/person_center.html
  18. 681 585
      donate-service/src/main/webapp/resources/view/project/project_detail.html
  19. 117 77
      donate-service/src/main/webapp/resources/view/project/project_list.html
  20. 1059 0
      donate-service/src/main/webapp/resources/view/user/user_center.html

+ 1 - 1
donate-service/src/main/webapp/WEB-INF/views/project.html

@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html lang="en">
 <head>
-    <title>一元捐-1</title>
+    <title>一元捐-UAS</title>
     <meta name="keywords" content="">
     <meta name="description" content="">
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

+ 181 - 1
donate-service/src/main/webapp/WEB-INF/views/person.html → donate-service/src/main/webapp/WEB-INF/views/userCenter.html

@@ -277,10 +277,14 @@
         }
         .active-detail .table tbody tr{
             border-bottom: 1px solid #e1e1e1;
+            cursor: pointer;
         }
         .active-detail .table tbody tr.look{
             border-bottom: none;
         }
+        /*.active-detail .table tbody tr.news-list{*/
+        /*border-bottom: none;*/
+        /*}*/
         .active-detail .table tbody tr.new-progress div{
             padding: 5px 20px;
             margin-left: 80px;
@@ -384,6 +388,46 @@
             border-radius: 50%;
             background: #f00;
         }
+        .new-top {
+            margin-left: 135px;
+            text-align: left;
+        }
+        .new-top p{
+            margin-bottom: 15px;
+            font-size: 14px;
+            color: #505050;
+        }
+        .new-top p a{
+            font-size: 14px;
+            color: #005aca;
+            text-decoration: underline;
+        }
+        .new-top .img{
+            width: 300px;
+            height: 200px;
+            line-height: 200px;
+            border: 1px solid #dcdcdc;
+        }
+        .new-top .img img{
+            width: 100%;
+            height: 100%;
+        }
+        .new-top .time-list{
+            margin-top: 17px;
+        }
+        .new-top .time-list span:first-child{
+            font-size: 14px;
+            color: #959595;
+        }
+        .new-top .time-list span.show-up{
+            margin-left: 22px;
+            font-size: 14px;
+            color: #005aca;
+            cursor: pointer;
+        }
+        .news-detail{
+            display: none;
+        }
         /*项目管理*/
         /*项目管理-我的项目*/
         .active-detail3 .projectNav{
@@ -602,6 +646,142 @@
         .myProject{
             display: none;
         }
+        /*登录弹出框*/
+        .modal-open .modal {
+            width: 100%;
+            height: 100%;
+        }
+        .modal-open .modal .modal-dialog{
+            width: 370px;
+            height: 330px;
+        }
+        .modal-open .modal-dialog .modal-content{
+            width: 370px;
+            height: 330px;
+        }
+        .login{
+            margin: 0 auto;
+            width: 370px;
+            height: 330px;
+            text-align: center;
+        }
+        .login .header{
+            padding: 0 20px;
+            width: 100%;
+            height: 44px;
+            line-height: 44px;
+            background: #eeeeee;
+        }
+        .login .header p{
+            font-size: 16px;
+            color: #969696;
+            font-weight: bold;
+        }
+        .login .header .close{
+            font-size: 38px;
+        }
+        .login .body{
+            padding: 0;
+        }
+        .x-login {
+            background: #fff;
+            overflow: visible;
+            z-index: 4;
+        }
+        .x-login-header {
+            position: relative;
+            height: 48px;
+            line-height: 48px;
+            overflow: hidden;
+            width: 100%;
+            border-bottom: 1px solid #e7e7e7;
+        }
+        .x-login-tab {
+            margin-top: -4px;
+            width: 173px;
+            font-size: 18px;
+            text-align: center;
+            background: #fff;
+            border-bottom: 2px solid transparent;
+        }
+        .x-login-tab a {
+            padding: 13px 10px;
+            font-size: 16px;
+            color: #777777;
+        }
+        .x-login-tab.active,.x-login-tab:hover{
+            border-bottom: 2px solid #5078cb;
+        }
+        .x-login-tab.active a,.x-login-tab:hover a{
+            color: #5078cb;
+        }
+        .x-login-form, .x-login-qrcode {
+            padding: 20px;
+        }
+        .x-has-feedback-left {
+            position: relative;
+        }
+        .x-has-feedback-left i{
+            position: absolute;
+            top: 10px;
+            left: 10px;
+            font-size: 16px;
+            color: #5078cb;
+        }
+        .x-has-feedback-left>.form-control {
+            padding-left: 30px;
+        }
+        .x-input {
+            border-color: #ccc;
+            border-radius: 0;
+            box-shadow: none;
+        }
+        .x-btn-primary, .x-btn-primary:hover {
+            background: #5078cb;
+            color: #fff;
+            font-weight: 700;
+            letter-spacing: 4px;
+        }
+        .x-btn {
+            border-radius: 0;
+        }
+        .x-login-help {
+            line-height: 50px;
+        }
+        .x-login-help a {
+            color: #5078cb;
+        }
+        .icon-left {
+            font-size: inherit;
+            margin-right: 5px;
+        }
+        .x-qrcode-help {
+            text-align: center;
+            margin-bottom: 12px;
+        }
+        .x-qrcode-img {
+            width: 129px;
+            margin: 0 auto 20px auto;
+            box-shadow: 0 0 8px #ddd;
+        }
+        .x-qrcode-ex {
+            margin: 0 -20px -20px -20px;
+            padding: 0 20px;
+            line-height: 50px;
+            background: #fdfdfd;
+            border-top: 1px solid #e7e7e7;
+        }
+        .x-qrcode-ex ul {
+            margin-bottom: 0;
+        }
+        .x-qrcode-ex li {
+            width: 100px;
+            text-align: center;
+            color: #999;
+        }
+        .show-form{
+            display: none;
+        }
     </style>
 </head>
 <body>
@@ -612,7 +792,7 @@
     <script src="static/lib/jquery/jquery.min.js"></script>
     <script src="static/lib/bootstrap/js/bootstrap.min.js"></script>
     <script type="text/javascript" src="static/lib/require.js"
-            data-main="static/js/personal/main.js"></script>
+            data-main="static/js/user/main.js"></script>
     <script>
         //    点击切换
         $(document).ready(function (){

+ 4 - 4
donate-service/src/main/webapp/resources/js/activity/controllers/ActivityDetailCtrl.js

@@ -8,7 +8,7 @@ define([ 'app/app' ], function(app) {
             var id = $stateParams.id;
 
             // 获取活动详情
-            Activity.getDetailById({ id: id}, {}, function (data) {
+            Activity.getDetailById({id: id}, {}, function(data) {
                 console.log('detail', data);
                 $scope.activity = data;
             }, function (error) {
@@ -16,9 +16,9 @@ define([ 'app/app' ], function(app) {
             });
 
             // 获取本次活动相关项目所筹集金额
-            Activity.getThisAmount({id:id}, {}, function (data) {
-                $scope.donationHistory = data;
-                console.log($scope.donationHistory);
+            Activity.getThisAmount({id: id}, {}, function(data) {
+                $scope.donationHistory = data.sum;
+                console.log(data);
             });
         };
         init();

+ 13 - 1476
donate-service/src/main/webapp/resources/js/common/controllers/commonCtrls.js

@@ -47,16 +47,6 @@ define([ 'app/app' ], function(app) {
 		}
 	}]);
 
-	// 修改页面标题
-	app.controller('TitleCtrl', ['$scope', '$rootScope', '$window', function($scope, $rootScope, $window) {
-		$rootScope.$on('$routeChangeSuccess', function(event, current, previous) {
-			if(current.$$route) {
-				$scope.pageTitle = current.$$route.title || '商品管理';
-				document.title = $scope.pageTitle + '-优软商城';
-			}
-		});
-	}]);
-
 	// 身份认证
 	app.controller('AuthenticationCtrl', ['$scope', '$window', 'AuthenticationService', '$rootScope', 'SessionService', 'collectionService', '$modal', 'toaster','$q', 'Cart',
 		function($scope, $window, AuthenticationService, $rootScope, SessionService, collectionService, $modal, toaster, $q, Cart) {
@@ -178,7 +168,7 @@ define([ 'app/app' ], function(app) {
 //	        modalInstance.result.then(function(orderid){
 //	        	$window.location.reload();
 //	        }, function(reason){
-//	        	
+//
 //	        });
 				// 跳转账户中心
 				AuthenticationService.redirectSignin();
@@ -234,770 +224,6 @@ define([ 'app/app' ], function(app) {
 		};
 	}]);
 
-	// 搜索框Ctrl
-	app.controller('SearchCtrl', ['$scope', '$http', '$rootScope', 'SessionService', function($scope, $http, $rootScope, SessionService) {
-		$scope.searchType = 'original';// 搜索类型
-		$scope.searchType = {
-			original: false,
-			inaction: false,
-			proffing: false,
-			brand: false,
-			isCmp: function() {
-				var me = this;
-				return me.original || me.inaction || me.proffing;
-			}
-		};
-		if(SessionService.get('brand')) {
-			$scope.searchType.brand = true;
-		}
-
-		var componentSearchType = SessionService.get('component');
-		if(componentSearchType) {
-			$scope.searchType = angular.fromJson(componentSearchType);
-			$scope.searchType.isCmp = function() {
-				var me = this;
-				return me.original || me.inaction || me.proffing;
-			}
-		}
-
-		// 点击搜索库存、样品、呆滞
-		$scope.cmpTypeClick = function() {
-			if($scope.searchType.isCmp()) {
-				$scope.searchType.brand = false;
-			}
-		};
-
-		// 点击搜索品牌
-		$scope.brandTypeClick = function() {
-			if($scope.searchType.brand) {
-				$scope.searchType.original = false;
-				$scope.searchType.inaction = false;
-				$scope.searchType.proffing = false;
-			}
-		};
-
-		// 选搜索类型
-		$scope.setSearchType = function(t) {
-			$scope.searchType = t;
-		};
-
-		// 搜索
-		$scope.search = function() {
-			if($scope.keyword) {
-				if($scope.searchType.brand) {
-					SessionService.set('brand', true);
-					SessionService.unset('component');
-					window.location.href = 'search?w=' + encodeURI(encodeURIComponent($scope.keyword)) + '&type=brand';
-				}else if($scope.searchType.isCmp()){
-					SessionService.set('component', angular.toJson($scope.searchType));
-					SessionService.unset('brand');
-					window.location.href = 'search?w=' + encodeURI(encodeURIComponent($scope.keyword)) + '&type=component';
-				}else {
-					SessionService.unset('component');
-					SessionService.unset('brand');
-					window.location.href = 'search?w=' + encodeURI(encodeURIComponent($scope.keyword)) + '&type=all';
-				}
-
-			}
-		};
-
-		// 搜索框获得焦点,显示联想框
-		$scope.onFocus = function() {
-			$scope.associate = true;
-			$scope.selectIndex = -1;
-			if(!$scope.keyword) $scope.keyword = '';
-		};
-
-		// 搜索框失去焦点,关闭联想框
-		$scope.onBlur = function() {
-			$scope.associate = false;
-		};
-
-		// 搜索框通过按键选取想要的联想词
-		$scope.onKeyup = function() {
-			if($scope.associates && $scope.associates.length) {
-				if(event.keyCode == 40) { //监听到按下键
-					$scope.selectIndex ++;
-					if($scope.selectIndex >= $scope.associates.length) $scope.selectIndex = 0;
-					$scope.keyword = $scope.associates[$scope.selectIndex];
-				} else if(event.keyCode == 38) { //监听到按上键
-					$scope.selectIndex --;
-					if($scope.selectIndex < 0) $scope.selectIndex = $scope.associates.length - 1;
-					$scope.keyword = $scope.keyword = $scope.associates[$scope.selectIndex];
-				} else if(event.keyCode == 13) { //确定键
-					$scope.search();
-				}
-			}
-		};
-
-		// 输入框内容变化,获取新的联想词
-		$scope.onChange = function() {
-			if ($scope.keyword) {
-				var params = {
-					keyword: $scope.keyword
-				};
-				if($rootScope.userInfo) {
-					params.userUU = $rootScope.userInfo.userUU;
-				}
-				$http.get('search/similarKeywords', {
-					params : params
-				}).success(function(data){
-					$scope.associates = data;// 联想词数组
-				}).error(function(response) {
-
-				});
-			} else {
-				$scope.associates = [];// 联想词数组
-			}
-
-		};
-
-		// 点击联想词
-		$scope.onAssociateClick = function(component) {
-			$scope.keyword = component;
-			$scope.search();
-		};
-
-		// 鼠标进入联想词框,不能关闭联想词框
-		$scope.onAssociateEnter = function() {
-			$scope.associateEnter = true;
-		};
-
-		// 鼠标离开联想词框,可以关闭联想词框
-		$scope.onAssociateLeave = function() {
-			$scope.associateEnter = false;
-		};
-
-		// 热词
-		$scope.hotwords = [{name : 'SCT2080KEC', url :'product#/component/1100400300009990/'},
-			{name : '电池组', url : 'product#/kinds/346'},
-			{name : 'Vishay',url : 'product#/brand/30327265e42a871be050007f01003d96/'},
-			{name : 'Panasonic Battery', url : 'product#/brand/30327265e4e7871be050007f01003d96/'}];
-	}]);
-
-	// 商品类目菜单导航
-	app.controller('CategoryMenuCtrl', ['$scope', 'KindAPI', '$rootScope', function($scope, KindAPI, $rootScope) {
-		// 展开、收起类目菜单
-		$scope.showMenu = function(b) {
-			$scope.isMenuShow = b;
-		};
-
-		// 获取类目数据
-		KindAPI.getAllChildren({parentId: 0}, function(data) {
-			$scope.categories = data;
-		}, function(response) {
-
-		});
-
-	}]);
-
-	// 首页计数器
-	app.controller('CommonCountCtrl', [ '$scope', 'CommonCountAPI', function ($scope, CommonCountAPI) {
-		$scope.opreatedCounts = [];
-		CommonCountAPI.getActived({}, function (data) {
-			$scope.counts = data;
-			angular.forEach($scope.counts, function (count) {
-				count.countStr = count.count.toString();
-				while (count.countStr.length < 9) {
-					count.countStr = '0' + count.countStr;
-				}
-
-				count.nums = [];
-				for(var i = 0; i < count.countStr.length; i++) {
-					if (i%3 == 0) {
-						var num = [];
-					}
-					var str = count.countStr.substring(i, i+1);
-					num.push({value : str});
-					if (i%3 == 0) {
-						count.nums.push(num);
-					}
-				}
-			});
-
-			for(var i = 0; i < $scope.counts.length; i++) {
-				if (i % 2 == 0) {
-					var countList = [];
-				}
-				countList.push($scope.counts[i]);
-				if (i % 2 == 0) {
-					$scope.opreatedCounts.push(countList);
-				}
-			}
-		}, function (response) {
-
-		})
-	}]);
-
-
-	//器件的上架货物选择模态框的controller
-	app.controller('GoodChooseCtrl', ['$scope', '$rootScope', 'toaster', 'NgTableParams', '$modalInstance', 'uuid', 'isBuy', 'Goods', 'Cart' , 'Order', '$filter', '$modal' ,'$location', 'Currency', 'SessionService', 'ngTableParams', function($scope, $rootScope, toaster, NgTableParams, $modalInstance, uuid, isBuy, Goods, Cart, Order, $filter, $modal, $location, Currency, SessionService, ngTableParams) {
-		var enIdFilter = $filter('EncryptionFilter');
-		$scope.uuid = uuid;
-		$scope.isBuy = isBuy;
-		$scope.choosedGoods = [];
-		$scope.sort = {field: 'minPrice', desc: 'asc'};
-		// 是否已加入购物车判断
-		$scope.flag = {};
-		$scope.orderType= 'prices[0].rMBPrice';
-
-		// 设置每个批次的最低价格,用于排序
-		var setMinPrice = function(data) {
-			for(var i = 0; i < data.length; i ++) {
-				var g = data[i];
-				if(g.prices && g.prices.length) {
-					g.minPrice = g.prices[g.prices.length - 1].price;
-				}
-				g.minPackQty = g.minPackQty || 1;
-				g.minBuyQty = g.minBuyQty || 1;
-			}
-		};
-
-		// 获取商品是否加入购物车状态信息
-		var getCarts = function() {
-			$scope.flag = {};
-			if($rootScope.userInfo) {
-				Cart.getCarts({}, function(data) {
-					angular.forEach(data,function(cart){
-						$scope.flag[cart.batchCode] = true;
-					});
-				});
-			}
-		};
-
-
-		// 展开或隐藏分段价格
-		$scope.showPrices = function(goods, currency) {
-			if(currency === 'RMB') {
-				goods.$pricesShowRmb = !goods.$pricesShowRmb;
-			}else if(currency === 'USD') {
-				goods.$pricesShowUsd = !goods.$pricesShowUsd;
-			}
-		};
-
-		// 获取初始数据
-		var getData = function() {
-			$scope.productTableParams = new ngTableParams({
-				page : 1,
-				count : 10
-			}, {
-				total : 0,
-				getData : function($defer, params) {
-					$scope.paginationParams = params;
-					var pageParams = params.url();
-					pageParams.filter = {};
-					getCarts();
-					pageParams.filter.kindid = $scope.kindId;
-					if($scope.filters.brandid) {// 品牌筛选
-						pageParams.filter.brandid = $scope.filters.brandid;
-					}
-					// 属性值筛选
-					if($scope.filters.properties && Object.keys($scope.filters.properties).length) {
-						pageParams.filter.properties = angular.toJson($scope.filters.properties);
-					}
-					KindAPI.getCompGoodsByKindid(BaseService.parseParams(pageParams), function(data) {
-						init(data.content);
-						$defer.resolve(data.content);
-						params.total(data.totalElements);
-						// 初始化一下是否有送样
-						$scope.hasSample = [];
-						angular.forEach(data.content, function(compGoods) {
-							compGoods.$pricesShowRmb = false;
-							compGoods.$pricesShowUsd = false;
-							if(compGoods.sampleQty > 0) {
-								$scope.hasSample.push(false);
-							}
-						});
-
-					}, function(response) {
-						toaster.pop('error', '获取信息失败');
-					});
-				}
-			});
-		}
-
-		getData();
-
-		// 检测是否给定产品只有一种类型,同时标记同种类型的批次,便于在HTML中年使之具备相同的背景色。约定:content的数据是按型号已经分组好的。
-		var init = function(content) {
-			$scope.onlyOneType = false;
-			if(content.length > 0) {
-				$scope.onlyOneType = true;
-				var obj0 = content[0];
-				obj0.isOdd = true;
-				var previousObj = obj0;
-				var currentObj;
-				for(var i = 0; i < content.length; i++) {
-					currentObj = content[i];
-					if(currentObj.code !== obj0.code) {
-						$scope.onlyOneType = false;
-					}
-					if(currentObj.code !== previousObj.code) {
-						//console.log('curr.code'+content[i].code);
-						currentObj.isOdd = !previousObj.isOdd;
-						//console.log('prev.code'+content[i].code);
-					}else {
-						currentObj.isOdd = previousObj.isOdd;
-					}
-					previousObj = currentObj;
-				}
-			}
-
-			if($scope.onlyOneType) {
-				$scope.orderType = 'reserve';
-				$scope.dir = '-';
-			}
-		}
-
-		// 改变排序顺序
-		$scope.changeOrder = function(type){
-			$scope.orderType = type;
-			if(!$scope.dir || $scope.dir === '') {
-				$scope.dir = '-';
-			}else {
-				$scope.dir = '';
-			}
-		}
-
-		// 加入购物车或直接购买
-		$scope.addToCart = function(goods, isBuy, value){
-			if(!$rootScope.userInfo || !$rootScope.userInfo.userUU) {
-				AuthenticationService.redirectSignin();
-				return;
-			}
-			var a = {};
-			a.uuid = goods.uuid;
-			//TODO 先设置为点击加入购物车加入最小起订量,方便修改页面
-			a.number = goods.minBuyQty;
-			a.batchCode = goods.batchCode;
-			a.taxes = goods.taxes;
-			///a.storeuuid = goods.s
-			var goodsList = [];
-			goodsList.push(a);
-			SessionService.set("buyNow", false);
-			if(isBuy){// 1、如果是立即购买,跳转订单确认页面
-				if(a.number > 0) {
-					var newWindow = window.open('product#/cart');
-					Order.saveByGroup({}, goodsList, function(data){
-						// 控制订单确认页,直接购买不显示进度条
-						SessionService.set("buyNow", true);
-						newWindow.location.href = 'products#/orderEnsure/'+ enIdFilter(data.data.orderid);
-					}, function(res){
-						newWindow.close();
-						toaster.pop('error', '警告', res.data);
-					});
-				}else {
-					toaster.pop('warning', '提示', '该商品库存为0,请等待上货或咨询客服');
-				}
-			} else {// 2、如果是加入购物车,组装cart对象,提交
-				if (a.number > 0) {
-					Cart.save({uuid: a.uuid}, a, function(data){
-						toaster.pop('success', '保存成功', '添加购物车成功');
-						Cart.getCount({}, function(data){
-							$rootScope.countCart = data.count;
-						}, function(res){
-						});
-						// 每次修改购物车信息之后,都获取当前状态
-						getCarts();
-					}, function(res){
-						toaster.pop('error', '警告', res.data);
-						getCarts();
-					});
-				} else {
-					toaster.pop('warning', '提示', '该商品库存为0,请等待上货或咨询客服');
-				}
-			}
-		};
-
-		// 删除购物车对应商品
-		$scope.deleteFromCart = function(batchCode) {
-			var arr = [];
-			arr.push(batchCode);
-			var batchCodes = angular.toJson(arr);
-			Cart.deleteByBatchCode(batchCodes,function(data){
-				toaster.pop('info', '取消成功', '撤销商品成功');
-				Cart.getCount({}, function(data){
-					$rootScope.countCart = data.count;
-				}, function(res){
-				});
-
-				// 每次修改购物车信息之后,都获取当前状态
-				getCarts();
-			}, function(res){
-				toaster.pop('error', '取消失败', '商品已从购物车删除,请重新选择');
-				getCarts();
-			});
-		};
-
-		Currency.getAllName({}, {}, function(data) {
-			$scope.currencyNames = data;
-		}, function(res) {
-			toaster.pop('error', '币别信息加载失败,请刷新页面')
-		})
-
-		// 选择币别
-		$scope.setCurrency = function(c){
-			$scope.goodsTableParams.filter({'currencyName': c});
-		}
-
-		// 设置已添加购物车数
-		var setAddedCart = function(carts) {
-			if(carts && carts.length > 0) {
-				for(var i = 0; i < carts.length; i ++) {
-					var cart = carts[i];
-					for(var j = 0; j < $scope.goodes.length; j ++) {
-						var goods = $scope.goodes[j];
-						if(goods.batchCode == cart.batchCode) {
-							goods.addedQty = (goods.addedQty || 0) + cart.number;
-							goods.qty = goods.addedQty;
-							$scope.checkQty(goods);
-						}
-					}
-				}
-			}
-		};
-
-		var loadData = function(){
-			// 请求商品批次信息
-			Goods.findSimpleAvailableByUuid({uuid: uuid}, {}, function(data){
-				setMinPrice(data);// 设置每个批次的最低价格
-				$scope.goodes = data;
-				$scope.goodsTableParams = new NgTableParams({}, { dataset: data});
-				$scope.goodsTableParams.sorting($scope.sort.field, $scope.sort.desc);
-				getCarts();
-				Cart.getByUuid({uuid: uuid}, function(data) {
-					setAddedCart(data);
-				}, function(response) {
-					toaster.pop('error', '获取购物车信息失败', response.data);
-				});
-			}, function(res){
-				toaster.pop('error', '系统异常', '产品现货批次数据加载失败');
-			});
-		};
-
-		// 设置排序方式
-		$scope.setSort = function(field, desc) {
-			if(field == 'minPrice' && $scope.sort.field != 'minPrice') {// 切换到价格排序时先升序排序
-				desc = 'asc';
-			} else if( ! desc) {// 不指定升降序时,进行升降序切换
-				if($scope.sort.desc == 'asc') {
-					desc = 'desc';
-				} else {
-					desc = 'asc';
-				}
-			}
-			$scope.sort = {field: field, desc: desc};
-			$scope.goodsTableParams.sorting($scope.sort.field, $scope.sort.desc);
-		};
-
-		// 根据批次已输入购买数量获取对应的分段价格
-		$scope.currentPrice = function(goods) {
-			var r;
-			if(goods.qty && goods.prices) {
-				angular.forEach(goods.prices, function(v, k) {
-					if(v.start <= goods.qty && v.end >= goods.qty) {
-						r = v.taxPrice;
-						v.$checked = true;
-					} else {
-						v.$checked = false;
-					}
-					if(k == (goods.prices.length - 1) && goods.qty > v.end) {
-						r = v.taxPrice;
-					}
-				});
-			}
-			return r;
-		};
-
-		// 验证批次购买数量是否有效
-		$scope.qtyInvalid = function(goods) {
-			return goods.qty && (goods.qty % goods.minPackQty);
-		};
-
-		// 检验购买数量,合理则加入已加入购物清单
-		$scope.checkQty = function(goods) {
-			if(! $scope.qtyInvalid(goods) && goods.qty) {
-				var p = $scope.currentPrice(goods);
-				var taxes = goods.qty*(p*goods.tax/(100+goods.tax)); // 税率是相对于未含税的价格,而此处的价格已含税
-				var unContained = true;
-				angular.forEach($scope.choosedGoods, function(v, k) {
-					if(v.batchCode == goods.batchCode) {
-						unContained = false;
-						v.taxPrice = p;
-						v.qty = goods.qty;
-						v.taxes = taxes;
-					}
-				});
-				if(unContained) {
-					$scope.choosedGoods.push(angular.extend({taxPrice: p, taxes: taxes}, goods));
-				}
-				goods.$choosed = true;// 此批次已选购
-			} else {
-				angular.forEach($scope.choosedGoods, function(v, k) {
-					if(v.batchCode == goods.batchCode) {
-						$scope.choosedGoods.splice(k, 1);
-					}
-				});
-				goods.$choosed = false;// 此批次未选购
-			}
-		};
-
-		// 移除已选择的批次
-		$scope.removeChoosed = function(index) {
-			var cg = $scope.choosedGoods[index];
-			if(cg) {
-				$scope.choosedGoods.splice(index, 1);
-				angular.forEach($scope.goodes, function(v, k) {
-					if(cg.batchCode == v.batchCode) {
-						v.qty = null;
-						v.$choosed = false;
-					}
-				});
-			}
-		};
-
-		// 获取已选购的总数量
-		$scope.getTotalQty = function() {
-			var qty = 0;
-			angular.forEach($scope.choosedGoods, function(v, k) {
-				qty += Number(v.qty);
-			});
-			return qty;
-		};
-
-		// 获取已选购的总额
-		$scope.getTotal = function() {
-			var total = {};
-			angular.forEach($scope.choosedGoods, function(v, k) {
-				total[v.currencyName] = total[v.currencyName] || 0;
-				total[v.currencyName] += v.taxPrice * v.qty;
-			});
-			return total;
-		};
-
-		// 提交前转换一下已选购的商品
-		var convertGoods = function() {
-			var r = [];
-			angular.forEach($scope.choosedGoods, function(v, k) {
-				r.push({
-					uuid: v.uuid,
-					batchCode: v.batchCode,
-					number: v.qty,
-					taxes: v.taxes
-				});
-			});
-			return r;
-		};
-
-		loadData();
-
-		/*// 自动分配选购数量
-		 $scope.allocate = function(num) {
-		 if(num) {
-		 if (!$scope.currency) {
-		 $scope.currency = 'RMB';
-		 $scope.goodsTableParams.filter({'currencyName': 'RMB'});
-		 }
-		 $scope.choosedGoods = [];
-		 var datas = $filter('orderBy')($scope.goodes, $scope.sort.field, $scope.sort.desc == 'desc');
-		 for(var i = 0; i < datas.length; i ++) {
-		 var d = datas[i];
-		 // 只对指定的币别 && 要分配数量大于最小订购量 的商品批次分配
-		 if(d.currencyName == $scope.currency && num >= d.minBuyQty) {
-		 if(d.reserve >= num) {
-		 if(num % d.minPackQty > 0) {
-		 d.qty = num - (num % d.minPackQty) + d.minPackQty;
-		 } else {
-		 d.qty = num;
-		 }
-		 } else {
-		 d.qty = d.reserve - (d.reserve % d.minPackQty);
-		 }
-		 num -= d.qty;
-		 } else {
-		 d.qty = null;
-		 }
-		 $scope.checkQty(d);
-		 }
-		 }
-		 };*/
-
-		/*// 确认
-		 $scope.ok = function(){
-		 angular.forEach($scope.goodes, function(v, k) {
-		 $scope.checkQty(v);
-		 });
-		 var g = convertGoods();
-		 if(!g || g.length == 0) return;// 没选择批次就不提交
-		 if($scope.isBuy){// 1、如果是立即购买,直接生成订单,返回订单
-		 Order.saveByGroup({}, g, function(data){
-		 var orderids = [];
-		 angular.forEach(data, function(order) {
-		 orderids.push(order.orderid );
-		 })
-		 toaster.pop('success', '成功', '订单生成成功,订单号为【' + orderids.join(',') + '】。请您确认订单并付款');
-		 $modalInstance.close(enIdFilter(orderids.join('-')));
-		 }, function(res){
-		 toaster.pop('error', '警告', res.data);
-		 });
-		 } else {// 2、如果是加入购物车,组装cart对象,提交
-		 Cart.save({uuid: $scope.uuid}, g, function(data){
-		 toaster.pop('success', '保存成功', '添加购物车成功');
-		 Cart.getCount({}, function(data){
-		 $rootScope.countCart = data.count;
-		 }, function(res){
-		 });
-		 $modalInstance.close(); //关闭并返回当前选项
-		 window.open('user#/cart');
-		 }, function(res){
-		 toaster.pop('error', '警告', res.data);
-		 });
-		 }
-		 };*/
-
-		$scope.applysample = function(goods) {
-			//首先判断是否已送样
-			Goods.isSample({id: goods.id}, {}, function(data){
-				if(data.id) {
-					window.open("product#/proofings/" + enIdFilter(goods.batchCode));
-				}else {
-					toaster.pop('info', '该批次已申请样品', '请勿重复申请');
-					loadData();
-				}
-			}, function(res){
-				loadData();
-				toaster.pop('error', '系统异常', '产品现货批次数据加载失败');
-			});
-		}
-
-		// 退出
-		$scope.cancel = function(){
-			$modalInstance.dismiss('');
-		};
-
-	}]);
-
-	// 对比框侧边栏的Controller
-	app.controller('CompareBarCtrl', ['$scope', '$rootScope', 'Compare', 'toaster', function($scope, $rootScope, Compare, toaster) {
-		if(!$rootScope.compares) {
-			Compare.get({}, function(data){
-				$rootScope.compares = data;
-			}, function(response) {
-				toaster.pop('error', '获取对比列表失败', response.data);
-			});
-		}
-
-		// 移除对比
-		$scope.remove = function(uuid) {
-			Compare.remove({uuid: uuid}, {}, function(data) {
-				$rootScope.compares = data;
-			}, function(response) {
-				toaster.pop('error', '移除对比失败', response.data);
-			});
-		};
-
-		// 清空对比
-		$scope.removeAll = function() {
-			Compare.removeAll({}, {}, function(data) {
-				$rootScope.compares = data;
-			}, function(response) {
-				toaster.pop('error', '清空对比失败', response.data);
-			});
-		};
-
-		// 开始对比
-		$scope.compare = function() {
-			$rootScope.$content_open = false;
-			var uuids = [];
-			if($rootScope.compares.length<2) {
-				toaster.pop('info', "少于两个产品,不能对比");
-				return ;
-			}
-			for(var i=0; i<$rootScope.compares.length; i ++) {
-				uuids.push($rootScope.compares[i].uuid);
-			}
-			var uuidStr = uuids.join(',');
-			window.location.href = 'product#/compare/' + uuidStr;
-		};
-
-	}]);
-
-	// 留言板侧边栏的Controller
-	app.controller('MessageBarCtrl', ['$scope', '$modal', 'BaseService', function($scope, $modal, BaseService) {
-		var rootPath = BaseService.getRootPath();
-		$scope.openMessagePanel = function() {
-			var modalInstance = $modal.open({
-				templateUrl : rootPath + '/static/view/common/modal/messageBoard.html',  //指向上面创建的视图
-				controller : 'MessageBoardModalCtrl',// 初始化模态范围
-				size : 'md',
-				backdrop : 'static'
-			});
-			modalInstance.opened.then(function(){
-			});
-			modalInstance.result.then(function(brand){
-			}, function(reason){
-			});
-		}
-	}]);
-
-	// Web Chat侧边栏的Controller
-	app.controller('WebChatCtrl', ['$scope', '$interval', 'AuthenticationService', 'ChatBusinessLayer', 'toaster', function($scope, $interval, AuthenticationService, ChatBusinessLayer, toaster) {
-		$scope.userInfo = null;
-		$scope.countData = 0;
-		$scope.goWebChat = goWebChat;
-
-		activate();
-
-		function activate() {
-			AuthenticationService.getAuthentication().then(function (data) {
-				if (data && data.data) {
-					$scope.userInfo = data.data;
-					$scope.param = ChatBusinessLayer.getParamsFromUserInfo(data.data);
-					accessRealTimeData($scope.param);
-				}
-			}, function () {
-			});
-		}
-
-		function accessRealTimeData(param) {
-			$interval(function () {
-				ChatBusinessLayer.accessUnreadMessageCount(param).then(function (count) {
-					$scope.countData = count;
-				}, function () {
-					$scope.countData = 0;
-				});
-			}, 10000);
-		}
-
-		function goWebChat() {
-			if (!$scope.userInfo) {
-				toaster.pop('error', '请先登录优软商城!');
-				return ;
-			}
-			if (!$scope.userInfo.userTel || $scope.userInfo.userTel === '') {
-				toaster.pop('error', '请先注册优软互联!');
-				return ;
-			}
-
-			//获得窗口的垂直位置
-			var iTop = (window.screen.availHeight - 30 - 600) / 2;
-			//获得窗口的水平位置
-			var iLeft = (window.screen.availWidth - 10 - 1030) / 2;
-			var newTab = window.open('', '即时对话框', 'height=600, width=1030, top=' + iTop + ', left=' + iLeft + ', toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no');
-
-			var chatInfoDto = { userPhone: $scope.param.phone, enUU: $scope.param.enUU };
-			ChatBusinessLayer.visitWebChat(chatInfoDto, 'LIST').then(function (gid) {
-				console.log(gid);
-				//newTab.location.href = 'http://192.168.253.31:20220/chat/visit?gid=' + gid;
-				newTab.location.href = 'http://im.ubtob.com/chat/visit?gid=' + gid;
-			}, function (error) {
-				console.log(error);
-				newTab.close();
-				toaster.pop('warning', '您还没有开通客服系统,请开通客服系统!');
-			});
-		}
-	}]);
-
 	// 跳至顶部
 	app.controller('ScrollToTopCtrl', ['$scope', 'SmoothScroll', 'toaster', 'CommonGoodsBrowsingHistory', 'AuthenticationService', function($scope, SmoothScroll, toaster, CommonGoodsBrowsingHistory, AuthenticationService){
 		$scope.scrollToTop = function(){
@@ -1011,708 +237,19 @@ define([ 'app/app' ], function(app) {
 			}
 		});
 
-		// 获取浏览历史
-		var  loadData = function(){
-			CommonGoodsBrowsingHistory.getAllHistory({ }, { }, function (response) {
-				$scope.inithistory = response;
-				$scope.history = [];
-				angular.forEach($scope.inithistory, function(data){
-					if(data.isDelete == 1){
-						$scope.history.push(data);
-					}
-				})
-			})
-		}
-
-		// 删除足迹历史
-		$scope.deleteHistory = function (id) {
-			CommonGoodsBrowsingHistory.setDelete({id : id}, { }, function(response){
-				if(response.data = "success"){
-					toaster.pop("success", "删除足迹成功");
-					loadData();
-				}
-			})
-		}
+		// // 获取浏览历史
+		// var  loadData = function(){
+		// 	CommonGoodsBrowsingHistory.getAllHistory({ }, { }, function (response) {
+		// 		$scope.inithistory = response;
+		// 		$scope.history = [];
+		// 		angular.forEach($scope.inithistory, function(data){
+		// 			if(data.isDelete == 1){
+		// 				$scope.history.push(data);
+		// 			}
+		// 		})
+		// 	})
+		// }
 
 	}]);
 
-	// 留言板模态框
-	app.controller('MessageBoardModalCtrl', ['$scope', '$modalInstance', 'AuthenticationService', 'MessageBoardAPI', 'MessageBoard', 'toaster', 'ngTableParams', 'BaseService', function($scope, $modalInstance, AuthenticationService, MessageBoardAPI, MessageBoard, toaster, ngTableParams, BaseService) {
-		$scope.messageBoard = {};
-		$scope.showHistory = false;
-
-		$scope.params = {
-			page : 1,
-			count : 3,
-			sorting : {
-				createDate: 'DESC'
-			}
-		};
-
-		AuthenticationService.getAuthentication().success(function(data){
-			$scope.user = data;
-		});
-
-		document.onkeydown = function (ev) {
-			var onEvent = ev || event;
-			if (onEvent.keyCode == 27)
-				$('#image-box').hide();
-		};
-
-		/**
-		 * 上传图片
-		 */
-		$scope.onUpload = function ($data, index) {
-			if (!$scope.imgs) {
-				$scope.imgs = [{}, {}, {}, {}, {}];
-			}
-			if (!$data || !$data.path) {
-				toaster.pop('error', '图片上传失败');
-				return ;
-			}
-			$scope.imgs[index] = {'img' : $data.path};
-		};
-
-		// 删除图片
-		$scope.deleteImg = function (index) {
-			$scope.imgs[index] = {};
-		};
-
-		// 查看范例
-		$scope.showImg = function(imgUrl) {
-			var src = imgUrl, box = $('#image-box'), modal = $('.modal-content');
-			box.show();
-			box.find('img').attr('src', src);
-			box.find('a').click(function(){
-				box.hide();
-			});
-			box.dblclick(function(){
-				box.hide();
-			});
-		};
-
-		//初始化页数信息
-		$scope.initPages = function (totalElementPages) {
-			var pageNum = [];
-			if(totalElementPages == 1) {
-				return ;
-			}else if(totalElementPages < 10) {
-				for(var i = 0; i < totalElementPages + 2; i++) {
-					pageNum.push(i);
-				}
-			}else {
-				pageNum = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
-			}
-			angular.forEach(pageNum, function (number) {
-				var page = {active : true, type : 'page', number : number};
-				if(number == 0) {
-					page.type = 'prev';
-				}else if(number == 1) {
-					page.type = 'first';
-				}else if(number == pageNum.length - 2) {
-					page.type = 'last';
-					page.number = totalElementPages;
-				}else if(number == pageNum.length - 1){
-					page.type = 'next';
-				}
-				$scope.pages.push(page);
-			});
-		};
-
-		//当前页在后端计算方式
-		$scope.endSegment = function (currentPage, totalElementPages) {
-			if (totalElementPages > 8) {
-				angular.forEach($scope.pages, function (page) {
-					switch (page.number) {
-						case 2:
-							page.active = false;
-							page.type = 'more';
-							break;
-						case 10:
-							if(currentPage == totalElementPages) {
-								page.active = false;
-							}
-							break;
-						case 0:
-						case 1:
-							break;
-						default:
-							if(page.number != totalElementPages) {
-								page.number = totalElementPages - 9 + page.number;
-							}
-							page.current = (currentPage == page.number);
-							break;
-					}
-				});
-			}
-		};
-
-		//当前页在中间计算方式
-		$scope.middleSegment = function (currentPage) {
-			angular.forEach($scope.pages, function (page) {
-				switch (page.number) {
-					case 2:
-					case 8:
-						page.type ='more';
-						page.active = false;
-						break;
-					case 3:
-						page.number = currentPage - 2;
-						break;
-					case 4:
-						page.number = currentPage - 1;
-						break;
-					case 5:
-						page.number = currentPage;
-						page.current = true;
-						break;
-					case 6:
-						page.number = currentPage + 1;
-						break;
-					case 7:
-						page.number = currentPage + 2;
-						break;
-				}
-			});
-		};
-
-		//当前页在前段的计算方式
-		$scope.frontSegment = function (currentPage, totalElementPages) {
-			if (totalElementPages > 8) {
-				angular.forEach($scope.pages, function (page) {
-					switch (page.number) {
-						case 8:
-							page.type = 'more';
-							page.active = false;
-							break;
-						case 0:
-							if(currentPage == 1) {
-								page.active = false;
-							}
-						default : {
-							page.current = (currentPage == page.number);
-						}
-					}
-				});
-			}
-		};
-
-		//输入框监听Enter事件
-		$scope.listenEnter = function () {
-			if(event.keyCode == 13) {
-				$scope.setPage("page", $scope.params.currentPage);
-			}
-		};
-
-		$scope.setPage = function(type, number) {
-			if(type != 'prev' &&  type != 'page' && type != 'next' && type != 'last' && type != 'first') {
-				return ;
-			};
-			var page = -1;
-			switch (type) {
-				case "page":
-					if(number < 1) {
-						page = 1;
-					}else if(number > $scope.messageBoardAllData.totalPages) {
-						page = $scope.messageBoardAllData.totalPages;
-					}else {
-						page = number;
-					};
-					break;
-				case "prev":
-					if($scope.params.page <= 1) {
-						page = 1;
-					}else {
-						page =$scope.params.page - 1;
-					};
-					break;
-				case "next":
-					if($scope.params.page >= $scope.messageBoardAllData.totalPages) {
-						page = $scope.messageBoardAllData.totalPages
-					}else {
-						page =$scope.params.page + 1;
-					}
-					break;
-				case "first":
-					page = 1;
-					break;
-				case "last":
-					page = $scope.messageBoardAllData.totalPages;
-					break;
-			}
-			if(page == $scope.params.page || page < 1 || page > $scope.messageBoardAllData.totalPages) {
-				$scope.params.currentPage = $scope.params.page;
-				return ;
-			}
-			$scope.params.page = page;
-			loadData();
-		};
-
-		//计算页数的方式。
-		$scope.acculatePages = function(currentPage, totalElementPages) {
-			$scope.pages = [];
-			if(totalElementPages < 1)  {
-				return ;
-			}
-			//初始化页面数据
-			$scope.initPages(totalElementPages);
-			if(currentPage < 6) {//当期页小于6
-				$scope.frontSegment(currentPage, totalElementPages);
-			}else if(currentPage > totalElementPages - 5) { //当期页在后面
-				$scope.endSegment(currentPage, totalElementPages);
-			}else { //当期页在中间
-				$scope.middleSegment(currentPage);
-			}
-		};
-
-		var loadData = function() {
-			MessageBoard.getPageInfoByUser($scope.params, function(page) {
-				if (page) {
-					$scope.messageBoardAllData = page;
-					$scope.messageBoardCurrent = page.content;
-					$scope.params.currentPage = page.number;
-					$scope.acculatePages(page.number, page.totalPages);
-				}
-			}, function(){
-			});
-		};
-
-		// 提交留言
-		$scope.confirm = function(){
-			$scope.messageBoard.imgs = [];
-			angular.forEach($scope.imgs, function(img){
-				if (img.img) {
-					$scope.messageBoard.imgs.push(img);
-				}
-			});
-			if (!$scope.messageBoard.question) {
-				toaster.pop('info', '您还没有填写反馈内容');
-				return;
-			}
-
-			if (!$scope.messageBoard.role) {
-				toaster.pop('info', '请选择您的身份信息');
-				return;
-			}
-
-			if (!$scope.messageBoard.type) {
-				toaster.pop('info', '请选择一种反馈类型');
-				return;
-			}
-
-			if (!$scope.user) {
-				if (!$scope.messageBoard.userTel && !$scope.messageBoard.email) {
-					toaster.pop('info', '请填写任意一种联系方式');
-					return;
-				}
-
-				var regTel = /^[\d]{8,11}$/;
-				if ($scope.messageBoard.userTel && ($scope.messageBoard.userTel.length > 11 || $scope.messageBoard.userTel.length < 8)) {
-					toaster.pop('info', '请填写8~11位手机号码');
-					return;
-				}
-				if ($scope.messageBoard.userTel && $scope.messageBoard.userTel.match(regTel) == null) {
-					toaster.pop('info', '请填写正确的联系方式');
-					return;
-				}
-
-				var regEmail = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
-				if ($scope.messageBoard.email && $scope.messageBoard.email.length > 125) {
-					toaster.pop('info', '邮箱地址不得超过125个字符');
-					return;
-				}
-				if ($scope.messageBoard.email && messageBoardForm.email.$invalid) {
-					toaster.pop('info', '请填写正确的联系方式');
-					return;
-				}
-
-				if (!$scope.messageBoard.userTel && !$scope.messageBoard.email) {
-					toaster.pop('info', '请填写任意一种联系方式');
-					return;
-				}
-			}
-
-			$scope.messageBoard.submitUrl = window.location.href;
-			$scope.messageBoard.submitTitle = document.title;
-
-			MessageBoardAPI.save({}, $scope.messageBoard, function(data) {
-				toaster.pop('info', '提示', '感谢您的宝贵意见');
-				$modalInstance.close();
-			}, function(res) {
-				toaster.pop('error', '提示', '留言失败,请重新提交' + res.data);
-			});
-		};
-
-		// 关闭
-		$scope.cancel = function() {
-			$modalInstance.dismiss();
-		};
-
-		// 打开记录
-		$scope.openHistory = function() {
-			$scope.showHistory = true;
-			loadData();
-		};
-
-		// 关闭记录
-		$scope.hideHistory = function() {
-			$scope.showHistory = false;
-		};
-	}]);
-
-	// 留言记录模态框
-	app.controller('MessageBoardListModalCtrl', ['$scope', function($scope) {
-		// 关闭
-		$scope.cancel = function() {
-			$modalInstance.dismiss();
-		};
-	}]);
-
-
-	// 线下支付模态框
-	app.controller('OfflinePayCtrl', ['$scope', '$modalInstance', 'order', 'totalAmount', 'bankInfoService', 'toaster', '$modal', '$filter', 'ImgUrl', 'bankTransferService', function ($scope, $modalInstance, order, totalAmount, bankInfoService, toaster, $modal, $filter, ImgUrl, bankTransferService) {
-		var hideBankFilter = $filter("hideBankFilter");
-
-		$scope.order = order;
-		$scope.totalAmount = totalAmount;
-
-		$scope.isBuyerAccountPersonal = false; // 默认买家账户是企业账户
-		$scope.isMallAccountPersonal = false; // 默认商城账户是企业账户
-
-		// 为买家设置账户类型
-		$scope.setAccountTypeForBuyer = function(isPersonal) {
-			if(!angular.equals($scope.isBuyerAccountPersonal, isPersonal)) {
-				$scope.isBuyerAccountPersonal = isPersonal;
-				getBuyAccount();
-			}
-		};
-
-		// 为商城设置账户类型
-		$scope.setAccountTypeForMall = function(isPersonal) {
-			if(!angular.equals($scope.isMallAccountPersonal, isPersonal)) {
-				$scope.isMallAccountPersonal = isPersonal;
-				getSellerAccount();
-			}
-		};
-
-		// 下拉买家账户
-		$scope.dropDownBuyerAccount = function(dropdown) {
-			$scope.isBuyerAccountDropDown = dropdown
-		}
-		// 选择买家账户
-		$scope.selectBuyerAccount = function (account) {
-			$scope.buyAccount = account;
-			$scope.isBuyerAccountDropDown = false;
-		}
-		// 下拉商城账户
-		$scope.dropDownMallAccount = function(dropdown) {
-			$scope.isMallAccountDropDown = dropdown
-		}
-		// 选择商城账户
-		$scope.selectMallAccount = function (account) {
-			$scope.saleAccount = account;
-			$scope.isMallAccountDropDown = false;
-		}
-
-		// 获取数据
-		//根据单选框的状态,提取不同的数据
-		var getBuyAccount = function() {
-			if(!$scope.isBuyerAccountPersonal) {
-				bankInfoService.getBuyEnterpriseBank('', function(data) {
-					$scope.buyAccountInfos = resolveData(data);
-					angular.forEach($scope.buyAccountInfos, function(buyAccountInfo) {
-						buyAccountInfo.filterAccount = hideBankFilter(buyAccountInfo.number);
-					});
-					$scope.buyAccount = getOriginalData($scope.buyAccountInfos);
-				}, function(error) {
-					toaster.pop('error', '错误', '提取企业账户信息失败');
-				});
-			}else {
-				bankInfoService.getBuyPersonalBank('', function(data) {
-					$scope.buyAccountInfos = resolveData(data);
-					angular.forEach($scope.buyAccountInfos, function(buyAccountInfo) {
-						buyAccountInfo.filterAccount = hideBankFilter(buyAccountInfo.number);
-					});
-					$scope.buyAccount = getOriginalData($scope.buyAccountInfos);
-				}, function(error) {
-					toaster.pop('error', '错误', '提取个人账户信息失败');
-				});
-			}
-		};
-		getBuyAccount();
-
-		//获取管理平台账户信息
-		var getSellerAccount = function() {
-			if(!$scope.isMallAccountPersonal) {
-				bankInfoService.getAdminEnterAccount('', function(data) {
-					$scope.saleAccountInfos = resolveData(data);
-					angular.forEach($scope.saleAccountInfos, function(saleAccountInfo) {
-						saleAccountInfo.filterAccount = hideBankFilter(saleAccountInfo.number);
-					});
-					$scope.saleAccount = getOriginalData($scope.saleAccountInfos);
-				}, function(res) {
-					toaster.pop('error', '错误', '获取卖家企业账户信息失败');
-				});
-			}else {
-				bankInfoService.getAdminPersAccount('', function(data) {
-					$scope.saleAccountInfos = resolveData(data);
-					angular.forEach($scope.saleAccountInfos, function(saleAccountInfo) {
-						saleAccountInfo.filterAccount = hideBankFilter(saleAccountInfo.number);
-					});
-					$scope.saleAccount = getOriginalData($scope.saleAccountInfos);
-				}, function(res) {
-					toaster.pop('error', '错误', '获取卖家个人账户信息失败');
-				});
-			}
-		}
-		getSellerAccount();
-
-		// 买家新增账户
-		$scope.newAccount = function(data) {
-			var modalInstance = $modal.open({
-				templateUrl : 'static/view/common/bankInfoModal.html',
-				controller : 'BankInfoCtrl',
-				resolve : {
-					kind : function() {
-						//深拷贝一份
-						return angular.copy($scope.isBuyerAccountPersonal);
-					},
-					account : function() {
-						//深拷贝一份
-						return angular.copy(data);
-					}
-				}
-			});
-
-			modalInstance.result.then(function(account) {
-				if(account.kind) {
-					bankInfoService.saveBuyPersonalBank({}, account, function(data) {
-						toaster.pop('success', '成功','信息已添加');
-						$scope.purKind = account.kind;
-						getBuyAccount();  //这个方法不能提取到外面,因为存在异步。
-					}, function(res) {
-						toaster.pop('error', '错误', res.data);
-					});
-				}else {
-					//企业账户
-					bankInfoService.saveBuyEnterpriseBank({}, account, function(data) {
-						toaster.pop('success', '保存成功','信息已添加');
-						$scope.purKind = account.kind;
-						getBuyAccount();
-					}, function(res) {
-						toaster.pop('error', '错误', res.data);
-					});
-				}
-			}, function() {
-
-			});
-		};
-		// 买家删除账户
-		$scope.deleteAccount = function(buyAccount) {
-			var  isSure = confirm('确认删除本银行账户?删除后无法恢复,请谨慎操作');
-			if(isSure){
-				bankInfoService.deleteBank({id: buyAccount.id}, function(data) {
-					toaster.pop('success', '删除成功');
-					getBuyAccount();
-				}, function(response) {
-					toaster.pop('error', '删除失败');
-				})
-			}
-		}
-
-		// 选择日期相关逻辑
-		$scope.maxDate = new Date();
-
-		$scope.image = {src: null};
-		// 图片上传成功之后
-		$scope.onUploadSuccess = function(data){
-			var path = data.path;
-			path = ImgUrl.handelByWidthHeigth(path, 65, 66);
-			$scope.$apply(function(){
-				$scope.image.src = data.path;
-				$scope.image.thumb = path;
-			});
-		};
-
-		$scope.pay = function(order) {
-			if(order.availabletime < new Date().getTime()) {
-				toaster.pop("error", '错误', '此订单已过期,已失效');
-			}
-		};
-
-		$scope.confirm = function() {
-			if(angular.isUndefined($scope.order.orderid) || angular.equals($scope.order.orderid,'') || angular.equals($scope.total, 0)) {
-				toaster.pop('info', '提示', '没有选择要付款的订单,或付款总额为0');
-				return ;
-			}
-			if(angular.isUndefined($scope.buyAccount)||angular.equals("{}", angular.toJson($scope.buyAccount))) {
-				toaster.pop('info', '提示', '请选择买家账户');
-				return ;
-			}
-			if(angular.isUndefined($scope.saleAccount)||angular.equals("{}", angular.toJson($scope.saleAccount))) {
-				toaster.pop('info', '提示', '请选择卖家账户');
-				return ;
-			}
-			if(!$scope.transferTime) {
-				toaster.pop('info', '提示', '请选择付款日期');
-				return ;
-			}
-			if(!$scope.image.src) {
-				toaster.pop('info', '提示', '请选择付款截图');
-				return ;
-			}
-			var buyAccount = angular.copy($scope.buyAccount);
-			var saleAccount = angular.copy($scope.saleAccount);
-			delete saleAccount.filterAccount;
-			delete buyAccount.filterAccount;
-			var jsonPament = angular.toJson(buyAccount);
-			var jsonReceive = angular.toJson(saleAccount);
-			var transfer = {};
-			transfer.jsonPament = jsonPament;
-			transfer.jsonReceive = jsonReceive;
-			transfer.imgUrl = $scope.logoUrl;
-			transfer.transferTime = $scope.transferTime.getTime();
-			transfer.total = $scope.total;
-			bankTransferService.saveTransfer({order: $scope.order.orderid}, transfer, function(data) {
-				$modalInstance.close();
-			}, function(response) {
-				toaster.pop("error", '失败', '信息保存失败:' + response.data);
-			});
-		}
-
-		// 取消
-		$scope.cancel = function () {
-			$modalInstance.dismiss();
-		}
-
-		// 确认提醒
-		$scope.ensureWarning = function (isWarning) {
-			if(isWarning) {
-				if(!$scope.transferTime) $scope.transferWaring = true;
-				if(!$scope.image.src) $scope.imgWarning = true;
-			}else {
-				$scope.transferWaring = false;
-				$scope.imgWarning = false;
-			}
-		}
-	}]);
-
-	// 新建/修改银行账户
-	app.controller('BankInfoCtrl', ['$scope', '$modalInstance', 'account', 'kind', function($scope, $modalInstance, account, kind){
-		$scope.account = account;
-		if($scope.account) {
-			$scope.eidt = true;
-		} else {
-			delete $scope.eidt;
-		}
-		$scope.kind = kind;
-
-		if($scope.account) {
-			$scope.title = "修改账户";
-		}else {
-			$scope.title = "新增账户";
-			$scope.account = {};
-			$scope.account.currency = 'RMB'; // 默认银行卡币别是人民币
-		}
-
-		$scope.set = function(kind) {
-			$scope.kind = kind;
-		}
-
-		$scope.confirm = function() {
-			$scope.account.kind = $scope.kind;
-			$modalInstance.close($scope.account);
-		}
-
-		$scope.cancel = function() {
-			$modalInstance.dismiss();
-		}
-
-	}]);
-
-	/**
-	 * 店铺首页header控制器
-	 */
-	app.controller('StoreHeaderCtrl', ['$scope', '$rootScope', '$modal', 'toaster', 'StoreFocusService', 'AuthenticationService', function ($scope, $rootScope, $modal, toaster, StoreFocusService, AuthenticationService) {
-		/**
-		 * 店铺首页下拉信息是否展开
-		 */
-		$scope.isOpen = false;
-
-		/**
-		 * 展示下拉信息
-		 */
-		$scope.openDropDown = function () {
-			$scope.isOpen = true;
-		};
-
-		/**
-		 * 收起下拉信息
-		 */
-		$scope.closeDropDown = function () {
-			$scope.isOpen = false;
-		};
-
-
-		$scope.isFocus = false;  // 是否关注标识
-		// 用户已登陆状态,初始加载页面时,判断店铺是否已经关注
-		AuthenticationService.getAuthentication().success(function(data){
-			$scope.userInfo = data;
-			if(data) {
-				StoreFocusService.storeIfFocus({storeid : $rootScope.storeInfo.id}, {}, function(response){
-					var result = response.data;
-					if(result == "true"){
-						$scope.isFocus = true;
-					}
-				});
-			}
-		});
-
-		// 店铺关注	
-		$scope.focus = function(id, storeName){
-			$scope.storeFocus = {};
-			$scope.storeFocus.storeName = storeName;
-			$scope.storeFocus.storeid = id;
-			StoreFocusService.saveStoreFocus({}, $scope.storeFocus, function(response){
-				var result = response.data;
-				if(result == "success"){
-					$scope.isFocus = true;
-					$modal.open({
-						templateUrl : $rootScope.rootPath + "/static/view/store/modal/storeFocus_modal.html",
-						controller : "storeFocusModalCtrl",
-						size : 'sm'
-					});
-				}else{
-					toaster.pop("error", "店铺关注失败");
-				}
-			})
-		}
-	}]);
-
-	app.controller('storeFocusModalCtrl', ["$scope", "$modalInstance", function($scope, $modalInstance){
-		$scope.cancel = function() {
-			$modalInstance.dismiss();
-		};
-	}]);
-
-	var getOriginalData = function(data) {
-		var result = {};
-		if(data&&data.length) {
-			result = data[0];
-		}else {
-			result = null;
-		}
-		return result;
-	};
-	//解析数据,从返回的数据中找到要解析的数据
-	var resolveData = function(data) {
-		var arr = new Array();
-		for(var key in data) {
-			var numb= Number(key);
-			if(angular.isNumber(numb)&&(!isNaN(numb))) {
-				arr.push(data[key]);
-			}
-		}
-		return arr;
-	};
 });

+ 36 - 0
donate-service/src/main/webapp/resources/js/common/directives.js

@@ -0,0 +1,36 @@
+define(['angular'], function(angular) {
+	'use strict';
+	angular.module('common.directives', []).directive('scrollTable', [function(){
+		// table 固定表头
+		return {
+			restrict : 'A',
+			link : function(scope, element, attrs, ngModel) {
+				var header = element.find('.table-header-wrap'), body = element.find('.table-body-wrap');
+				if(header && body) {
+					body.bind('scroll', function() {
+						header.scrollLeft(body.scrollLeft());
+	                });
+				}
+			}
+		};
+	}])
+    /**
+     * 搜索框,回车触发
+     */
+    .directive('ngSearch', ['$parse', function ($parse) {
+        return {
+            require: '?ngModel',
+            restrict: 'A',
+            link: function (scope, element, attrs, ngModel) {
+                var searchFn = $parse(attrs.ngSearch);
+                element.bind('keypress', function (event) {
+                    if (event.keyCode == '13') {
+                        event.preventDefault();
+                        event.stopPropagation();
+                        searchFn(scope, {$data: ngModel.$modelValue, $event: event});
+                    }
+                });
+            }
+        };
+    }]);
+});

+ 51 - 3
donate-service/src/main/webapp/resources/js/common/query/Project.js

@@ -1,18 +1,31 @@
 define ([ 'ngResource' ], function() {
     angular.module('ProjectService', ['ngResource']).factory('Project', ['$resource', function ($resource) {
-        return $resource ('project', {}, {
+        return $resource ('api/project', {}, {
             getAll: {
+                url: 'project/get',
+                method: 'GET'
             },
-            getWaiting: {
+            getEnd: {
+                url: 'project/get',
+                method: 'GET',
                 params : {
-                    _state: 'waiting'
+                    _state: 'end'
                 }
             },
             getTodo: {
+                url: 'project/get',
+                method: 'GET',
                 params : {
                     _state: 'todo'
                 }
             },
+            getWaiting: {
+                url: 'project/get',
+                method: 'GET',
+                params : {
+                    _state: 'waiting'
+                }
+            },
             getDetailById: {
                 url: 'project/detail/:id',
                 method: 'GET',
@@ -23,6 +36,41 @@ define ([ 'ngResource' ], function() {
             save: {
                 url: 'project/save',
                 method: 'POST'
+            },
+            // 获取历史数据
+            getHistory: {
+                url: 'project/sumDonation',
+                method: 'GET'
+            },
+            // 获取当前项目历史参加人数
+            getJoinedHistory: {
+                url: 'project/donation/:id',
+                method: 'GET'
+            },
+            // 获取当前项目参与的活动
+            getJoinedActivity: {
+                url:'',
+                method: 'GET'
+            },
+            // 获取当前项目所属机构消息
+            getOrg: {
+                url:'',
+                method: 'GET'
+            },
+            // 获取当前项目的同类项目
+            getSameKinds: {
+                url:'',
+                method: 'GET'
+            },
+            // 获取所有项目进度
+            getSchedules: {
+                url:'',
+                method: 'GET'
+            },
+            // 获取报告
+            getProReport: {
+                url:'',
+                method: 'GET'
             }
         });
     }]);

+ 31 - 0
donate-service/src/main/webapp/resources/js/common/query/User.js

@@ -0,0 +1,31 @@
+define ([ 'ngResource' ], function() {
+    angular.module('UserService', ['ngResource']).factory('User', ['$resource', function ($resource) {
+        return $resource ('user', {}, {
+            // 获取参加项目记录
+            getProjectRecord: {
+                url: 'projectrecode/joins',
+                method: 'GET'
+            },
+            // 获取参加活动记录
+            getActivityRecord: {
+                url: 'activityRecode/queryOne',
+                method: 'GET'
+            },
+            // 获取消息
+            getMessage: {
+                url: '',
+                method: 'GET'
+            },
+            // 获取人员历史记录
+            getUserHistory: {
+                url: '',
+                method: 'GET'
+            },
+            // 获取消息未读数量
+            getUnreadMessageNum: {
+                url: '',
+                method: 'GET'
+            }
+        });
+    }]);
+});

+ 2 - 2
donate-service/src/main/webapp/resources/js/project/app.js

@@ -2,9 +2,9 @@
  * index
  *
  */
-define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'common/services', 'angular-toaster', 'ngSanitize', 'common/query/Project'], function(angularAMD) {
+define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'common/services', 'common/directives', 'angular-toaster', 'ngSanitize', 'common/query/Project'], function(angularAMD) {
 	'use strict';
-	var app = angular.module('myApp', [ 'ui.router', 'ui.bootstrap', 'ng.local', 'ngTable', 'common.services', 'toaster', 'ProjectService']);
+	var app = angular.module('myApp', [ 'ui.router', 'ui.bootstrap', 'ng.local', 'ngTable', 'common.services', 'common.directives', 'toaster', 'ProjectService']);
 	app.init = function() {
 		angularAMD.bootstrap(app);
 	};

+ 48 - 3
donate-service/src/main/webapp/resources/js/project/controllers/ProjectDetailCtrl.js

@@ -1,6 +1,7 @@
 define([ 'app/app' ], function(app) {
     'use strict';
-    app.register.controller('ProjectDetailCtrl', ['$scope', '$rootScope', 'Project', '$stateParams', function ($scope, $rootScope, Project, $stateParams) {
+    app.register.controller('ProjectDetailCtrl', ['$scope', '$rootScope', 'Project', '$stateParams',
+        function ($scope, $rootScope, Project, $stateParams) {
         $rootScope.page = 'project';
 
         var init = function () {
@@ -8,10 +9,54 @@ define([ 'app/app' ], function(app) {
 
             Project.getDetailById({ id: id}, {}, function (data) {
                 console.log('detail', data);
-                $scope.newsDetail = data;
+                $scope.project = data;
+                $scope.percentage = data.totalAmount / data.target;
             }, function (error) {
                 console.log(error);
-            })
+            });
+
+            // 历史数据
+            Project.getJoinedHistory ({id: id}, {}, function(data) {
+                $scope.joinedPersonHistory = data.joinedPersonHistory;
+            }, function (error) {
+                console.log(error);
+            });
+
+            // 参加的活动
+            Project.getJoinedActivity({id:id}, {}, function(data) {
+                $scope.activity = data;
+            }, function (error) {
+                console.log(error);
+            });
+
+            // 机构资料
+            Project.getOrg({id:id}, {}, function(data) {
+                $scope.organization = data;
+            }, function (error) {
+                console.log(error);
+            });
+
+            // 同类项目
+            Project.getSameKinds({id:id}, {}, function(data) {
+                $scope.sameKinds = data;
+            }, function (error) {
+                console.log(error);
+            });
+
+            // 项目进度
+            Project.getSchedules({id:id}, {}, function(data) {
+                $scope.schedules = data;
+            }, function (error) {
+                console.log(error);
+            });
+
+            // 结项报告
+            Project.getProReport({id:id}, {}, function(data) {
+                $scope.proReport = data;
+            }, function (error) {
+                console.log(error);
+            });
+
         };
         init();
     }]);

+ 76 - 7
donate-service/src/main/webapp/resources/js/project/controllers/ProjectListCtrl.js

@@ -2,7 +2,7 @@ define([ 'app/app' ], function(app) {
 	'use strict';
 
     var getState = function (active) {
-        var fn = 'get';
+        var fn = 'getAll';
         switch (active) {
             // 已结束
             case 'end':
@@ -20,23 +20,64 @@ define([ 'app/app' ], function(app) {
         return fn;
     };
 
-	app.register.controller('ProjectListCtrl', ['$scope', '$rootScope', 'toaster', 'ngTableParams', 'BaseService', 'Project', function ($scope, $rootScope, toaster, ngTableParams, BaseService, Project) {
-        $scope.tableParams = new ngTableParams({
+	app.register.controller('ProjectListCtrl', ['$scope', '$rootScope', 'toaster', 'ngTableParams', 'BaseService', 'Project',
+        function ($scope, $rootScope, toaster, ngTableParams, BaseService, Project) {
+
+	    // $scope.selectedArea = -1;
+	    $scope.active = 'todo';
+        $scope.keyword = '';
+	    // 捐款记录
+	    $scope.projectRecord = {
+	        amount: null,
+	        bless: null
+        };
+	    // $scope.areas = ['环保/保护动物','疾病救助','扶贫/救灾','教育/助学'];
+
+        /**
+         * 修改分类
+         * @param value
+         */
+        $scope.setActive= function(value) {
+            if ($scope.active != value) {
+                $scope.active = value;
+                if ($scope.projectParams.page() == 1)
+                    $scope.projectParams.reload();
+                else
+                    $scope.projectParams.page(1);
+            }
+        };
+
+        /**
+         * 修改领域
+         * @param value
+         */
+        $scope.setArea= function(value) {
+            if ($scope.selectedArea != value) {
+                $scope.selectedArea = value;
+                if ($scope.projectParams.page() == 1)
+                    $scope.projectParams.reload();
+                else
+                    $scope.projectParams.page(1);
+            }
+        };
+
+	    $scope.projectParams = new ngTableParams({
             page: 1,
-            count: 20,
+            count: 5,
             sorting: {
                 'id': 'desc'
             }
         }, {
             total: 0,
             counts: [5, 10, 25, 50],
-            getData: function ($defer, params) {
+            getData: function($defer, params) {
                 $scope.loading = true;
                 var pageParams = params.url();
                 var realActive = {};
                 pageParams.searchFilter = { // 筛选条件
-                    keyword: $scope.keyword
-                }
+                    keyword: $scope.keyword,
+                    area: $scope.selectedArea
+                };
                 Project[getState($scope.active)].call(null, BaseService.parseParams(pageParams), function (page) {
                     $scope.loading = false;
                     if (page) {
@@ -51,6 +92,34 @@ define([ 'app/app' ], function(app) {
             }
         });
 
+	    // 设置捐款金额
+        $scope.setMoney = function(value) {
+          $scope.donation = value;
+        };
+
+        // 获取历史人数、获取历史金额
+        var loadHistory = function() {
+            Project.getHistory({}, {}, function(data) {
+                $scope.joinedPersonHistory = data.joinedPersonHistory;
+                $scope.totalDonationsHistory = data.totalDonationsHistory;
+            });
+        };
+        loadHistory();
+        // 确认捐款
+        $scope.ensureDonate = function(id) {
+
+        };
+
+        $scope.onSearch = function(keyword) {
+            if (!angular.isUndefined(keyword)) {
+                $scope.keyword = keyword;
+                if ($scope.projectParams.page() == 1)
+                    $scope.projectParams.reload();
+                else
+                    $scope.projectParams.page(1);
+            }
+        };
+
 		/******************根据页数设置翻页的信息********start**************************/
 
 

+ 9 - 13
donate-service/src/main/webapp/resources/js/personal/app.js → donate-service/src/main/webapp/resources/js/user/app.js

@@ -1,10 +1,10 @@
 /**
- * activity
+ * 个人中心
  *
  */
-define([ 'angularAMD', 'ngRoute', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'common/services', 'angular-toaster', 'ngSanitize'], function(angularAMD) {
+define([ 'angularAMD', 'ngRoute', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'common/services', 'common/query/User', 'angular-toaster', 'ngSanitize'], function(angularAMD) {
 	'use strict';
-	var app = angular.module('myApp', [ 'ngRoute', 'ui.router', 'ui.bootstrap', 'ng.local', 'ngTable', 'common.services', 'toaster']);
+	var app = angular.module('myApp', [ 'ngRoute', 'ui.router', 'ui.bootstrap', 'ng.local', 'ngTable', 'common.services', 'UserService', 'toaster']);
 	app.init = function() {
 		angularAMD.bootstrap(app);
 	};
@@ -25,13 +25,13 @@ define([ 'angularAMD', 'ngRoute', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTab
         return httpInterceptor;
     }]);
 	app.config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider) {
-		$urlRouterProvider.otherwise("/personal");
-		$stateProvider.state("personal", angularAMD.route({
-			url : '/personal',
+		$urlRouterProvider.otherwise("/");
+		$stateProvider.state("user", angularAMD.route({
+			url : '/',
 			title : '个人中心',
-			templateUrl : 'static/view/person/person_center.html',
-			controller : 'PersonalCtrl',
-			controllerUrl : 'app/controllers/PersonalCtrl'
+			templateUrl : 'static/view/user/user_center.html',
+			controller : 'UserCtrl',
+			controllerUrl : 'app/controllers/UserCtrl'
 		}));
 	}]);
 
@@ -40,9 +40,5 @@ define([ 'angularAMD', 'ngRoute', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTab
 
 	}]);
 
-	app.controller('hotNewsCtrl', ['$scope', 'News', function ($scope, News) {
-
-	}]);
-
 	return app;
 });

+ 29 - 17
donate-service/src/main/webapp/resources/js/personal/controllers/PersonalCtrl.js → donate-service/src/main/webapp/resources/js/user/controllers/UserCtrl.js

@@ -2,33 +2,31 @@ define([ 'app/app' ], function(app) {
     'use strict';
 
     var getState = function (active) {
-        var fn = 'get';
+        var fn = 'getProjectRecord';
         switch (active) {
-            // 已结束
-            case 'end':
-                fn = 'getEnd';
+            // 关联项目
+            case 'project':
+                fn = 'getProjectRecord';
                 break;
-            // 兑奖中
-            case 'done':
-                fn = 'getDone';
+            // 活动
+            case 'activity':
+                fn = 'getActivityRecord';
                 break;
-            // 待开奖
-            case 'waiting':
-                fn = 'getWaiting';
-                break;
-            // 进行中
-            case 'todo':
-                fn = 'getTodo';
+            // 消息
+            case 'message':
+                fn = 'getMessage';
                 break;
         }
         return fn;
     };
 
-    app.register.controller('PersonalCtrl', ['$scope', '$rootScope', 'toaster', 'Personal', 'ngTableParams', 'BaseService', function ($scope, $rootScope, toaster, Personal, ngTableParams, BaseService) {
+    app.register.controller('UserCtrl', ['$scope', 'toaster', 'User', 'ngTableParams', 'BaseService',
+        function ($scope, toaster, User, ngTableParams, BaseService) {
 
+        // 根据标签获取不同数据
         $scope.tableParams = new ngTableParams({
             page: 1,
-            count: 20,
+            count: 5,
             sorting: {
                 'id': 'desc'
             }
@@ -47,7 +45,7 @@ define([ 'app/app' ], function(app) {
                 // AccountEnterprise.get({}, function(data){
                 //     $scope.currentEn = data;
                 // });
-                Personal[getState($scope.active)].call(null, BaseService.parseParams(pageParams), function (page) {
+                User[getState($scope.active)].call(null, BaseService.parseParams(pageParams), function (page) {
                     $scope.loading = false;
                     if (page) {
                         params.total(page.totalElement);
@@ -60,5 +58,19 @@ define([ 'app/app' ], function(app) {
                 });
             }
         });
+
+        // 获取历史数据
+        var loadData = function() {
+            User.getUserHistory({}, {}, function(data) {
+                $scope.joinedProjectNum = data.joinedProjectNum;
+                $scope.joinedActivityNum = data.joinedActivityNum;
+                $scope.sumDonation = data.sumDonation;
+            });
+
+            User.getUnreadMessageNum({}, {}, function(data) {
+                $scope.unreadMessage = data.unreadMessage;
+            });
+        };
+        loadData();
     }]);
 });

+ 1 - 1
donate-service/src/main/webapp/resources/js/personal/main.js → donate-service/src/main/webapp/resources/js/user/main.js

@@ -1,7 +1,7 @@
 require.config({
 	baseUrl : 'static',
 	paths : {
-		'app' : 'js/personal',
+		'app' : 'js/user',
 		'angular' : 'lib/angular/angular.min',
 		'angularAMD' : 'lib/angular/angularAMD',
 		'angular-toaster': 'lib/angular/angular-toaster.min',

+ 1 - 1
donate-service/src/main/webapp/resources/view/activity/activity_detail.html

@@ -765,7 +765,7 @@
             <div class="body modal-body">
                 <p>领奖成功!</p>
                 <span>感谢您一直以来对本平台和公益事业的关注和支持。</span>
-                <div class="closeBtn"><a href="" data-dismiss="modal">关闭</a><a href="/person">个人中心</a></div>
+                <div class="closeBtn"><a href="" data-dismiss="modal">关闭</a><a href="/userCenter">个人中心</a></div>
             </div>
         </div>
     </div>

+ 1 - 1
donate-service/src/main/webapp/resources/view/activity/activity_list.html

@@ -389,7 +389,7 @@
             <div class="personal-center">
                 <div class="top">
                     <div class="top-item">
-                        <a href="/person">
+                        <a href="/userCenter">
                             <img src="static/images/index/icon_1.png" alt="个人中心"/>
                             <p>个人中心</p>
                         </a>

+ 50 - 0
donate-service/src/main/webapp/resources/view/common/project_detail_side.html

@@ -0,0 +1,50 @@
+<!-- 项目相关内容 -->
+<!--参与的活动-->
+<div class="project-box fl">
+    <div class="box box1">
+        <span class="join">参与的活动</span>
+        <p class="title"><a href="/activity#/detail/{{activity.id}}">{{activity.name}}</a></p>
+        <div class="box-details">
+            <div class="box-detail clearfix">
+                <span class="fl">活动时间:</span>
+                <div class="fl">
+                    <span>{{activity.startTime | date:'yyyy-MM-dd'}}&nbsp;至&nbsp;{{activity.endTime | date:'yyyy-MM-dd'}} </span>
+                </div>
+            </div>
+            <div class="box-detail clearfix">
+                <span class="fl">活动奖品:</span>
+                <div class="fl">
+                    <span ng-repeat="award in activity.awards">{{award.awardName}}*{{award.amount}}</span>
+                </div>
+            </div>
+            <div class="box-detail clearfix">
+                <span class="fl">参加条件:</span>
+                <div class="fl">
+                    <span>相关的项目捐款一元以上</span>
+                </div>
+            </div>
+        </div>
+    </div>
+    <!--执行机构简介-->
+    <div class="box box2">
+        <span class="join">执行机构简介</span>
+        <p class="title">{{organization.name}}</p>
+        <div class="box-details">
+            <p>{{organization.summary}}</p>
+            <img src="{{organization.logo}}" alt="机构LOGO"/>
+        </div>
+    </div>
+    <!--同类项目-->
+    <div class="box3"  ng-if="sameKinds.length() != 0">
+        <h4>同类项目</h4>
+        <div class="item-list clearfix" ng-repeat="sameKind in sameKinds">
+            <div class="img fl">
+                <a ui-sref="detail(sameKind.id)"><img src="{{sameKind.listImg}}" alt="项目缩略图"></a>
+            </div>
+            <div class="txt fl">
+                <p><a ui-sref="detail(sameKind.id)">{{sameKind.name}}</a></p>
+                <span ng-bind="sameKind.proSummary"></span>
+            </div>
+        </div>
+    </div>
+</div>

+ 0 - 398
donate-service/src/main/webapp/resources/view/person/person_center.html

@@ -1,398 +0,0 @@
-<div class="main">
-    <div class="container">
-        <div class="section">
-            <div class="nav">
-                <span><a href="">项目列表</a></span><span>&gt;</span><span>个人中心</span>
-            </div>
-            <div class="personalCenter clearfix">
-                <div class="personal-center fl">
-                    <div class="top clearfix">
-                        <div class="fl"><img src="static/images/per.png" alt=""/><span>个人资料</span></div>
-                        <div class="fr"><img src="static/images/pen.png" alt=""/><span>编辑</span></div>
-                    </div>
-                    <div class="detail">
-                        <div class="name"><img src="static/images/name.png" alt=""/><span>马化腾</span></div>
-                        <div class="item clearfix">
-                            <span class="fl">联系电话:</span>
-                            <span class="fl">155 3344 0000</span>
-                        </div>
-                        <div class="item clearfix">
-                            <span class="fl">所在公司:</span>
-                            <span class="fl">深圳市优软科技有限公司</span>
-                        </div>
-                        <div class="item clearfix">
-                            <span class="fl">居住地址:</span>
-                            <span class="fl overTop">广东省深圳市南山区高新技术产业园科技南五路</span>
-                        </div>
-                        <div class="item items clearfix">
-                            <span class="fl">参与项目:</span>
-                            <span class="fl part"><em>6</em>个</span>
-                        </div>
-                        <div class="item items clearfix">
-                            <span class="fl">参与活动:</span>
-                            <span class="fl part"><em>4</em>个</span>
-                        </div>
-                        <div class="item items clearfix">
-                            <span class="fl">捐赠善款:</span>
-                            <div class="count"><span>9,336</span><span>元</span></div>
-                        </div>
-                    </div>
-                </div>
-                <div class="project-management fl">
-                    <div class="active-toggle">
-                        <span class="active">已参与项目</span><span>已参与活动</span><span>消息提醒<em class="red"></em></span><span>项目管理</span>
-                    </div>
-                    <!--已参与项目-->
-                    <div class="active-detail show">
-                        <table class="table">
-                            <thead>
-                            <tr>
-                                <td width="80">序号</td>
-                                <td width="390">项目</td>
-                                <td width="180">捐款金额</td>
-                                <td width="150">项目状态</td>
-                            </tr>
-                            </thead>
-                            <tbody>
-                            <tr>
-                                <td>1</td>
-                                <td>
-                                    <div class="project-title">
-                                        <h3><a href="projectDetailsAndProgress">寒门学子 阳光助学</a></h3>
-                                        <div class="time">
-                                            <span>捐款时间:</span><span>2017-08-20 14:38:11</span>
-                                        </div>
-                                    </div>
-                                </td>
-                                <td>1200元</td>
-                                <td class="arrangement">筹备中</td>
-                            </tr>
-                            <tr class="look">
-                                <td>2</td>
-                                <td>
-                                    <div class="project-title">
-                                        <h3><a href="projectDetailsAndProgress">寒门学子 阳光助学</a></h3>
-                                        <div class="time">
-                                            <span>捐款时间:</span><span>2017-08-20 14:38:11</span>
-                                        </div>
-                                    </div>
-                                </td>
-                                <td>1200元</td>
-                                <td>执行中</td>
-                            </tr>
-                            <tr class="new-progress">
-                                <td colspan="4">
-                                    <div>
-                                        <span>最新进度:7月30日,上午与商家签订课桌椅、餐桌椅购买合同,同时,钢木门的商家来到学校,在办公室签订合同。签完合同后,商家就开始了精准的测量。(图)
-                                        </span>
-                                        <a href="projectDetailsAndProgress"><img src="static/images/look.png" alt=""/></a>
-                                    </div>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td>3</td>
-                                <td>
-                                    <div class="project-title">
-                                        <h3><a href="projectDetailsAndProgress">寒门学子 阳光助学</a></h3>
-                                        <div class="time">
-                                            <span>捐款时间:</span><span>2017-08-20 14:38:11</span>
-                                        </div>
-                                    </div>
-                                </td>
-                                <td>1200元</td>
-                                <td>执行中</td>
-                            </tr>
-                            <tr>
-                                <td>4</td>
-                                <td>
-                                    <div class="project-title">
-                                        <h3><a href="projectDetailsAndProgress">寒门学子 阳光助学</a></h3>
-                                        <div class="time">
-                                            <span>捐款时间:</span><span>2017-08-20 14:38:11</span>
-                                        </div>
-                                    </div>
-                                </td>
-                                <td>1200元</td>
-                                <td class="arrangement">筹备中</td>
-                            </tr>
-                            <tr>
-                                <td>5</td>
-                                <td>
-                                    <div class="project-title">
-                                        <h3><a href="projectDetailsAndProgress">寒门学子 阳光助学</a></h3>
-                                        <div class="time">
-                                            <span>捐款时间:</span><span>2017-08-20 14:38:11</span>
-                                        </div>
-                                    </div>
-                                </td>
-                                <td>1200元</td>
-                                <td class="end">已结束</td>
-                            </tr>
-                            <tr>
-                                <td>6</td>
-                                <td>
-                                    <div class="project-title">
-                                        <h3><a href="projectDetailsAndProgress">寒门学子 阳光助学</a></h3>
-                                        <div class="time">
-                                            <span>捐款时间:</span><span>2017-08-20 14:38:11</span>
-                                        </div>
-                                    </div>
-                                </td>
-                                <td>1200元</td>
-                                <td class="end">已结束</td>
-                            </tr>
-                            </tbody>
-                        </table>
-                    </div>
-                    <!--已参与活动-->
-                    <div class="active-detail active-detail1">
-                        <table class="table">
-                            <thead>
-                            <tr>
-                                <td width="80">序号</td>
-                                <td width="390">活动</td>
-                                <td width="180">开奖日期</td>
-                                <td width="150">活动状态</td>
-                            </tr>
-                            </thead>
-                            <tbody>
-                            <tr>
-                                <td>1</td>
-                                <td><a href="activeCenter">优软一元捐特别活动四</a></td>
-                                <td>2017-08-20</td>
-                                <td>进行中</td>
-                            </tr>
-                            <tr>
-                                <td>2</td>
-                                <td><a href="activeCenter">优软一元捐特别活动三</a></td>
-                                <td>2017-08-20</td>
-                                <td>进行中</td>
-                            </tr>
-                            <tr class="rewarded">
-                                <td>3</td>
-                                <td><a href="activeCenter">优软一元捐特别活动二</a></td>
-                                <td>2017-08-20</td>
-                                <td>已开奖</td>
-                            </tr>
-                            <tr class="rewarded">
-                                <td>4</td>
-                                <td><a href="activeCenter">优软一元捐特别活动一</a></td>
-                                <td>2017-08-20</td>
-                                <td>已开奖</td>
-                            </tr>
-                            </tbody>
-                        </table>
-                    </div>
-                    <!--消息提醒-->
-                    <div class="active-detail active-detail2">
-                        <table class="table">
-                            <thead>
-                            <tr>
-                                <td width="80">序号</td>
-                                <td width="320">消息</td>
-                                <td width="400">内容</td>
-                            </tr>
-                            </thead>
-                            <tbody>
-                            <tr>
-                                <td class="read">1<em class="red"></em></td>
-                                <td>新活动推荐:一元捐特别活动ABC</td>
-                                <td>内容简介内容简介内容简介内容简介内容简介内容简介内容简介内容简介内容简介</td>
-                            </tr>
-                            <tr>
-                                <td class="read">2<em class="red"></em></td>
-                                <td>新活动推荐:一元捐特别活动ABC</td>
-                                <td>内容简介内容简介内容简介内容简介内容简介内容简介内容简介内容简介内容简介</td>
-                            </tr>
-                            <tr>
-                                <td class="read">3<em class="red"></em></td>
-                                <td>新活动推荐:一元捐特别活动ABC</td>
-                                <td>内容简介内容简介内容简介内容简介内容简介内容简介内容简介内容简介内容简介</td>
-                            </tr>
-                            <tr>
-                                <td class="read">4<em class="red"></em></td>
-                                <td>新活动推荐:一元捐特别活动ABC</td>
-                                <td>内容简介内容简介内容简介内容简介内容简介内容简介内容简介内容简介内容简介</td>
-                            </tr>
-                            </tbody>
-                        </table>
-                    </div>
-                    <!--项目管理-->
-                    <!--项目管理-项目进展-->
-                    <div class="active-detail active-detail3">
-                        <div class="projectNav clearfix">
-                            <div class="fl progressToggle" style="margin-bottom: 6px;"><span class="active hideProjectDevelopNav">我的项目</span><span>项目进展</span></div>
-                            <a href="launchProject" class="fr">发起新项目</a>
-                        </div>
-                        <!--项目管理-我的项目-->
-                        <div class="myProject show">
-                            <div class="projectDetail">
-                                <form action="" class="clearfix">
-                                    <div class="form-group">
-                                        <label for="" class="control-label">项目状态:</label>
-                                        <select name="" id="">
-                                            <option value="">全部</option>
-                                        </select>
-                                    </div>
-                                    <div class="form-group">
-                                        <label for="" class="control-label">项目领域:</label>
-                                        <select name="" id="">
-                                            <option value="">全部</option>
-                                        </select>
-                                    </div>
-                                    <div class="form-group" style="margin-right: 0;">
-                                        <label for="" class="control-label">项目状态:</label>
-                                        <select name="" id="">
-                                            <option value="">全部</option>
-                                        </select>
-                                    </div>
-                                    <div class="form-group form-groups">
-                                        <label for="" class="control-label fl">项目名称:</label>
-                                        <input type="text" class="form-control fl" style="margin-left: -10px;" placeholder="输入项目名称"/>
-                                    </div>
-                                    <div class="form-group form-groups">
-                                        <label for="" class="control-label fl">项目发起人:</label>
-                                        <input type="text" class="form-control fl" placeholder="输入优软云账户名称"/>
-                                    </div>
-                                    <div class="form-group">
-                                        <label for="" class="control-label">受助地区:</label>
-                                        <select name="" id="">
-                                            <option value="">请选择</option>
-                                        </select>
-                                    </div>
-                                    <div class="form-group groups" style="margin-right: 0;">
-                                        <label for="" class="control-label fl">募捐时间:</label>
-                                        <div class="date fl">
-                                            <input type="date" class="form-control fl"/>
-                                            <span class="fl">至</span>
-                                            <input type="date" class="form-control fl"/>
-                                        </div>
-                                    </div>
-                                    <div class="button"><button class="btn">查询</button></div>
-                                </form>
-                            </div>
-                            <div class="search">
-                                <div class="searchNav">
-                                    <span class="width160">项目名称</span><span class="width140">捐款时间</span><span class="width140">已筹款(元)</span><span class="width110">状态</span><span class="width110">发起类型</span><span class="width130">操作</span>
-                                </div>
-                                <div class="searchDetail">
-                                    <span>没有搜索到对应项目</span>
-                                </div>
-                            </div>
-                        </div>
-                        <!--项目管理-项目进度-->
-                        <div class="myProject">
-                            <div class="projectDevelopNav">
-                                <span class="active">项目进度管理</span><span>财务披露管理</span><span>项目报告管理</span><span>结项管理</span>
-                            </div>
-                            <!--项目进度管理-->
-                            <div class="progressManagement show">
-                                <div class="projectDetail projectDetail1">
-                                    <form action="" class="clearfix">
-                                        <div class="form-group form-groups">
-                                            <label for="" class="control-label fl">项目名称:</label>
-                                            <input type="text" class="form-control fl" style="margin-left: -10px;" placeholder="输入项目名称"/>
-                                        </div>
-                                        <div class="form-group">
-                                            <label for="" class="control-label">项目状态:</label>
-                                            <select name="" id="">
-                                                <option value="">全部</option>
-                                            </select>
-                                        </div>
-                                        <div class="form-group">
-                                            <label for="" class="control-label">项目进展:</label>
-                                            <select name="" id="">
-                                                <option value="">全部</option>
-                                            </select>
-                                        </div>
-                                        <div class="button"><button class="btn">查询</button></div>
-                                    </form>
-                                </div>
-                                <div class="search searcher">
-                                    <div class="searchDetail">
-                                        <span>没有搜索到对应项目</span>
-                                    </div>
-                                </div>
-                            </div>
-                            <!--财务披露管理-->
-                            <div class="progressManagement">
-                                <div class="projectDetail projectDetail1 projectDetail2">
-                                    <form action="" class="clearfix">
-                                        <div class="form-group form-groups">
-                                            <label for="" class="control-label fl">项目名称:</label>
-                                            <input type="text" class="form-control fl" style="margin-left: -10px;" placeholder="输入项目名称"/>
-                                        </div>
-                                        <div class="form-group">
-                                            <label for="" class="control-label">项目状态:</label>
-                                            <select name="" id="">
-                                                <option value="">全部</option>
-                                            </select>
-                                        </div>
-                                        <div class="button"><button class="btn">查询</button></div>
-                                    </form>
-                                </div>
-                                <div class="search searcher">
-                                    <div class="searchDetail">
-                                        <span>没有搜索到对应项目</span>
-                                    </div>
-                                </div>
-                            </div>
-                            <!--项目报告管理-->
-                            <div class="progressManagement">
-                                <div class="projectDetail projectDetail1 projectDetail2">
-                                    <form action="" class="clearfix">
-                                        <div class="form-group form-groups">
-                                            <label for="" class="control-label fl">项目名称:</label>
-                                            <input type="text" class="form-control fl" style="margin-left: -10px;" placeholder="输入项目名称"/>
-                                        </div>
-                                        <div class="form-group">
-                                            <label for="" class="control-label">项目状态:</label>
-                                            <select name="" id="">
-                                                <option value="">全部</option>
-                                            </select>
-                                        </div>
-                                        <div class="button"><button class="btn">查询</button></div>
-                                    </form>
-                                </div>
-                                <div class="search searcher">
-                                    <div class="searchDetail">
-                                        <span>没有搜索到对应项目</span>
-                                    </div>
-                                </div>
-                            </div>
-                            <!--结项管理-->
-                            <div class="progressManagement">
-                                <div class="projectDetail projectDetail1">
-                                    <form action="" class="clearfix">
-                                        <div class="form-group form-groups">
-                                            <label for="" class="control-label fl">项目名称:</label>
-                                            <input type="text" class="form-control fl" style="margin-left: -10px;" placeholder="输入项目名称"/>
-                                        </div>
-                                        <div class="form-group">
-                                            <label for="" class="control-label">项目状态:</label>
-                                            <select name="" id="">
-                                                <option value="">全部</option>
-                                            </select>
-                                        </div>
-                                        <div class="form-group">
-                                            <label for="" class="control-label" style="width: 115px;">结项报告状态:</label>
-                                            <select name="" id="">
-                                                <option value="">全部</option>
-                                            </select>
-                                        </div>
-                                        <div class="button"><button class="btn">查询</button></div>
-                                    </form>
-                                </div>
-                                <div class="search searcher">
-                                    <div class="searchDetail">
-                                        <span>没有搜索到对应项目</span>
-                                    </div>
-                                </div>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-            </div>
-        </div>
-    </div>
-</div>

File diff suppressed because it is too large
+ 681 - 585
donate-service/src/main/webapp/resources/view/project/project_detail.html


+ 117 - 77
donate-service/src/main/webapp/resources/view/project/project_list.html

@@ -526,38 +526,38 @@
         <div class="section section1">
             <!--banner-->
             <div class="banner">
-                <div id="myCarousel" class="carousel slide">
-                    <!-- 轮播(Carousel)指标 -->
+                <!--<div id="myCarousel" class="carousel slide">
+                    &lt;!&ndash; 轮播(Carousel)指标 &ndash;&gt;
                     <ol class="carousel-indicators">
                         <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
                         <li data-target="#myCarousel" data-slide-to="1"></li>
                         <li data-target="#myCarousel" data-slide-to="2"></li>
                     </ol>
-                    <!-- 轮播(Carousel)项目 -->
+                    &lt;!&ndash; 轮播(Carousel)项目 &ndash;&gt;
                     <div class="carousel-inner">
                         <div class="item active"><img src="static/images/index/banner01.png"/></div>
                         <div class="item"><img src="static/images/index/banner01.png"/></div>
                         <div class="item"><img src="static/images/index/banner01.png"/></div>
                     </div>
-                    <!-- 轮播(Carousel)导航 -->
+                    &lt;!&ndash; 轮播(Carousel)导航 &ndash;&gt;
                     <a class="carousel-control left" href="#myCarousel"
                        data-slide="prev">&lsaquo;</a>
                     <a class="carousel-control right" href="#myCarousel"
                        data-slide="next">&rsaquo;</a>
-                </div>
+                </div>-->
             </div>
             <!--personal-center-->
             <div class="personal-center">
                 <div class="top">
                     <div class="top-item">
-                        <a href="/person">
-                            <img src="static/images/index/icon_1.png" alt=""/>
+                        <a href="/userCenter">
+                            <img src="static/images/index/icon_1.png" alt="个人中心"/>
                             <p>个人中心</p>
                         </a>
                     </div>
                     <div class="top-item">
-                        <a href="/message">
-                            <img src="static/images/index/icon_2.png" alt=""/>
+                        <a href="/userCenter">
+                            <img src="static/images/index/icon_2.png" alt="消息中心"/>
                             <p>消息中心</p>
                             <em class="red"></em>
                         </a>
@@ -572,8 +572,9 @@
                             <!--<p>发起项目</p>-->
                         <!--</a>-->
                         <a ui-sref="newBase">
-                        <img src="static/images/index/icon_3.png" alt=""/>
-                        <p>发起项目</p>
+                            <img src="static/images/index/icon_3.png" alt=""/>
+                            <p>发起项目</p>
+                        </a>
                     </div>
                 </div>
                 <div class="button">
@@ -583,69 +584,100 @@
                 <div class="buttons show">
                     <div class="bottom-item">
                         <div class="title"><span>历史参加人数</span></div>
-                        <div class="count"><span>21,206</span><span>人次</span></div>
-                    </div>
-                    <div class="bottom-item">
-                        <div class="title"><span>历史捐款总额</span></div>
-                        <div class="count" style="margin-left: -10px;"><span>1,409366</span><span>元</span></div>
-                    </div>
-                </div>
-                <div class="buttons">
-                    <div class="bottom-item">
-                        <div class="title"><span>历史参加人数</span></div>
-                        <div class="count"><span>21,206</span><span>人次</span></div>
+                        <div class="count"><span ng-bind="joinedPersonHistory | number"></span><span>人次</span></div>
                     </div>
                     <div class="bottom-item">
                         <div class="title"><span>历史捐款总额</span></div>
-                        <div class="count" style="margin-left: -10px;"><span>1,409366</span><span>元</span></div>
+                        <div class="count" style="margin-left: -10px;"><span ng-bind="totalDonationsHistory | number"></span><span>元</span></div>
                     </div>
                 </div>
+                <!--<div class="buttons">-->
+                    <!--<div class="bottom-item">-->
+                        <!--<div class="title"><span>历史参加人数</span></div>-->
+                        <!--<div class="count"><span>21,206</span><span>人次</span></div>-->
+                    <!--</div>-->
+                    <!--<div class="bottom-item">-->
+                        <!--<div class="title"><span>历史捐款总额</span></div>-->
+                        <!--<div class="count" style="margin-left: -10px;"><span>1,409366</span><span>元</span></div>-->
+                    <!--</div>-->
+                <!--</div>-->
             </div>
         </div>
         <div class="section section2">
-            <div class="status">
-                <div class="form-group">
-                    <label for="">项目状态:</label>
-                    <select name="" id="">
-                        <option value="">筹备中</option>
-                        <option value="">执行中</option>
-                        <option value="">已结束</option>
-                    </select>
-                </div>
-                <div class="form-group">
-                    <label for="">项目领域:</label>
-                    <select name="" id="">
-                        <option value="">全部分类</option>
-                        <option value="">环保/保护动物</option>
-                        <option value="">疾病救助</option>
-                        <option value="">扶贫/救灾</option>
-                        <option value="">教育/助学</option>
-                    </select>
-                </div>
-                <div class="form-group form-groups">
-                    <input type="text" class="form-control" placeholder="请输入关键词"/>
-                    <img src="static/images/index/search.png" alt=""/>
-                </div>
-            </div>
-            <div class="list-item clearfix">
-                <div class="project-img fl">
-                    <a ui-sref="projectDetail"><img src="static/images/index/help01.png" alt=""/></a>
-                </div>
-                <div class="project-detail fl">
-                    <p><a href="projectDetailsAndProgress">罕见病DMD医疗救助-angular</a></p>
-                    <div><span>项目简介:</span><span>关注DMD患儿家庭,竭力增加生命长度,接力拓展生命宽度。</span></div>
-                    <div><span>筹款时间:</span><span>2017-08-20至2017-09-10</span></div>
-                    <div><span>筹款目标:</span><span>115000元</span></div>
-                    <div><span>执&nbsp;行&nbsp;方:</span><span>深圳市优软科技有限公司</span></div>
-                </div>
-                <div class="project-progress fr">
-                    <div><span>项目状态:<em>筹备中</em></span></div>
-                    <div><span>已参与:<em>526</em>人</span></div>
-                    <div><span>已筹款:<em>82614</em>元(79%)</span></div>
-                </div>
-                <a class="fr donation" data-toggle="modal" data-target="#layer">我要捐款</a>
-            </div>
-            <div class="list-item clearfix">
+            <table ng-table="projectParams">
+                <thead>
+                    <tr>
+                        <th>
+                            <div class="status">
+                                <div class="form-group">
+                                    <label for="">项目状态:</label>
+                                    <select ng-model="active" ng-change="setActive(active)" ng-init="active = 'todo'">
+                                        <option ng-selected="active == 'all'" value="all">全部</option>
+                                        <option ng-selected="active == 'waiting'" value="waiting">筹备中</option>
+                                        <option ng-selected="active == 'todo'" value="todo">进行中</option>
+                                        <option ng-selected="active == 'end'" value="end">已结束</option>
+                                    </select>
+                                </div>
+                                <div class="form-group">
+                                    <label>项目领域:</label>
+                                    <select ng-model="selectedArea" ng-change="setArea(selectedArea)" ng-init="selectedArea = '0'">
+                                        <option ng-selected="selectedArea == '0'" value="-1">全部分类</option>
+                                        <option ng-selected="selectedArea == '环保/保护动物'" value="环保/保护动物">环保/保护动物</option>
+                                        <option ng-selected="selectedArea == '疾病救助'" value="疾病救助">疾病救助</option>
+                                        <option ng-selected="selectedArea == '扶贫/救灾'" value="扶贫/救灾">扶贫/救灾</option>
+                                        <option ng-selected="selectedArea == '教育/助学'" value="教育/助学">教育/助学</option>
+                                    </select>
+                                </div>
+                                <div class="form-group form-groups">
+                                    <input type="search" ng-model="keyword" ng-search="onSearch(keyword)" class="form-control" placeholder="请输入关键词"/>
+                                    <img src="static/images/index/search.png" ng-click="onSearch(keyword)" alt="搜索" title="点击搜索"/>
+                                </div>
+                            </div>
+                        </th>
+                    </tr>
+                </thead>
+                <tbody ng-if="tableParams.total() == 0">
+                <tr>
+                    <td>
+                        <div class="row text-muted info-container" style="padding: 50px 10px;">
+                            <div class="col-md-4 text-center">
+                                <div class="f16">当前没有找到符合条件的项目!</div>
+                            </div>
+                        </div>
+                    </td>
+                </tr>
+                </tbody>
+                <tbody ng-repeat="project in $data">
+                    <tr>
+                        <td>
+                            <div class="list-item clearfix">
+                                <div class="project-img fl">
+                                    <a ui-sref="projectDetail"><img src="{{project.thumbnail}}" alt="项目缩略图" title="{{project.name}}"/></a>
+                                </div>
+                                <div class="project-detail fl">
+                                    <p><a ui-sref="detail({id:project.id})">{{project.name}}</a></p>
+                                    <div><span>项目简介:</span><span>{{project.summary}}</span></div>
+                                    <div><span>筹款时间:</span><span>{{project.startTime | date:'yyyy-MM-dd'}}至{{project.endTime | date:'yyyy-MM-dd'}}</span></div>
+                                    <div><span>筹款目标:</span><span>{{project.target | number}}元</span></div>
+                                    <div><span>执&nbsp;行&nbsp;方:</span><span>{{project.orgName}}</span></div>
+                                </div>
+                                <div class="project-progress fr">
+                                    <div>
+                                        <span>项目状态:
+                                            <em ng-if="project.overdue != 1">进行中</em>
+                                            <em ng-if="project.overdue == 1">已结束</em>
+                                        </span>
+                                    </div>
+                                    <div><span>已参与:<em>{{joinedHistory | number}}</em>人</span></div>
+                                    <div><span>已筹款:<em>{{project.totalAmount | number}}</em>元({{project.totalAmount * 100 / project.target}}%)</span></div>
+                                </div>
+                                <a class="fr donation" data-toggle="modal" data-target="#layer">我要捐款</a>
+                            </div>
+                        </td>
+                    </tr>
+                </tbody>
+            </table>
+            <!--<div class="list-item clearfix">
                 <div class="project-img fl">
                     <a href="projectDetailsAndProgress"><img src="static/images/index/help02.png" alt=""/></a>
                 </div>
@@ -764,7 +796,7 @@
                     <li class="list"><a href="">20</a></li>
                     <li class="list next"><a href="">下一页</a></li>
                 </ul>
-            </div>
+            </div>-->
         </div>
     </div>
 </div>
@@ -773,7 +805,7 @@
     <div class="modal-dialog">
         <div class="modal-content">
             <div class="header modal-header clearfix">
-                <p class="fl">捐款项目:寒门学子 阳光助学</p>
+                <p class="fl">捐款项目:{{project.name}}</p>
                 <div class="close fr" data-dismiss="modal">&times;</div>
             </div>
             <div class="body modal-body">
@@ -781,23 +813,31 @@
                     <span class="fl">捐款金额:</span>
                     <div class="fl">
                         <ul>
-                            <li class="active">1元</li>
-                            <li>50元</li>
-                            <li>100元</li>
-                            <li>200元</li>
+                            <li class="select-money active" ng-click="setMoney(1)">1元</li>
+                            <li class="select-money" ng-click="setMoney(50)">50元</li>
+                            <li class="select-money" ng-click="setMoney(100)">100元</li>
+                            <li class="select-money" ng-click="setMoney(200)">200元</li>
                         </ul>
-                        <div class="write"><input type="text" placeholder="其他金额" class="form-control"/><em>元</em></div>
+                        <div class="write"><input type="text" ng-model="donation" ng-click="setMoney(0)" placeholder="其他金额" class="write-money  form-control"/><em>元</em></div>
                     </div>
                 </div>
                 <div class="choose clearfix">
                     <span class="fl best">我的祝福:</span>
-                    <textarea name="" id="" cols="30" rows="10" class="fl form-control"></textarea>
+                    <textarea ng-model="bless" name="" id="" cols="30" rows="10" class="fl form-control"></textarea>
                     <div class="fl agree clearfix">
-                        <input type="checkbox" class="fl"><span class="fl"><a href="">同意并接受《优软一元捐用户协议</a></span>
+                        <input type="checkbox" class="fl" required><span class="fl">同意并接受《<a href="/userAgreement" target="_blank" style="color: #5078cb;">优软一元捐用户协议</a></span>
                     </div>
                 </div>
-                <a href="donationsOver"> <button>确认捐款</button></a>
+                <a href="donationsOver"><button ng-click="ensureDonate()">确认捐款</button></a>
             </div>
         </div>
     </div>
-</div>
+</div>
+<script>
+    $('.select-money').on('click', function () {
+        $(this).addClass('active').siblings().removeClass('active');
+    });
+    $('.write-money').on('focus', function () {
+        $('.select-money').removeClass('active');
+    });
+</script>

+ 1059 - 0
donate-service/src/main/webapp/resources/view/user/user_center.html

@@ -0,0 +1,1059 @@
+<style>
+    body{
+        font-family: "Microsoft Yahei", "微软雅黑";
+        box-sizing: border-box;
+    }
+    .fl{
+        float: left;
+    }
+    .fr{
+        float: right;
+    }
+    .clearfix {
+        clear: both;
+    }
+    /*头部导航*/
+    #nav{
+        width: 100%;
+        margin: 0 auto;
+        background: #474443;
+    }
+    #nav .container{
+        margin: 0 auto;
+        padding: 0;
+        width: 1140px;
+        height: 60px;
+        line-height: 60px;
+        text-align: center;
+    }
+    #nav .fl{
+        position: relative;
+    }
+    #nav .fl img{
+        margin-right: 32px;
+        width: 65px;
+        height: 22px;
+    }
+    #nav .fl span{
+        font-size: 16px;
+        color: #fff;
+    }
+    #nav .fl span:before{
+        content: '';
+        position: absolute;
+        top: 25px;
+        left: 80px;
+        width: 1px;
+        height: 14px;
+        background: #a0a0a0;
+    }
+    #nav .fl a.return{
+        margin-left: 28px;
+        font-size: 12px;
+        color: #b4b4b4;
+        text-decoration: none;
+    }
+    #nav .fr a{
+        margin-right: 45px;
+        font-size: 14px;
+        color: #fff;
+    }
+    #nav .fr a:last-child {
+        margin-right: 0;
+    }
+    .main{
+        width: 100%;
+        margin: 24px 0 150px 0;
+    }
+    .main .container{
+        width: 1140px;
+        margin: 0 auto;
+        padding: 0;
+    }
+    .main .section{
+        width: 100%;
+        overflow: hidden;
+        text-align: center;
+        margin: 0 auto;
+    }
+    .section .nav{
+        margin-bottom: 15px;
+        padding-bottom: 15px;
+        width: 100%;
+        text-align: left;
+        border-bottom: 2px solid #ef613b;
+    }
+    .section .nav span:first-child a{
+        font-size: 14px;
+        color: #303030;
+    }
+    .section .nav span:nth-child(2){
+        margin: 0 10px;
+    }
+    .section .nav span:last-child{
+        font-size: 30px;
+        color: #303030;
+    }
+    .section .personalCenter{
+        margin-top: 14px;
+    }
+    .section .personalCenter .personal-center{
+        margin-right: 29px;
+        width: 310px;
+        height: 350px;
+        border: 1px solid #e1e1e1;
+    }
+    .section .personalCenter .personal-center .top{
+        padding: 0 20px;
+        width: 100%;
+        height: 40px;
+        line-height: 40px;
+        background: #f5f5f5;
+        border-bottom: 1px solid #e1e1e1;
+    }
+    .section .personalCenter .personal-center .top img{
+        margin: -2px 10px 0 0;
+    }
+    .section .personalCenter .personal-center .top .fl span{
+        font-size: 14px;
+        color: #505050;
+    }
+    .section .personalCenter .personal-center .top .fr{
+        cursor: pointer;
+    }
+    .section .personalCenter .personal-center .top .fr span{
+        font-size: 12px;
+        color: #0072ff;
+    }
+    .section .personalCenter .personal-center .detail{
+        padding: 0 20px;
+        text-align: left;
+    }
+    .section .personalCenter .personal-center .detail .name{
+        margin: 12px 0;
+    }
+    .section .personalCenter .personal-center .detail .name img{
+        margin-top: -5px;
+    }
+    .section .personalCenter .personal-center .detail .name span{
+        margin-left: 10px;
+        font-size: 18px;
+        font-weight: normal;
+        color: #1e1e1e;
+    }
+    .section .personalCenter .personal-center .item{
+        margin-bottom: 10px;
+    }
+    .section .personalCenter .personal-center .item span:first-child{
+        width: 70px;
+        font-size: 14px;
+        color: #969696;
+    }
+    .section .personalCenter .personal-center .item span:last-child{
+        width: 190px;
+        font-size: 14px;
+        color: #323232;
+        font-weight: 700;
+    }
+    .section .personalCenter .personal-center .item .overTop{
+        width: 100%;
+        height: 40px;
+        overflow: hidden;
+        text-overflow:ellipsis;
+        display:-webkit-box;
+        -webkit-box-orient:vertical;
+        -webkit-line-clamp:2;
+    }
+    .section .personalCenter .personal-center .items span.part{
+        font-size: 14px;
+        color: #969696;
+        font-weight: normal;
+    }
+    .section .personalCenter .personal-center .items span em{
+        margin-right: 5px;
+        font-size: 14px;
+        color: #313131;
+        font-weight: bold;
+        font-style: normal;
+    }
+    .section .personalCenter .personal-center .items .count{
+        margin-top: 30px;
+    }
+    .section .personalCenter .personal-center .items .count span:first-child{
+        display: inline-block;
+        margin-right: 10px;
+        padding-right: 15px;
+        width: 240px;
+        height: 40px;
+        line-height: 40px;
+        font-size: 28px;
+        color: #505050;
+        text-align: right;
+        border: 1px solid #e1e1e1;
+        background: -webkit-linear-gradient(top, #fff 50%,#eee 100%);
+        background: -o-linear-gradient(top, #fff 50%,#eee 100%);
+        background: -ms-linear-gradient(top, #fff 50%,#eee 100%);
+        background: linear-gradient(to bottom, #fff 50%,#eee 100%);
+    }
+    .section .personalCenter .personal-center .items .count span:last-child {
+        font-size: 14px;
+        color: #787878;
+        text-align: left;
+    }
+    /*已参与项目。。。*/
+    .section .personalCenter .project-management{
+        width: 800px;
+        text-align: left;
+    }
+    .section .personalCenter .project-management .active-toggle{
+        width: 100%;
+        height: 40px;
+        line-height: 40px;
+    }
+    .section .personalCenter .project-management .active-toggle span{
+        position: relative;
+        display: inline-block;
+        margin-right: 5px;
+        width: 100px;
+        height: 40px;
+        line-height: 40px;
+        font-size: 14px;
+        color: #505050;
+        text-align: center;
+        border: 1px solid #e1e1e1;
+        border-bottom: none;
+        background: #f5f5f5;
+        cursor: pointer;
+    }
+    /*消息提示小红点*/
+    .section .personalCenter .project-management .active-toggle em.red{
+        position: absolute;
+        top: 8px;
+        left: 85px;
+        width: 6px;
+        height: 6px;
+        border-radius: 50%;
+        background: #f00;
+    }
+    .section .personalCenter .project-management .active-toggle span.active,.section .personalCenter .project-management .active-toggle span:hover{
+        background: #499aff;
+        color: #fff;
+        border: none;
+    }
+    /*已参与项目*/
+    .active-detail .table>tbody>tr>td, .active-detail .table>tbody>tr>th,.active-detail .table>tfoot>tr>td,.active-detail .table>tfoot>tr>th,.active-detail .table>thead>tr>td,.active-detail .table>thead>tr>th{
+        border-top: 0;
+    }
+    .active-detail .table{
+        width: 100%;
+        text-align: center;
+        margin: 0 auto;
+        table-layout: fixed;
+    }
+    .active-detail .table thead{
+        width: 100%;
+        height: 40px;
+        line-height: 40px;
+        border: 1px solid #e1e1e1;
+    }
+    .active-detail .table thead td{
+        font-size: 14px;
+        color: #aaa;
+        vertical-align: middle;
+    }
+    .active-detail .table tbody tr{
+        border-bottom: 1px solid #e1e1e1;
+        cursor: pointer;
+    }
+    .active-detail .table tbody tr.look{
+        border-bottom: none;
+    }
+    /*.active-detail .table tbody tr.news-list{*/
+    /*border-bottom: none;*/
+    /*}*/
+    .active-detail .table tbody tr.new-progress div{
+        padding: 5px 20px;
+        margin-left: 80px;
+        width: 730px;
+        height: 50px;
+        text-align: left;
+        background: #f5f5f5;
+    }
+    .active-detail .table tbody tr.new-progress div span{
+        font-size: 14px;
+        color: #787878;
+    }
+    .active-detail .table tbody tr.new-progress div a{
+        font-size: 12px;
+        color: #0072ff;
+    }
+    .active-detail .table tbody tr.new-progress div a img{
+        margin-top: -2px;
+        margin-left: 3px;
+    }
+    .active-detail .table tbody td{
+        padding: 15px 0;
+        font-size: 14px;
+        color: #1e1e1e;
+        vertical-align: middle;
+    }
+    .active-detail .table tbody td div.project-title{
+        text-align: left;
+    }
+    .active-detail .table tbody td div.project-title h3{
+        font-weight: bold;
+        font-size: 18px;
+        color: #1e1e1e;
+    }
+    .active-detail .table tbody td div.project-title h3 a{
+        font-weight: bold;
+        font-size: 18px;
+        color: #1e1e1e;
+    }
+    .active-detail .table tbody td div.project-title .time{
+        margin-top: 10px;
+    }
+    .active-detail .table tbody td div.project-title .time span:first-child{
+        font-size: 14px;
+        color: #969696;
+    }
+    .active-detail .table tbody td div.project-title .time span:last-child{
+        font-size: 14px;
+        color: #333;
+    }
+    .active-detail .table tbody td.arrangement{
+        color: #ef613b;
+    }
+    .active-detail .table tbody td.end{
+        color: #aaa;
+    }
+    /*已参与活动*/
+    .active-detail1 .table tbody tr.rewarded td:last-child{
+        font-size: 14px;
+        color: #989898;
+    }
+    .active-detail1 .table tbody tr td{
+        color: #1d1d1d;
+        font-size: 14px;
+    }
+    .active-detail1 .table tbody tr td:nth-child(2) {
+        font-weight: bold;
+    }
+    .active-detail1 .table tbody tr td:nth-child(2) a{
+        color: #1d1d1d;
+        font-size: 14px;
+    }
+    /*消息提醒*/
+    .active-detail2 .table tbody tr td{
+        font-size: 14px;
+    }
+    .active-detail2 .table tbody tr td:nth-child(1) {
+        color: #1e1e1e;
+    }
+    .active-detail2 .table tbody tr td:nth-child(2) {
+        color: #1d1d1d;
+        font-weight: bold;
+    }
+    .active-detail2 .table tbody tr td:nth-child(3) {
+        width: 400px;
+        text-overflow: ellipsis ;
+        overflow: hidden ;
+        white-space: nowrap ;
+        color: #959595;
+    }
+    /*消息提示小红点*/
+    .active-detail2 .table tbody tr td.read{
+        position: relative;
+    }
+    .active-detail2 .table tbody tr td.read em.red{
+        position: absolute;
+        top: 21px;
+        right: 22px;
+        width: 6px;
+        height: 6px;
+        border-radius: 50%;
+        background: #f00;
+    }
+    .new-top {
+        margin-left: 135px;
+        text-align: left;
+    }
+    .new-top p{
+        margin-bottom: 15px;
+        font-size: 14px;
+        color: #505050;
+    }
+    .new-top p a{
+        font-size: 14px;
+        color: #005aca;
+        text-decoration: underline;
+    }
+    .new-top .img{
+        width: 300px;
+        height: 200px;
+        line-height: 200px;
+        border: 1px solid #dcdcdc;
+    }
+    .new-top .img img{
+        width: 100%;
+        height: 100%;
+    }
+    .new-top .time-list{
+        margin-top: 17px;
+    }
+    .new-top .time-list span:first-child{
+        font-size: 14px;
+        color: #959595;
+    }
+    .new-top .time-list span.show-up{
+        margin-left: 22px;
+        font-size: 14px;
+        color: #005aca;
+        cursor: pointer;
+    }
+    .news-detail{
+        display: none;
+    }
+    /*项目管理*/
+    /*项目管理-我的项目*/
+    .active-detail3 .projectNav{
+        padding: 0 25px;
+        width: 100%;
+        height: 60px;
+        line-height: 45px;
+        border: 1px solid #e1e1e1;
+        border-bottom: none;
+    }
+    .active-detail3 .projectNav .fl span{
+        padding-bottom: 10px;
+        margin-right: 55px;
+        font-size: 16px;
+        color: #787878;
+        cursor: pointer;
+    }
+    .active-detail3 .projectNav .fl span.active, .active-detail3 .projectNav .fl span:hover{
+        color: #1e1e1e;
+        font-weight: bold;
+        border-bottom: 3px solid #499aff;
+    }
+    .active-detail3 .projectNav a.fr {
+        margin-top: 13px;
+        display: inline-block;
+        width: 90px;
+        height: 32px;
+        line-height: 32px;
+        text-align: center;
+        font-size: 14px;
+        border-radius: 3px;
+        background: #ef613b;
+        color: #fff;
+    }
+    .active-detail3 .projectNav a.fr:hover{
+        background: #be3b1b;
+    }
+    .active-detail3 .projectDetail{
+        padding: 15px 34px 0 34px;
+        margin: 0 auto;
+        /*text-align: center;*/
+        width: 100%;
+        height: 210px;
+        background: #f7f7f7;
+        border: 1px solid #e1e1e1;
+        /*border-top: none;*/
+    }
+    .active-detail3 .projectDetail .form-group{
+        margin-bottom: 14px;
+        float: left;
+        margin-right: 25px;
+    }
+    .active-detail3 .projectDetail .form-group label{
+        width: 85px;
+        font-weight: normal;
+        font-size: 14px;
+        color: #343434;
+    }
+    .active-detail3 .projectDetail .form-group select{
+        margin-left: -12px;
+        padding-left: 10px;
+        width: 150px;
+        height: 34px;
+        font-size: 14px;
+        color: #232323;
+        cursor: pointer;
+        border: 1px solid #d2d2d2;
+    }
+    .active-detail3 .projectDetail .form-group input{
+        padding-left: 10px;
+        width: 215px;
+        height: 34px;
+        outline: none ;
+        border-radius: 0;
+    }
+    .active-detail3 .projectDetail .form-groups{
+        overflow: hidden;
+    }
+    .active-detail3 .projectDetail .form-groups label{
+        margin-top: 7px;
+    }
+    .active-detail3 .projectDetail .groups label{
+        margin-top: 8px;
+    }
+    .active-detail3 .projectDetail .groups .date{
+        margin-left: -10px;
+    }
+    .active-detail3 .projectDetail .groups .date input{
+        width: 180px;
+        height: 34px;
+    }
+    .active-detail3 .projectDetail .groups .date span{
+        margin: 8px 15px 0 15px;
+    }
+    .active-detail3 .projectDetail .button{
+        width: 100%;
+        margin: 0 auto;
+        text-align: center;
+    }
+    .active-detail3 .projectDetail .btn{
+        width: 110px;
+        height: 32px;
+        border-radius: 3px;
+        background: #bfbfbf;
+        color: #fff;
+    }
+    .active-detail3 .projectDetail .btn:hover{
+        background: #499aff;
+    }
+    .active-detail3 .search{
+        padding-top: 20px;
+        width: 100%;
+        height: 116px;
+        border: 1px solid #e1e1e1;
+        border-top: 0;
+    }
+    .active-detail3 .search .searchNav{
+        width: 100%;
+        height: 40px;
+        text-align: center;
+        line-height: 40px;
+        border-top: 1px solid #e1e1e1;
+        border-bottom: 1px solid #e1e1e1;
+    }
+    .active-detail3 .search .searchNav span{
+        display: inline-block;
+        height: 40px;
+        font-size: 14px;
+        color: #323232;
+        border-right: 1px solid #e1e1e1;
+    }
+    .active-detail3 .search .searchNav span:last-child {
+        border-right: none;
+    }
+    .active-detail3 .search .searchDetail{
+        width: 100%;
+        height: 56px;
+        line-height: 56px;
+        margin: 0 auto;
+        text-align: center;
+    }
+    .active-detail3 .search .searchDetail span{
+        font-size: 14px;
+        color: #969696;
+    }
+    .width160{
+        width: 160px;
+    }
+    .width140{
+        width: 140px;
+    }
+    .width130{
+        width: 130px;
+    }
+    .width110{
+        width: 110px;
+    }
+    /*项目管理-项目进展-项目进展管理*/
+    .projectDevelopNav {
+        border-right: 1px solid #e1e1e1;
+        width: 100%;
+        height: 40px;
+        line-height: 40px;
+        overflow: hidden;
+    }
+    .projectDevelopNav span{
+        text-align: center;
+        display: inline-block;
+        width: 115px;
+        height: 40px;
+        font-size: 14px;
+        color: #505050;
+        background: #f5f5f5;
+        cursor: pointer;
+        border-top:1px solid #e1e1e1;
+        border-right: 1px solid #e1e1e1;
+    }
+    .projectDevelopNav span:first-child {
+        border-left: 1px solid #e1e1e1;
+    }
+    .projectDevelopNav span:hover,.projectDevelopNav span.active{
+        color: #1d1d1d;
+        background: #fff;
+        font-weight: bold;
+    }
+    .active-detail3 .projectDetail1 .form-groups{
+        width: 100%;
+    }
+    .active-detail3 .projectDetail1{
+        height: auto;
+    }
+    .active-detail3 .searcher{
+        height: auto;
+    }
+    .active-detail3 .searcher .searchDetail{
+        border-top: 1px solid #e1e1e1;
+    }
+    /*项目管理-项目进展-财务披露管理*/
+    .active-detail3 .projectDetail2 .form-groups{
+        width: auto;
+    }
+    /*我的项目状态下隐藏下面的导航*/
+    .active-detail3 div.progressToggle span.active span.hideProjectDevelopNav + .projectDevelopNav{
+        display: none;
+    }
+    /*切换*/
+    .active-detail {
+        display: none;
+    }
+    .show{
+        display: block;
+    }
+    .progressManagement{
+        display: none;
+    }
+    .myProject{
+        display: none;
+    }
+    /*登录弹出框*/
+    .modal-open .modal {
+        width: 100%;
+        height: 100%;
+    }
+    .modal-open .modal .modal-dialog{
+        width: 370px;
+        height: 330px;
+    }
+    .modal-open .modal-dialog .modal-content{
+        width: 370px;
+        height: 330px;
+    }
+    .login{
+        margin: 0 auto;
+        width: 370px;
+        height: 330px;
+        text-align: center;
+    }
+    .login .header{
+        padding: 0 20px;
+        width: 100%;
+        height: 44px;
+        line-height: 44px;
+        background: #eeeeee;
+    }
+    .login .header p{
+        font-size: 16px;
+        color: #969696;
+        font-weight: bold;
+    }
+    .login .header .close{
+        font-size: 38px;
+    }
+    .login .body{
+        padding: 0;
+    }
+    .x-login {
+        background: #fff;
+        overflow: visible;
+        z-index: 4;
+    }
+    .x-login-header {
+        position: relative;
+        height: 48px;
+        line-height: 48px;
+        overflow: hidden;
+        width: 100%;
+        border-bottom: 1px solid #e7e7e7;
+    }
+    .x-login-tab {
+        margin-top: -4px;
+        width: 173px;
+        font-size: 18px;
+        text-align: center;
+        background: #fff;
+        border-bottom: 2px solid transparent;
+    }
+    .x-login-tab a {
+        padding: 13px 10px;
+        font-size: 16px;
+        color: #777777;
+    }
+    .x-login-tab.active,.x-login-tab:hover{
+        border-bottom: 2px solid #5078cb;
+    }
+    .x-login-tab.active a,.x-login-tab:hover a{
+        color: #5078cb;
+    }
+    .x-login-form, .x-login-qrcode {
+        padding: 20px;
+    }
+    .x-has-feedback-left {
+        position: relative;
+    }
+    .x-has-feedback-left i{
+        position: absolute;
+        top: 10px;
+        left: 10px;
+        font-size: 16px;
+        color: #5078cb;
+    }
+    .x-has-feedback-left>.form-control {
+        padding-left: 30px;
+    }
+    .x-input {
+        border-color: #ccc;
+        border-radius: 0;
+        box-shadow: none;
+    }
+    .x-btn-primary, .x-btn-primary:hover {
+        background: #5078cb;
+        color: #fff;
+        font-weight: 700;
+        letter-spacing: 4px;
+    }
+    .x-btn {
+        border-radius: 0;
+    }
+    .x-login-help {
+        line-height: 50px;
+    }
+    .x-login-help a {
+        color: #5078cb;
+    }
+    .icon-left {
+        font-size: inherit;
+        margin-right: 5px;
+    }
+    .x-qrcode-help {
+        text-align: center;
+        margin-bottom: 12px;
+    }
+    .x-qrcode-img {
+        width: 129px;
+        margin: 0 auto 20px auto;
+        box-shadow: 0 0 8px #ddd;
+    }
+    .x-qrcode-ex {
+        margin: 0 -20px -20px -20px;
+        padding: 0 20px;
+        line-height: 50px;
+        background: #fdfdfd;
+        border-top: 1px solid #e7e7e7;
+    }
+    .x-qrcode-ex ul {
+        margin-bottom: 0;
+    }
+    .x-qrcode-ex li {
+        width: 100px;
+        text-align: center;
+        color: #999;
+    }
+    .show-form{
+        display: none;
+    }
+</style>
+<div class="main">
+    <div class="container">
+        <div class="section">
+            <div class="nav">
+                <span><a href="">项目列表</a></span><span>&gt;</span><span>个人中心</span>
+            </div>
+            <div class="personalCenter clearfix">
+                <div class="personal-center fl">
+                    <div class="top clearfix">
+                        <div class="fl"><img src="static/images/per.png" alt=""/><span>个人资料</span></div>
+                        <div class="fr">
+                            <!--<img src="static/images/pen.png" alt=""/><span>编辑</span>-->
+                        </div>
+                    </div>
+                    <div class="detail">
+                        <div class="name"><img src="static/images/name.png" alt=""/><span ng-bind="user.userName"></span></div>
+                        <div class="item clearfix">
+                            <span class="fl">联系电话:</span>
+                            <span class="fl" ng-bind="user.userTel"></span>
+                        </div>
+                        <div class="item clearfix">
+                            <span class="fl">所在公司:</span>
+                            <span class="fl" ng-bind="user.enName"></span>
+                        </div>
+                        <div class="item clearfix">
+                            <span class="fl">居住地址:</span>
+                            <span class="fl overTop">{{user.address}}</span>
+                        </div>
+                        <div class="item items clearfix">
+                            <span class="fl">参与项目:</span>
+                            <span class="fl part"><em>{{joinedProjectNum}}</em>个</span>
+                        </div>
+                        <div class="item items clearfix">
+                            <span class="fl">参与活动:</span>
+                            <span class="fl part"><em>{{joinedActivityNum}}</em>个</span>
+                        </div>
+                        <div class="item items clearfix">
+                            <span class="fl">捐赠善款:</span>
+                            <div class="count"><span>{{sumDonation}}</span><span>元</span></div>
+                        </div>
+                    </div>
+                </div>
+                <div class="project-management fl">
+                    <div class="active-toggle">
+                        <span class="active">已参与项目</span>
+                        <span>已参与活动</span>
+                        <span>消息提醒<em ng-class="{'red':unreadMessage > 0}"></em></span>
+                    </div>
+                    <!--已参与项目-->
+                    <div class="active-detail show">
+                        <table class="table" ng-table="tableParams">
+                            <thead>
+                            <tr>
+                                <td width="80">序号</td>
+                                <td width="390">项目</td>
+                                <td width="180">捐款金额</td>
+                                <td width="150">项目状态</td>
+                            </tr>
+                            </thead>
+                            <tbody ng-repeat="projectRecord in $data">
+                            <tr>
+                                <td>{{$index + 1}}</td>
+                                <td>
+                                    <div class="project-title">
+                                        <h3><a href="/project#/detail/{{projectRecord.proId}}">{{projectRecord.project.name}}</a></h3>
+                                        <div class="time">
+                                            <span>捐款时间:</span><span ng-bind="projectRecord.donateDate | date:'yyyy-MM-dd'"></span>
+                                        </div>
+                                    </div>
+                                </td>
+                                <td>{{projectRecord.amount | number:2}}元</td>
+                                <td class="arrangement">{{projectRecord.project.overdue}}</td>
+                            </tr>
+                            <!-- 判断是否有最新进展 -->
+                            <!--<tr class="new-progress">-->
+                                <!--<td colspan="4">-->
+                                    <!--<div>-->
+                                        <!--<span>最新进度:7月30日,上午与商家签订课桌椅、餐桌椅购买合同,同时,钢木门的商家来到学校,在办公室签订合同。签完合同后,商家就开始了精准的测量。(图)-->
+                                        <!--</span>-->
+                                        <!--<a href="projectDetailsAndProgress"><img src="static/images/look.png" alt=""/></a>-->
+                                    <!--</div>-->
+                                <!--</td>-->
+                            <!--</tr>-->
+                            <tr>
+                                <td>6</td>
+                                <td>
+                                    <div class="project-title">
+                                        <h3><a href="projectDetailsAndProgress">静态数据</a></h3>
+                                        <div class="time">
+                                            <span>捐款时间:</span><span>2017-08-20 14:38:11</span>
+                                        </div>
+                                    </div>
+                                </td>
+                                <td>1200元</td>
+                                <td class="end">已结束</td>
+                            </tr>
+                            </tbody>
+                        </table>
+                    </div>
+                    <!--已参与活动-->
+                    <div class="active-detail active-detail1">
+                        <table class="table" ng-table="tableParams">
+                            <thead>
+                            <tr>
+                                <td width="80">序号</td>
+                                <td width="390">活动</td>
+                                <td width="180">开奖日期</td>
+                                <td width="150">活动状态</td>
+                            </tr>
+                            </thead>
+                            <tbody ng-repeat="activityRecord in $data">
+                            <tr>
+                                <td>{{$index + 1}}</td>
+                                <td><a href="/activity#/detail/{{activityRecord.activityId}}">{{activityRecord.activity.name}}</a></td>
+                                <td>{{activityRecord.activity.luckyTime | date:'yyyy-MM-dd'}}</td>
+                                <td>
+                                    <span ng-if="activityRecord.activity.stage == 0">
+                                        进行中
+                                    </span>
+                                    <span ng-if="activityRecord.activity.stage == 1">
+                                        待开奖
+                                    </span>
+                                    <span ng-if="activityRecord.activity.stage == 2">
+                                        <!-- 兑奖截止日期 -->
+                                        <span>兑奖截止日期</span><br>
+                                        <span>{{activityRecord.activity.receiveEndTime | date:'yyyy-MM-dd'}}</span>
+                                    </span>
+                                    <span ng-if="activityRecord.activity.stage == 3">
+                                        已结束
+                                    </span>
+                                </td>
+                            </tr>
+                            <tr class="rewarded">
+                                <td>4</td>
+                                <td><a href="activeCenter">优软一元捐特别活动一</a></td>
+                                <td>2017-08-20</td>
+                                <td>已开奖</td>
+                            </tr>
+                            </tbody>
+                        </table>
+                    </div>
+                    <!--消息提醒-->
+                    <div class="active-detail active-detail2">
+                        <table class="table" ng-table="tableParams">
+                            <thead>
+                            <tr>
+                                <td width="80">序号</td>
+                                <td width="320">消息</td>
+                                <td width="400">内容</td>
+                            </tr>
+                            </thead>
+                            <tbody ng-repeat="message in $data">
+                            <tr class="news-list">
+                                <td class="read">{{$index + 1}}<em ng-class="{'red':message.readStatus != 1}"></em></td>
+                                <td>{{message.title}}</td>
+                                <td class="third">{{message.context}}</td>
+                            </tr>
+                            <tr class="news-detail">
+                                <td colspan="3">
+                                    <div class="new-top">
+                                        <!--<p> 全新优软一元捐感恩回馈活动 011期马上要开始咯~</p>-->
+                                        <!--<p>届时活动将会关联全平台所有项目,只要在活动时间内在平台上先出您的爱心,即可参加活动抽奖!</p>-->
+                                        <!--<p>本次活动将会抽出全新iPhone X  30台!</p>-->
+                                        {{message.detail}}
+                                        <p>更多好礼请点击链接查看:<a href="http://www.usoftmall.com/">http://www.usoftmall.com/</a></p>
+                                        <div class="img">
+                                            <img src="{{message.img}}" alt="活动缩略图"/>
+                                        </div>
+                                        <div class="time-list">
+                                            <span>{{message.date | date: 'yyyy-MM-dd'}}</span> <span class="show-up">收起</span>
+                                        </div>
+                                    </div>
+                                </td>
+                            </tr>
+                            </tbody>
+                        </table>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+<!--登录弹出框-->
+<div class="login modal" role='dialog' id='login'>
+    <div class="modal-dialog">
+        <div class="modal-content">
+            <div class="header modal-header clearfix">
+                <p class="fl">请登录</p>
+                <div class="close fr" data-dismiss="modal">&times;</div>
+            </div>
+            <div class="body modal-body">
+                <div class="x-login">
+                    <div class="x-login-header">
+                        <div class="x-login-tab fl" aria-controls="qrcode-wrap" aria-left="0">
+                            <a href="javascript:void(0)"> 扫码登录 </a>
+                        </div>
+                        <div class="x-login-tab active fr" aria-controls="form-wrap" aria-left="50%">
+                            <a href="javascript:void(0)"> 账户登录 </a>
+                        </div>
+                    </div>
+                    <!-- qrcode login wrap -->
+                    <div id="qrcode-wrap" class="x-login-qrcode show-form">
+                        <div class="x-qrcode-help">
+                            <span>打开手机客户端,扫描下面的二维码</span>
+                        </div>
+                        <div class="x-qrcode-img">
+                            <img src="static/images/qrcode.png">
+                        </div>
+                    </div>
+                    <!-- user & pwd login wrap -->
+                    <div id="form-wrap" class="x-login-form show-form show">
+                        <form name="loginForm">
+                            <input type="hidden" name="appId" value="mall"> <input type="hidden" name="returnUrl" value=""> <input type="hidden" name="spaceId" value="">
+                            <div class="form-group">
+                                <div class="x-has-feedback-left">
+                                    <input type="text" class="form-control x-input" placeholder="手机号/邮箱" name="username" required=""><i class="fa fa-user" aria-hidden="true"></i>
+                                </div>
+                            </div>
+                            <div class="form-group">
+                                <div class="x-has-feedback-left">
+                                    <input type="password" class="form-control x-input" placeholder="密码" name="password" required=""> <i class="fa fa-lock" aria-hidden="true"></i>
+                                </div>
+                            </div>
+                            <div class="form-group">
+                                <div>
+                                    <button class="btn x-btn x-btn-primary btn-block" type="button">登录</button>
+                                </div>
+                            </div>
+                        </form>
+                        <div class="x-login-help clearfix">
+                            <a href="https://account.ubtob.com/user/pwd" class="fl"><i class="iconfont icon-left icon-question"></i>忘记密码</a>
+                            <a href="https://account.ubtob.com/sso/register" class="fr"><i class="iconfont icon-left icon-arrow"></i>免费注册</a>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+<script>
+
+    $(document).ready(function (){
+//        收起打开消息列表
+        $('.news-list').click(function(){
+            $(this).next('.news-detail').toggle();
+            if($(this).next('.news-detail').css('display') !== 'none'){
+                $(this).css('border-bottom','none')
+                    .children('.third').css('display','none');
+            }else if($(this).next('.news-detail').css('display') !== 'block'){
+                $(this).css('border-bottom','1px solid #e1e1e1')
+                    .children('.third').css('display','block');
+            }
+        });
+        $('.show-up').click(function(){
+            $(this).parent().parent().parent().parent().hide();
+            if($(this).parent().parent().parent().parent().css('display')==='none'){
+                $(this).parent().parent().parent().parent().prev().children('.third').show();
+                $(this).parent().parent().parent().parent().prev().css('border-bottom','1px solid #dcdcdc');
+            }
+        });
+        //    点击切换
+        $('.active-toggle').on('click', 'span', function () {
+            var index = $(this).index();
+            $(this).addClass('active').siblings().removeClass('active');
+            $('.active-detail').eq(index).addClass('show').siblings().removeClass('show');
+        });
+
+//        项目管理切换
+        $('.progressToggle').on('click', 'span', function () {
+            var index = $(this).index();
+            $(this).addClass('active').siblings().removeClass('active');
+            $('.myProject').eq(index).addClass('show').siblings().removeClass('show');
+        });
+//        项目进展
+        $('.projectDevelopNav').on('click', 'span', function () {
+            var index = $(this).index();
+            $(this).addClass('active').siblings().removeClass('active');
+            $('.progressManagement').eq(index).addClass('show').siblings().removeClass('show');
+        });
+//        登录
+        $('.x-login-header').on('click', '.x-login-tab', function () {
+            var index = $(this).index();
+            $(this).addClass('active').siblings('.x-login-tab').removeClass('active');
+            $('.show-form').eq(index).addClass('show').siblings().removeClass('show');
+        });
+
+    })
+</script>

Some files were not shown because too many files changed in this diff