activateTest.html
3.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<!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>