Exemple #1
0
 public function deladdr($address_id)
 {
     $uid = LuS::get('uid');
     $rs = UserAddress::delAddr($uid, $address_id);
     //pc删除地址
     if (isset($_GET['ajax']) && $_GET['ajax'] == 1) {
         echo json_encode(array('result' => TRUE));
         throw new Exception('exit');
     }
     if (!$rs) {
         echo "删除地址失败!";
         throw new Exception('exit');
     }
     $url = url('usercenter', 'usercenter::addr');
     header("Location:{$url}");
     throw new Exception('exit');
 }