Browse Source

修改页面

fuwencai 4 years ago
parent
commit
5b6fc9b54f

+ 0 - 1
service/product.go

@@ -17,7 +17,6 @@ func CreateProduct(product model.Product) error {
 	var count int64
 	// 判断用产品id是否重复
 	db.GetSFISDB().Table("product").Where("id = ?", product.ID).Count(&count)
-	fmt.Println(count, product.ID)
 	if count > 0 {
 		return errors.New("产品id重复")
 	}

+ 212 - 212
static/templates/login.html

@@ -1,248 +1,248 @@
 {{define "login.html"}}
-    <!DOCTYPE html>
-    <html lang="en">
-    <head>
-        <meta charset="UTF-8">
-        <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
-        <script src="https://cdn.bootcss.com/blueimp-md5/2.10.0/js/md5.js"></script>
-        <title>接口服务平台后台管理系统</title>
-    </head>
-    <style>
-
-    </style>
-    <body>
-    <style>
-        .title {
-            text-align: center;
-        }
-
-        .tableDiv {
-            margin-top: 20px;
-        }
-
-        .box tr td {
-            text-align: center;
-        }
-
-        .handle a {
-            text-decoration: none;
-            margin-right: 5px;
-        }
-
-        .userProductList {
-            margin-top: 20px;
-        }
-
-        .userProTbody tr td {
-            text-align: center;
-        }
-
-        .test {
-
-            width: 400px;
-            height: 400px;
-        }
-
-
-    </style>
-    <div>
-        <h1 class="title">接口服务平台测试系统</h1>
-    </div>
-    <div>
-        <button style="width: 80px;height: 35px"><a style="text-decoration:none;" href="/page/createUser">创建用户</a>
-        </button>
-    </div>
-    <div class="tableDiv">
-        <table border="1" cellspacing="0" cellpadding="0" id="tableId" width="80%" align="center" hidden>
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
+    <script src="https://cdn.bootcss.com/blueimp-md5/2.10.0/js/md5.js"></script>
+    <title>接口服务平台后台管理系统</title>
+</head>
+<style>
+
+</style>
+<body>
+<style>
+    .title {
+        text-align: center;
+    }
+
+    .tableDiv {
+        margin-top: 20px;
+    }
+
+    .box tr td {
+        text-align: center;
+    }
+
+    .handle a {
+        text-decoration: none;
+        margin-right: 5px;
+    }
+
+    .userProductList {
+        margin-top: 20px;
+    }
+
+    .userProTbody tr td {
+        text-align: center;
+    }
+
+    .test {
+
+        width: 400px;
+        height: 400px;
+    }
+
+
+</style>
+<div>
+    <h1 class="title">接口服务平台测试系统</h1>
+</div>
+<div>
+    <button style="width: 80px;height: 35px"><a target="_blank" style="text-decoration:none;" href="/page/createUser">创建用户</a>
+    </button>
+</div>
+<div class="tableDiv">
+    <table border="1" cellspacing="0" cellpadding="0" id="tableId" width="80%" align="center" hidden>
+        <thead>
+        <tr class="tableTitle">
+            <th style="width: 5%">序号</th>
+            <th style="width: 25%">客户名称</th>
+            <th style="width: 20%">APPID</th>
+            <th style="width: 10%">密钥</th>
+            <th style="width: 10%">客户电话</th>
+            <th style="width: 10%">余额</th>
+            <th style="width: 20%">操作</th>
+        </tr>
+        </thead>
+        <tbody class="box">
+
+        </tbody>
+    </table>
+</div>
+<div class="userProductList">
+    <div class="userProductDiv" hidden>
+        <p class="nodata"></p>
+        <h3>用户购买产品列表</h3>
+        <table border="1" cellspacing="0" cellpadding="0" width="80%" align="center" id="userProduct">
             <thead>
             <tr class="tableTitle">
                 <th style="width: 5%">序号</th>
-                <th style="width: 25%">客户名称</th>
-                <th style="width: 20%">APPID</th>
-                <th style="width: 10%">密钥</th>
-                <th style="width: 10%">客户电话</th>
-                <th style="width: 10%">余额</th>
-                <th style="width: 20%">操作</th>
+                <th style="width: 5%">产品ID</th>
+                <th style="width: 8%">产品名称</th>
+                <th style="width: 25%">用户APPID</th>
+                <th style="width: 5%">剩余量</th>
+                <th style="width: 10%">扣费模式</th>
+                <th style="width: 5%">状态</th>
+                <th style="width: 10%">每日调用次数</th>
+                <th style="width: 10%">单次返回数量</th>
+                <th style="width: 25%">操作</th>
             </tr>
             </thead>
-            <tbody class="box">
+            <tbody class="userProTbody">
 
             </tbody>
         </table>
     </div>
-    <div class="userProductList">
-        <div class="userProductDiv" hidden>
-            <p class="nodata"></p>
-            <h3>用户购买产品列表</h3>
-            <table border="1" cellspacing="0" cellpadding="0" width="80%" align="center" id="userProduct">
-                <thead>
-                <tr class="tableTitle">
-                    <th style="width: 5%">序号</th>
-                    <th style="width: 5%">产品ID</th>
-                    <th style="width: 8%">产品名称</th>
-                    <th style="width: 25%">用户APPID</th>
-                    <th style="width: 5%">剩余量</th>
-                    <th style="width: 10%">扣费模式</th>
-                    <th style="width: 5%">状态</th>
-                    <th style="width: 10%">每日调用次数</th>
-                    <th style="width: 10%">单次返回数量</th>
-                    <th style="width: 25%">操作</th>
-                </tr>
-                </thead>
-                <tbody class="userProTbody">
-
-                </tbody>
-            </table>
-        </div>
 
-    </div>
+</div>
 
-    {{/*
+{{/*
 <div class="test">
     <h3 id="demo">并发测试</h3>
     <input type="text" placeholder="请输入并发量">
     <button>确定</button>
 </div>
 */}}
-    <div class="result"></div>
-
-
-    <script>
-        userList()
-
-        function userList() {
-            $.ajax({
-                url: "/manage/user/list",
-                type: "POST",
-                dataType: "json",
-                async: false,
-                success: function (r) {
-                    if (r.code === 0) {
-                        var str = ""
-                        if (r.data.length != 0) {
-                            $("#tableId").show();
-                            for (var i = 0; i < r.data.length; i++) {
-                                var item = r.data[i];
-                                str += "<tr >";
-                                str += "<td style='width: 50px'>" + (i + 1) + "</td>";
-                                str += "<td style='width: 100px'><a href='javascript:void(0);' style='pointer:hand;' onclick=\"userProductList('" + item.app_id + "','" + item.secret_key + "')\">" + item.name + "</a></td>";
-                                str += "<td style='width: 200px'>" + item.app_id + "</td>";
-                                str += "<td style='width: 100px'>" + item.secret_key + "</td>";
-                                str += "<td style='width: 100px'>" + item.phone + "</td>";
-                                str += "<td style='width: 100px'>" + (item.money / 100) + "</td>";
-                                str += "<td class='handle' style='width: 100px'><a href=\"/page/moneyRechargePage?appId=" + item.app_id + "\">账户余额充值</a><a href=\"/page/chooseProductPage?appId=" + item.app_id + "\">购买产品</a></td>";
-
-                                str += "</tr>";
-                            }
-                            $(".box").html(str);
-                        } else {
-                            $(".tableDiv").html("还没有客户,请添加客户信息");
+<div class="result"></div>
+
+
+<script>
+    userList()
+
+    function userList() {
+        $.ajax({
+            url: "/manage/user/list",
+            type: "POST",
+            dataType: "json",
+            async: false,
+            success: function (r) {
+                if (r.code === 0) {
+                    var str = ""
+                    if (r.data.length != 0) {
+                        $("#tableId").show();
+                        for (var i = 0; i < r.data.length; i++) {
+                            var item = r.data[i];
+                            str += "<tr >";
+                            str += "<td style='width: 50px'>" + (i + 1) + "</td>";
+                            str += "<td style='width: 100px'><a   href='javascript:void(0);' style='pointer:hand;' onclick=\"userProductList('" + item.app_id + "','" + item.secret_key + "')\">" + item.name + "</a></td>";
+                            str += "<td style='width: 200px'>" + item.app_id + "</td>";
+                            str += "<td style='width: 100px'>" + item.secret_key + "</td>";
+                            str += "<td style='width: 100px'>" + item.phone + "</td>";
+                            str += "<td style='width: 100px'>" + (item.money / 100) + "</td>";
+                            str += "<td class='handle' style='width: 100px'><a  target=\"_blank\" href=\"/page/moneyRechargePage?appId=" + item.app_id + "\">账户余额充值</a><a  target=\"_blank\" href=\"/page/chooseProductPage?appId=" + item.app_id + "\">购买产品</a></td>";
+
+                            str += "</tr>";
                         }
+                        $(".box").html(str);
                     } else {
-                        $(".tableDiv").html(r.msg);
+                        $(".tableDiv").html("还没有客户,请添加客户信息");
                     }
+                } else {
+                    $(".tableDiv").html(r.msg);
                 }
-            })
-        }
+            }
+        })
+    }
+
+    function userProductList(appId, key) {
+        //var appId = $(obj).find("td:eq(2)").text();
+        //var key = $(obj).find("td:eq(3)").text();
+        console.log(appId, "|", key)
+        let param = {
+            "appId": appId
+        };
+        $.ajax({
+            url: "/manage/user/userProductList",
+            type: "POST",
+            dataType: "json",
+            async: false,
+            data: param,
+            success: function (r) {
+                if (r.code === 0) {
+                    var str = "";
+                    if (r.data) {
+                        $(".nodata").html("");
+                        $(".userProductDiv").show();
+                        $(".userProTbody").html("");
+                        for (var i = 0; i < r.data.length; i++) {
+                            var item = r.data[i];
+                            str += "<tr>";
+                            str += "<td>" + (i + 1) + "</td>";
+                            str += "<td>" + item.product_id + "</td>";
+                            str += "<td>" + item.name + "</td>";
+                            str += "<td>" + item.app_id + "</td>";
+                            str += "<td>" + item.left_num + "</td>";
+                            if (item.cost_model == 0) {
+                                str += "<td>扣量</td>";
+                            } else {
+                                str += "<td>扣余额</td>";
+                            }
+                            if (item.interface_status == 0) {
+                                str += "<td>开启</td>";
+                            } else {
+                                str += "<td>关闭</td>";
+                            }
+                            str += "<td>" + item.call_times_limit_day + "</td>";
+                            str += "<td>" + item.data_num_limit_one_times + "</td>";
+                            if (item.product_id === 1000 || item.product_id === 1001) {
+                                str += "<td class='handle' style='width: 100px ;'><a  target=\"_blank\" href=\"/page/projectListPage?appId=" + appId + "&key=" + key + "\" >测试接口</a>";
+                            } else {
+                                str += "<td class='handle' style='width: 100px;'><a  target=\"_blank\" href=\"/page/projectListDetail?appId=" + appId + "&key=" + key + "\"  >测试接口</a>";
+                            }
+                            if (item.cost_model == 0) {
+                                str += "<a  target=\"_blank\" href=\"/page/userRecharge?appId=" + appId + "&productId=" + item.product_id + "\"  >剩余量充值</a>"
+                            }
+                            str += "<a  target=\"_blank\" href=\"/page/callLogPage?appId=" + appId + "&key=" + key + "&product_id=" + item.product_id + "\"  >调用记录</a>";
+                            str += "<a  target=\"_blank\" onclick=\"myFunction('" + appId + "','" + key + "','" + item.product_id + "')\"  href='javascript:void(0);' style='pointer:hand;'>并发测试</a>"
+                            // else {
+                            //
+                            // }
+                            str += "</td>";
+                            str += "</tr>";
+                        }
+                        // console.log(str);
+                        let trBody = $(str);
+                        $(".userProTbody").append(trBody);
+                    } else {
+                        $(".userProductDiv").hide();
+                    }
 
-        function userProductList(appId, key) {
-            //var appId = $(obj).find("td:eq(2)").text();
-            //var key = $(obj).find("td:eq(3)").text();
-            console.log(appId, "|", key)
-            let param = {
-                "appId": appId
-            };
+                } else {
+                    $(".userProductList").html(r.msg);
+                }
+            }
+        })
+    }
+
+    //并发测试点击事件,参数 appid 产品id,并发量
+
+    function myFunction(appId, key, productId) {
+        console.log(appId, key, productId)
+        var num = prompt("请输入并发量", "");
+        if (num != null && num != "") {
+            console.log(num)
+            var param = {
+                "appid": appId,
+                "productId": productId,
+                "count": num,
+            }
             $.ajax({
-                url: "/manage/user/userProductList",
+                url: "/manage/user/concurrentTest",
                 type: "POST",
                 dataType: "json",
                 async: false,
                 data: param,
                 success: function (r) {
-                    if (r.code === 0) {
-                        var str = "";
-                        if (r.data) {
-                            $(".nodata").html("");
-                            $(".userProductDiv").show();
-                            $(".userProTbody").html("");
-                            for (var i = 0; i < r.data.length; i++) {
-                                var item = r.data[i];
-                                str += "<tr>";
-                                str += "<td>" + (i + 1) + "</td>";
-                                str += "<td>" + item.product_id + "</td>";
-                                str += "<td>" + item.name + "</td>";
-                                str += "<td>" + item.app_id + "</td>";
-                                str += "<td>" + item.left_num + "</td>";
-                                if (item.cost_model == 0) {
-                                    str += "<td>扣量</td>";
-                                } else {
-                                    str += "<td>扣余额</td>";
-                                }
-                                if (item.interface_status == 0) {
-                                    str += "<td>开启</td>";
-                                } else {
-                                    str += "<td>关闭</td>";
-                                }
-                                str += "<td>" + item.call_times_limit_day + "</td>";
-                                str += "<td>" + item.data_num_limit_one_times + "</td>";
-                                if (item.product_id === 1000 || item.product_id === 1001) {
-                                    str += "<td class='handle' style='width: 100px ;'><a href=\"/page/projectListPage?appId=" + appId + "&key=" + key + "\" >测试接口</a>";
-                                } else {
-                                    str += "<td class='handle' style='width: 100px;'><a href=\"/page/projectListDetail?appId=" + appId + "&key=" + key + "\"  >测试接口</a>";
-                                }
-                                if (item.cost_model == 0) {
-                                    str += "<a href=\"/page/userRecharge?appId=" + appId + "\"  >剩余量充值</a>"
-                                }
-                                str += "<a href=\"/page/callLogPage?appId=" + appId + "&key=" + key + "&product_id=" + item.product_id +  "\"  >调用记录</a>";
-                                str += "<a onclick=\"myFunction('" + appId + "','" + key + "','" + item.product_id + "')\"  href='javascript:void(0);' style='pointer:hand;'>并发测试</a>"
-                                // else {
-                                //
-                                // }
-                                str += "</td>";
-                                str += "</tr>";
-                            }
-                            // console.log(str);
-                            let trBody = $(str);
-                            $(".userProTbody").append(trBody);
-                        } else {
-                            $(".userProductDiv").hide();
-                        }
-
-                    } else {
-                        $(".userProductList").html(r.msg);
-                    }
+                    alert(JSON.stringify(r))
                 }
             })
-        }
-
-        //并发测试点击事件,参数 appid 产品id,并发量
-
-        function myFunction(appId, key, productId) {
-            console.log(appId, key, productId)
-            var num = prompt("请输入并发量", "");
-            if (num != null && num != "") {
-                console.log(num)
-                var param = {
-                    "appid": appId,
-                    "productId": productId,
-                    "count": num,
-                }
-                $.ajax({
-                    url: "/manage/user/concurrentTest",
-                    type: "POST",
-                    dataType: "json",
-                    async: false,
-                    data: param,
-                    success: function (r) {
-                        alert(JSON.stringify(r))
-                    }
-                })
 
-            }
         }
+    }
 
 
-    </script>
-    </body>
-    </html>
+</script>
+</body>
+</html>
 {{end}}

+ 116 - 112
static/templates/projectList.html

@@ -1,127 +1,131 @@
 {{define "projectList.html"}}
-    <!DOCTYPE html>
-    <html lang="en">
-    <head>
-        <meta charset="UTF-8">
-        <title>项目列表页面</title>
-        <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
-        <script src="https://cdn.bootcss.com/blueimp-md5/2.10.0/js/md5.js"></script>
-    </head>
-    <body>
-    <div id="projectList">
-        <input type="text" id="projectName" placeholder="请输入项目名">
-        <input type="text" id="winner" placeholder="请输入中标企业名">
-        <input type="text" id="bidTime" placeholder="请输入中标日期">
-        <button type="button" id="projectListBtn">提交</button>
-    </div>
-    <div id="resultContent"></div>
-    <div id="tableDiv" hidden>
-        <table border="0" id="tableId">
-            <thead>
-            <tr class="tableTitle">
-                {{/*                <th style="width: 20px"><input type="checkbox" name="item"></td></th>*/}}
-                <th style="width: 5%;">序号</th>
-                <th style="width: 20%">项目标识</th>
-                <th style="width: 36%">项目名称</th>
-                <th style="width: 15%">采购单位</th>
-                <th style="width: 8%">采购单位行业</th>
-                <th style="width: 8%">招标日期</th>
-                <th style="width: 8%">中标日期</th>
-            </tr>
-            </thead>
-            <tbody class="box">
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>项目列表页面</title>
+    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
+    <script src="https://cdn.bootcss.com/blueimp-md5/2.10.0/js/md5.js"></script>
+</head>
+<body>
+<div id="projectList">
+    <input type="text" id="projectName" placeholder="请输入项目名">
+    <input type="text" id="winner" placeholder="请输入中标企业名">
+    <input type="text" id="bidTime" placeholder="请输入中标日期">
+    <button type="button" id="projectListBtn">提交</button>
+</div>
+<div id="resultContent"></div>
+<div id="tableDiv" hidden>
+    <table border="0" id="tableId">
+        <thead>
+        <tr class="tableTitle">
+            {{/*
+            <th style="width: 20px"><input type="checkbox" name="item">
+            </td></th>*/}}
+            <th style="width: 5%;">序号</th>
+            <th style="width: 20%">项目标识</th>
+            <th style="width: 36%">项目名称</th>
+            <th style="width: 15%">采购单位</th>
+            <th style="width: 8%">采购单位行业</th>
+            <th style="width: 8%">招标日期</th>
+            <th style="width: 8%">中标日期</th>
+        </tr>
+        </thead>
+        <tbody class="box">
 
-            </tbody>
-        </table>
-    </div>
+        </tbody>
+    </table>
+</div>
 
-    </body>
-    <style>
-        .box tr .td {
-            text-align: center;
-        }
-    </style>
-    <script>
-        var LocString = String(window.document.location.href);
+</body>
+<style>
+    .box tr .td {
+        text-align: center;
+    }
+</style>
+<script>
+    var LocString = String(window.document.location.href);
 
-        // 获取页面跳转传过来的参数
-        function GetQueryString(name) {
-            var rs = new RegExp("(^|)" + name + "=([^&]*)(&|$)", "gi").exec(LocString);
-            var tmp;
-            if (tmp = rs) {
-                return decodeURI(tmp[2])
-            }
-            return "";
+    // 获取页面跳转传过来的参数
+    function GetQueryString(name) {
+        var rs = new RegExp("(^|)" + name + "=([^&]*)(&|$)", "gi").exec(LocString);
+        var tmp;
+        if (tmp = rs) {
+            return decodeURI(tmp[2])
         }
+        return "";
+    }
 
-        var appid = GetQueryString("appId");
-        var key = GetQueryString("key");
+    var appid = GetQueryString("appId");
+    var key = GetQueryString("key");
 
-        function submit(param, rType, url, hearders, str) {
-            $("#resultContent").text("正在查询中......");
-            $.ajax({
-                url: url,
-                type: rType,
-                headers: hearders,
-                data: param,
-                success: function (r) {
-                    if (r.data) {
-                        $("#tableDiv").show();
-                        $("#resultContent").text("");
-                        var str = "";
-                        for (var i = 0; i < r.data.length; i++) {
-                            var item = r.data[i]
-                            str += '<tr >';
-                            // str += '<td style="width: 20px"></td>';
-                            str += '<td class="td">' + (i + 1) + '</td>';
-                            str += "<td class=\"td\"><a href='javascript:void(0);' style='pointer:hand;' onclick=\"projectDetails('" + item.projectId + "')\">" + item.projectId + "</a></td>";
-                            // str += '<td class="td"><a href="javascript:void(0);" onclick="projectDetails()"> ' + item.projectId + '</a></td>';
-                            str += '<td>' + item.projectName + '</td>';
-                            str += '<td>' + item.buyer + '</td>';
-                            str += '<td class="td">' + item.buyerClass + '</td>';
-                            if (item.tenderDate == undefined || item.tenderDate == "") {
-                                str += '<td class="td"></td>';
-                            } else {
-                                str += '<td class="td">' + item.tenderDate + '</td>';
-                            }
-                            if (item.bidDate == undefined || item.bidDate == "") {
-                                str += '<td></td>';
-                            } else {
-                                str += '<td class="td">' + item.bidDate + '</td>';
-                            }
-                            str += '</tr>';
+    function submit(param, rType, url, hearders, str) {
+        $("#resultContent").text("正在查询中......");
+        $.ajax({
+            url: url,
+            type: rType,
+            headers: hearders,
+            data: param,
+            success: function (r) {
+                if (r.data) {
+                    $("#tableDiv").show();
+                    $("#resultContent").text("");
+                    var str = "";
+                    for (var i = 0; i < r.data.length; i++) {
+                        var item = r.data[i]
+                        str += '<tr >';
+                        // str += '<td style="width: 20px"></td>';
+                        str += '<td class="td">' + (i + 1) + '</td>';
+                        str += "<td class=\"td\"><a   href='javascript:void(0);' style='pointer:hand;' onclick=\"projectDetails('" + item.projectId + "')\">" + item.projectId + "</a></td>";
+                        // str += '<td class="td"><a href="javascript:void(0);" onclick="projectDetails()"> ' + item.projectId + '</a></td>';
+                        str += '<td>' + item.projectName + '</td>';
+                        str += '<td>' + item.buyer + '</td>';
+                        str += '<td class="td">' + item.buyerClass + '</td>';
+                        if (item.tenderDate == undefined || item.tenderDate == "") {
+                            str += '<td class="td"></td>';
+                        } else {
+                            str += '<td class="td">' + item.tenderDate + '</td>';
+                        }
+                        if (item.bidDate == undefined || item.bidDate == "") {
+                            str += '<td></td>';
+                        } else {
+                            str += '<td class="td">' + item.bidDate + '</td>';
                         }
-                        $(".box").html(str);
-                    } else {
-                        $("#resultContent").text(r.msg);
+                        str += '</tr>';
                     }
+                    $(".box").html(str);
+                } else {
+                    $("#resultContent").text(r.msg);
                 }
-            })
-        }
-
-        $("#projectListBtn").on("click", function () {
-            var param = {
-                "app_id": appid,
-                "project_name": $("#projectName").val(),
-                "winner": $("#winner").val(),
-                "bid_time": $("#bidTime").val()
-            };
-            var url = "/sfis/api/v1/projectList";
-            var rType = "post";
-            var now = new Date().getTime();
-            var token = md5(appid + Math.round(now / 1000) + key);
-            var hearders = {
-                "timestamp": "" + Math.round(now / 1000),
-                "token": token
             }
-            $("#tableDiv").hide();
-            submit(param, rType, url, hearders, "list");
         })
+    }
 
-        function projectDetails(obj) {
-            // var p = $(obj).parent().find("td:eq(1)").text();
-            location.href = "/page/projectDetailsPage?projectId=" + obj + "&appId=" + appid + "&key=" + key
+    $("#projectListBtn").on("click", function () {
+        var param = {
+            "app_id": appid,
+            "project_name": $("#projectName").val(),
+            "winner": $("#winner").val(),
+            "bid_time": $("#bidTime").val()
+        };
+        var url = "/sfis/api/v1/projectList";
+        var rType = "post";
+        var now = new Date().getTime();
+        var token = md5(appid + Math.round(now / 1000) + key);
+        var hearders = {
+            "timestamp": "" + Math.round(now / 1000),
+            "token": token
         }
-    </script>
-    </html>
+        $("#tableDiv").hide();
+        submit(param, rType, url, hearders, "list");
+    })
+
+    function projectDetails(obj) {
+        // var p = $(obj).parent().find("td:eq(1)").text();
+        // window.top.location.href = "/page/projectDetailsPage?projectId=" + obj + "&appId=" + appid + "&key=" + key
+        var targetUrl = "/page/projectDetailsPage?projectId=" + obj + "&appId=" + appid + "&key=" + key
+        window.open(targetUrl)
+    }
+</script>
+</html>
 {{end}}

+ 6 - 3
static/templates/projectListDetail.html

@@ -12,13 +12,13 @@
 <button type="button" id="projectListDetailBtn">提交</button>
 <div id="resultContent"></div>
 <div id="tableDiv" hidden>
-    <table  id="tableId" border="1px solid" cellspacing="0" cellpadding="0" >
+    <table id="tableId" border="1px solid" cellspacing="0" cellpadding="0">
         <tr>
             <th style="width: 2%;">序号</th>
             <th style="width: 5%">项目标识</th>
             <th style="width: 4%">项目名称</th>
             <th style="width: 5%">项目代码</th>
-            <th style="width: 5%">中标单位</th>
+            <th style="width: 15%">中标单位</th>
             <th style="width: 5%">采购单位</th>
             <th style="width: 5%">采购单位电话</th>
             <th style="width: 5%">采购单位联系人</th>
@@ -31,7 +31,7 @@
             <th style="width: 5%">城市</th>
             <th style="width: 5%">中标信息列表</th>
             <th style="width: 5%">原链接</th>
-            <th style="width: 5%">剑鱼标讯链接</th>
+            <th style="width: 10%">剑鱼标讯链接</th>
         </tr>
         <tbody class="box">
 
@@ -40,6 +40,7 @@
 </div>
 <script>
     var LocString = String(window.document.location.href);
+
     // 获取页面跳转传过来的参数
     function GetQueryString(name) {
         var rs = new RegExp("(^|)" + name + "=([^&]*)(&|$)", "gi").exec(LocString);
@@ -49,8 +50,10 @@
         }
         return "";
     }
+
     var appid = GetQueryString("appId");
     var key = GetQueryString("key");
+
     function submit(param, rType, url, hearders, str) {
         $.ajax({
             url: url,

+ 4 - 0
static/templates/userRecharge.html

@@ -54,6 +54,8 @@
         console.log(startTime)
         $("#startTime").val(startTime)
         $("#endTime").val(endTime)
+
+
     });
 
     var appid = getParam("appId");
@@ -70,6 +72,8 @@
                     }
                     $("#productId").append(html);
                 }
+                product_id = getParam("productId")
+                $("#productId").val(product_id)
             }
         })
     }