123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8" />
- <title>欢迎页面-X-admin2.0</title>
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
- <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
- <link rel="stylesheet" href="./static/css/font.css">
- <link rel="stylesheet" href="./static/css/xadmin.css">
- <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
- <script src="./static/lib/layui/layui.js" charset="utf-8"></script>
- <script type="text/javascript" src="./static/js/xadmin.js"></script>
- </head>
- <body>
- <input type="text" id="token" value={{.token}} hidden=true>
- <div class="x-body layui-anim layui-anim-up">
- <blockquote class="layui-elem-quote">
- <input class="layui-btn" type="button" onclick="UpdateItem()" value=更新道具配置>
- <br>
- <br>
- <input class="layui-btn" type="button" onclick="UpdateGoods()" value=更新商品配置>
- </blockquote>
- </div>
- <script language="JavaScript">
- function UpdateItem() {
- var token = document.getElementById("token").value;
- var text = "token=" + encodeURI(token);
- text += "&ty=" + encodeURI("items");
- $.ajax({
- type:"post",
- url:"/gameconfig?" + text,
- success:function (data) {
- // alert(data.status);
- if (data.status){
- window.location.href="/gameconfig";
- if (data.info){
- layer.msg(data.info,{icon:1,time:1000});
- }
- }else{
- if (data.info){
- alert(data.info);
- }else{
- window.location.href="/accountlogin";
- }
- }
- }
- });
- }
- function UpdateGoods() {
- var token = document.getElementById("token").value;
- var text = "token=" + encodeURI(token);
- text += "&ty=" + encodeURI("goods");
- $.ajax({
- type:"post",
- url:"/gameconfig?" + text,
- success:function (data) {
- // alert(data.status);
- if (data.status){
- window.location.href="/gameconfig";
- if (data.info){
- layer.msg(data.info,{icon:1,time:1000});
- }
- }else{
- if (data.info){
- alert(data.info);
- }else{
- window.location.href="/accountlogin";
- }
- }
- }
- });
- }
- </script>
- </body>
- </html>
|