Browse Source

追加推送 新增pc版首页接口 5/15

彭俊 6 years ago
parent
commit
dc91c42c46

+ 1 - 1
Application/Api/Controller/BetOrder.php

@@ -554,7 +554,7 @@ class Betorder extends BaseController{
         $data['moneyData'] = (double)$bet_amount*(double)$multiple;
         if($sonNum == $allNum and (int)$after ==1){//N场赛事  N串一
             //获取所有赛事赔率乘积
-            $odds = array_product($odds_all);
+            $odds = array_product($odds_all) - 1;
             //获取可赢金额
             $data['prize_money'] =  sprintf("%.2f",substr(sprintf("%.3f", $bet_amount*$odds), 0, -1));//floor($bet_amount*$odds*100)/100;//保留两位小数
         }

+ 231 - 0
Application/Sports/Controller/MatchListWeb.php

@@ -0,0 +1,231 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: Jun.peng
+ * Date: 2019/5/14
+ * Time: 16:25
+ */
+namespace App\Sports\Controller;
+
+use BaseController\Controller;
+use Biz\Match\GetmatchData;
+use Biz\Match\GetOddsData;
+
+/**
+ * Class MatchListWeb
+ * @package App\Sports\Controller
+ * pc端 接口
+ */
+class MatchListWeb extends Controller{
+    private $getTypeData;
+    public function init() {
+        $this->getTypeData = new GetmatchData();
+        $this->getOddsData = new GetOddsData();
+        $this->commonFunction =  C()->get('commonFunction');
+    }
+
+    //各球类玩法列表及数量
+    public function gameList(){
+
+        $type = $_REQUEST['type'];
+        $game_code= $_REQUEST['game_code'];
+        $p_code= $_REQUEST['p_code'];
+
+        try {
+            if(empty($type) ){
+                throw new \Exception(Render([], '10001', lang('Tips','Sports')->get('PARAM_ERROR')));
+            }
+            switch ($type){
+                case 'StRollBall'://滚球
+                    $this->getRollBall($type,$game_code,$p_code);
+                    break;
+                case 'StSoon'://即将
+                    $this->Other($type,$game_code,$p_code);
+                    break;
+                case 'StToday'://今日
+                    $this->Other($type,$game_code,$p_code);
+                    break;
+                case 'StMorningPlate'://早盘
+                    $this->Other($type,$game_code,$p_code);
+                    break;
+                case 'StStringScene'://串场
+                    $this->Other($type,$game_code,$p_code);
+                    break;
+                default:
+                    throw new \Exception(Render([], '10002', lang('Tips','Sports')->get('PARAM_ERROR')));
+            }
+            Render([], '1', lang('Tips','Sports')->get('success'));
+        } catch (\Exception $e) {
+            echo $e->getMessage();
+        }
+    }
+
+    //获取滚球
+    public function getRollBall($type){
+        $game = lm('GameType', 'Sports')->select('game_code')->where('status',1)->get()->toArray();
+        $gameData = [];
+        foreach ($game as $k=>$v){
+            if($v['game_code'] !='gj'){
+                $where = $this->commonFunction->getState($type);
+                $models = $this->commonFunction->getModels($v['game_code'],1);
+                $matchNum = lm($models['model_league'],"Sports")
+                    ->join($models['model_match'],$models['model_match'].'.lg_id',$models['model_league'].'.lg_id')
+                    ->where($models['model_match'].'.source',$this->source['source'])
+                    ->where($where)
+                    ->count("*");
+                //获取满足状态的球类
+                if($matchNum != 0){
+                    $gameData[$v['game_code']] = $matchNum;
+                }
+            }
+        }
+        $gameData['all_num'] = array_sum($gameData);
+        Render($gameData, '1', lang('Tips','Sports')->get('success'));
+    }
+    //获取非滚球数据
+    public function Other($type,$game_code,$p_code){
+        //根据球类代码及玩法代码 获取相关赛事赔率数据
+        if(!empty($game_code) and !empty($p_code)){
+            $matchData = $this->getMatchData($type,$game_code,$p_code);
+
+            Render($matchData, '1', lang('Tips','Sports')->get('success'));
+        }
+        //根据状态获取所有球类/玩法下赛事数量
+        $game = lm('GameType', 'Sports')->select('game_code')->where('status',1)->get()->toArray();
+        $oddsCodeNum = [];
+        foreach ($game as $k=>$v) {
+            if ($v['game_code'] != 'gj') {
+                //获取各球类下父级玩法赛事数量
+                $oddsCodeNum[$k] = $this->getMatchData($type,$v['game_code'],'');
+            }
+        }
+
+        $matchDataNum = [];
+        foreach ($oddsCodeNum as $k => $v){
+            foreach ($v as $kk=>$vv){
+                $matchDataNum[] = $vv;
+            }
+        }
+        Render($matchDataNum, '1', lang('Tips','Sports')->get('success'));
+    }
+
+    //获取赛事数据
+    public function getMatchData($type,$game_code,$p_code=''){
+        $where = $this->commonFunction->getState($type);
+        $models = $this->commonFunction->getModels($game_code,1);
+        $select = [$models['model_match'].'.match_id'];
+        if($p_code){
+            $select = [$models['model_league'].'.lg_id',$models['model_league'].'.name_chinese as leagueName',$models['model_match'].'.match_id','home_team','guest_team','match_date','match_time','tag'];
+        }
+
+        $matchNum = lm($models['model_league'],"Sports")
+            ->join($models['model_match'],$models['model_match'].'.lg_id',$models['model_league'].'.lg_id')
+//            ->select($models['model_league'].'.lg_id',$models['model_league'].'.name_chinese as leagueName',$models['model_match'].'.match_id','home_team','guest_team','match_date','match_time','tag')
+            ->select($select)
+            ->where($models['model_match'].'.source',$this->source['source'])
+            ->where($where)
+            ->get()->toArray();
+
+        $oddsCodeNum = $this->getOddsData($game_code,$models['model_odds'],$matchNum,$p_code);
+        if($p_code){
+            $match_odds = [];
+            foreach ($oddsCodeNum as $k=>$v){
+                foreach ($matchNum as $kk=>$vv){
+                    if($v['match_id'] == $vv['match_id']){
+                        $match_odds[$kk]['lg_id'] = $vv['lg_id'];
+                        $match_odds[$kk]['leagueName'] = $vv['leagueName'];
+                        $match_odds[$kk]['match_id'] = $vv['match_id'];
+                        $match_odds[$kk]['home_team'] = $vv['home_team'];
+                        $match_odds[$kk]['guest_team'] = $vv['guest_team'];
+                        $match_odds[$kk]['match_date'] = $vv['match_date'];
+                        $match_odds[$kk]['match_time'] = $vv['match_time'];
+                        $match_odds[$kk]['tag'] = $vv['tag'];
+                        $match_odds[$kk]['oddsData'][] = $v;
+                    }
+                }
+            }
+            //排序
+            sort($match_odds);
+            $data = [];
+            foreach ($matchNum as $k=>$v){
+                foreach ($match_odds as $kk=>$vv){
+                    if($v['lg_id'] == $vv['lg_id']){
+                        $data[$k]['lg_id'] = $v['lg_id'];
+                        $data[$k]['leagueName'] = $v['leagueName'];
+                        $data[$k]['matchData'][] = $vv;
+                    }
+                }
+            }
+            //去重
+            $data = $this->uniquArr($data,'lg_id');
+
+            return $data;
+        }
+        return $oddsCodeNum;
+    }
+    //根据match_id获取赔率数据
+    public function getOddsData($game_code,$model_odds,$match_ids,$p_code=''){
+        $match_id = [];
+        foreach ($match_ids as $k => $v){
+           $match_id[] = $v['match_id'];
+        }
+        $select = ['match_id','p_code'];
+        $whereOr = [];
+        if($p_code){
+            $whereOr = [['p_code','=',$p_code],['sort','=',0]];
+            $select = ['match_id','id','p_code','odds_code','condition','odds','odds_only','sort','status'];
+        }
+        $oddsData = lm($model_odds,"Sports")
+//           ->select('match_id','p_code')(
+            ->select($select)
+            ->whereIn('match_id', $match_id)
+            ->where('source',$this->source['source'])
+            ->where($whereOr)
+            ->get()
+            ->toArray();
+
+        if($p_code){
+            return $oddsData;
+        }
+        //按父级玩法分组
+        $oddsCode = [];
+        foreach ($oddsData as $kk=>$vv){
+           $oddsCode[$vv['p_code']][]= $vv;
+        }
+
+        // 去重 获取每个玩法下的赛事数量
+        $oddsCodeNum = [];
+        $game_num = count($match_ids);
+        foreach ($oddsCode as $kkk=>$vvv){
+            $oddsCodeNum[$kkk]['game_code'] = $game_code;
+            $oddsCodeNum[$kkk]['game_num'] = $game_num;
+            $oddsCodeNum[$kkk]['p_code'] = $kkk;
+            $oddsCodeNum[$kkk]['code_num'] = count($this->uniquArr($vvv,'match_id'));
+        }
+
+        sort($oddsCodeNum);
+        return $oddsCodeNum;
+    }
+
+    /**
+     * 二维数组根据某个字段去重
+     * @param array $array  二维数组
+     * @para array  去重后的数组
+     */
+     function uniquArr($array,$key){
+        $result = array();
+        foreach($array as $k=>$val){
+            $code = false;
+            foreach($result as $_val){
+                if($_val[$key] == $val[$key]){
+                    $code = true;
+                    break;
+                }
+            }
+            if(!$code){
+                $result[]=$val;
+            }
+        }
+        return $result;
+    }
+}

+ 73 - 66
Application/Sports/Controller/WriteSports.php

@@ -81,36 +81,37 @@ class WriteSports extends Controller{
         $game_code = $opt['game_code'];
         //根据球类代码获取相关model
         $model = $this->commonFunction->getModels($game_code,1);
-        foreach ($opt['data'] as $k => $v){
+        $data = $opt['data'];
+//        foreach ($opt['data'] as $k => $v){
             //验证联赛所属国家
-            if(!empty($v['country_id'])){
+            if(!empty($data['country_id'])){
                 $country = lm('st_country','Sports')
-                    ->where(['country_id'=>$v['country_id']])
+                    ->where(['country_id'=>$data['country_id']])
                     ->count();
                 if($country < 1) Render([], '10013', lang('Tips','Sports')->get('country_error'));
             }
             //验证联赛所属地区
-            if(!empty($v['area_id'])){
+            if(!empty($data['area_id'])){
                 $area = lm('st_area','Sports')
-                    ->where(['id'=>$v['area_id']])
+                    ->where(['id'=>$data['area_id']])
                     ->count();
                 if($area < 1) Render([], '10014', lang('Tips','Sports')->get('area_error'));
             }
             $post = lm($model['model_league'],'Sports')
-                ->where(['lg_id'=>$v['lg_id']])
+                ->where(['lg_id'=>$data['lg_id']])
                 ->count();
             //更新操作
             if($post > 0){
                 $ret = lm($model['model_league'],'Sports')
-                    -> where(['lg_id'=>$v['lg_id']])
-                    -> update($v);
+                    -> where(['lg_id'=>$data['lg_id']])
+                    -> update($data);
                 if($ret < 1) Render([], '10011', lang('Tips','Sports')->get('update_error'));
             }else{
                 //写入操作
-                $ret = lm($model['model_league'],'Sports')->insert($v);
+                $ret = lm($model['model_league'],'Sports')->insert($data);
                 if($ret != true) Render([], '10012', lang('Tips','Sports')->get('insert_error'));
             }
-        }
+//        }
         Render([], '1', lang('Tips','Sports')->get('success'));
     }
 
@@ -119,29 +120,30 @@ class WriteSports extends Controller{
         $game_code = $opt['game_code'];
         //根据球类代码获取相关model
         $model = $this->commonFunction->getModels($game_code,1);
-        foreach ($opt['data'] as $k => $v){
+        $data = $opt['data'];
+//        foreach ($opt['data'] as $k => $v){
             //验证赛事所属联赛
-            if(!empty($v['lg_id'])){
+            if(!empty($data['lg_id'])){
                 $lg = lm($model['model_league'],'Sports')
-                    ->where(['lg_id'=>$v['lg_id']])
+                    ->where(['lg_id'=>$data['lg_id']])
                     ->count();
                 if($lg < 1) Render([], '10015', lang('Tips','Sports')->get('league_error'));
             }
             $post = lm($model['model_match'],'Sports')
-                ->where(['match_id'=>$v['match_id']])
+                ->where(['match_id'=>$data['match_id']])
                 ->count();
             //更新操作
             if($post > 0){
                 $ret = lm($model['model_match'],'Sports')
-                    -> where(['match_id'=>$v['match_id']])
-                    -> update($v);
+                    -> where(['match_id'=>$data['match_id']])
+                    -> update($data);
                 if($ret < 1) Render([], '10011', lang('Tips','Sports')->get('update_error'));
             }else{
                 //写入操作
-                $ret = lm($model['model_match'],'Sports')->insert($v);
+                $ret = lm($model['model_match'],'Sports')->insert($data);
                 if($ret != true) Render([], '10012', lang('Tips','Sports')->get('insert_error'));
             }
-        }
+//        }
         Render([], '1', lang('Tips','Sports')->get('success'));
     }
 
@@ -150,36 +152,37 @@ class WriteSports extends Controller{
         $game_code = $opt['game_code'];
         //根据球类代码获取相关model
         $model = $this->commonFunction->getModels($game_code,1);
-        foreach ($opt['data'] as $k => $v){
+        $data = $opt['data'];
+//        foreach ($opt['data'] as $k => $v){
             //验证赔率所属赛事
-            if(!empty($v['match_id'])){
+            if(!empty($data['match_id'])){
                 $match = lm($model['model_match'],'Sports')
-                    ->where(['match_id'=>$v['match_id']])
+                    ->where(['match_id'=>$data['match_id']])
                     ->count();
                 if($match < 1) Render([], '10016', lang('Tips','Sports')->get('match_error'));
             }
             //验证赔率所属联赛 冠军盘口
-            if(!empty($v['lg_id'])){
+            if(!empty($data['lg_id'])){
                 $lg = lm($model['model_league'],'Sports')
-                    ->where(['lg_id'=>$v['lg_id']])
+                    ->where(['lg_id'=>$data['lg_id']])
                     ->count();
                 if($lg < 1) Render([], '10015', lang('Tips','Sports')->get('league_error'));
             }
             $post = lm($model['model_odds'],'Sports')
-                ->where(['match_id'=>$v['match_id'],'odds_code'=>$v['odds_code'],'sort'=>$v['sort']])
+                ->where(['match_id'=>$data['match_id'],'odds_code'=>$data['odds_code'],'sort'=>$data['sort']])
                 ->count();
             //更新操作
             if($post > 0){
                 $ret = lm($model['model_odds'],'Sports')
-                    ->where(['match_id'=>$v['match_id'],'odds_code'=>$v['odds_code'],'sort'=>$v['sort']])
-                    -> update($v);
+                    ->where(['match_id'=>$data['match_id'],'odds_code'=>$data['odds_code'],'sort'=>$data['sort']])
+                    -> update($data);
                 if($ret < 1) Render([], '10011', lang('Tips','Sports')->get('update_error'));
             }else{
                 //写入操作
-                $ret = lm($model['model_odds'],'Sports')->insert($v);
+                $ret = lm($model['model_odds'],'Sports')->insert($data);
                 if($ret != true) Render([], '10012', lang('Tips','Sports')->get('insert_error'));
             }
-        }
+//        }
         Render([], '1', lang('Tips','Sports')->get('success'));
     }
 
@@ -188,29 +191,30 @@ class WriteSports extends Controller{
         $game_code = $opt['game_code'];
         //根据球类代码获取相关model
         $model = $this->commonFunction->getModels($game_code,1);
-        foreach ($opt['data'] as $k => $v){
+        $data = $opt['data'];
+//        foreach ($opt['data'] as $k => $v){
             //验证结果所属联赛
-            if(!empty($v['lg_id'])){
+            if(!empty($data['lg_id'])){
                 $lg = lm($model['model_league'],'Sports')
-                    ->where(['lg_id'=>$v['lg_id']])
+                    ->where(['lg_id'=>$data['lg_id']])
                     ->count();
                 if($lg < 1) Render([], '10015', lang('Tips','Sports')->get('league_error'));
             }
             $post = lm($model['model_league_result'],'Sports')
-                ->where(['lg_id'=>$v['lg_id'],'game_name'=>$v['game_name']])
+                ->where(['lg_id'=>$data['lg_id'],'game_name'=>$data['game_name']])
                 ->count();
             //更新操作
             if($post > 0){
                 $ret = lm($model['model_league_result'],'Sports')
-                    ->where(['lg_id'=>$v['lg_id'],'game_name'=>$v['game_name']])
-                    -> update($v);
+                    ->where(['lg_id'=>$data['lg_id'],'game_name'=>$data['game_name']])
+                    -> update($data);
                 if($ret < 1) Render([], '10011', lang('Tips','Sports')->get('update_error'));
             }else{
                 //写入操作
-                $ret = lm($model['model_league_result'],'Sports')->insert($v);
+                $ret = lm($model['model_league_result'],'Sports')->insert($data);
                 if($ret != true) Render([], '10012', lang('Tips','Sports')->get('insert_error'));
             }
-        }
+//        }
         Render([], '1', lang('Tips','Sports')->get('success'));
     }
 
@@ -219,36 +223,37 @@ class WriteSports extends Controller{
         $game_code = $opt['game_code'];
         //根据球类代码获取相关model
         $model = $this->commonFunction->getModels($game_code,1);
-        foreach ($opt['data'] as $k => $v){
+        $data = $opt['data'];
+//        foreach ($opt['data'] as $k => $v){
             //验证结果所属联赛
-            if(!empty($v['lg_id'])){
+            if(!empty($data['lg_id'])){
                 $lg = lm($model['model_league'],'Sports')
-                    ->where(['lg_id'=>$v['lg_id']])
+                    ->where(['lg_id'=>$data['lg_id']])
                     ->count();
                 if($lg < 1) Render([], '10015', lang('Tips','Sports')->get('league_error'));
             }
             //验证结果所属赛事
-            if(!empty($v['match_id'])){
+            if(!empty($data['match_id'])){
                 $lg = lm($model['model_match'],'Sports')
-                    ->where(['match_id'=>$v['match_id']])
+                    ->where(['match_id'=>$data['match_id']])
                     ->count();
                 if($lg < 1) Render([], '10016', lang('Tips','Sports')->get('match_error'));
             }
             $post = lm($model['model_result'],'Sports')
-                ->where(['match_id'=>$v['match_id']])
+                ->where(['match_id'=>$data['match_id']])
                 ->count();
             //更新操作
             if($post > 0){
                 $ret = lm($model['model_result'],'Sports')
-                    -> where(['match_id'=>$v['match_id']])
-                    -> update($v);
+                    -> where(['match_id'=>$data['match_id']])
+                    -> update($data);
                 if($ret < 1) Render([], '10011', lang('Tips','Sports')->get('update_error'));
             }else{
                 //写入操作
-                $ret = lm($model['model_result'],'Sports')->insert($v);
+                $ret = lm($model['model_result'],'Sports')->insert($data);
                 if($ret != true) Render([], '10012', lang('Tips','Sports')->get('insert_error'));
             }
-        }
+//        }
         Render([], '1', lang('Tips','Sports')->get('success'));
     }
 
@@ -257,36 +262,37 @@ class WriteSports extends Controller{
         $game_code = $opt['game_code'];
         //根据球类代码获取相关model
         $model = $this->commonFunction->getModels($game_code,1);
-        foreach ($opt['data'] as $k => $v){
+        $data = $opt['data'];
+//        foreach ($opt['data'] as $k => $v){
             //验证结果所属联赛
-            if(!empty($v['lg_id'])){
+            if(!empty($data['lg_id'])){
                 $lg = lm($model['model_league'],'Sports')
-                    ->where(['lg_id'=>$v['lg_id']])
+                    ->where(['lg_id'=>$data['lg_id']])
                     ->count();
                 if($lg < 1) Render([], '10015', lang('Tips','Sports')->get('league_error'));
             }
             //验证结果所属赛事
-            if(!empty($v['match_id'])){
+            if(!empty($data['match_id'])){
                 $lg = lm($model['model_match'],'Sports')
-                    ->where(['match_id'=>$v['match_id']])
+                    ->where(['match_id'=>$data['match_id']])
                     ->count();
                 if($lg < 1) Render([], '10016', lang('Tips','Sports')->get('match_error'));
             }
             $post = lm($model['model_result_record'],'Sports')
-                ->where(['match_id'=>$v['match_id'],'match_time'=>$v['match_time']])
+                ->where(['match_id'=>$data['match_id'],'match_time'=>$data['match_time']])
                 ->count();
             //更新操作
             if($post > 0){
                 $ret = lm($model['model_result_record'],'Sports')
-                    ->where(['match_id'=>$v['match_id'],'match_time'=>$v['match_time']])
-                    -> update($v);
+                    ->where(['match_id'=>$data['match_id'],'match_time'=>$data['match_time']])
+                    -> update($data);
                 if($ret < 1) Render([], '10011', lang('Tips','Sports')->get('update_error'));
             }else{
                 //写入操作
-                $ret = lm($model['model_result_record'],'Sports')->insert($v);
+                $ret = lm($model['model_result_record'],'Sports')->insert($data);
                 if($ret != true) Render([], '10012', lang('Tips','Sports')->get('insert_error'));
             }
-        }
+//        }
         Render([], '1', lang('Tips','Sports')->get('success'));
     }
 
@@ -295,36 +301,37 @@ class WriteSports extends Controller{
         $game_code = $opt['game_code'];
         //根据球类代码获取相关model
         $model = $this->commonFunction->getModels($game_code,1);
-        foreach ($opt['data'] as $k => $v){
+        $data = $opt['data'];
+//        foreach ($opt['data'] as $k => $v){
             //验证赔率所属赛事
-            if(!empty($v['match_id'])){
+            if(!empty($data['match_id'])){
                 $match = lm($model['model_match'],'Sports')
-                    ->where(['match_id'=>$v['match_id']])
+                    ->where(['match_id'=>$data['match_id']])
                     ->count();
                 if($match < 1) Render([], '10016', lang('Tips','Sports')->get('match_error'));
             }
             //验证赔率所属联赛 冠军盘口
-            if(!empty($v['lg_id'])){
+            if(!empty($data['lg_id'])){
                 $lg = lm($model['model_league'],'Sports')
-                    ->where(['lg_id'=>$v['lg_id']])
+                    ->where(['lg_id'=>$data['lg_id']])
                     ->count();
                 if($lg < 1) Render([], '10015', lang('Tips','Sports')->get('league_error'));
             }
             $post = lm($model['model_odds_record'],'Sports')
-                ->where(['match_id'=>$v['match_id'],'odds_code'=>$v['odds_code'],'sort'=>$v['sort']])
+                ->where(['match_id'=>$data['match_id'],'odds_code'=>$data['odds_code'],'sort'=>$data['sort']])
                 ->count();
             //更新操作
             if($post > 0){
                 $ret = lm($model['model_odds_record'],'Sports')
-                    ->where(['match_id'=>$v['match_id'],'odds_code'=>$v['odds_code'],'sort'=>$v['sort']])
-                    -> update($v);
+                    ->where(['match_id'=>$data['match_id'],'odds_code'=>$data['odds_code'],'sort'=>$data['sort']])
+                    ->update($data);
                 if($ret < 1) Render([], '10011', lang('Tips','Sports')->get('update_error'));
             }else{
                 //写入操作
-                $ret = lm($model['model_odds_record'],'Sports')->insert($v);
+                $ret = lm($model['model_odds_record'],'Sports')->insert($data);
                 if($ret != true) Render([], '10012', lang('Tips','Sports')->get('insert_error'));
             }
-        }
+//        }
         Render([], '1', lang('Tips','Sports')->get('success'));
     }
 

+ 1 - 1
Public/protest/1.html

@@ -4,7 +4,7 @@
     <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>
+    <script src="./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"

+ 2 - 1
Public/protest/tbase.js

@@ -14,9 +14,10 @@ function doRealRequest(){
 }
 
 function  getUrl(parobj){
+    const locationHost = 'http://' + window.location.host + '/Inapi-index/makeurl';
     $.ajax({
         type: 'POST',
-        url: 'http://www.kaiyou-dev.com/Inapi-index/makeurl',
+        url: locationHost,
         data: parobj,
         success: function(returndatas){