Browse Source

Merge remote-tracking branch 'origin/dev' into dev

dongbw 8 years ago
parent
commit
d01b3ef949
20 changed files with 787 additions and 255 deletions
  1. 26 5
      donate-console/src/main/java/com/uas/console/donate/model/ProjectRecode.java
  2. 1 1
      donate-console/src/main/java/com/uas/console/donate/service/impl/OrgServiceImpl.java
  3. 373 13
      donate-console/src/main/webapp/resources/js/index/app.js
  4. 4 3
      donate-console/src/main/webapp/resources/view/user/charityCertification.html
  5. 50 35
      donate-console/src/main/webapp/resources/view/user/charityCertification1.html
  6. 1 1
      donate-console/src/main/webapp/resources/view/user/charityCertification2.html
  7. 104 10
      donate-console/src/main/webapp/resources/view/user/charityCertification3.html
  8. 4 3
      donate-console/src/main/webapp/resources/view/user/publicOfferingCertification.html
  9. 54 23
      donate-console/src/main/webapp/resources/view/user/publicOfferingCertification1.html
  10. 1 1
      donate-console/src/main/webapp/resources/view/user/publicOfferingCertification2.html
  11. 103 9
      donate-console/src/main/webapp/resources/view/user/publicOfferingCertification3.html
  12. 57 4
      donate-console/src/main/webapp/resources/view/user/publicOfferingCertification4.html
  13. 2 53
      donate-console/src/main/webapp/resources/view/user/selectInstitutionsNature.html
  14. 2 41
      donate-service/src/main/java/com/uas/service/donate/controller/AlipayController.java
  15. 1 0
      donate-service/src/main/java/com/uas/service/donate/controller/IndexController.java
  16. 2 38
      donate-service/src/main/java/com/uas/service/donate/controller/WxpayController.java
  17. 0 11
      donate-service/src/main/java/com/uas/service/donate/model/User.java
  18. 1 3
      donate-service/src/main/resources/templates/index.ftl
  19. 0 1
      donate-service/src/main/webapp/WEB-INF/views/project.html
  20. 1 0
      donate-service/src/main/webapp/resources/js/pay.js

+ 26 - 5
donate-console/src/main/java/com/uas/console/donate/model/ProjectRecode.java

@@ -76,6 +76,19 @@ public class ProjectRecode {
     @Column(name = "pr_way")
     private String way;
 
+    /**
+     * 支付状态(1:待支付,2:已支付,3:异常情况)
+     * @return
+     */
+    @Column(name = "pr_status")
+    private short status;
+
+    /**
+     * 支付异常情况时信息
+     */
+    @Column(name = "pr_exception_msg")
+    private String exceptionMsg;
+
     public Long getId() {
         return id;
     }
@@ -149,11 +162,19 @@ public class ProjectRecode {
         this.way = way;
     }
 
-    public User getUser() {
-        return user;
+    public short getStatus() {
+        return status;
+    }
+
+    public void setStatus(short status) {
+        this.status = status;
+    }
+
+    public String getExceptionMsg() {
+        return exceptionMsg;
     }
 
-    public void setUser(User user) {
-        this.user = user;
+    public void setExceptionMsg(String exceptionMsg) {
+        this.exceptionMsg = exceptionMsg;
     }
-}
+}

+ 1 - 1
donate-console/src/main/java/com/uas/console/donate/service/impl/OrgServiceImpl.java

@@ -34,7 +34,7 @@ public class OrgServiceImpl implements OrgService {
 
     //取出机构信息
     public Org show(Long uuid){
-        return orgDao.findOne(uuid);
+        return orgDao.findByUuid(uuid);
     }
 
     //保存机构

+ 373 - 13
donate-console/src/main/webapp/resources/js/index/app.js

@@ -80,6 +80,7 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
             url : '/charityCertificationStep0',
             title : '公益机构认证协议',
             templateUrl : 'static/view/user/charityCertification.html',
+            controller : 'CertificationStep0Ctrl'
         }).state("charityCertificationStep1", {
             url : '/charityCertificationStep1',
             title : '公益机构认证第一步',
@@ -104,6 +105,7 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
             url : '/publicOfferingCertificationStep0',
             title : '公募机构认证协议',
             templateUrl : 'static/view/user/publicOfferingCertification.html',
+            controller : 'CertificationStep0Ctrl'
         }).state("publicOfferingCertificationStep1", {
             url : '/publicOfferingCertificationStep1',
             title : '公募机构认证第一步',
@@ -435,14 +437,154 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
     /**
      * 机构入驻选择
      */
-    app.controller('SelectInstitutionsNatureCtrl', ['$scope', 'toaster', 'Organization',
-        function ($scope, toaster, Organization) {
+    app.controller('SelectInstitutionsNatureCtrl', ['$scope', 'toaster', 'Organization', '$location',
+        function ($scope, toaster, Organization, $location) {
             // 获取当前账户注册机构情况
-            Organization.getByUuid({uuid : 10041166}, {}, function(data) {//10041558
+            Organization.getByUuid({uuid : 222222}, {}, function(data) {//10041558
                 $scope.org = data;
             }, function() {
                 toaster.pop('error', '注册情况加载失败');
             });
+
+            //公益机构注册
+            $scope.registerCharityCertification = function () {
+                if (typeof $scope.org.id == 'undefined') {
+                    $location.path('charityCertificationStep0');
+                } else {
+                    if ($scope.org.type == 2) {
+                        //之前已填写过公益机构注册信息
+                        if ($scope.org.publish != 2) {
+                            //未完成或保存为草稿
+                            $location.path('charityCertificationStep1');
+                        } else {
+                            //发布正式
+                            if ($scope.org.status == 0) {
+                                //已发布待审核 (暂时)
+                                $location.path('charityCertificationStep4');
+                            } else if ($scope.org.status == 1) {
+                                //已发布已审核
+                                $location.path('charityCertificationStep4');
+                            } else if ($scope.org.status == 2) {
+                                //已发布已驳回
+                                $location.path('charityCertificationStep1');
+                            }
+                        }
+                    } else if ($scope.org.type == 1) {
+                        //之前填写过公募机构注册信息
+                        if ($scope.org.publish != 2) {
+                            //未完成或保存为草稿
+                            //TODO 模态框判断
+                            var decideContinue = false;
+                            if (decideContinue) {
+                                //TODO 继续注册公益机构并替换掉之前的公募机构注册信息
+                                $location.path('charityCertificationStep0');
+                            } else {
+                                //TODO 继续之前的公募机构注册信息
+                                toaster.pop('info', '继续之前的公募机构注册信息');
+                                $location.path('publicOfferingCertificationStep1');
+                            }
+                        } else {
+                            //发布正式
+                            if ($scope.org.status == 0) {
+                                //已发布待审核 (暂时)
+                                $location.path('publicOfferingCertificationStep5');
+                            } else if ($scope.org.status == 1) {
+                                //已发布已审核
+                                $location.path('publicOfferingCertificationStep5');
+                            } else if ($scope.org.status == 2) {
+                                //已发布已驳回
+                                $location.path('publicOfferingCertificationStep1');
+                            }
+                        }
+                    }
+                }
+            }
+
+            //公募机构注册
+            $scope.registerPublicOfferingCertification = function () {
+                if (typeof $scope.org.id == 'undefined') {
+                    $location.path('publicOfferingCertificationStep0');
+                } else {
+                    if ($scope.org.type == 1) {
+                        //之前已填写过公募机构注册信息
+                        if ($scope.org.publish != 2) {
+                            //未完成或保存为草稿
+                            $location.path('publicOfferingCertificationStep1');
+                        } else {
+                            //发布正式
+                            if ($scope.org.status == 0) {
+                                //已发布待审核 (暂时)
+                                $location.path('publicOfferingCertificationStep5');
+                            } else if ($scope.org.status == 1) {
+                                //已发布已审核
+                                $location.path('publicOfferingCertificationStep5');
+                            } else if ($scope.org.status == 2) {
+                                //已发布已驳回
+                                $location.path('publicOfferingCertificationStep1');
+                            }
+                        }
+                    } else if ($scope.org.type == 2) {
+                        //之前填写过公益机构注册信息
+                        if ($scope.org.publish != 2) {
+                            //未完成或保存为草稿
+                            //TODO 模态框判断
+                            var decideContinue = false;
+                            if (decideContinue) {
+                                //TODO 继续注册公募机构并替换掉之前的公益机构注册信息
+                                $location.path('publicOfferingCertificationStep0');
+                            } else {
+                                //TODO 继续之前的公益机构注册信息
+                                toaster.pop('info', '继续之前的公益机构注册信息');
+                                $location.path('charityCertificationStep1');
+                            }
+                        } else {
+                            //发布正式
+                            if ($scope.org.status == 0) {
+                                //已发布待审核 (暂时)
+                                $location.path('charityCertificationStep4');
+                            } else if ($scope.org.status == 1) {
+                                //已发布已审核
+                                $location.path('charityCertificationStep4');
+                            } else if ($scope.org.status == 2) {
+                                //已发布已驳回
+                                $location.path('charityCertificationStep1');
+                            }
+                        }
+                    }
+                }
+            }
+
+        }]);
+
+    /**
+     * 机构入驻同意协议
+     */
+    app.controller('CertificationStep0Ctrl', ['$scope', 'toaster', 'Organization', '$location',
+        function ($scope, toaster, Organization, $location) {
+            $scope.checked = false;
+            $scope.changeChecked = function() {
+                $scope.checked = !$scope.checked;
+            };
+
+            $scope.stepNext = function (checked, orgType) {
+                if (checked) {
+                    if (orgType == 1) {
+                        $location.path('publicOfferingCertificationStep1');
+                    } else if (orgType == 2) {
+                        $location.path('charityCertificationStep1');
+                    }
+                }
+            }
+
+            // 获取当前账户注册机构情况
+            Organization.getByUuid({uuid : 222222}, {}, function(data) {//10041558
+                if (typeof data.id == 'undefined') {
+                    return;
+                }
+                $scope.checked = true;
+            }, function() {
+                toaster.pop('error', '注册情况加载失败');
+            });
         }]);
 
     /**
@@ -450,10 +592,20 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
      */
     app.controller('CertificationStep1Ctrl', ['$scope', '$http', '$rootScope', '$timeout', '$location', 'toaster', 'Organization',
         function ($scope, $http, $rootScope, $timeout, $location, toaster, Organization) {
+            // 主要领域
+            // $scope.areas = ['疾病援助', '扶贫/救灾', '教育/助学' , '环境/动物保护', '其他'];
+
+            $scope.org = {
+                majorArea: 1
+            };
 
             var orgCopy;
             // 获取当前账户注册机构情况
-            Organization.getByUuid({uuid : 10041166}, {}, function(data) {//10041558
+            Organization.getByUuid({uuid : 222222}, {}, function(data) {//10041558
+                if (typeof data.id == 'undefined') {
+                    return;
+                }
+
                 $scope.org = data;
                 orgCopy = angular.copy($scope.org);
             }, function() {
@@ -467,9 +619,10 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
                 $scope.provinces = response.data;
             });
 
-            $scope.selectMajorArea = function (index) {
+            // 设置主要领域
+            $scope.selectMajorArea = function(index) {
                 $scope.org.majorArea = index;
-            }
+            };
 
             $scope.openDatePicker = function ($event, item, openParam) {
                 $event.preventDefault();
@@ -532,7 +685,7 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
 
             var orgCopy;
             // 获取当前账户注册机构情况
-            Organization.getByUuid({uuid : 10041166}, {}, function(data) {//10041558
+            Organization.getByUuid({uuid : 222222}, {}, function(data) {//10041558
                 $scope.org = data;
                 orgCopy = angular.copy($scope.org);
             }, function() {
@@ -583,11 +736,18 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
      */
     app.controller('CertificationStep3Ctrl', ['$scope', '$http', '$rootScope', '$timeout', '$location', 'toaster', 'Organization',
         function ($scope, $http, $rootScope, $timeout, $location, toaster, Organization) {
-
             var orgCopy;
             // 获取当前账户注册机构情况
-            Organization.getByUuid({uuid : 10041166}, {}, function(data) {//10041558
+            Organization.getByUuid({uuid : 222222}, {}, function(data) {//10041558
+                if (typeof data.id == 'undefined') {
+                    return;
+                }
                 $scope.org = data;
+                $scope.logoUrl = $scope.org.logo;
+                $scope.personCertificateUrl = $scope.org.personCertificate;
+                $scope.donateCertificateUrl = $scope.org.donateCertificate;
+                $scope.legalIdCardUrl = $scope.org.legalIdCard;
+
                 orgCopy = angular.copy($scope.org);
             }, function() {
                 toaster.pop('error', '注册情况加载失败');
@@ -601,7 +761,7 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
                     $scope.org.branchMessage = "";
                 } else {
                     bankCard = bankCard.toString();
-                    $.getJSON("resources/jsondata/bank.json", {}, function (data) {
+                    $.getJSON("static/jsondata/bank.json", {}, function (data) {
                         var bankBin = 0;
                         var isFind = false;
                         for (var key = 10; key >= 2; key--) {
@@ -626,18 +786,126 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
 
             }
 
+            /*$scope.fileChanged = function(ele, order){
+                if (order == 0) {
+                    $scope.logo = ele.files[0];
+                } else if (order == 1) {
+                    $scope.personCertificate = ele.files[0];
+                } else if (order == 2) {
+                    $scope.donateCertificate = ele.files[0];
+                } else if (order == 3) {
+                    $scope.legalIdCard = ele.files[0];
+                }
+                $scope.$apply();
+            };*/
+
+            //建立一个可存取到该file的url
+            var getObjectURL = function (file) {
+                var url = null;
+                if (window.createObjectURL != undefined) { // basic
+                    url = window.createObjectURL(file);
+                } else if (window.URL != undefined) { // mozilla(firefox)
+                    url = window.URL.createObjectURL(file);
+                } else if (window.webkitURL != undefined) { // webkit or chrome
+                    url = window.webkitURL.createObjectURL(file);
+                }
+                return url;
+            };
+
+            // 图片上传
             $scope.fileChanged = function(ele, order){
                 if (order == 0) {
                     $scope.logo = ele.files[0];
+                    $scope.logoUrl = getObjectURL($scope.logo);
                 } else if (order == 1) {
                     $scope.personCertificate = ele.files[0];
+                    $scope.personCertificateUrl = getObjectURL($scope.personCertificate);
                 } else if (order == 2) {
                     $scope.donateCertificate = ele.files[0];
+                    $scope.donateCertificateUrl = getObjectURL($scope.donateCertificate);
                 } else if (order == 3) {
                     $scope.legalIdCard = ele.files[0];
+                    $scope.legalIdCardUrl = getObjectURL($scope.legalIdCard);
                 }
                 $scope.$apply();
             };
+
+            // 查看范例
+            $scope.showImg = function (type) {
+                var img = null;
+                var imgUrl = null;
+                switch (type) {
+                    case 'logo':
+                        img = $scope.org.logo;
+                        imgUrl = $scope.logoUrl;
+                        break;
+                    case 'personCertificate':
+                        img = $scope.org.personCertificate;
+                        imgUrl = $scope.personCertificateUrl;
+                        break;
+                    case 'donateCertificate':
+                        img = $scope.org.donateCertificate;
+                        imgUrl = $scope.donateCertificateUrl;
+                        break;
+                    case 'legalIdCard':
+                        img = $scope.org.legalIdCard;
+                        imgUrl = $scope.legalIdCardUrl;
+                        break;
+                }
+                if (img) {
+                    var src = img, box = $('#image-box');
+                    box.show();
+                    box.find('img').attr('src', src);
+                    box.find('a').click(function () {
+                        box.hide();
+                    });
+                    box.dblclick(function () {
+                        box.hide();
+                    });
+                } else if (imgUrl != null) {
+                    var src = imgUrl, box = $('#image-box');
+                    box.show();
+                    box.find('img').attr('src', src);
+                    box.find('a').click(function () {
+                        box.hide();
+                    });
+                    box.dblclick(function () {
+                        box.hide();
+                    });
+                }
+            };
+
+            // 删除
+            $scope.clearFile = function (type) {
+                switch (type) {
+                    case 'logo':
+                        $scope.logo = null;
+                        $scope.logoUrl = null;
+                        break;
+                    case 'personCertificate':
+                        $scope.personCertificate = null;
+                        $scope.personCertificateUrl = null;
+                        break;
+                    case 'donateCertificate':
+                        $scope.donateCertificate = null;
+                        $scope.donateCertificateUrl = null;
+                        break;
+                    case 'legalIdCard':
+                        $scope.legalIdCard = null;
+                        $scope.legalIdCardUrl = null;
+                        break;
+                }
+                // 清空input框的内容
+                var file=document.getElementById(type);
+                //IE,Safari,chrome
+                if(file.outerHTML){
+                    file.outerHTML=file.outerHTML;
+                }
+                else{      //FF
+                    file.value="";
+                }
+            };
+
             //提交
             $scope.saveStep3 = function (org, isDraft, orgType) {
                 if (orgCopy == org) {
@@ -703,14 +971,20 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
 
             var orgCopy;
             // 获取当前账户注册机构情况
-            Organization.getByUuid({uuid : 10041166}, {}, function(data) {//10041166  10041558
+            Organization.getByUuid({uuid : 222222}, {}, function(data) {//10041166  10041558
+                if (typeof data.id == 'undefined') {
+                    return;
+                }
                 $scope.org = data;
+                $scope.materialUrl = $scope.org.material;
+                $scope.certifyUrl = $scope.org.certify;
+
                 orgCopy = angular.copy($scope.org);
             }, function() {
                 toaster.pop('error', '注册情况加载失败');
             });
 
-            $scope.fileChanged = function(ele, order){
+            /*$scope.fileChanged = function(ele, order){
                 if (order == 0) {
                     //合作商户资料
                     $scope.material = ele.files[0];
@@ -719,7 +993,93 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
                     $scope.certify = ele.files[0];
                 }
                 $scope.$apply();
-            }
+            }*/
+
+            //建立一个可存取到该file的url
+            var getObjectURL = function (file) {
+                var url = null;
+                if (window.createObjectURL != undefined) { // basic
+                    url = window.createObjectURL(file);
+                } else if (window.URL != undefined) { // mozilla(firefox)
+                    url = window.URL.createObjectURL(file);
+                } else if (window.webkitURL != undefined) { // webkit or chrome
+                    url = window.webkitURL.createObjectURL(file);
+                }
+                return url;
+            };
+
+            // 图片上传
+            $scope.fileChanged = function(ele, order){
+                if (order == 0) {
+                    $scope.material = ele.files[0];
+                    $scope.materialUrl = getObjectURL($scope.material);
+                } else if (order == 1) {
+                    $scope.certify = ele.files[0];
+                    $scope.certifyUrl = getObjectURL($scope.certify);
+                }
+                $scope.$apply();
+            };
+
+            // 查看范例
+            $scope.showImg = function (type) {
+                var img = null;
+                var imgUrl = null;
+                switch (type) {
+                    case 'material':
+                        img = $scope.org.material;
+                        imgUrl = $scope.materialUrl;
+                        break;
+                    case 'certify':
+                        img = $scope.org.certify;
+                        imgUrl = $scope.certifyUrl;
+                        break;
+                }
+                if (img) {
+                    var src = img, box = $('#image-box');
+                    box.show();
+                    box.find('img').attr('src', src);
+                    box.find('a').click(function () {
+                        box.hide();
+                    });
+                    box.dblclick(function () {
+                        box.hide();
+                    });
+                } else if (imgUrl != null) {
+                    var src = imgUrl, box = $('#image-box');
+                    box.show();
+                    box.find('img').attr('src', src);
+                    box.find('a').click(function () {
+                        box.hide();
+                    });
+                    box.dblclick(function () {
+                        box.hide();
+                    });
+                }
+            };
+
+            // 删除
+            $scope.clearFile = function (type) {
+                switch (type) {
+                    case 'material':
+                        $scope.material = null;
+                        $scope.materialUrl = null;
+                        break;
+                    case 'certify':
+                        $scope.certify = null;
+                        $scope.certifyUrl = null;
+                        break;
+                }
+                // 清空input框的内容
+                var file=document.getElementById(type);
+                //IE,Safari,chrome
+                if(file.outerHTML){
+                    file.outerHTML=file.outerHTML;
+                }
+                else{      //FF
+                    file.value="";
+                }
+            };
+
             //提交
             $scope.saveStep4 = function (org, isDraft) {
                 if (orgCopy == org) {

+ 4 - 3
donate-console/src/main/webapp/resources/view/user/charityCertification.html

@@ -408,10 +408,11 @@
                                 </div>
                             </div>
                             <div class="agree clearfix">
-                                <input type="checkbox" class="fl"/>
-                                <div class="fl read"><span>我已经阅读并同意<a href="http://lj.ubtob.com/userAgreement" target="_blank">《优软一元捐用户协议》</a></span></div>
+                                <input type="checkbox" ng-click="changeChecked()" ng-checked="checked" required class="fl">
+
+                                <div class="fl read"><span>我已经阅读并同意<a href="http://lj.ubtob.com/userAgreement">《优软一元捐用户协议》</a></span></div>
                             </div>
-                            <a ui-sref="charityCertificationStep1" class="btn">确定,下一步</a>
+                            <button class="btn" ng-disabled="!checked" ng-click="stepNext(checked, 2)">确定,下一步</button>
                         </div>
                     </div>
                 </div>

+ 50 - 35
donate-console/src/main/webapp/resources/view/user/charityCertification1.html

@@ -491,7 +491,7 @@
 <!--主体内容-->
 <div class="content-wrapper" style="min-height: 924px;; z-index: 50;">
     <!-- Main content -->
-    <form name="charityCertification1" novalidate>
+    <form class="form-horizontal" name="charityCertification1" novalidate>
         <section class="content">
             <div class="container">
                 <div class="section">
@@ -510,37 +510,47 @@
                                 <form action="">
                                     <div class="form-group clearfix">
                                         <label for="" class="fl control-label">优软账号</label>
-                                        <input required="true" type="text" class="fl form-control" ng-maxlength="15" placeholder="请输入企业UU号" ng-model="org.uuid">
+                                        <input required type="text" name="orgUuid" class="fl form-control" ng-maxlength="15" placeholder="请输入企业UU号" ng-model="org.uuid">
+
+                                        <span class="error" ng-show="charityCertification1.orgUuid.$touched && charityCertification1.orgUuid.$error.required">*优软账号不能为空</span>
+
                                     </div>
                                     <div class="form-group clearfix">
                                         <label for="" class="fl control-label">机构全称</label>
-                                        <input required="true" type="text" class="fl form-control" placeholder="请输入机构全称" ng-model="org.name">
+                                        <input required type="text" class="fl form-control" placeholder="请输入机构全称" ng-model="org.name">
                                         <span class="control-help fl">(请填写机构全称,例如:优软公益慈善基金会)</span>
                                     </div>
                                     <div class="form-group clearfix">
                                         <label for="" class="fl control-label">机构电话</label>
                                         <!--验证规则:区号+号码,区号以0开头,3位或4位号码由7位或8位数字组成区号与号码之间可以无连接符,也可以“-”连接
                                         若电话号码与手机号码同时验证:(^(\d{3,4}-)?\d{7,8})$|(13[0-9]{9})-->
-                                        <input required="true" type="text" class="fl form-control" ng-parttern="/^0\d{2,3}-?\d{7,8}$/" ng-model="org.telphone">
+                                        <input required type="text" class="fl form-control" name="orgTelPhone" ng-pattern="/^0\d{2,3}-?\d{7,8}$/" ng-model="org.telphone">
                                         <span class="control-help fl">(请填写机构常用联系电话,例如:0755-26994808)</span>
+                                        <span class="error" ng-show="charityCertification1.orgTelPhone.$touched && charityCertification1.orgTelPhone.$error.required">*机构电话不能为空</span>
+                                        <span class="error" ng-show="ccharityCertification1.orgTelPhone.$touched && charityCertification1.orgTelPhone.$error.pattern">*机构电话不合法</span>
                                     </div>
                                     <div class="form-group clearfix">
                                         <label for="" class="fl control-label">常驻地址</label>
                                         <div class="select-group fl">
-                                            <select required="true" name="" id=""  ng-model="org.province" ng-options="key as key for (key,value) in provinces" ng-change="org.city='';">
+                                            <select required name="orgProvince" ng-model="org.province" ng-options="key as key for (key,value) in provinces" ng-change="org.city='';">
                                                 <option value="">请选择</option>
                                             </select>
                                             <span>省</span>
                                         </div>
                                         <div class="select-group fl">
-                                            <select required="true" name="" id="" ng-model="org.city" ng-options="key as key for (key,value) in provinces[org.province]">
+                                            <select required name="orgCity" ng-model="org.city" ng-options="key as key for (key,value) in provinces[org.province]">
                                                 <option value="">请选择</option>
                                             </select>
                                             <span>市</span>
                                         </div>
                                         <div class="select-group fl">
-                                            <input required="true" type="text" placeholder="详细地址" class="form-control" ng-model="org.address">
+                                            <input required type="text" placeholder="详细地址" class="form-control" name="orgAddress" ng-model="org.address">
                                         </div>
+
+                                        <span class="error" ng-show="charityCertification1.orgProvince.$touched && charityCertification1.orgProvince.$error.required">*请选择省份</span>
+                                        <span class="error" ng-show="charityCertification1.orgCity.$touched && charityCertification1.orgCity.$error.required">*请选择市区</span>
+                                        <span class="error" ng-show="charityCertification1.orgAddress.$touched && charityCertification1.orgAddress.$error.required">*地区不能为空</span>
+
                                     </div>
                                 </form>
                                 <div class="message">
@@ -549,15 +559,17 @@
                                 <form action="">
                                     <div class="form-group clearfix">
                                         <label for="" class="fl control-label">机构登记性质</label>
-                                        <select required="true" name="" id="" class="fl" ng-model="org.regType">
+                                        <select required name="orgRegType" class="fl" ng-model="org.regType">
                                             <option value="">请选择</option>
                                             <option value="公益机构">公益机构</option>
                                         </select>
+
+                                        <span class="error" ng-show="charityCertification1.orgRegType.$touched && charityCertification1.orgRegType.$error.required">*请选择机构登记性质</span>
                                     </div>
                                     <div class="form-group clearfix">
                                         <label for="" class="fl control-label">主要领域</label>
-                                        <div class="area fl" id="choose-major-area"">
-                                        <input required="true" type="text" ng-show="false" ng-model="org.majorArea">
+                                        <div class="area fl" id="choose-major-area">
+                                        <input required type="text" ng-show="false" ng-model="org.majorArea">
                                             <span ng-class="{'active': org.majorArea==1}" ng-click="selectMajorArea(1)">疾病援助</span>
                                             <span ng-class="{'active': org.majorArea==2}" ng-click="selectMajorArea(2)">扶贫/救灾</span>
                                             <span ng-class="{'active': org.majorArea==3}" ng-click="selectMajorArea(3)">教育/助学</span>
@@ -567,81 +579,96 @@
                                     </div>
                                     <div class="form-group clearfix">
                                         <label for="" class="fl control-label">年募捐额</label>
-                                        <select required="true" name="" id="" class="fl" ng-model="org.yearDonationAmount">
+                                        <select required name="" id="" class="fl" ng-model="org.yearDonationAmount">
                                             <option value="">请选择</option>
                                             <option value="100w-1000w">100w-1000w</option>
                                             <option value="1000w-10000w">1000w-10000w</option>
                                             <option value="大于10000w">大于10000w</option>
                                         </select>
                                         <span class="fl control-help">(请选择机构上一年的全年募款金额)</span>
+
+                                        <span class="error" ng-show="charityCertification1.orgRegType.$touched && charityCertification1.orgRegType.$error.required">*请选择机构登记性质</span>
                                     </div>
                                     <div class="form-group clearfix">
                                         <label for="" class="fl control-label">机构规模</label>
                                         <div class="select-group fl">
                                             <span class="count">全职人数</span>
-                                            <select required="true" name="" id="" ng-model="org.fullTimePopulation">
+                                            <select required name="orgFullTimePopulation" ng-model="org.fullTimePopulation">
                                                 <option value="">请选择</option>
                                                 <option value="10-100">10-100</option>
                                                 <option value="100-500">100-500</option>
                                                 <option value="超过500">超过500</option>
                                             </select>
+
+                                            <span class="error" ng-show="charityCertification1.orgFullTimePopulation.$touched && charityCertification1.orgFullTimePopulation.$error.required">*请选择机构规模</span>
                                         </div>
                                         <div class="select-group fl">
                                             <span>兼职人数</span>
-                                            <select required="true" name="" id="" ng-model="org.partTimePopulation">
+                                            <select required name="orgPartTimePopulation" ng-model="org.partTimePopulation">
                                                 <option value="">请选择</option>
                                                 <option value="0-10">0-10</option>
                                                 <option value="10-50">10-50</option>
                                                 <option value="超过50">超过50</option>
                                             </select>
+
+                                            <span class="error" ng-show="charityCertification1.orgPartTimePopulation.$touched && charityCertification1.orgPartTimePopulation.$error.required">*请选择机构兼职人数</span>
                                         </div>
                                         <div class="select-group fl">
                                             <span>志愿者人数</span>
-                                            <select required="true" name="" id="" ng-model="org.voluntaryPopulation">
+                                            <select required name="orgVoluntaryPopulation" ng-model="org.voluntaryPopulation">
                                                 <option value="">请选择</option>
                                                 <option value="0-10">0-10</option>
                                                 <option value="10-50">10-50</option>
                                                 <option value="超过50">超过50</option>
                                             </select>
+
+                                            <span class="error" ng-show="charityCertification1.orgVoluntaryPopulation.$touched && charityCertification1.orgVoluntaryPopulation.$error.required">*请选择机构志愿者人数</span>
                                         </div>
                                     </div>
                                     <div class="form-group input-group input-group-xs input-trigger clearfix">
                                         <label for="" class="fl control-label">成立日期</label>
                                         <!--<input type="text" class="fl form-control" ng-model="org.createTime">-->
-                                        <input type="text" ng-model="org.createTime"
+                                        <input type="text" name="orgCreateTime" ng-model="org.createTime"
                                                class="f1 form-control" placeholder="到"
                                                datepicker-popup="yyyy-MM-dd" is-open="org.$toOpened"
-                                               ng-required="true"
+                                               ng-required
                                                current-text="今天" clear-text="清除" close-text="关闭"
                                                datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
                                                ng-focus="openDatePicker($event, org, '$toOpened')">
-									</span>
+
+                                        <span class="error" ng-show="charityCertification1.orgCreateTime.$touched && charityCertification1.orgCreateTime.$error.required">*请选择机构成立日期</span>
                                     </div>
                                     <div class="form-group clearfix home">
                                         <label for="" class="fl control-label">官方主页</label>
                                         <div class="fl text-left">
-                                            <input required="true" type="text" class="form-control" ng-model="org.website">
+                                            <input required type="text" class="form-control" name="orgWebsite" ng-model="org.website">
                                             <p class="tip">(请填写您的官网地址,或者机构新浪微博地址,没有设置访问权限的QQ空间、微信公众号推送文章链接其中任意一个)</p>
+
+                                            <span class="error" ng-show="charityCertification1.orgWebsite.$touched && charityCertification1.orgWebsite.$error.required">*请填写机构官方主页</span>
                                         </div>
                                     </div>
                                     <div class="form-group clearfix home">
                                         <label for="" class="fl control-label">机构简介</label>
                                         <div class="fl text-left">
-                                            <textarea required="true" name="" id="" cols="30" rows="10" class="fl"
-                                                      ng-model="org.summary"
+                                            <textarea required name="orgSummary" cols="30" rows="10" class="fl"
+                                                      ng-model="org.summary" ng-maxlength="500" ng-minlength="10"
                                                       placeholder="筹款来源、特色项目、服务片区、机构愿景、希望解决的社会问题等"></textarea>
                                             <p class="tip">机构简介建议保持在200~500字。</p>
+
+                                            <span class="error" ng-show="charityCertification1.orgSummary.$touched && charityCertification1.orgSummary.$error.required">*请填写机构简介</span>
+                                            <span class="error" ng-show="charityCertification1.orgSummary.$touched && charityCertification1.orgSummary.$error.maxlength">*机构简介字数过长</span>
+                                            <span class="error" ng-show="charityCertification1.orgSummary.$touched && charityCertification1.orgSummary.$error.minlength">*机构简介字数过少</span>
                                         </div>
                                     </div>
-                                    <div class="form-group clearfix">
+                                    <!--<div class="form-group clearfix">
                                         <label for="" class="fl">验证码</label>
                                         <input type="text" class="form-control valid fl">
                                         <div class="clearfix valida">
                                             <span>BBPf</span><a href="">刷新验证码</a>
                                         </div>
-                                    </div>
+                                    </div>-->
                                     <div class="text-left submitBtn">
-                                        <button type="submit" ng-click="saveStep1(org, 2)" ng-disabled="charityCertification1.$invalid">保存,下一步</button><a href="charityCertificationStep0">返回上一页</a></div>
+                                        <button class="btn" type="button" ng-click="saveStep1(org, 2)" ng-disabled="charityCertification1.$invalid">保存,下一步</button><a ui-sref="charityCertificationStep0">返回上一页</a></div>
                                     <!--<div class="text-left submitBtn"><a href="charityCertification2">保存,下一步</a><a href="charityCertification">返回上一页</a></div>-->
                                 </form>
                             </div>
@@ -660,16 +687,4 @@
         $('.right-list').eq(index).addClass('show').siblings().removeClass('show');
     });
 
-    //选择主要领域
-//    $('#choose-major-area span').on('click', function (event) {
-//        var spans = $('#choose-major-area span');
-//        var indexxx = 0
-//        for (var i=0;i<spans.length;i++) {
-//            $(spans[i]).removeClass('active');
-//            if (event.target.innerHTML == spans[i].innerHTML) {
-//                indexxx = i
-//            }
-//        }
-//        $(event.target).addClass('active');
-//    })
 </script>

+ 1 - 1
donate-console/src/main/webapp/resources/view/user/charityCertification2.html

@@ -551,7 +551,7 @@
                                     <span class="control-help fl">(请填写机构当前联系人电子邮箱)</span>
                                 </div>
                                 <div class="text-left submitBtn" style="margin-top: 55px;">
-                                    <button type="submit" ng-click="saveStep2(org, 2)" ng-disabled="charityCertification2.$invalid">保存,下一步</button>
+                                    <button class="btn" type="button" ng-click="saveStep2(org, 2)" ng-disabled="charityCertification2.$invalid">保存,下一步</button>
                                     <a ui-sref="charityCertificationStep1">返回上一页</a>
                                 </div>
                             </form>

+ 104 - 10
donate-console/src/main/webapp/resources/view/user/charityCertification3.html

@@ -537,42 +537,126 @@
                             <div class="certificate">
                                 <div class="certificate-item clearfix">
                                     <span class="fl">上传机构logo</span>
-                                    <div class="fl uploadImg">
+                                    <!--<div class="fl uploadImg">
                                         <button>上传图片</button>
                                         <input type="file" ng-multiple="false" onchange='angular.element(this).scope().fileChanged(this, 0)'>
                                     </div>
-                                    <img class="fl lookImg" src="{{org.logo}}">
+                                    <img class="fl lookImg" src="{{org.logo}}">-->
+
+                                    <div class="fl uploadImage">
+                                        <div><button>上传图片</button></div>
+                                        <input type="file" accept="image/*" ng-multiple="false" id="logoUrl" onchange='angular.element(this).scope().fileChanged(this, 0)'>
+                                        <a href="">查看样式</a>
+                                        <div ng-if="null != logoUrl" style="max-height: 100px; max-width: 300px">
+                                            <img style="max-height: 100px; max-width: 100px" src="{{logoUrl}}">
+                                            <span class="hover-show">
+                                                <em style="cursor: pointer;" class="delete" title="删除" ng-click="clearFile('logo')">
+                                                    <em class="fa fa-2x fa-trash"></em>
+                                                </em>
+                                                <a ng-click="showImg('logo')" title="点击查看大图">
+                                                    <em class="fa fa-search"></em>查看
+                                                </a>
+                                            </span>
+                                        </div>
+                                        <input type="text" name="logoUrl" ng-show="false" ng-model="logoUrl" required>
+                                        <span class="error" ng-show="charityCertification3.$submitted && charityCertification3.logoUrl.$error.required">*需上传机构logo</span>
+
+                                    </div>
+
                                 </div>
                                 <div class="certificate-item clearfix">
                                     <span class="fl">慈善组织法人登记证书(加盖慈善机构红章)</span>
-                                    <div class="fl uploadImg">
+                                    <!--<div class="fl uploadImg">
                                         <button>上传图片</button>
                                         <input type="file" id="personCertificateImage" ng-multiple="false" onchange='angular.element(this).scope().fileChanged(this, 1)'>
                                         <a href="">查看样式</a>
                                     </div>
-                                    <img class="fl lookImg" src="{{org.personCertificate}}">
+                                    <img class="fl lookImg" src="{{org.personCertificate}}">-->
+
+                                    <div class="fl uploadImage">
+                                        <div><button>上传图片</button></div>
+                                        <input type="file" accept="image/*" ng-multiple="false" onchange='angular.element(this).scope().fileChanged(this, 1)'>
+                                        <a href="">查看样式</a>
+                                        <div ng-if="null != personCertificateUrl" style="max-height: 100px; max-width: 300px">
+                                            <img style="max-height: 100px; max-width: 100px" src="{{personCertificateUrl}}">
+                                            <span class="hover-show">
+                                                <em style="cursor: pointer;" class="delete" title="删除" ng-click="clearFile('personCertificate')">
+                                                    <em class="fa fa-2x fa-trash"></em>
+                                                </em>
+                                                <a ng-click="showImg('personCertificate')" title="点击查看大图">
+                                                    <em class="fa fa-search"></em>查看
+                                                </a>
+                                            </span>
+                                        </div>
+
+                                        <input type="text" name="personCertificateUrl" ng-show="false" ng-model="personCertificateUrl" required>
+                                        <span class="error" ng-show="charityCertification3.$submitted && charityCertification3.personCertificateUrl.$error.required">*需上传慈善组织法人登记证书</span>
+                                    </div>
+
                                 </div>
                                 <div class="certificate-item clearfix">
                                     <span class="fl">慈善组织公开募捐资格证书(加盖机构红章)</span>
-                                    <div class="fl uploadImg">
+                                    <!--<div class="fl uploadImg">
                                         <button>上传图片</button>
                                         <input type="file" id="donateCertificateImage" ng-multiple="false" onchange='angular.element(this).scope().fileChanged(this, 2)'>
                                         <a href="">查看样式</a>
                                     </div>
-                                    <img class="fl lookImg" src="{{org.donateCertificate}}">
+                                    <img class="fl lookImg" src="{{org.donateCertificate}}">-->
+
+                                    <div class="fl uploadImage">
+                                        <div><button>上传图片</button></div>
+                                        <input type="file" accept="image/*" ng-multiple="false" onchange='angular.element(this).scope().fileChanged(this, 2)'>
+                                        <a href="">查看样式</a>
+                                        <div ng-if="null != donateCertificateUrl" style="max-height: 100px; max-width: 300px">
+                                            <img style="max-height: 100px; max-width: 100px" src="{{donateCertificateUrl}}">
+                                            <span class="hover-show">
+                                                <em style="cursor: pointer;" class="delete" title="删除" ng-click="clearFile('donateCertificate')">
+                                                    <em class="fa fa-2x fa-trash"></em>
+                                                </em>
+                                                <a ng-click="showImg('donateCertificate')" title="点击查看大图">
+                                                    <em class="fa fa-search"></em>查看
+                                                </a>
+                                            </span>
+                                        </div>
+
+                                        <input type="text" name="donateCertificateUrl" ng-show="false" ng-model="donateCertificateUrl" required>
+                                        <span class="error" ng-show="charityCertification3.$submitted && charityCertification3.donateCertificateUrl.$error.required">*需上传慈善组织公开募捐资格证书</span>
+                                    </div>
+
                                 </div>
                                 <div class="certificate-item clearfix">
                                     <span class="fl">法人身份证(加盖机构红章)</span>
-                                    <div class="fl uploadImg">
+                                    <!--<div class="fl uploadImg">
                                         <button>上传图片</button>
                                         <input type="file" id="legalIdCardImage" ng-multiple="false" onchange='angular.element(this).scope().fileChanged(this, 3)'>
                                         <a href="">查看样式</a>
                                     </div>
-                                    <img class="fl lookImg" src="{{org.legalIdCard}}">
+                                    <img class="fl lookImg" src="{{org.legalIdCard}}">-->
+
+                                    <div class="fl uploadImage">
+                                        <div><button>上传图片</button></div>
+                                        <input type="file" accept="image/*" ng-multiple="false" onchange='angular.element(this).scope().fileChanged(this, 3)'>
+                                        <a href="">查看样式</a>
+                                        <div ng-if="null != legalIdCardUrl" style="max-height: 100px; max-width: 300px">
+                                            <img style="max-height: 100px; max-width: 100px" src="{{legalIdCardUrl}}">
+                                            <span class="hover-show">
+                                                <em style="cursor: pointer;" class="delete" title="删除" ng-click="clearFile('legalIdCard')">
+                                                    <em class="fa fa-2x fa-trash"></em>
+                                                </em>
+                                                <a ng-click="showImg('legalIdCard')" title="点击查看大图">
+                                                    <em class="fa fa-search"></em>查看
+                                                </a>
+                                            </span>
+                                        </div>
+
+                                        <input type="text" name="legalIdCardUrl" ng-show="false" ng-model="legalIdCardUrl" required>
+                                        <span class="error" ng-show="charityCertification3.$submitted && charityCertification3.legalIdCardUrl.$error.required">*需上传法人身份证</span>
+                                    </div>
+
                                 </div>
                                 <div class="text-left submitBtn" style="margin-top: 75px;">
-                                    <button type="submit" ng-click="saveStep3(org, true, 2)" ng-disabled="charityCertification3.$invalid">保存,下一步</button>
-                                    <button type="submit" ng-click="saveStep3(org, false, 2)" ng-disabled="charityCertification3.$invalid">提交</button>
+                                    <button class="btn" type="submit" ng-click="saveStep3(org, true, 2)" ng-disabled="charityCertification3.$invalid">保存,下一步</button>
+                                    <button class="btn" type="submit" ng-click="saveStep3(org, false, 2)" ng-disabled="charityCertification3.$invalid">提交</button>
                                     <a ui-sref="charityCertificationStep2">返回上一页</a>
                                 </div>
                             </div>
@@ -584,6 +668,16 @@
     </section>
     </form>
 </div>
+<!--查看大图-->
+<div id="image-box" style="display: none;">
+    <div class="x-close-wrap" title="关闭">
+        <a href="javascript:void(0);">&times;</a>
+    </div>
+    <div class="x-floating-wrap"></div>
+    <div class="x-floating">
+        <img/>
+    </div>
+</div>
 
 <script>
     $('.right-nav').on('click', 'span', function () {

+ 4 - 3
donate-console/src/main/webapp/resources/view/user/publicOfferingCertification.html

@@ -533,10 +533,11 @@
                                 </div>
                             </div>
                             <div class="agree clearfix">
-                                <input type="checkbox" class="fl"/>
-                                <div class="fl read"><span>我已经阅读并同意<a href="http://lj.ubtob.com/userAgreement" target="_blank">《优软一元捐用户协议》</a></span></div>
+                                <input type="checkbox" ng-click="changeChecked()" ng-checked="checked" required class="fl">
+                                <div class="fl read"><span>我已经阅读并同意<a href="http://lj.ubtob.com/userAgreement">《优软一元捐用户协议》</a></span></div>
                             </div>
-                            <a ui-sref="publicOfferingCertificationStep1" class="btn">确定,下一步</a>
+                            <button class="btn" ng-disabled="!checked" ng-click="stepNext(checked, 1)">确定,下一步</button>
+
                         </div>
                     </div>
                 </div>

+ 54 - 23
donate-console/src/main/webapp/resources/view/user/publicOfferingCertification1.html

@@ -545,37 +545,47 @@
                             <form action="">
                                 <div class="form-group clearfix">
                                     <label for="" class="fl control-label">优软账号</label>
-                                    <input required="true" type="text" class="fl form-control" ng-maxlength="15" placeholder="请输入企业UU号" ng-model="org.uuid">
+                                    <input required type="text" name="orgUuid" class="fl form-control" ng-maxlength="15" placeholder="请输入企业UU号" ng-model="org.uuid">
+
+                                    <span class="error" ng-show="publicOfferingCertification1.orgUuid.$touched && publicOfferingCertification1.orgUuid.$error.required">*优软账号不能为空</span>
+
                                 </div>
                                 <div class="form-group clearfix">
                                     <label for="" class="fl control-label">机构全称</label>
-                                    <input required="true" type="text" class="fl form-control" placeholder="请输入机构全称" ng-model="org.name">
+                                    <input required type="text" class="fl form-control" placeholder="请输入机构全称" ng-model="org.name">
                                     <span class="control-help fl">(请填写机构全称,例如:优软公益慈善基金会)</span>
                                 </div>
                                 <div class="form-group clearfix">
                                     <label for="" class="fl control-label">机构电话</label>
                                     <!--验证规则:区号+号码,区号以0开头,3位或4位号码由7位或8位数字组成区号与号码之间可以无连接符,也可以“-”连接
                                     若电话号码与手机号码同时验证:(^(\d{3,4}-)?\d{7,8})$|(13[0-9]{9})-->
-                                    <input required="true" type="text" class="fl form-control" ng-parttern="/^0\d{2,3}-?\d{7,8}$/" ng-model="org.telphone">
+                                    <input required type="text" class="fl form-control" name="orgTelPhone" ng-pattern="/^0\d{2,3}-?\d{7,8}$/" ng-model="org.telphone">
                                     <span class="control-help fl">(请填写机构常用联系电话,例如:0755-26994808)</span>
+                                    <span class="error" ng-show="publicOfferingCertification1.orgTelPhone.$touched && publicOfferingCertification1.orgTelPhone.$error.required">*机构电话不能为空</span>
+                                    <span class="error" ng-show="cpublicOfferingCertification1.orgTelPhone.$touched && publicOfferingCertification1.orgTelPhone.$error.pattern">*机构电话不合法</span>
                                 </div>
                                 <div class="form-group clearfix">
                                     <label for="" class="fl control-label">常驻地址</label>
                                     <div class="select-group fl">
-                                        <select required="true" name="" id=""  ng-model="org.province" ng-options="key as key for (key,value) in provinces" ng-change="org.city='';">
+                                        <select required name="orgProvince" ng-model="org.province" ng-options="key as key for (key,value) in provinces" ng-change="org.city='';">
                                             <option value="">请选择</option>
                                         </select>
                                         <span>省</span>
                                     </div>
                                     <div class="select-group fl">
-                                        <select required="true" name="" id="" ng-model="org.city" ng-options="key as key for (key,value) in provinces[org.province]">
+                                        <select required name="orgCity" ng-model="org.city" ng-options="key as key for (key,value) in provinces[org.province]">
                                             <option value="">请选择</option>
                                         </select>
                                         <span>市</span>
                                     </div>
                                     <div class="select-group fl">
-                                        <input required="true" type="text" placeholder="详细地址" class="form-control" ng-model="org.address">
+                                        <input required type="text" placeholder="详细地址" class="form-control" name="orgAddress" ng-model="org.address">
                                     </div>
+
+                                    <span class="error" ng-show="publicOfferingCertification1.orgProvince.$touched && publicOfferingCertification1.orgProvince.$error.required">*请选择省份</span>
+                                    <span class="error" ng-show="publicOfferingCertification1.orgCity.$touched && publicOfferingCertification1.orgCity.$error.required">*请选择市区</span>
+                                    <span class="error" ng-show="publicOfferingCertification1.orgAddress.$touched && publicOfferingCertification1.orgAddress.$error.required">*地区不能为空</span>
+
                                 </div>
                             </form>
                             <div class="message">
@@ -584,95 +594,116 @@
                             <form action="">
                                 <div class="form-group clearfix">
                                     <label for="" class="fl control-label">机构登记性质</label>
-                                    <select required="true" name="" id="" class="fl" ng-model="org.regType">
+                                    <select required name="orgRegType" class="fl" ng-model="org.regType">
                                         <option value="">请选择</option>
                                         <option value="公益机构">公益机构</option>
                                     </select>
+
+                                    <span class="error" ng-show="publicOfferingCertification1.orgRegType.$touched && publicOfferingCertification1.orgRegType.$error.required">*请选择机构登记性质</span>
                                 </div>
                                 <div class="form-group clearfix">
                                     <label for="" class="fl control-label">主要领域</label>
-                                    <div class="area fl" ng-model="org.majorArea">
-                                        <span class="active">疾病援助</span><span>扶贫/救灾</span><span>教育/助学</span><span>环境/动物保护</span><span>其他</span>
+                                    <div class="area fl" id="choose-major-area">
+                                        <input required type="text" ng-show="false" ng-model="org.majorArea">
+                                        <span ng-class="{'active': org.majorArea==1}" ng-click="selectMajorArea(1)">疾病援助</span>
+                                        <span ng-class="{'active': org.majorArea==2}" ng-click="selectMajorArea(2)">扶贫/救灾</span>
+                                        <span ng-class="{'active': org.majorArea==3}" ng-click="selectMajorArea(3)">教育/助学</span>
+                                        <span ng-class="{'active': org.majorArea==4}" ng-click="selectMajorArea(4)">环境/动物保护</span>
+                                        <span ng-class="{'active': org.majorArea==5}" ng-click="selectMajorArea(5)">其他</span>
                                     </div>
                                 </div>
                                 <div class="form-group clearfix">
                                     <label for="" class="fl control-label">年募捐额</label>
-                                    <select required="true" name="" id="" class="fl" ng-model="org.yearDonationAmount">
+                                    <select required name="" id="" class="fl" ng-model="org.yearDonationAmount">
                                         <option value="">请选择</option>
                                         <option value="100w-1000w">100w-1000w</option>
                                         <option value="1000w-10000w">1000w-10000w</option>
                                         <option value="大于10000w">大于10000w</option>
                                     </select>
                                     <span class="fl control-help">(请选择机构上一年的全年募款金额)</span>
+
+                                    <span class="error" ng-show="publicOfferingCertification1.orgRegType.$touched && publicOfferingCertification1.orgRegType.$error.required">*请选择机构登记性质</span>
                                 </div>
                                 <div class="form-group clearfix">
                                     <label for="" class="fl control-label">机构规模</label>
                                     <div class="select-group fl">
                                         <span class="count">全职人数</span>
-                                        <select required="true" name="" id="" ng-model="org.fullTimePopulation">
+                                        <select required name="orgFullTimePopulation" ng-model="org.fullTimePopulation">
                                             <option value="">请选择</option>
                                             <option value="10-100">10-100</option>
                                             <option value="100-500">100-500</option>
                                             <option value="超过500">超过500</option>
                                         </select>
+
+                                        <span class="error" ng-show="publicOfferingCertification1.orgFullTimePopulation.$touched && publicOfferingCertification1.orgFullTimePopulation.$error.required">*请选择机构规模</span>
                                     </div>
                                     <div class="select-group fl">
                                         <span>兼职人数</span>
-                                        <select required="true" name="" id="" ng-model="org.partTimePopulation">
+                                        <select required name="orgPartTimePopulation" ng-model="org.partTimePopulation">
                                             <option value="">请选择</option>
                                             <option value="0-10">0-10</option>
                                             <option value="10-50">10-50</option>
                                             <option value="超过50">超过50</option>
                                         </select>
+
+                                        <span class="error" ng-show="publicOfferingCertification1.orgPartTimePopulation.$touched && publicOfferingCertification1.orgPartTimePopulation.$error.required">*请选择机构兼职人数</span>
                                     </div>
                                     <div class="select-group fl">
                                         <span>志愿者人数</span>
-                                        <select required="true" name="" id="" ng-model="org.voluntaryPopulation">
+                                        <select required name="orgVoluntaryPopulation" ng-model="org.voluntaryPopulation">
                                             <option value="">请选择</option>
                                             <option value="0-10">0-10</option>
                                             <option value="10-50">10-50</option>
                                             <option value="超过50">超过50</option>
                                         </select>
+
+                                        <span class="error" ng-show="publicOfferingCertification1.orgVoluntaryPopulation.$touched && publicOfferingCertification1.orgVoluntaryPopulation.$error.required">*请选择机构志愿者人数</span>
                                     </div>
                                 </div>
                                 <div class="form-group input-group input-group-xs input-trigger clearfix">
                                     <label for="" class="fl control-label">成立日期</label>
                                     <!--<input type="text" class="fl form-control" ng-model="org.createTime">-->
-                                    <input type="text" ng-model="org.createTime"
+                                    <input type="text" name="orgCreateTime" ng-model="org.createTime"
                                            class="f1 form-control" placeholder="到"
                                            datepicker-popup="yyyy-MM-dd" is-open="org.$toOpened"
-                                           ng-required="true"
+                                           ng-required
                                            current-text="今天" clear-text="清除" close-text="关闭"
                                            datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
                                            ng-focus="openDatePicker($event, org, '$toOpened')">
-                                    </span>
+
+                                    <span class="error" ng-show="publicOfferingCertification1.orgCreateTime.$touched && publicOfferingCertification1.orgCreateTime.$error.required">*请选择机构成立日期</span>
                                 </div>
                                 <div class="form-group clearfix home">
                                     <label for="" class="fl control-label">官方主页</label>
                                     <div class="fl text-left">
-                                        <input required="true" type="text" class="form-control" ng-model="org.website">
+                                        <input required type="text" class="form-control" name="orgWebsite" ng-model="org.website">
                                         <p class="tip">(请填写您的官网地址,或者机构新浪微博地址,没有设置访问权限的QQ空间、微信公众号推送文章链接其中任意一个)</p>
+
+                                        <span class="error" ng-show="publicOfferingCertification1.orgWebsite.$touched && publicOfferingCertification1.orgWebsite.$error.required">*请填写机构官方主页</span>
                                     </div>
                                 </div>
                                 <div class="form-group clearfix home">
                                     <label for="" class="fl control-label">机构简介</label>
                                     <div class="fl text-left">
-                                            <textarea required="true" name="" id="" cols="30" rows="10" class="fl"
-                                                      ng-model="org.summary"
+                                            <textarea required name="orgSummary" cols="30" rows="10" class="fl"
+                                                      ng-model="org.summary" ng-maxlength="500" ng-minlength="10"
                                                       placeholder="筹款来源、特色项目、服务片区、机构愿景、希望解决的社会问题等"></textarea>
                                         <p class="tip">机构简介建议保持在200~500字。</p>
+
+                                        <span class="error" ng-show="publicOfferingCertification1.orgSummary.$touched && publicOfferingCertification1.orgSummary.$error.required">*请填写机构简介</span>
+                                        <span class="error" ng-show="publicOfferingCertification1.orgSummary.$touched && publicOfferingCertification1.orgSummary.$error.maxlength">*机构简介字数过长</span>
+                                        <span class="error" ng-show="publicOfferingCertification1.orgSummary.$touched && publicOfferingCertification1.orgSummary.$error.minlength">*机构简介字数过少</span>
                                     </div>
                                 </div>
-                                <div class="form-group clearfix">
+                                <!--<div class="form-group clearfix">
                                     <label for="" class="fl">验证码</label>
                                     <input type="text" class="form-control valid fl">
                                     <div class="clearfix valida">
                                         <span>BBPf</span><a href="">刷新验证码</a>
                                     </div>
-                                </div>
+                                </div>-->
                                 <div class="text-left submitBtn">
-                                    <button type="submit" ng-click="saveStep1(org, 1)" ng-disabled="publicOfferingCertification1.$invalid">保存,下一步</button>
-                                    <a ui-sref="publicOfferingCertificationStep0">返回上一页</a></div>
+                                    <button class="btn" type="button" ng-click="saveStep1(org, 1)" ng-disabled="publicOfferingCertification1.$invalid">保存,下一步</button><a ui-sref="charityCertificationStep0">返回上一页</a></div>
                                 <!--<div class="text-left submitBtn"><a href="charityCertification2">保存,下一步</a><a href="charityCertification">返回上一页</a></div>-->
                             </form>
                         </div>

+ 1 - 1
donate-console/src/main/webapp/resources/view/user/publicOfferingCertification2.html

@@ -586,7 +586,7 @@
                                     <span class="control-help fl">(请填写机构当前联系人电子邮箱)</span>
                                 </div>
                                 <div class="text-left submitBtn" style="margin-top: 55px;">
-                                    <button type="submit" ng-click="saveStep2(org, 1)" ng-disabled="publicOfferingCertification2.$invalid">保存,下一步</button>
+                                    <button class="btn" type="button" ng-click="saveStep2(org, 1)" ng-disabled="publicOfferingCertification2.$invalid">保存,下一步</button>
                                     <a ui-sref="publicOfferingCertificationStep1">返回上一页</a>
                                 </div>
                             </form>

+ 103 - 9
donate-console/src/main/webapp/resources/view/user/publicOfferingCertification3.html

@@ -553,41 +553,125 @@
                             <div class="certificate">
                                 <div class="certificate-item clearfix">
                                     <span class="fl">上传机构logo</span>
-                                    <div class="fl uploadImg">
+                                    <!--<div class="fl uploadImg">
                                         <button>上传图片</button>
                                         <input type="file" ng-multiple="false" onchange='angular.element(this).scope().fileChanged(this, 0)'>
                                     </div>
-                                    <img class="fl lookImg" src="{{org.logo}}">
+                                    <img class="fl lookImg" src="{{org.logo}}">-->
+
+                                    <div class="fl uploadImage">
+                                        <div><button>上传图片</button><span>(160*160)</span></div>
+                                        <input type="file" accept="image/*" ng-multiple="false" id="logoUrl" onchange='angular.element(this).scope().fileChanged(this, 0)'>
+                                        <a href="">查看样式</a>
+                                        <div ng-if="null != logoUrl" style="max-height: 100px; max-width: 300px">
+                                            <img style="max-height: 100px; max-width: 100px" src="{{logoUrl}}">
+                                            <span class="hover-show">
+                                                <em style="cursor: pointer;" class="delete" title="删除" ng-click="clearFile('logo')">
+                                                    <em class="fa fa-2x fa-trash"></em>
+                                                </em>
+                                                <a ng-click="showImg('logo')" title="点击查看大图">
+                                                    <em class="fa fa-search"></em>查看
+                                                </a>
+                                            </span>
+                                        </div>
+                                        <input type="text" ng-show="false" ng-model="logoUrl" required>
+                                        <span class="error" ng-show="publicOfferingCertification3.$submitted && publicOfferingCertification3.logoUrl.$error.required">*需上传机构logo</span>
+
+                                    </div>
+
                                 </div>
                                 <div class="certificate-item clearfix">
                                     <span class="fl">慈善组织法人登记证书(加盖慈善机构红章)</span>
-                                    <div class="fl uploadImg">
+                                    <!--<div class="fl uploadImg">
                                         <button>上传图片</button>
                                         <input type="file" id="personCertificateImage" ng-multiple="false" onchange='angular.element(this).scope().fileChanged(this, 1)'>
                                         <a href="">查看样式</a>
                                     </div>
-                                    <img class="fl lookImg" src="{{org.personCertificate}}">
+                                    <img class="fl lookImg" src="{{org.personCertificate}}">-->
+
+                                    <div class="fl uploadImage">
+                                        <div><button>上传图片</button><span>(160*160)</span></div>
+                                        <input type="file" accept="image/*" ng-multiple="false" onchange='angular.element(this).scope().fileChanged(this, 1)'>
+                                        <a href="">查看样式</a>
+                                        <div ng-if="null != personCertificateUrl" style="max-height: 100px; max-width: 300px">
+                                            <img style="max-height: 100px; max-width: 100px" src="{{personCertificateUrl}}">
+                                            <span class="hover-show">
+                                                <em style="cursor: pointer;" class="delete" title="删除" ng-click="clearFile('personCertificate')">
+                                                    <em class="fa fa-2x fa-trash"></em>
+                                                </em>
+                                                <a ng-click="showImg('personCertificate')" title="点击查看大图">
+                                                    <em class="fa fa-search"></em>查看
+                                                </a>
+                                            </span>
+                                        </div>
+
+                                        <input type="text" ng-show="false" ng-model="personCertificateUrl" required>
+                                        <span class="error" ng-show="publicOfferingCertification3.$submitted && publicOfferingCertification3.personCertificateUrl.$error.required">*需上传慈善组织法人登记证书</span>
+                                    </div>
+
                                 </div>
                                 <div class="certificate-item clearfix">
                                     <span class="fl">慈善组织公开募捐资格证书(加盖机构红章)</span>
-                                    <div class="fl uploadImg">
+                                    <!--<div class="fl uploadImg">
                                         <button>上传图片</button>
                                         <input type="file" id="donateCertificateImage" ng-multiple="false" onchange='angular.element(this).scope().fileChanged(this, 2)'>
                                         <a href="">查看样式</a>
                                     </div>
-                                    <img class="fl lookImg" src="{{org.donateCertificate}}">
+                                    <img class="fl lookImg" src="{{org.donateCertificate}}">-->
+
+                                    <div class="fl uploadImage">
+                                        <div><button>上传图片</button><span>(160*160)</span></div>
+                                        <input type="file" accept="image/*" ng-multiple="false" onchange='angular.element(this).scope().fileChanged(this, 2)'>
+                                        <a href="">查看样式</a>
+                                        <div ng-if="null != donateCertificateUrl" style="max-height: 100px; max-width: 300px">
+                                            <img style="max-height: 100px; max-width: 100px" src="{{donateCertificateUrl}}">
+                                            <span class="hover-show">
+                                                <em style="cursor: pointer;" class="delete" title="删除" ng-click="clearFile('donateCertificate')">
+                                                    <em class="fa fa-2x fa-trash"></em>
+                                                </em>
+                                                <a ng-click="showImg('donateCertificate')" title="点击查看大图">
+                                                    <em class="fa fa-search"></em>查看
+                                                </a>
+                                            </span>
+                                        </div>
+
+                                        <input type="text" ng-show="false" ng-model="donateCertificateUrl" required>
+                                        <span class="error" ng-show="publicOfferingCertification3.$submitted && publicOfferingCertification3.donateCertificateUrl.$error.required">*需上传慈善组织公开募捐资格证书</span>
+                                    </div>
+
                                 </div>
                                 <div class="certificate-item clearfix">
                                     <span class="fl">法人身份证(加盖机构红章)</span>
-                                    <div class="fl uploadImg">
+                                    <!--<div class="fl uploadImg">
                                         <button>上传图片</button>
                                         <input type="file" id="legalIdCardImage" ng-multiple="false" onchange='angular.element(this).scope().fileChanged(this, 3)'>
                                         <a href="">查看样式</a>
                                     </div>
-                                    <img class="fl lookImg" src="{{org.legalIdCard}}">
+                                    <img class="fl lookImg" src="{{org.legalIdCard}}">-->
+
+                                    <div class="fl uploadImage">
+                                        <div><button>上传图片</button><span>(160*160)</span></div>
+                                        <input type="file" accept="image/*" ng-multiple="false" onchange='angular.element(this).scope().fileChanged(this, 3)'>
+                                        <a href="">查看样式</a>
+                                        <div ng-if="null != legalIdCardUrl" style="max-height: 100px; max-width: 300px">
+                                            <img style="max-height: 100px; max-width: 100px" src="{{legalIdCardUrl}}">
+                                            <span class="hover-show">
+                                                <em style="cursor: pointer;" class="delete" title="删除" ng-click="clearFile('legalIdCard')">
+                                                    <em class="fa fa-2x fa-trash"></em>
+                                                </em>
+                                                <a ng-click="showImg('legalIdCard')" title="点击查看大图">
+                                                    <em class="fa fa-search"></em>查看
+                                                </a>
+                                            </span>
+                                        </div>
+
+                                        <input type="text" ng-show="false" ng-model="legalIdCardUrl" required>
+                                        <span class="error" ng-show="publicOfferingCertification3.$submitted && publicOfferingCertification3.legalIdCardUrl.$error.required">*需上传法人身份证</span>
+                                    </div>
+
                                 </div>
                                 <div class="text-left submitBtn" style="margin-top: 75px;">
-                                    <button type="submit" ng-click="saveStep3(org, true, 1)" ng-disabled="publicOfferingCertification3.$invalid">保存,下一步</button>
+                                    <button class="btn" type="button" ng-click="saveStep3(org, true, 1)" ng-disabled="publicOfferingCertification3.$invalid">保存,下一步</button>
                                     <a ui-sref="publicOfferingCertificationStep2">返回上一页</a>
                                 </div>
                             </div>
@@ -600,6 +684,16 @@
     </form>
 </div>
 
+<!--查看大图-->
+<div id="image-box" style="display: none;">
+    <div class="x-close-wrap" title="关闭">
+        <a href="javascript:void(0);">&times;</a>
+    </div>
+    <div class="x-floating-wrap"></div>
+    <div class="x-floating">
+        <img/>
+    </div>
+</div>
 
 <script>
     $('.right-nav').on('click', 'span', function () {

+ 57 - 4
donate-console/src/main/webapp/resources/view/user/publicOfferingCertification4.html

@@ -558,23 +558,65 @@
                                 </div>
                                 <div class="certificate-item item clearfix">
                                     <span class="fl name">XXX合作商户资料</span>
-                                    <div class="fl uploadImg">
+                                    <!--<div class="fl uploadImg">
                                         <button>上传图片</button>
                                         <input type="file" ng-multiple="false" onchange='angular.element(this).scope().fileChanged(this, 0)'>
                                         <a href="">下载模板</a>
                                         <span class="txt-info">(请根据模板要求填写对应内容)</span>
                                     </div>
-                                    <img class="fl lookImg" src="{{org.material}}">
+                                    <img class="fl lookImg" src="{{org.material}}">-->
+
+                                    <div class="fl uploadImage">
+                                        <div><button>上传图片</button></div>
+                                        <input type="file" accept="image/*" ng-multiple="false" onchange='angular.element(this).scope().fileChanged(this, 0)'>
+                                        <a href="">下载模板</a>
+                                        <div ng-if="null != materialUrl" style="max-height: 100px; max-width: 300px">
+                                            <img style="max-height: 100px; max-width: 100px" src="{{materialUrl}}">
+                                            <span class="hover-show">
+                                                <em style="cursor: pointer;" class="delete" title="删除" ng-click="clearFile('material')">
+                                                    <em class="fa fa-2x fa-trash"></em>
+                                                </em>
+                                                <a ng-click="showImg('material')" title="点击查看大图">
+                                                    <em class="fa fa-search"></em>查看
+                                                </a>
+                                            </span>
+                                        </div>
+
+                                        <input type="text" name="materialUrl" ng-show="false" ng-model="materialUrl" required>
+                                        <span class="error" ng-show="publicOfferingCertification4.$submitted && publicOfferingCertification4.materialUrl.$error.required">*需上传XXX合作商户资料</span>
+                                    </div>
+
                                 </div>
                                 <div class="certificate-item item clearfix">
                                     <span class="fl name">XXX结算银行账号证明</span>
-                                    <div class="fl uploadImg">
+                                    <!--<div class="fl uploadImg">
                                         <button>上传图片</button>
                                         <input type="file" ng-multiple="false" onchange='angular.element(this).scope().fileChanged(this, 1)'>
                                         <a href="">下载模板</a>
                                         <span class="txt-info">(请根据模板要求填写对应内容)</span>
                                     </div>
-                                    <img class="fl lookImg" src="{{org.certify}}">
+                                    <img class="fl lookImg" src="{{org.certify}}">-->
+
+                                    <div class="fl uploadImage">
+                                        <div><button>上传图片</button></div>
+                                        <input type="file" accept="image/*" ng-multiple="false" onchange='angular.element(this).scope().fileChanged(this, 1)'>
+                                        <a href="">下载模板</a>
+                                        <div ng-if="null != certifyUrl" style="max-height: 100px; max-width: 300px">
+                                            <img style="max-height: 100px; max-width: 100px" src="{{certifyUrl}}">
+                                            <span class="hover-show">
+                                                <em style="cursor: pointer;" class="delete" title="删除" ng-click="clearFile('certify')">
+                                                    <em class="fa fa-2x fa-trash"></em>
+                                                </em>
+                                                <a ng-click="showImg('certify')" title="点击查看大图">
+                                                    <em class="fa fa-search"></em>查看
+                                                </a>
+                                            </span>
+                                        </div>
+
+                                        <input type="text" name="certifyUrl" ng-show="false" ng-model="certifyUrl" required>
+                                        <span class="error" ng-show="publicOfferingCertification4.$submitted && publicOfferingCertification4.certifyUrl.$error.required">*需上传XXX合作商户资料</span>
+                                    </div>
+
                                 </div>
                                 <div class="important-txt text-left">
                                     <p>重要说明:</p>
@@ -596,6 +638,17 @@
     </form>
 </div>
 
+<!--查看大图-->
+<div id="image-box" style="display: none;">
+    <div class="x-close-wrap" title="关闭">
+        <a href="javascript:void(0);">&times;</a>
+    </div>
+    <div class="x-floating-wrap"></div>
+    <div class="x-floating">
+        <img/>
+    </div>
+</div>
+
 <script>
     $('.right-nav').on('click', 'span', function () {
         var index = $(this).index();

+ 2 - 53
donate-console/src/main/webapp/resources/view/user/selectInstitutionsNature.html

@@ -100,67 +100,16 @@
                     <p class="choose-txt">请选择适合您的身份,完成以下注册和认证,以便快速发布公益项目。</p>
                     <div class="choose-about">
                         <div class="choose-item">
-                            <a ng-if="org.id == null || org.publish == 1" ui-sref="charityCertificationStep0">
+                            <a ng-click="registerCharityCertification()">
                                 <div class="img">
                                     <img src="static/images/non-public.png" alt=""/>
                                 </div>
                                 <p>公益机构</p>
                                 <span>适合慈善组织(务公开募捐资格证书)、民办非企业单位、社会团体、企业等,不具备直接面向公众募捐的性质</span>
                             </a>
-
-                            <a ng-if="org.publish == 2 && org.status == 0" ui-sref="charityCertificationStep4"><!--跳到待审核页面-->
-                                <div class="img">
-                                    <img src="static/images/non-public.png" alt=""/>
-                                </div>
-                                <p>公益机构</p>
-                                <span>适合慈善组织(务公开募捐资格证书)、民办非企业单位、社会团体、企业等,不具备直接面向公众募捐的性质</span>
-                            </a>
-
-                            <a ng-if="org.publish == 2 && org.status == 1" ui-sref="charityCertificationStep4"><!--跳到已批准页面-->
-                                <div class="img">
-                                    <img src="static/images/non-public.png" alt=""/>
-                                </div>
-                                <p>公益机构</p>
-                                <span>适合慈善组织(务公开募捐资格证书)、民办非企业单位、社会团体、企业等,不具备直接面向公众募捐的性质</span>
-                            </a>
-
-                            <a ng-if="org.publish == 2 && org.status == 2" href="#"><!--跳到批准不通过页面-->
-                                <div class="img">
-                                    <img src="static/images/non-public.png" alt=""/>
-                                </div>
-                                <p>公益机构</p>
-                                <span>适合慈善组织(务公开募捐资格证书)、民办非企业单位、社会团体、企业等,不具备直接面向公众募捐的性质</span>
-                            </a>
-
-
-
                         </div>
                         <div class="choose-item">
-                            <a ng-if="org.id == null || org.publish == 1" ui-sref="publicOfferingCertificationStep0">
-                                <div class="img">
-                                    <img src="static/images/public.png" alt=""/>
-                                </div>
-                                <p>慈善组织(公募)</p>
-                                <span>适合民证部批准,持有法人登记证书、公开募捐资格证书,具备向公众募捐集资金性质的公募基金会。</span>
-                            </a>
-
-                            <a ng-if="org.publish == 2 && org.status == 0" ui-sref="publicOfferingCertificationStep5">
-                                <div class="img">
-                                    <img src="static/images/public.png" alt=""/>
-                                </div>
-                                <p>慈善组织(公募)</p>
-                                <span>适合民证部批准,持有法人登记证书、公开募捐资格证书,具备向公众募捐集资金性质的公募基金会。</span>
-                            </a>
-
-                            <a ng-if="org.publish == 2 && org.status == 1" ui-sref="publicOfferingCertificationStep5">
-                                <div class="img">
-                                    <img src="static/images/public.png" alt=""/>
-                                </div>
-                                <p>慈善组织(公募)</p>
-                                <span>适合民证部批准,持有法人登记证书、公开募捐资格证书,具备向公众募捐集资金性质的公募基金会。</span>
-                            </a>
-
-                            <a ng-if="org.publish == 2 && org.status == 2" href="#">
+                            <a ng-click="registerPublicOfferingCertification()">
                                 <div class="img">
                                     <img src="static/images/public.png" alt=""/>
                                 </div>

+ 2 - 41
donate-service/src/main/java/com/uas/service/donate/controller/AlipayController.java

@@ -217,34 +217,6 @@ public class AlipayController {
 
     }
 
-    /**
-     * 创建订单
-     */
-/*    @ResponseBody
-    @RequestMapping("/tradeCreate")
-    public String tradeCreate(){
-        String outTradeNo = NumberGenerator.generateId();
-
-        String notifyUrl = AlipayConfig.notify_url;
-
-        AlipayTradeCreateModel model = new AlipayTradeCreateModel();
-        model.setTimeoutExpress("2m");//该笔订单允许的最晚付款时间,逾期将关闭交易。取值范围:1m~15d。该参数数值不接受小数点, 如 1.5h,可转换为 90m。
-        model.setOutTradeNo(outTradeNo);
-        model.setTotalAmount("13.14");
-        model.setBody("收单测试body");//对交易或商品的描述
-        model.setSubject("测试统一收单交易创建接口");//订单标题
-        model.setBuyerLogonId("xfnwjs8936@sandbox.com");//买家支付宝账号,和buyer_id不能同时为空
-        model.setSellerId("2088102171369624");//卖家支付宝用户ID。如果该值为空,则默认为商户签约账号对应的支付宝用户ID
-        try {
-            AlipayTradeCreateResponse response = AlipayApi.tradeCreate(model,alipayClient,notifyUrl);
-            if (response.isSuccess()) {
-                return  response.getBody();
-            }
-        } catch (AlipayApiException e) {
-            e.printStackTrace();
-        }
-        return null;
-    }*/
 
     /**
      * notify_url 异步通知  异步通知验签
@@ -422,14 +394,7 @@ public class AlipayController {
     }
 
 
-
-
-
-
-
-
-
-
+/*在需要获取支付宝用户信息时,才需要去获取access_Token*/
 
     /**
      * 判断是否需要用户授权获取会员信息
@@ -465,11 +430,7 @@ public class AlipayController {
         //String sandBoxUrl = "https://openauth.alipaydev.com/oauth2/publicAppAuthorize.htm?app_id=" + app_id + "&scope=" + scope + "&redirect_uri=" + redirect_url;
         String url = "https://openauth.alipay.com/oauth2/publicAppAuthorize.htm?app_id=" + app_id + "&scope=" + scope + "&redirect_uri=" + redirect_url;
 
-        com.uas.sso.common.util.HttpUtil.ResponseWrap responseWrap = com.uas.sso.common.util.HttpUtil.doGet(url);
-        response.setContentType("text/html;charset=" + AlipayConfig.CHARSET);
-        response.getWriter().write(responseWrap.getContent());//直接将完整的表单html输出到页面
-        response.getWriter().flush();
-        response.getWriter().close();
+        response.sendRedirect(url);
     }
 
 

+ 1 - 0
donate-service/src/main/java/com/uas/service/donate/controller/IndexController.java

@@ -60,6 +60,7 @@ public class IndexController {
                 //String url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=" + wxPayApi.getConfig().getAppId() + "&redirect_uri=" + URLEncoder.encode("http://lj.ubtob.com/", "UTF-8") + "&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect";
                 String url = WechatConnector.createAuthorizeUrl(WxConfig.oauthUserScope, wxPayApi.getConfig().getAppId(), URLEncoder.encode("http://lj.ubtob.com", "UTF-8"));
                 response.sendRedirect(url);
+                return null;
             }
         }
 

+ 2 - 38
donate-service/src/main/java/com/uas/service/donate/controller/WxpayController.java

@@ -147,6 +147,7 @@ public class WxpayController {
             logger.info("公众号支付缺少openId:--需要用户授权");
             String url = WechatConnector.createAuthorizeUrl(WxConfig.oauthUserScope, wxPayApi.getConfig().getAppId(), URLEncoder.encode("http://lj.ubtob.com", "UTF-8"));
             response.sendRedirect(url);
+            return null;
         }
 
         logger.info("公众号支付处理:openId=" + openId);
@@ -400,7 +401,7 @@ public class WxpayController {
 
 
     /**
-     * 获取token  这大概是基础支持token  一日上限2000次  用具体用户授权无关
+     * 获取token  基础支持token  一日上限2000次  与用户网页授权无关  与支付无关
      * @return
      * @throws Exception
      */
@@ -440,12 +441,6 @@ public class WxpayController {
             logger.info("公众号获取:authCode=" + code + ",state=" + state);
             //String xmlResult = IOUtils.toString(request.getInputStream(), request.getCharacterEncoding());
             String openId = wxPayApi.authcode2Openid(code);
-            User user = SystemSession.getUser();
-            if (user == null) {
-                user = new User();
-            }
-            user.setWxOpenId(openId);
-            SystemSession.setUser(user);
         } catch (WxPayException e) {
             e.printStackTrace();
         }
@@ -488,37 +483,6 @@ public class WxpayController {
 //
 
 
-
-//    /**
-//     * 获取验签秘钥API
-//     * https://pay.weixin.qq.com/wiki/doc/api/jsapi_sl.php?chapter=23_1
-//     *  mch_id 商户号
-//     *  partnerKey 商户平台设置的密钥key
-//     * @return {String}
-//     */
-//    @ResponseBody
-//    @RequestMapping("/getsignkey")
-//    public String getsignkey() throws Exception {
-//        Map<String, String> map =new HashMap<String, String>();
-//        String mch_id = "";
-//        String partnerKey = "";//商户平台设置的密钥key
-//        String nonce_str = String.valueOf(System.currentTimeMillis());
-//        map.put("mch_id", mch_id);//商户号
-//        map.put("nonce_str", nonce_str);//随机字符串
-//        map.put("sign", WxSign.createSign(map, partnerKey));
-//
-//        String url = null;
-//        if (isSandBox) {
-//            url = WXPayConstants.SANDBOX_GETSINGKEY_URL;
-//        }else {
-//            //url = WXPayConstants.UGETSINGKEY_URL;
-//        }
-//        HttpUtil.Response result = HttpUtil.sendPostRequest(url, map);
-//
-//        return result.getResponseText();
-//    }
-//
-
     private WxPayUnifiedOrderRequest createWxPayUnifiedOrderRequest(HttpServletRequest request, ProjectRecode projectRecode, String tradeType) {
         //Project project = projectRecode.getProject();
         WxPayUnifiedOrderRequest wxPayUnifiedOrderRequest = new WxPayUnifiedOrderRequest();

+ 0 - 11
donate-service/src/main/java/com/uas/service/donate/model/User.java

@@ -54,8 +54,6 @@ public class User implements Serializable{
     @Column(name = "user_type")
     private String type;
 
-    private String wxOpenId;
-
     public User() {
 
     }
@@ -131,14 +129,6 @@ public class User implements Serializable{
         this.type = type;
     }
 
-    public String getWxOpenId() {
-        return wxOpenId;
-    }
-
-    public void setWxOpenId(String wxOpenId) {
-        this.wxOpenId = wxOpenId;
-    }
-
     @Override
     public String toString() {
         return "User{" +
@@ -149,7 +139,6 @@ public class User implements Serializable{
                 ", organization='" + org.getName() + '\'' +
                 ", userIMId=" + userIMId +
                 ", type='" + type + '\'' +
-                ", wxOpenId='" + wxOpenId + '\'' +
                 '}';
     }
 }

+ 1 - 3
donate-service/src/main/resources/templates/index.ftl

@@ -13,9 +13,7 @@
     <link rel="stylesheet" href="static/css/bootstrap.min.css">
     <link rel="stylesheet" href="static/css/base.css">
     <link rel="stylesheet" type="text/css" href="static/css/kkpager_orange.css" />
-    <!--<link rel="stylesheet" href="static/css/toastr.css">
-    <script type="text/javascript" src ="static/js/toastr.js"></script>-->
-    <link href="https://cdn.bootcss.com/toastr.js/latest/css/toastr.css" rel="stylesheet">
+
     <link href="https://cdn.bootcss.com/toastr.js/latest/css/toastr.min.css" rel="stylesheet">
 
     <style>

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

@@ -14,7 +14,6 @@
     <link rel="stylesheet" href="static/lib/angular/toaster.css">
     <link rel="stylesheet" href="static/css/base.css">
 
-    <link href="https://cdn.bootcss.com/toastr.js/latest/css/toastr.css" rel="stylesheet">
     <link href="https://cdn.bootcss.com/toastr.js/latest/css/toastr.min.css" rel="stylesheet">
     <style>
         a {

+ 1 - 0
donate-service/src/main/webapp/resources/js/pay.js

@@ -220,6 +220,7 @@ function onBridgeReady(resJsonObj){
         //微信签名   
     },
     function (res) {
+        alert(JSON.stringify(res));
         // 使用以上方式判断前端返回,微信团队郑重提示:res.err_msg将在用户支付成功后返回    ok,但并不保证它绝对可靠。
         if (res.err_msg == 'get_brand_wcpay_request:ok') {
             toastr.success("支付成功!");