/** * 地址修改 */ public function alterAddr() { codecheck(); $data = array(array('addr', 'string'), array('name', 'string'), array('phone', 'string'), array('id', 'int')); dataFilter($data, 'post'); $id = $data['id']; unset($data['id']); D('Address')->update($data, 'cust_id=' . $_SESSION['userinfo']['id'] . ' AND id=' . $id); returnJson(SUCCESS, '', '操作成功'); }
/** * 用户注销 */ public function logout() { codecheck(); D('CustCode')->delete('0 AND cust_id=' . $_SESSION['userinfo']['id']); returnJson(SUCCESS, '', '注销成功!'); }