public function save_user_privacy()
{
$map['uid'] = $this->mid;
if (isset($this->data['message'])) {
$map['key'] = 'message';
$key = 'message';
$value = intval($this->data['message']);
D('user_privacy')->where($map)->delete();
$map['value'] = $value;
$res = D('user_privacy')->add($map);
}
if (isset($this->data['comment_weibo'])) {
$map['key'] = 'comment_weibo';
$key = 'comment_weibo';
$value = intval($this->data['comment_weibo']);
D('user_privacy')->where($map)->delete();
$map['value'] = $value;
$res = D('user_privacy')->add($map);
}
if (isset($this->data['space'])) {
$map['key'] = 'space';
$key = 'space';
$value = intval($this->data['space']);
D('user_privacy')->where($map)->delete();
$map['value'] = $value;
$res = D('user_privacy')->add($map);
}
// if($res){
return array('status' => 1, 'msg' => '设置成功');
// }else{
// return array('status'=>0,'msg'=>'设置失败');
// }
}