thinkphp 中ajax 返回语句是哪句?? 后台ordercontrol其中一个case:关闭订单,前台总是返回执行error
functionordercontrol(){$id=intval(IReq::get('id'));$type=IReq::get('type');if(empty($...
function ordercontrol()
{
$id = intval(IReq::get('id'));
$type = IReq::get('type');
if(empty($id)) $this->message('order_noexit');
$orderinfo = $this->mysql->select_one("select * from ".Mysite::$app->config['tablepre']."order where id='".$id."' ");
if(empty($orderinfo)) $this->message('order_noexit');
switch($type)
{
case 'un'://关闭订单
$reasons = IReq::get('reasons');
$suresend = IReq::get('suresend');
if(empty($reasons)) $this->message('order_emptyclosereason');
if($orderinfo['status'] > 2) $this->message('order_cantclose');
//更新订单
//写消息给买家
if(!empty($orderinfo['buyeruid']))
{
$detail = '';
$memberinfo = $this->mysql->select_one("select * from ".Mysite::$app->config['tablepre']."member where uid='".$orderinfo['buyeruid']."' ");
if($orderinfo['paystatus'] == 1&& $orderinfo['paytype'] != 0){ 展开
{
$id = intval(IReq::get('id'));
$type = IReq::get('type');
if(empty($id)) $this->message('order_noexit');
$orderinfo = $this->mysql->select_one("select * from ".Mysite::$app->config['tablepre']."order where id='".$id."' ");
if(empty($orderinfo)) $this->message('order_noexit');
switch($type)
{
case 'un'://关闭订单
$reasons = IReq::get('reasons');
$suresend = IReq::get('suresend');
if(empty($reasons)) $this->message('order_emptyclosereason');
if($orderinfo['status'] > 2) $this->message('order_cantclose');
//更新订单
//写消息给买家
if(!empty($orderinfo['buyeruid']))
{
$detail = '';
$memberinfo = $this->mysql->select_one("select * from ".Mysite::$app->config['tablepre']."member where uid='".$orderinfo['buyeruid']."' ");
if($orderinfo['paystatus'] == 1&& $orderinfo['paytype'] != 0){ 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询