activateTest.html 3.93 KB
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8"/>
    <title>Yoho!Buy运营平台</title>
    <script src="/union/js/include.js"></script>
    <script src="/union/js/ajaxfileupload.js"></script>
</head>
<body class="easyui-layout" fit="true">
<div id="search" region="center" style="padding-bottom: 35px; ">
            <!--<script>-->
            <!--document.write(addHead('市场管理', '分组营销管理'));-->
            <!--</script>-->
            
            <div style="text-align: center;margin-top: 200px;" class="div_search">
            	<div style="margin-top: 100px;" >
            		<span>接口测试</span>
            	</div>
                <form id="searchForm" method="post" accept-charset="utf-8">
                    <input id="t1" type="text" class="easyui-textbox" data-options="prompt:'请输入渠道号'"
                           style="width: 500px;" value="idfa=862380036648114&union_type=4">
                    <a id="searchBtn1" class="easyui-linkbutton btn-info" style="margin-left: 30px; "></a><br/>
                    <input id="t2"  type="text" class="easyui-textbox" data-options="prompt:'请输入渠道号'"
                           style="width: 500px;" value="idfa=862380036648114&union_type=4">
                    <a id="searchBtn2" class="easyui-linkbutton btn-info" style="margin-left: 30px; "></a><br/>
                    <input id="t3"  type="text" class="easyui-textbox" data-options="prompt:'请输入渠道号'"
                           style="width: 500px;" value="https://union.yoho.cn/union/app-downloads.html?union_type=4">
                    <a id="searchBtn3" class="easyui-linkbutton btn-info" style="margin-left: 30px; "></a><br/>
                </form>
            </div>
        </div>

<script>
    $(function () {
    	
    	function getQueryString(url,name) {
    	    var querystr=url;
    	    var arr1=querystr.split('&');
    	    var arr2=new Object();
    	    for  (i in arr1){
    	        var ta=arr1[i].split('=');
    	        arr2[ta[0]]=ta[1];
    	    }
    	    return arr2[name];
        }
        $("#searchBtn1").linkbutton({
            iconCls: "icon-search",
            text: "测试addUnion   ",
            onClick: function () {
                var param = {};
                param.union_type = getQueryString($("#t1").textbox("getValue"),'union_type');
                param.idfa = getQueryString($("#t1").textbox("getValue"),'idfa');
                $.post(contextPath + "/ClickUnionRest/addUnion", param,
                    function(data) {
                        $.messager.progress("close");
                        if (data.code == "200") {
                            $.messager.alert("成功", data.message, "success");
                        } else {
                            $.messager.alert("失败", data.message, "error");
                        }
                    }, "json");
            }
        });
        $("#searchBtn2").linkbutton({
            iconCls: "icon-search",
            text: "测试addMonitor",
            onClick: function () {
            	var param = {};
                param.union_type = getQueryString($("#t2").textbox("getValue"),'union_type');
                param.idfa = getQueryString($("#t2").textbox("getValue"),'idfa');
                $.post(contextPath + "/ClickUnionRest/addMonitor", param,
                    function(data) {
                        $.messager.progress("close");
                        $.messager.alert("提示", JSON.stringify(data), "success");
                    }, "json");
            }
        });
        $("#searchBtn3").linkbutton({
                    iconCls: "icon-search",
                    text: "到手机验证   ",
                    onClick:function(){
                    	alert('请复制url,发送到手机端点击测试!');
                        //window.open ('http://union.yoho.	/union/admin/mktReportform.html')
                    }
                }
        );
    });

</script>

</body>
</html>