作者 lihan
1 个管道 的构建 通过 耗费 1 秒

项目细节完善

... ... @@ -47,7 +47,7 @@ class ActivityController extends HomeBaseController
}
}
}else {
//$this->error('请从微信浏览器打开');
$this->error('请从微信浏览器打开');
}
}
... ...
... ... @@ -57,7 +57,7 @@ class IndexController extends HomeBaseController
}
}
}else {
//$this->error('请从微信浏览器打开');
$this->error('请从微信浏览器打开');
}
}
... ...
... ... @@ -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')
... ...
... ... @@ -80,20 +80,24 @@
})
$(".ok").click(function () {
alert(rank_synthetical);
$.ajax({
url:"{:url('user/Center/comment')}",
data:{
oid:'{$oid}',
rank_synthetical:rank_synthetical,
rank_service:rank_service,
rank_journey:rank_journey
rank_journey:rank_journey,
content:$(".idea").val()
},
type:"POST",
dataType:"JSON",
success: function (data) {
if(data.data === true) {
window.location.href=data.url;
}else {
alert(data.msg);
}
}
})
})
... ...