echo "<script>window.alert('商家兑换密码输入有误!');" . "window.location.href='http://weilink.huaxi100.com/spe/weixin-shake/my_coupons.php';</script>"; exit; } $ids = $_POST['ids']; $success = $shake->change($ids); if ($success) { echo "<script>window.alert('兑换成功!');" . "window.location.href='http://weilink.huaxi100.com/spe/weixin-shake/my_coupons.php';</script>"; exit; } else { echo "<script>window.alert('兑换失败!');" . "window.location.href='http://weilink.huaxi100.com/spe/weixin-shake/my_coupons.php';</script>"; exit; } break; case "shake": $id = $_GET['id']; $shake->record_shake_time($id); break; case "contact": $id = $_POST['id']; $name = $_POST['name']; $phone = $_POST['phone']; $msg = ''; if (empty($name)) { $msg .= '请输入姓名\\n'; } if (empty($phone)) { $msg .= '请输入手机号'; } if (empty($msg)) { $success = $shake->record_contact($id, $name, $phone); if ($success) {