Bläddra i källkod

追加推送 5/9

彭俊 6 år sedan
förälder
incheckning
5254f5c298

+ 1 - 1
Application/InApi/Controller/Index.php

@@ -147,7 +147,7 @@ class Index extends Controller {
 
 	    $strArr = array() ;
         foreach ($paras as $key=>$val){
-            if ($key=='agent'){   $val = 'test1agent' ;   }
+            //if ($key=='agent'){   $val = 'test1agent' ;   }
             array_push($strArr,$key.'='.$val);
         }
         $string = implode ('$',$strArr);

+ 49 - 14
Application/Sports/Controller/MatchList.php

@@ -783,12 +783,39 @@ class  MatchList extends Controller {
             //查询当前联赛下的赛事
             $league = [];
             if($oddsType != 'StRollBall'){
+                $where = [
+                    ['home_team','<>',null],
+                    ['guest_team','<>',null],
+                    ['status','<',2],
+                    ['lg_id',$matchData->lg_id],
+                ];
+
+                switch ($oddsType)
+                {
+                    case 'StSoon'://即将
+                        $matchWhere=[['is_morningplate','=',1]];
+                        break;
+                    case 'StToday'://今日
+                        $matchWhere=[['is_today','=',1]];
+                        break;
+                    case 'StMorningPlate'://早盘
+                        $matchWhere=[['is_morningplate','=',1]];
+                        break;
+                    case 'StStringScene'://串场
+                        $matchWhere = [['is_stringscene','=',1]];
+                        break;
+                    case 'home'://首页
+                        $matchWhere = [['is_stringscene','=',1]];
+                        break;
+                    default:
+                        $matchWhere = [];
+                }
                 $league = lm($model_match,'Sports')
                     ->select('match_id','home_team','guest_team')
                     ->where($this->source)
-                    ->where('lg_id',$matchData->lg_id)
-                    ->where('home_team','<>',null)
-                    ->where('guest_team','<>',null)
+                    ->where($where)
+                    ->where($matchWhere)
+                    ->distinct($model_match.'.match_id')
                     ->get()
                     ->toarray();
             }
@@ -823,12 +850,12 @@ class  MatchList extends Controller {
 
             $p_code_array = [];
             foreach ($oddsData as $key =>$val){
-                $p_code_array[$val['p_code']] = lang('OddsTemp','Sports')->get($val['p_code']);
+                $p_code_array[] = $val['p_code'];
+//                $p_code_array[$val['p_code']] = lang('OddsTemp','Sports')->get($val['p_code']);
 
             }
 
-//            $p_code_array = array_keys(array_flip(array_unique($p_code_array)));//p_code 去重排序
-
+            $p_code_array = array_keys(array_flip(array_unique($p_code_array)));//p_code 去重排序
 
             $data = [
                 'lg_id' =>$matchData->lg_id,
@@ -840,7 +867,7 @@ class  MatchList extends Controller {
                 'match_ptime'=>$matchData->ptime,
                 'match_score'=>$matchData->match_score,
                 'p_code_array'=> $p_code_array,
-                'oddsData'=>$oddsData, //$sd,
+                'oddsData'=>$oddsData,
                 'league' => $league,
 //                'lang' => lang('OddsTemp','Sports')->getAll(),
             ];
@@ -908,18 +935,26 @@ class  MatchList extends Controller {
      * 获取球类-玩法-赔率代码
      */
     public function getOddsCode(){
-
-        $p_code = lm('st_odds_code','Sports')
-                ->select('id','p_id','odds_code','odds_name','type')
+        $type = $_REQUEST['type'];
+        if($type == 'p_code'){
+            $p_code = lm('st_odds_code','Sports')
+                ->select('odds_code','odds_name')
                 ->where('p_id',0)
                 ->get();
-        foreach ($p_code as $k=>$v){
-               $v->below = lm('st_odds_code','Sports')
-                ->select('id','p_id','odds_code','odds_name','type')
-                ->where('p_id',$v['id'])
+        }else{
+            $p_code = lm('st_odds_code','Sports')
+                ->select('id','odds_code','odds_name')
+                ->where('p_id',0)
                 ->get();
+            foreach ($p_code as $k=>$v){
+                $v->below = lm('st_odds_code','Sports')
+                    ->select('odds_code','odds_name')
+                    ->where('p_id',$v['id'])
+                    ->get();
+            }
         }
 
+
         Render($p_code, '1', lang('Tips','Sports')->get('success'));
     }
 

+ 12 - 10
Biz/Match/GetOddsData.php

@@ -40,6 +40,8 @@ class GetOddsData {
             ->where($whereDate)
             ->where($model_match.'.us_time','>',qgmdate('Y-m-d H:i:s', '', -4))
             ->where('status','<',2)
+            ->where($model_match.'.home_team','<>',null)
+            ->where($model_match.'.guest_team','<>',null)
             ->where(function($query)use ($model_match,$search){
                 $query->where($model_match.'.home_team','like','%'.$search.'%')
                     ->orWhere(function($query)use ($model_match,$search) {
@@ -146,15 +148,15 @@ class GetOddsData {
 //                    ->where($model_odds.'.expire_time','>',date("Y-m-d H:i:s"))//追加查询有效时间
                 ->where(
                     function($query)use ($model_odds){
-                        $query->where($model_odds.'.odds_code','lq_concede_home')
+                        $query->where($model_odds.'.odds_code','concede_home')
                             ->orWhere(function($query)use ($model_odds){
-                                $query->where($model_odds.'.odds_code','lq_concede_guest');
+                                $query->where($model_odds.'.odds_code','concede_guest');
                             })
                             ->orWhere(function($query)use ($model_odds){
-                                $query->where($model_odds.'.odds_code','lq_total_sizes_big');
+                                $query->where($model_odds.'.odds_code','total_sizes_big');
                             })
                             ->orWhere(function($query)use ($model_odds){
-                                $query->where($model_odds.'.odds_code','lq_total_sizes_small');
+                                $query->where($model_odds.'.odds_code','total_sizes_small');
                             });
                     }
                 )
@@ -191,15 +193,15 @@ class GetOddsData {
 //                    ->where($model_odds.'.expire_time','>',date("Y-m-d H:i:s"))//追加查询有效时间
                 ->where(
                     function($query)use ($model_odds){
-                        $query->where($model_odds.'.odds_code','wq_concede_home')
+                        $query->where($model_odds.'.odds_code','dishes_home')
                             ->orWhere(function($query)use ($model_odds){
-                                $query->where($model_odds.'.odds_code','wq_concede_guest');
+                                $query->where($model_odds.'.odds_code','dishes_guest');
                             })
                             ->orWhere(function($query)use ($model_odds){
-                                $query->where($model_odds.'.odds_code','wq_kemp_home');
+                                $query->where($model_odds.'.odds_code','kemp_home');
                             })
                             ->orWhere(function($query)use ($model_odds){
-                                $query->where($model_odds.'.odds_code','wq_kemp_guest');
+                                $query->where($model_odds.'.odds_code','kemp_guest');
                             });
                     }
                 )
@@ -236,9 +238,9 @@ class GetOddsData {
 //                    ->where($model_odds.'.expire_time','>',date("Y-m-d H:i:s"))//追加查询有效时间
                 ->where(
                     function($query)use ($model_odds){
-                        $query->where($model_odds.'.odds_code','bq_capot_home')
+                        $query->where($model_odds.'.odds_code','capot_home')
                             ->orWhere(function($query)use ($model_odds){
-                                $query->where($model_odds.'.odds_code','bq_capot_guest');
+                                $query->where($model_odds.'.odds_code','capot_guest');
                             });
                     }
                 )

+ 78 - 43
Biz/Match/GetmatchData.php

@@ -48,7 +48,7 @@ class GetmatchData {
                 $oddsTypeWhere = [
                     [$models['model_odds'].'.is_morningplate','=',1],
                 ];
-                $data = $this->getSoon($source,$models,$where,$lg_id,$search,$oddsTypeWhere);
+                $data = $this->getSoon($source,$models,$where,$lg_id,$ret,$search,$oddsTypeWhere);
                 break;
             case 'StToday'://今日
                 $oddsTypeWhere = [
@@ -199,7 +199,7 @@ class GetmatchData {
     /**
      * 获取即将数据
      */
-    public function getSoon($source,$models,$where,$lg_id=0,$search='',$oddsTypeWhere=''){
+    public function getSoon($source,$models,$where,$lg_id=0,$ret,$search='',$oddsTypeWhere=''){
         $model_match = $models['model_match'];
         $model_odds = $models['model_odds'];
         $model_league = $models['model_league'];
@@ -242,53 +242,78 @@ class GetmatchData {
                 ->toarray();
         }
 
-        foreach($data as $k => $v){
-            foreach($v['matchData'] as $kk => $vv){
-                $wait_time = ceil(((strtotime( $vv['match_time']))-time())/60);
-                $data[$k]['matchData'][$kk]['wait_time'] = $wait_time;//追加距离开赛时间
-                $oddsData= lm($model_match,"Sports")
-                    ->leftjoin($model_odds,$model_odds.'.match_id',$model_match.'.match_id')
-                    ->select($model_odds.'.id','odds_only','p_code','odds_code',$model_odds.'.status','odds','condition','sort')
-                    ->where($model_match.'.source',$source['source'])
-                    ->where([$model_odds.'.match_id' => $vv['match_id'],$model_odds.'.type'=>0])
+        //获取足球即将默认玩法赔率
+        if($ret['game_code'] == 'zq'){
+            foreach($data as $k => $v){
+                foreach($v['matchData'] as $kk => $vv){
+                    $wait_time = ceil(((strtotime( $vv['match_time']))-time())/60);
+                    $data[$k]['matchData'][$kk]['wait_time'] = $wait_time;//追加距离开赛时间
+                    $oddsData= lm($model_match,"Sports")
+                        ->leftjoin($model_odds,$model_odds.'.match_id',$model_match.'.match_id')
+                        ->select($model_odds.'.id','odds_only','p_code','odds_code',$model_odds.'.status','odds','condition','sort')
+                        ->where($model_match.'.source',$source['source'])
+                        ->where([$model_odds.'.match_id' => $vv['match_id'],$model_odds.'.type'=>0])
 //                    ->where($oddsTypeWhere)
 //                        ->where($model_odds.'.expire_time','>',date("Y-m-d H:i:s"))
-                    ->where(function($query)use ($model_odds){
-                        $query->where($model_odds.'.odds_code','concede_home')
-                            ->orWhere(function($query)use ($model_odds){
-                                $query->where($model_odds.'.odds_code','concede_guest');
-                            })
-                            ->orWhere(function($query)use ($model_odds){
-                                $query->where($model_odds.'.odds_code','size_home');
-                            })
-                            ->orWhere(function($query)use ($model_odds){
-                                $query->where($model_odds.'.odds_code','size_guest');
-                            })
-                            ->orWhere(function($query)use ($model_odds){
-                                $query->where($model_odds.'.odds_code','capot_home');
-                            })
-                            ->orWhere(function($query)use ($model_odds){
-                                $query->where($model_odds.'.odds_code','capot_dogfall');
-                            })
-                            ->orWhere(function($query)use ($model_odds){
-                                $query->where($model_odds.'.odds_code','capot_guest');
-                            });
-                    })
-                    ->get()
-                    ->toarray();
+                        ->where(function($query)use ($model_odds){
+                            $query->where($model_odds.'.odds_code','concede_home')
+                                ->orWhere(function($query)use ($model_odds){
+                                    $query->where($model_odds.'.odds_code','concede_guest');
+                                })
+                                ->orWhere(function($query)use ($model_odds){
+                                    $query->where($model_odds.'.odds_code','size_home');
+                                })
+                                ->orWhere(function($query)use ($model_odds){
+                                    $query->where($model_odds.'.odds_code','size_guest');
+                                })
+                                ->orWhere(function($query)use ($model_odds){
+                                    $query->where($model_odds.'.odds_code','capot_home');
+                                })
+                                ->orWhere(function($query)use ($model_odds){
+                                    $query->where($model_odds.'.odds_code','capot_dogfall');
+                                })
+                                ->orWhere(function($query)use ($model_odds){
+                                    $query->where($model_odds.'.odds_code','capot_guest');
+                                });
+                        })
+                        ->get()
+                        ->toarray();
 
-                //根据 排序 获取 最新让球/大小玩法赔率
-                $sortData = array_column($oddsData,'sort');
-                array_multisort($sortData,SORT_DESC,$oddsData);
+                    //根据 排序 获取 最新让球/大小玩法赔率
+                    $sortData = array_column($oddsData,'sort');
+                    array_multisort($sortData,SORT_DESC,$oddsData);
 
-                $zu = [];
-                foreach ($oddsData as $key1 =>$item1){
-                    $zu[$item1['p_code']][] = $item1;
+                    $zu = [];
+                    foreach ($oddsData as $key1 =>$item1){
+                        $zu[$item1['p_code']][] = $item1;
+                    }
+                    $c_s = array_slice($zu['concede_size'],0,4);//让球/大小 前四条 放入
+                    $capot = $zu['capot'];//独赢
+
+                    $data[$k]['matchData'][$kk]['oddsData'] = [$c_s,$capot];
                 }
-                $c_s = array_slice($zu['concede_size'],0,4);//让球/大小 前四条 放入
-                $capot = $zu['capot'];//独赢
+            }
+        }
 
-                $data[$k]['matchData'][$kk]['oddsData'] = [$c_s,$capot];
+        //获取网球即将默认玩法赔率
+        if($ret['game_code'] == 'wq'){
+            foreach($data as $k => $v){
+                $matchData = $this->getOddsData->getOddsWQ($v['matchData'], $model_odds, $source,$oddsTypeWhere);
+                $data[$k]['matchData'] = $matchData;
+            }
+        }
+        //获取网球即将默认玩法赔率
+        if($ret['game_code'] == 'lq'){
+            foreach($data as $k => $v){
+                $matchData = $this->getOddsData->getOddsLQ($v['matchData'], $model_odds, $source,$oddsTypeWhere);
+                $data[$k]['matchData'] = $matchData;
+            }
+        }
+        //获取网球即将默认玩法赔率
+        if($ret['game_code'] == 'bq'){
+            foreach($data as $k => $v){
+                $matchData = $this->getOddsData->getOddsBQ($v['matchData'], $model_odds, $source,$oddsTypeWhere);
+                $data[$k]['matchData'] = $matchData;
             }
         }
         return $data;
@@ -450,10 +475,19 @@ class GetmatchData {
             ->get()
             ->toArray();
 
+        $timeWhere = [];
+        if(!empty($time)){
+            if($time == 'other'){
+                $timeWhere[] = ['match_date','>',date("Y-m-d",strtotime("+1weeks",strtotime(date('Y-m-d',time()))))];
+            }else{
+                $timeWhere[] = ['match_date',$time];
+            }
+        }
         $matchData = lm($model_match,'Sports')
             ->select('id','lg_id','match_id')
             ->where($where)
             ->where($source)
+            ->where($timeWhere)
             ->get()
             ->toArray();
 
@@ -730,6 +764,7 @@ class GetmatchData {
                         })
                         ->get()
                         ->toarray();
+
                 }else{//早盘 今天以后
                     $matchData = lm($model_match,"Sports")
                         ->select($model_match.'.match_id',$model_match.'.tag','match_date',$model_match.'.match_time',$model_match.'.home_team',$model_match.'.guest_team')

+ 33 - 0
Public/protest/1.html

@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>1.账户是否存在</title>
+    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
+    <script src="/Public/protest/tbase.js" type="text/javascript"></script>
+    <!--
+        "http://libs.baidu.com/jquery/2.0.0/jquery.min.js"
+        "http://cdn.staticfile.org/jquery/2.0.0/jquery.min.js"
+        "http://lib.sinaapp.com/js/jquery/1.6/jquery.min.js"
+    -->
+</head>
+<body>
+<a href="index.html">返回首页</a>
+<hr/>
+<br>
+<br>提交参数:
+<div id="paras"></div>
+<br/>
+返回结果:
+<div id="ret"></div>
+<br>
+<hr/>
+<from id="mfrom">
+    <p>代理:<input type="text" id="agent" name="agent" value="test1agent" class="fitem"></p>
+    <p>方法:<input type="text" id="method"  name="method"  value="caie" class="fitem"></p>
+    <br/><br/>
+    <p>用户名:<input type="text" id="username" name="username" value="" class="fitem"></p>
+</from>
+<input type="button"  id="mbutton" value="提交" >
+</body>
+</html>

+ 34 - 0
Public/protest/15.html

@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>15.更改密码</title>
+    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
+    <script src="/Public/protest/tbase.js" type="text/javascript"></script>
+    <!--
+        "http://libs.baidu.com/jquery/2.0.0/jquery.min.js"
+        "http://cdn.staticfile.org/jquery/2.0.0/jquery.min.js"
+        "http://lib.sinaapp.com/js/jquery/1.6/jquery.min.js"
+    -->
+</head>
+<body>
+<a href="index.html">返回首页</a>
+<hr/>
+<br>
+<br>提交参数:
+<div id="paras"></div>
+<br/>
+返回结果:
+<div id="ret"></div>
+<br>
+<hr/>
+<from id="mfrom">
+    <p>代理:<input type="text" id="agent" name="agent" value="test1agent" class="fitem"></p>
+    <p>方法:<input type="text" id="method"  name="method"  value="ua" class="fitem"></p>
+    <br/><br/>
+    <p>用户名:<input type="text" id="username" name="username" value="" class="fitem"></p>
+    <p>密  码:<input type="text" id="password" name="password" value="" class="fitem"></p>
+</from>
+<input type="button"  id="mbutton" value="提交" >
+</body>
+</html>

+ 35 - 0
Public/protest/2.html

@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>2.查询并创建账号</title>
+    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
+    <script src="/Public/protest/tbase.js" type="text/javascript"></script>
+    <!--
+        "http://libs.baidu.com/jquery/2.0.0/jquery.min.js"
+        "http://cdn.staticfile.org/jquery/2.0.0/jquery.min.js"
+        "http://lib.sinaapp.com/js/jquery/1.6/jquery.min.js"
+    -->
+</head>
+<body>
+<a href="index.html">返回首页</a>
+<hr/>
+
+<br>
+<br>提交参数:
+<div id="paras"></div>
+<br/>
+返回结果:
+<div id="ret"></div>
+<br>
+<hr/>
+<from id="mfrom">
+    <p>代理:<input type="text" id="agent" name="agent" value="test1agent" class="fitem"></p>
+    <p>方法:<input type="text" id="method"  name="method"  value="caca" class="fitem"></p>
+    <br/><br/>
+    <p>用户名:<input type="text" id="username" name="username" value="" class="fitem"></p>
+    <p>密  码:<input type="text" id="password" name="password" value="" class="fitem"></p>
+</from>
+<input type="button"  id="mbutton" value="提交" >
+</body>
+</html>

+ 34 - 0
Public/protest/3.html

@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>3.查询余额</title>
+    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
+    <script src="/Public/protest/tbase.js" type="text/javascript"></script>
+    <!--
+        "http://libs.baidu.com/jquery/2.0.0/jquery.min.js"
+        "http://cdn.staticfile.org/jquery/2.0.0/jquery.min.js"
+        "http://lib.sinaapp.com/js/jquery/1.6/jquery.min.js"
+    -->
+</head>
+<body>
+<a href="index.html">返回首页</a>
+<hr/>
+<br>
+<br>提交参数:
+<div id="paras"></div>
+<br/>
+返回结果:
+<div id="ret"></div>
+<br>
+<hr/>
+<from id="mfrom">
+    <p>代理:<input type="text" id="agent" name="agent" value="test1agent" class="fitem"></p>
+    <p>方法:<input type="text" id="method"  name="method"  value="gb" class="fitem"></p>
+    <br/><br/>
+    <p>用户名:<input type="text" id="username" name="username" value="" class="fitem"></p>
+    <p>密  码:<input type="text" id="password" name="password" value="" class="fitem"></p>
+</from>
+<input type="button"  id="mbutton" value="提交" >
+</body>
+</html>

+ 39 - 0
Public/protest/4.html

@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>4.转账</title>
+    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
+    <script src="/Public/protest/tbase.js" type="text/javascript"></script>
+    <!--
+        "http://libs.baidu.com/jquery/2.0.0/jquery.min.js"
+        "http://cdn.staticfile.org/jquery/2.0.0/jquery.min.js"
+        "http://lib.sinaapp.com/js/jquery/1.6/jquery.min.js"
+    -->
+</head>
+<body>
+<a href="index.html">返回首页</a>
+<hr/>
+<br>
+<br>提交参数:
+<div id="paras"></div>
+<br/>
+返回结果:
+<div id="ret"></div>
+<br>
+<hr/>
+<from id="mfrom">
+    <p>代理:<input type="text" id="agent" name="agent" value="test1agent" class="fitem"></p>
+    <p>方法:<input type="text" id="method"  name="method"  value="ptc" class="fitem"></p>
+    <br/><br/>
+    <p>用户名:<input type="text" id="username" name="username" value="" class="fitem"></p>
+    <p>密  码:<input type="text" id="password" name="password" value="" class="fitem"></p>
+    <br/><br/>
+    <p>订单:<input type="text" id="billno" name="billno" value="" class="fitem"></p>
+    <p>金额:<input type="text" id="credit" name="credit" value="" class="fitem"></p>
+    <p>进出:<input type="text" id="type" name="type" value="IN" class="fitem"></p>
+
+</from>
+<input type="button"  id="mbutton" value="提交" >
+</body>
+</html>

+ 38 - 0
Public/protest/5.html

@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>5.查询转账</title>
+    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
+    <script src="/Public/protest/tbase.js" type="text/javascript"></script>
+    <!--
+        "http://libs.baidu.com/jquery/2.0.0/jquery.min.js"
+        "http://cdn.staticfile.org/jquery/2.0.0/jquery.min.js"
+        "http://lib.sinaapp.com/js/jquery/1.6/jquery.min.js"
+    -->
+</head>
+<body>
+<a href="index.html">返回首页</a>
+<hr/>
+<br>
+<br>提交参数:
+<div id="paras"></div>
+<br/>
+返回结果:
+<div id="ret"></div>
+<br>
+<hr/>
+<from id="mfrom">
+    <p>代理:<input type="text" id="agent" name="agent" value="test1agent" class="fitem"></p>
+    <p>方法:<input type="text" id="method"  name="method"  value="ctc" class="fitem"></p>
+    <br/><br/>
+    <p>用户名:<input type="text" id="username" name="username" value="" class="fitem"></p>
+    <p>密  码:<input type="text" id="password" name="password" value="" class="fitem"></p>
+    <br/><br/>
+    <p>订单:<input type="text" id="billno" name="billno" value="" class="fitem"></p>
+    <p>进出:<input type="text" id="type" name="type" value="IN" class="fitem"></p>
+
+</from>
+<input type="button"  id="mbutton" value="提交" >
+</body>
+</html>

+ 42 - 0
Public/protest/6.html

@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>6.进入游戏</title>
+    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
+    <script src="/Public/protest/tbase.js" type="text/javascript"></script>
+    <!--
+        "http://libs.baidu.com/jquery/2.0.0/jquery.min.js"
+        "http://cdn.staticfile.org/jquery/2.0.0/jquery.min.js"
+        "http://lib.sinaapp.com/js/jquery/1.6/jquery.min.js"
+    -->
+</head>
+<body>
+<a href="index.html">返回首页</a>
+<hr/>
+<br>
+<br>提交参数:
+<div id="paras"></div>
+<br/>
+返回结果:
+<div id="ret"></div>
+<br>
+<hr/>
+<from id="mfrom">
+    <p>代理:<input type="text" id="agent" name="agent" value="test1agent" class="fitem"></p>
+    <p>方法:<input type="text" id="method"  name="method"  value="tg" class="fitem"></p>
+    <br/><br/>
+    <p>用户名:<input type="text" id="username" name="username" value="" class="fitem"></p>
+    <p>密  码:<input type="text" id="password" name="password" value="" class="fitem"></p>
+    <br/>
+    <p>域 名:<input type="text" id="domain" name="domain" value="" class="fitem"></p>
+    <p>游戏类型:<input type="text" id="gametype" name="gametype" value="" class="fitem"></p>
+    <p>游戏代码:<input type="text" id="gamekind" name="gamekind" value="" class="fitem"></p>
+    <p>是否框架:<input type="text" id="iframe" name="iframe" value="" class="fitem"></p>
+    <p>平台:<input type="text" id="platformname" name="platformname" value="" class="fitem"></p>
+    <p>语言:<input type="text" id="lang" name="lang" value="" class="fitem"></p>
+
+</from>
+<input type="button"  id="mbutton" value="提交" >
+</body>
+</html>

+ 37 - 0
Public/protest/7.html

@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>7.获取报表数据</title>
+    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
+    <script src="/Public/protest/tbase.js" type="text/javascript"></script>
+    <!--
+        "http://libs.baidu.com/jquery/2.0.0/jquery.min.js"
+        "http://cdn.staticfile.org/jquery/2.0.0/jquery.min.js"
+        "http://lib.sinaapp.com/js/jquery/1.6/jquery.min.js"
+    -->
+</head>
+<body>
+<a href="index.html">返回首页</a>
+<hr/>
+<br>
+<br>提交参数:
+<div id="paras"></div>
+<br/>
+返回结果:
+<div id="ret"></div>
+<br>
+<hr/>
+<from id="mfrom">
+    <p>代理:<input type="text" id="agent" name="agent" value="test1agent" class="fitem"></p>
+    <p>方法:<input type="text" id="method"  name="method"  value="gr" class="fitem"></p>
+    <br/><br/>
+    <p>用户名:<input type="text" id="username" name="username" value="" class="fitem"></p>
+    <p>密  码:<input type="text" id="password" name="password" value="" class="fitem"></p>
+    <br/>
+    <p>开始时间:<input type="text" id="datestart" name="datestart" value="" class="fitem"></p>
+    <p>结束时间:<input type="text" id="dateend" name="dateend" value="" class="fitem"></p>
+</from>
+<input type="button"  id="mbutton" value="提交" >
+</body>
+</html>

+ 34 - 0
Public/protest/8.html

@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>8.转账记录</title>
+    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
+    <script src="/Public/protest/tbase.js" type="text/javascript"></script>
+    <!--
+        "http://libs.baidu.com/jquery/2.0.0/jquery.min.js"
+        "http://cdn.staticfile.org/jquery/2.0.0/jquery.min.js"
+        "http://lib.sinaapp.com/js/jquery/1.6/jquery.min.js"
+    -->
+</head>
+<body>
+<a href="index.html">返回首页</a>
+<hr/>
+<br>
+<br>提交参数:
+<div id="paras"></div>
+<br/>
+返回结果:
+<div id="ret"></div>
+<br>
+<hr/>
+<from id="mfrom">
+    <p>代理:<input type="text" id="agent" name="agent" value="test1agent" class="fitem"></p>
+    <p>方法:<input type="text" id="method"  name="method"  value="gct" class="fitem"></p>
+    <br/><br/>
+    <p>订单:<input type="text" id="billno" name="billno" value="" class="fitem"></p>
+
+</from>
+<input type="button"  id="mbutton" value="提交" >
+</body>
+</html>

+ 36 - 0
Public/protest/9.html

@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>9.体育投注记录</title>
+    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
+    <script src="/Public/protest/tbase.js" type="text/javascript"></script>
+    <!--
+        "http://libs.baidu.com/jquery/2.0.0/jquery.min.js"
+        "http://cdn.staticfile.org/jquery/2.0.0/jquery.min.js"
+        "http://lib.sinaapp.com/js/jquery/1.6/jquery.min.js"
+    -->
+</head>
+<body>
+<a href="index.html">返回首页</a>
+<hr/>
+<br>
+<br>提交参数:
+<div id="paras"></div>
+<br/>
+返回结果:
+<div id="ret"></div>
+<br>
+<hr/>
+<from id="mfrom">
+    <p>代理:<input type="text" id="agent" name="agent" value="test1agent" class="fitem"></p>
+    <p>方法:<input type="text" id="method"  name="method"  value="gsbrbv" class="fitem"></p>
+    <br/><br/>
+    <p>订单号:<input type="text" id="vendorid" name="vendorid" value="" class="fitem"></p>
+    <p>是否结算:<input type="text" id="isjs" name="isjs" value="" class="fitem"></p>
+
+
+</from>
+<input type="button"  id="mbutton" value="提交" >
+</body>
+</html>

+ 25 - 0
Public/protest/index.html

@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>代理测试开始页</title>
+</head>
+<body>
+<p><a href="1.html" >1.账户是否存在</a></p>
+<p><a href="2.html" >2.检测并创建游戏账号</a></p>
+<p><a href="3.html" >3.查询余额</a></p>
+<p><a href="15.html">15.账号密码更改</a></p>
+<p><hr/></p>
+<p><a href="4.html" >4.转账</a></p>
+<p><a href="5.html" >5.查询转账</a></p>
+<p><a href="8.html" >8.转账记录</a></p>
+<p><hr/></p>
+<p><a href="6.html" >6.进入游戏</a></p>
+<p><a href="7.html" >10.获取报表数据</a></p>
+<p><hr/></p>
+<p><a href="9.html" >9.体育投注记录</a></p>
+<p><hr/></p>
+
+
+</body>
+</html>

+ 58 - 0
Public/protest/tbase.js

@@ -0,0 +1,58 @@
+Url = '' ;
+POSTDATAS = {};
+
+function doRealRequest(){
+    $.ajax({
+        type: 'POST',
+        url: Url,
+        data: POSTDATAS,
+        success: function(retdata){
+            $("#ret").html(JSON.stringify(retdata));
+        },
+        dataType: 'json'
+    });
+}
+
+function  getUrl(parobj){
+    $.ajax({
+        type: 'POST',
+        url: 'http://www.kaiyou-dev.com/Inapi-index/makeurl',
+        data: parobj,
+        success: function(returndatas){
+
+            if (returndatas.status!=1){
+                alert('发生错误:'+returndatas.msg);
+                return ;
+            }
+            Url = returndatas.data.url;
+            doRealRequest();
+        },
+        dataType: 'json'
+    });
+}
+
+function  subForm(){
+       var ParasObj = {};
+       var Mitems = $(".fitem");
+       var len  = Mitems.length ;
+       for (var i=0 ; i<len ;i++){
+           var name = $(Mitems[i]).attr('name');
+           var val = $(Mitems[i]).val() ;
+           ParasObj[name] = val ;
+       }
+       ParasObj['debug']=1 ;
+       POSTDATAS = ParasObj;
+
+       $("#ret").html('');
+       $("#paras").html(JSON.stringify(ParasObj));
+
+       getUrl(ParasObj);
+}
+
+$(document).ready(function(){
+    $("#mbutton").on("click", function(){
+        subForm();
+    });
+});
+
+