Ver Fonte

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

shicr há 8 anos atrás
pai
commit
a9845ce796

+ 59 - 2
donate-console/src/main/java/com/uas/console/donate/SSOConfiguration.java

@@ -8,9 +8,17 @@ import com.uas.console.donate.util.ContextUtils;
 import com.uas.console.donate.web.filter.SSOInterceptor;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
+import org.springframework.util.ResourceUtils;
 import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
 import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
 
+import java.io.*;
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.Properties;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+
 
 /**
  * SSOconfig 配置
@@ -55,10 +63,59 @@ public class SSOConfiguration extends WebMvcConfigurerAdapter {
      * @return
      */
     private AccountConfigurer accountConfigurer(String profile) {
-        AccountConfigurer accountConfigurer = new AccountConfigurer("classpath:" + profile + "/account.properties");
+        AccountConfigurer accountConfigurer = new AccountConfigurer();
         accountConfigurer.setApplicationContext(ContextUtils.getApplicationContext());
-        accountConfigurer.init();
+        Properties properties = new Properties();
+        String configPath = "/" + profile + "/account.properties";
+
+        try {
+            InputStream inputStream;
+            URL location = this.getClass().getProtectionDomain().getCodeSource().getLocation();
+            // 是否以 spring boot jar 形式运行
+            if (ResourceUtils.isJarURL(location)) {
+                // 提取 war 中的 config
+                File warFile = ResourceUtils.getFile(ResourceUtils.extractJarFileURL(location));
+                inputStream = extractConfig(warFile, configPath);
+            } else {
+                // 通过 getResourceAsStream 加载配置
+                inputStream = this.getClass().getResourceAsStream(configPath);
+            }
+            properties.load(inputStream);
+        } catch (Throwable e) {
+            throw new IllegalStateException("配置加载失败" + configPath);
+        }
+        accountConfigurer.initProperties(properties);
         return accountConfigurer;
     }
 
+    /**
+     * 加载 war 中的文件
+     *
+     * @param warFile war 文件
+     * @param path    要加载的文件路径
+     * @return 加载的字节流
+     * @throws IOException
+     */
+    private static InputStream extractConfig(File warFile, String path) throws IOException {
+        try (ZipFile zipFile = new ZipFile(warFile)) {
+            Enumeration<? extends ZipEntry> entries = zipFile.entries();
+            while (entries.hasMoreElements()) {
+                ZipEntry zipEntry = entries.nextElement();
+                // 只提取指定路径的文件
+                if (zipEntry.getName().endsWith(path)) {
+                    try (InputStream inputStream = zipFile.getInputStream(zipEntry); ByteArrayOutputStream outputStream = new ByteArrayOutputStream()) {
+                        byte[] buffer = new byte[32 * 1024];
+                        int bytesRead;
+                        while ((bytesRead = inputStream.read(buffer)) != -1) {
+                            outputStream.write(buffer, 0, bytesRead);
+                        }
+                        outputStream.flush();
+                        return new ByteArrayInputStream(outputStream.toByteArray());
+                    }
+                }
+            }
+        }
+        return null;
+    }
+
 }

+ 3 - 3
donate-console/src/main/resources/dev/account.properties

@@ -6,7 +6,7 @@ sso.cookie.secure=false
 
 # dev
 sso.cookie.domain=ubtob.com
-sso.login.url=http://hejq.ubtob.com:8090/account/sso/login
+sso.login.url=http://113.105.74.135:8001/sso/login
 
 ### account center config,
 account.us.save.url=http://10.10.100.133:8080/api/userspace
@@ -15,8 +15,8 @@ account.user.getPartners.url = http://10.10.100.133:8080/api/partners
 account.user.getContactPage.url=https://account.ubtob.com/business/groups
 
 #cross domain
-sso.ask.url=http://hejq.ubtob.com:8090/account/sso/login/ask
-sso.askout.url=http://hejq.ubtob.com:8090/account/sso/logout/ask
+sso.ask.url=http://113.105.74.135:8001/sso/login/ask
+sso.askout.url=http://113.105.74.135:8001/sso/logout/ask
 sso.proxy.uri=login/proxy
 sso.authcookie.secretkey=Z318866alN6gA0piuO
 sso.client.private_key=MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAIquTH9rOygR1iyMzU1CSQDXG+lJpMQgWkRWMwO3lzS+UJ3GRq1yxxD8mPFZCuItMRxP4Mvu3nvxDvsJx8lfRXk4MGswROIBPcdBAnasphN7wS5mDvDe/VBIKv+fg4j4VEnak9VUAQhS1gDtp+ZmQpCc9/gz8vueF1ueIXspAoUhAgMBAAECgYBfMP8PY1KK0Zt6nvd5NauYqQ7elg9EFJUBXU3NGmLu8Eez1NrEygk8braoy57921lffrDmKsOKvc+zn2YEoqGzbHCOuYsTDBXFCGLkj8oPeHyrs02+XuJe9j2ejhq2N04oP/TMxerFeyWnHdRCNXECrthqhwTRmGitnj2/+FLVAQJBAM93HY/5HoFlfRv9zjFy72ft/ZC60jHERXwyumbFs8z/x8sHCY1GWfgGhm1ShE1bDWAPY3W9WCFsx6nOETsHajECQQCrH8Dl7IIIHJ5D0TDisFkePnYELxpmOGlPwPOQ7hyLAdW4aB1fVIpjsWmgGOyPvmhK+b99XeLUbwpxVU7AAB3xAkAJNxJCFd+sAbUH7EMfYSqPJDwSFKpHeZ9Yf+xVqkxtO6NFOl/LPae7Y5bO/k5QHU4/yQ8y6KEkgu9vdG7Bf3fRAkEAiDlX6vDytphpmN0PyHXQC9Z3Rm9k2ZjwpM+aVXZn/HSyeQFQ2JHJNQGHby5IK0nNZloYiSlTJ/9ZVc0uSoQNUQJBAJFix2tD7b0Zq82xpeGt81rhXsofuerq1x9WM5UyYILCKJMHZw5lt58snINVzA7JxV+l60dbIgJjmRYm0yxQIAY=

+ 2 - 2
donate-console/src/main/resources/prod/account.properties

@@ -15,8 +15,8 @@ account.user.getPartners.url = http://10.10.100.133:8080/api/partners
 account.user.getContactPage.url=https://account.ubtob.com/business/groups
 
 #cross domain
-sso.ask.url=http://hejq.ubtob.com:8090/account/sso/login/ask
-sso.askout.url=http://hejq.ubtob.com:8090/account/sso/logout/ask
+sso.ask.url=https://account.ubtob.com/sso/login/ask
+sso.askout.url=https://account.ubtob.com/sso/logout/ask
 sso.proxy.uri=login/proxy
 sso.authcookie.secretkey=Z318866alN6gA0piuO
 sso.client.private_key=MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAIquTH9rOygR1iyMzU1CSQDXG+lJpMQgWkRWMwO3lzS+UJ3GRq1yxxD8mPFZCuItMRxP4Mvu3nvxDvsJx8lfRXk4MGswROIBPcdBAnasphN7wS5mDvDe/VBIKv+fg4j4VEnak9VUAQhS1gDtp+ZmQpCc9/gz8vueF1ueIXspAoUhAgMBAAECgYBfMP8PY1KK0Zt6nvd5NauYqQ7elg9EFJUBXU3NGmLu8Eez1NrEygk8braoy57921lffrDmKsOKvc+zn2YEoqGzbHCOuYsTDBXFCGLkj8oPeHyrs02+XuJe9j2ejhq2N04oP/TMxerFeyWnHdRCNXECrthqhwTRmGitnj2/+FLVAQJBAM93HY/5HoFlfRv9zjFy72ft/ZC60jHERXwyumbFs8z/x8sHCY1GWfgGhm1ShE1bDWAPY3W9WCFsx6nOETsHajECQQCrH8Dl7IIIHJ5D0TDisFkePnYELxpmOGlPwPOQ7hyLAdW4aB1fVIpjsWmgGOyPvmhK+b99XeLUbwpxVU7AAB3xAkAJNxJCFd+sAbUH7EMfYSqPJDwSFKpHeZ9Yf+xVqkxtO6NFOl/LPae7Y5bO/k5QHU4/yQ8y6KEkgu9vdG7Bf3fRAkEAiDlX6vDytphpmN0PyHXQC9Z3Rm9k2ZjwpM+aVXZn/HSyeQFQ2JHJNQGHby5IK0nNZloYiSlTJ/9ZVc0uSoQNUQJBAJFix2tD7b0Zq82xpeGt81rhXsofuerq1x9WM5UyYILCKJMHZw5lt58snINVzA7JxV+l60dbIgJjmRYm0yxQIAY=

+ 1 - 1
donate-console/src/main/resources/test/account.properties

@@ -5,7 +5,7 @@ sso.secretkey=0taQcW073Z7G628g5H
 sso.cookie.secure=false
 
 #test
-sso.cookie.domain=.ubtob.com
+sso.cookie.domain=ubtob.com
 sso.login.url=http://113.105.74.135:8001/sso/login
 
 ### account center config,

+ 93 - 1
donate-console/src/main/webapp/resources/css/base.css

@@ -70,4 +70,96 @@ input,button,select,textarea{outline:none}
 .text-center{
 	text-align: center !important;
 }
-/*通用颜色*/
+/*通用颜色*/
+
+
+
+/*分页效果*/
+#form .ng-isolate-scope{
+	position: absolute;
+	bottom: 50px;
+	left: 50px;
+	width: 100%;
+}
+.ng-table-pager .ng-table-counts{
+	display: none;
+}
+.ng-table-pager .pagination{
+	padding-left: 50px;
+	width: 100%;
+}
+.ng-table-pager .pagination li{
+	height: 35px;
+	line-height: 35px;
+}
+.ng-table-pager .pagination li a{
+	display: inline-block;
+	padding: 0 5px;
+	height: 35px;
+	line-height: 35px;
+	text-align: center;
+	font-size: 14px;
+	color: #333;
+	border-radius: 3px;
+}
+.ng-table-pager .pagination li a span{
+	display: inline-block;
+	width: 35px;
+	height: 35px;
+	line-height: 35px;
+	text-align: center;
+	font-size: 14px;
+	color: #333;
+	border-radius: 3px;
+}
+.ng-table-pager .pagination li.active a,.ng-table-pager .pagination li:hover a{
+	font-size: 14px;
+	color: #333;
+}
+.ng-table-pager .btn-default.active, .ng-table-pager .btn-default:hover, .ng-table-pager .pagination>.disabled>a, .ng-table-pager .pagination>li>a:hover {
+	color: #fff;
+	background-color: #ef613b;
+	border-color: #ef613b;
+}
+.ng-table-pager .pagination>.disabled>a span, .ng-table-pager .pagination>li>a:hover span{
+	color: #fff;
+}
+.page-record{
+	height: 35px;
+	line-height: 35px;
+}
+.page-record span:first-child {
+	margin: 0 10px;
+}
+.page-record span input{
+	margin: 0 5px;
+	width: 40px;
+	height: 35px;
+	line-height: 35px;
+	text-align: center;
+	font-size: 14px;
+	color: #333;
+	border-radius: 3px;
+	border: 1px solid #ddd;
+}
+.page-record span input:focus{
+	border-color: #4574e8;
+}
+.page-record span button {
+	margin-left: 5px;
+	width: 40px;
+	height: 35px;
+	line-height: 35px;
+	text-align: center;
+	font-size: 14px;
+	color: #333;
+	background: none;
+	border: 1px solid #ddd;
+	border-radius: 3px;
+	cursor: pointer ;
+}
+.page-record span button:hover{
+	background: #ef613b;
+	border: 1px solid transparent ;
+	color: #fff;
+}

+ 23 - 2
donate-console/src/main/webapp/resources/view/activity/activity_launch.html

@@ -566,14 +566,14 @@
                         </div>
                     </div>
                     <div class="form-group clearfix">
-                        <label for="" class="control-label fl">活动介绍</label>
+                        <label class="control-label fl">活动介绍</label>
                         <div class="fl introduce">
                             <summernote lang="zh-CN" ng-model="activity.summary" height="300px">
                             </summernote>
                         </div>
                     </div>
                     <div class="form-group clearfix">
-                        <label for="" class="control-label fl">封面图片</label>
+                        <label class="control-label fl">封面图片</label>
                         <div class="fl uploadImage">
                             <div><button>上传图片</button><span>(160*160)</span></div>
                             <input type="file" ng-multiple="false" onchange='angular.element(this).scope().fileChanged(this, 0)'>
@@ -696,3 +696,24 @@
         </div>
     </div>
 </div>
+<script type="text/javascript">
+    $(document).ready(function() {
+        var btn = document.getElementsByClassName('dropdown-toggle');
+        console.log(btn.length);
+        for (var i = 0; i < btn.length; i++) {
+            console.log(btn);
+            var sib = btn[i].nextElementSibling;
+            var flag = true;
+            console.log(btn[i].nextElementSibling);
+            btn[i].onclick = function () {
+                if (flag) {
+                    sib.style.display = 'none';
+                    flag = false
+                } else {
+                    sib.style.display = 'block';
+                    flag = true
+                }
+            }
+        }
+    });
+</script>

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

@@ -75,8 +75,8 @@ public class AlipayController {
      * 手机 wap支付
      */
     @ResponseBody
-    @RequestMapping(value = "/wapPay", method = RequestMethod.GET)
-    public void wapPay(@RequestParam String jsonStr, HttpServletRequest request, HttpServletResponse response) throws IOException {
+    @RequestMapping(value = "/wapPay", method = RequestMethod.POST)
+    public void wapPay(@RequestParam("jsonStr") String jsonStr, HttpServletRequest request, HttpServletResponse response) throws IOException {
         ProjectRecode projectRecode= null;
         try {
             projectRecode = this.createProjectRecode(jsonStr);
@@ -109,8 +109,8 @@ public class AlipayController {
      * PC支付
      */
     @ResponseBody
-    @RequestMapping(value = "/pcPay", method = RequestMethod.GET)
-    public void pcPay(@RequestParam String jsonStr, HttpServletRequest request, HttpServletResponse response) throws IOException {
+    @RequestMapping(value = "/pcPay", method = RequestMethod.POST)
+    public void pcPay(@RequestParam("jsonStr") String jsonStr, HttpServletRequest request, HttpServletResponse response) throws IOException {
         //AlipayTradePayModel  sellerId
         ProjectRecode projectRecode= null;
         try {

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

@@ -511,7 +511,7 @@
     $("#chooseStatus").change(function(){
         //得到被选中的状态下拉框文本值
         var status=$("#chooseStatus").find("option:selected").text();
-        window.location.href="http://localhost:8084/activeCenter?status="+status;
+        window.location.href="http://lj.ubtob.com/activeCenter?status="+status;
     })
 
     //获取浏览器地址参数值
@@ -539,7 +539,7 @@
    $("#search").keydown(function(){
         if(event.keyCode==13){
             var search=$("#search").val();
-            window.location.href="http://localhost:8084/activeCenter?search="+search;
+            window.location.href="http://lj.ubtob.com/activeCenter?search="+search;
         }
    })
 
@@ -587,7 +587,7 @@
         var area=$("#chooseArea").find("option:selected").text();
         //得到被选中的状态下拉框文本值
         var status=$("#chooseStatus").find("option:selected").text();
-        window.location.href="http://localhost:8084/activeCenter?status="+status+"&&page="+(pno-1);
+        window.location.href="http://lj.ubtob.com/activeCenter?status="+status+"&&page="+(pno-1);
     }
 </script>
 </body>

+ 39 - 13
donate-service/src/main/resources/templates/index.ftl

@@ -13,6 +13,9 @@
     <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_blue.css" />
+
+    <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
+    <script type="text/javascript" src ="static/js/pay.js"></script>
     <style>
         body{
             font-family: "Microsoft Yahei", "微软雅黑";
@@ -738,29 +741,28 @@
                 <!--弹出窗-->
                 <div class="pop">
                     <div class="header clearfix">
-                        <p>$
-                            {project.name}</p>
+                        <p>${project.name}</p>
                         <div class="close fr" class="close">&times;</div>
                     </div>
                     <div class="body">
                         <div class="choose clearfix">
                             <span class="fl">捐款金额:</span>
                             <div class="fl">
-                                <ul>
+                                <ul id="choose-money">
                                     <li class="active">1元</li>
                                     <li>50元</li>
                                     <li>100元</li>
                                     <li>200元</li>
                                 </ul>
-                                <div class="write"><input type="text" placeholder="其他金额" class="form-control"/><em>元</em></div>
+                                <div class="write"><input type="text" placeholder="其他金额" class="form-control" id="custom-amount${project.id!''}"/><em>元</em></div>
                             </div>
                         </div>
                         <div class="choose clearfix">
                             <span class="fl">支付方式:</span>
-                            <div class="fl pay">
-                                <div class="item active"><a href=""><img src="static/images/zfb.png" alt=""/>支付宝</a></div>
-                                <div class="item"><a href=""><img src="static/images/wx.png" alt=""/>微信支付</a></div>
-                                <div class="item"><a href=""><img src="static/images/bank.png" alt=""/>网银支付</a></div>
+                            <div class="fl pay" id="pay-way">
+                                <div class="item active"><img src="static/images/zfb.png" alt=""/>支付宝</div>
+                                <div class="item"><img src="static/images/wx.png" alt=""/>微信支付</div>
+                                <div class="item"><img src="static/images/bank.png" alt=""/>网银支付</div>
                             </div>
                         </div>
                         <div class="choose clearfix">
@@ -770,7 +772,7 @@
                                 <input type="checkbox" class="fl"><span class="fl"><a href="">同意并接受《优软一元捐用户协议》</a></span>
                             </div>
                         </div>
-                        <a href="donationsOver"> <button>确认捐款</button></a>
+                        <#--<a href="donationsOver">--> <button onclick="pay(${project.id!''}, money, payWay)">确认捐款</button><#--</a>-->
                     </div>
                 </div>
             </div>
@@ -801,6 +803,7 @@
         $(e).parent().next().css('display','block');
         $("#hover-background").css('display','block');
     }
+
     //    banner
     $('#myCarousel').carousel({
         interval: 5000
@@ -872,7 +875,7 @@
         var area=$("#chooseArea").find("option:selected").text();
         //得到被选中的状态下拉框文本值
         var status=$("#chooseStatus").find("option:selected").text();
-        window.location.href="http://localhost:8084/index?area="+area+"&&status="+status+"&&page="+(pno-1);
+        window.location.href="http://lj.ubtob.com/index?area="+area+"&&status="+status+"&&page="+(pno-1);
     }
 
     $('#chooseArea').val(area);
@@ -887,7 +890,7 @@
             var area=$("#chooseArea").find("option:selected").text();
             //得到被选中的状态下拉框文本值
             var status=$("#chooseStatus").find("option:selected").text();
-            window.location.href="http://localhost:8084/index?area="+area+"&&status="+status;
+            window.location.href="http://lj.ubtob.com/index?area="+area+"&&status="+status;
         })
 
     //项目状态下拉框查询项目
@@ -896,16 +899,39 @@
         var area=$("#chooseArea").find("option:selected").text();
         //得到被选中的状态下拉框文本值
         var status=$("#chooseStatus").find("option:selected").text();
-        window.location.href="http://localhost:8084/index?area="+area+"&&status="+status;
+        window.location.href="http://lj.ubtob.com/index?area="+area+"&&status="+status;
     })
 
     //input搜索框查询项目
     $("#search").keydown(function(event){
       if(event.keyCode==13){
           var search=$("#search").val();
-          window.location.href="http://localhost:8084/index?search="+search;
+          window.location.href="http://lj.ubtob.com/index?search="+search;
       }
     })
+
+    //选择金额
+    var money = 1;
+    $('#choose-money li').on('click', function (event) {
+        var lis = $('#choose-money li');
+        for (var i=0;i<lis.length; i++) {
+            $(lis[i]).removeClass('active');
+        }
+        $(event.target).addClass('active');
+        money = $(event.target).text()
+    })
+
+    //选择支付方式
+    var payWay = "支付宝";
+    $('#pay-way div').on('click', function (event) {
+        var divs = $('#pay-way div');
+        for (var i=0;i<divs.length; i++) {
+            $(divs[i]).removeClass('active');
+        }
+        $(event.target).addClass('active');
+        payWay = $(event.target).text()
+    })
+
 </script>
 </body>
 </html>

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

@@ -0,0 +1,155 @@
+/**
+ * Created by 黄诚天 on 2017-11-03.
+ */
+
+// var proId;
+// var amount;
+// var payWay;//0支付宝 1微信 2银联
+// var uuid = "10041166";
+
+const userAgent = navigator.userAgent;
+const isMobile = /(iPhone|iPad|Opera Mini|Android.*Mobile|NetFront|PSP|BlackBerry|Windows Phone)/ig.test(userAgent);
+
+var pay =function (proId, amount, payWay) {
+     var customAmount = $("#custom-amount" + proId).val();
+     console.log(customAmount);
+    if ($.trim(customAmount) != "") {
+        var reg = "^(([0-9]+\.[0-9]{1,2})|([0-9]*[1-9][0-9]*\.[0-9]{1,2})|([0-9]*[1-9][0-9]*))$";
+        var patt = new RegExp(reg);
+        var r = patt.test(customAmount);
+        if (r) {
+            amount = customAmount;
+        } else {
+            alert('输入金额有误,请正确输入金额且最多保留两位小数!');
+            return;
+        }
+    }
+
+    var yuanIndex = amount.toString().indexOf("元");
+    if (yuanIndex > 0) {
+        amount = amount.toString().substring(0, yuanIndex);
+    }
+
+    //获取支付方式
+    if(payWay == "支付宝") {
+        aliPay(proId, amount);
+    } else if (payWay == "微信支付") {
+        wxPay();
+    } else if (payWay == "网银支付") {
+        unionPay();
+    }
+}
+
+
+var wxPay = function () {
+    //公众号支付js模板 需引入http://res.wx.qq.com/open/js/jweixin-1.0.0.js
+    //对浏览器的UserAgent进行正则匹配,不含有微信独有标识的则为其他浏览器
+    //var userAgent = navigator.userAgent;
+    if (userAgent.match(/MicroMessenger/i) == 'MicroMessenger') {
+        //公众号支付逻辑(微信浏览器)
+        $.ajax({
+            url : "/wxpay/webPay",
+            type : "POST",
+            dataType : 'json',
+            //TODO ProjectRecord json数据
+            success : function(data) {
+                WeixinJSBridge.invoke('getBrandWCPayRequest', {
+                    "appId" : data.appId, //公众号名称,由商户传入       
+                    "timeStamp" : data.timeStamp, //时间戳,自1970年以来的秒数       
+                    "nonceStr" : data.nonceStr, //随机串       
+                    "package" : data.package,
+                    "signType" : data.signType, //微信签名方式:       
+                    "paySign" : data.paySign
+                    //微信签名   
+                }, function(res) {
+                    if (res.err_msg == "get_brand_wcpay_request:ok") {
+                        alert("支付成功");
+                        // 使用以上方式判断前端返回:res.err_msg将在用户支付成功后返回    ok,但并不保证它绝对可靠。
+                    }
+                    else{
+                        alert("支付失败");
+                        //res.err_msg;  
+                    }
+                });
+
+
+                //这个if判断后面加的  不知道作用
+                if (typeof WeixinJSBridge == "undefined") {
+                    if (document.addEventListener) {
+                        document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
+                    } else if (document.attachEvent) {
+                        document.attachEvent('WeixinJSBridgeReady', onBridgeReady);
+                        document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
+                    }
+                } else {
+                    onBridgeReady();
+                }
+            }
+        });
+    }else{
+        //H5支付逻辑
+        //电脑or手机?
+
+        $.ajax({
+            type : "POST",
+            url : "/wxpay/wapPay",
+            dataType : "json",
+            contentType : 'application/json;charset=UTF-8',
+            //data : JSON.stringify({orderId:orderId}),//TODO ProjectRecord json数据
+            success : function(res){
+                if("success" == res.errCode){
+                    var mwebUrl = res.data;
+                    window.location.href = mwebUrl;
+                }else{
+                    alert("支付操作异常,请稍后再试!");
+                }
+            },
+            error : function(XMLHttpRequest, textStatus, errorThrown) {
+                alert('支付异常,请联系客服!');
+            },
+            complete : function(XMLHttpRequest, textStatus) {
+            }
+        });
+    }
+}
+
+var aliPay = function (proId, amount) {
+    var jsonStr =  "{proId:" + proId + "," +
+        "amount:" + amount + "," +
+        //"uuid:" + uuid + "," +
+        "way:'支付宝'" +
+        "}";
+
+    //location.href="/alipay/pcPay?jsonStr=" + jsonStr;
+
+    var url = "/alipay/pcPay";
+
+    if (isMobile) {
+        url = "/alipay/wapPay";
+    }
+
+    $.ajax({
+        type : "POST",
+        url : url,
+        dataType : "html",
+        //contentType : "application/json;charset=UTF-8",
+        async: false,
+        data: {
+            jsonStr : jsonStr
+        },
+        success : function(data) {
+            document.write(data);
+        },
+        error : function() {
+            alert('支付异常,请联系客服!');
+        }
+    });
+}
+
+var unionPay  = function () {
+
+}
+
+
+
+

+ 60 - 0
donate-service/src/main/webapp/resources/view/common/donate_over.html

@@ -0,0 +1,60 @@
+<style>
+    .donate-overflow{
+        width: 480px;
+        height: 220px;
+    }
+    .donate-overflow .header{
+        padding: 0 20px;
+        width: 100%;
+        height: 44px;
+        line-height: 44px;
+        overflow: hidden;
+        background: #eeeeee;
+    }
+    .donate-overflow .header p{
+        font-size: 16px;
+        color: #e96d08;
+        font-weight: bold;
+    }
+    .donate-overflow .header .close{
+        font-size: 38px;
+    }
+    .donate-overflow .body{
+        padding-top: 50px;
+        margin: 0 auto;
+        text-align: center;
+    }
+    .donate-overflow .body p{
+        margin-bottom: 45px;
+        font-size: 16px;
+        color: #505050;
+    }
+    .donate-overflow .body .btn{
+        margin: 0 auto;
+        text-align: center;
+    }
+    .donate-overflow .body .btn button{
+        width: 110px;
+        height: 34px;
+        font-size: 16px;
+        color: #fff;
+        background: #ef613b;
+        border-radius: 0;
+        border: none;
+        outline: none;
+        text-align: center;
+    }
+    .donate-overflow .body .btn button:hover{
+        background: #be3b1b;
+    }
+</style>
+<div class="donate-overflow">
+    <div class="header">
+        <p class="fl">系统提示</p>
+        <div class="close fr" id="close">&times;</div>
+    </div>
+    <div class="body">
+        <p>感谢您的善心,该项目筹得目标善款!</p>
+        <div class="btn"><button>确认</button></div>
+    </div>
+</div>