public function index()
 {
     $root = array();
     $email = strim($GLOBALS['request']['email']);
     //用户名或邮箱
     $pwd = strim($GLOBALS['request']['pwd']);
     //密码
     $id = intval($GLOBALS['request']['id']);
     $ids = strim($GLOBALS['request']['ids']);
     //检查用户,用户密码
     $user = user_check($email, $pwd);
     $user_id = intval($user['id']);
     if ($user_id > 0) {
         require APP_ROOT_PATH . 'app/Lib/deal.php';
         $root['user_login_status'] = 1;
         $result = getUcRepayBorrowMoney($id, $ids);
         $root['status'] = $result['status'];
         if ($result['status'] == 2) {
             $root['response_code'] = 1;
             $root['app_url'] = $result['jump'];
         } else {
             $root['response_code'] = $result['status'];
             $root['show_err'] = $result['show_err'];
         }
     } else {
         $root['response_code'] = 0;
         $root['show_err'] = "未登录";
         $root['user_login_status'] = 0;
     }
     output($root);
 }
 public function index()
 {
     $root = array();
     $email = strim($GLOBALS['request']['email']);
     //用户名或邮箱
     $pwd = strim($GLOBALS['request']['pwd']);
     //密码
     $id = intval($GLOBALS['request']['id']);
     $ids = strim($GLOBALS['request']['ids']);
     $paypassword = strim($GLOBALS['request']['paypassword']);
     //检查用户,用户密码
     $user = user_check($email, $pwd);
     $user_id = intval($user['id']);
     if ($user_id > 0) {
         require APP_ROOT_PATH . 'app/Lib/deal.php';
         $root['user_login_status'] = 1;
         if ($paypassword == "") {
             $root["show_err"] = $GLOBALS['lang']['PAYPASSWORD_EMPTY'];
             output($root);
         }
         if (md5($paypassword) != $GLOBALS['user_info']['paypassword']) {
             $root["show_err"] = $GLOBALS['lang']['PAYPASSWORD_ERROR'];
             output($root);
         }
         $result = getUcRepayBorrowMoney($id, $ids);
         $root['status'] = $result['status'];
         if ($result['status'] == 2) {
             $root['response_code'] = 1;
             $root['app_url'] = $result['jump'];
         } else {
             $root['response_code'] = $result['status'];
             $root['show_err'] = $result['show_err'];
         }
         $root["show_err"] = "还款成功";
         output($root);
     } else {
         $root['response_code'] = 0;
         $root['show_err'] = "未登录";
         $root['user_login_status'] = 0;
     }
     output($root);
 }
Example #3
0
 public function repay_borrow_money()
 {
     $id = intval($_REQUEST['id']);
     $ids = strim($_REQUEST['ids']);
     $paypassword = strim($_REQUEST['paypassword']);
     if ($paypassword == "") {
         showErr($GLOBALS['lang']['PAYPASSWORD_EMPTY'], 1);
     }
     if (md5($paypassword) != $GLOBALS['user_info']['paypassword']) {
         showErr($GLOBALS['lang']['PAYPASSWORD_ERROR'], 1);
     }
     $status = getUcRepayBorrowMoney($id, $ids);
     if ($status['status'] == 2) {
         ajax_return($status);
         die;
     } elseif ($status['status'] == 0) {
         showErr($status['show_err'], 1);
     } else {
         showSuccess($status['show_err'], 1);
     }
 }