break; case "qd": if (($num = $api->userSign($wxid)) === false) { $text = join('', (array) $GLOBALS['err']->last_message()); } else { $text = "签到成功!获取积分{$num}。"; } echo $weixin->text($text)->reply(); exit; break; case "kf": echo $weixin->kefu()->reply(); exit; break; case 'qdcx': $order = $api->queryKuaidi($wxid); if ($order === false) { $text = join('', (array) $GLOBALS['err']->last_message()); } else { $text = ''; foreach ($order as $o) { $text .= "订单:{$o['order_sn']}\r\n"; $text .= "快递名称:{$o['shipping_name']}\r\n"; $text .= "快递单号:{$o['invoice_no']}\r\n"; $text .= "最新状态:{$o['kuaidi']['context']}\r\n"; } } echo $weixin->text($text)->reply(); exit; break; }