...
|
...
|
@@ -22,7 +22,7 @@ class CenterController extends HomeBaseController |
|
|
function _initialize()
|
|
|
{
|
|
|
if (empty(session('user.id'))) {
|
|
|
echo json_encode(['msg' => '登陆失败', 'code' => 40001]);
|
|
|
$this->redirect(url('portal/Index/index'));
|
|
|
exit();
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -473,7 +473,16 @@ class CenterController extends HomeBaseController |
|
|
public function comment(){
|
|
|
$request = request();
|
|
|
if($request->isAjax()) {
|
|
|
|
|
|
$data = $request->param();
|
|
|
$data['user_id'] = session('user.id');
|
|
|
$data['comment_time'] = time();
|
|
|
$data['activity_id'] = Db::name('order_info')->where(['id'=>$data['oid']])->value('activity_id');
|
|
|
unset($data['oid']);
|
|
|
if(Db::name('activity_comment')->insert($data)) {
|
|
|
$this->success('评论成功', url('user/Center/orderDetail', ['oid'=>$request->param('oid')]), true);
|
|
|
}else {
|
|
|
$this->success('评论失败', '', false);
|
|
|
}
|
|
|
}else {
|
|
|
return $this->fetch(':comment', [
|
|
|
'oid' => request()->param('oid')
|
...
|
...
|
|