|
@@ -24,13 +24,13 @@ class User extends Controller
|
|
|
{
|
|
|
/**
|
|
|
* 个人中心
|
|
|
- * @return \think\response\View
|
|
|
+ * @return \think\response\Redirect | \think\response\view
|
|
|
*/
|
|
|
public function personal()
|
|
|
{
|
|
|
$userId = Session::get('user_id');
|
|
|
if (empty($userId)) {
|
|
|
- return view('passport/logIn');
|
|
|
+ return redirect('/index/passport/login.html');
|
|
|
}
|
|
|
$goodsModel = new GoodsModel();
|
|
|
//$goods['content'] = html_entity_decode($goods['content']);
|
|
@@ -39,14 +39,14 @@ class User extends Controller
|
|
|
|
|
|
/**
|
|
|
* 我的订单页面
|
|
|
- * @return \think\response\View
|
|
|
+ * @return \think\response\Redirect | \think\response\view
|
|
|
*/
|
|
|
public function order(string $orderType = 'received')
|
|
|
{
|
|
|
$userId = Session::get('user_id');
|
|
|
if (empty($userId)) {
|
|
|
Cache::set('returnuri', '/index/user/order.html', 300);
|
|
|
- return view('passport/logIn');
|
|
|
+ return redirect('/index/passport/login.html');
|
|
|
}
|
|
|
return view('order');
|
|
|
}
|
|
@@ -54,7 +54,7 @@ class User extends Controller
|
|
|
/**
|
|
|
* 订单详情
|
|
|
* @param $orderId
|
|
|
- * @return \think\response\View
|
|
|
+ * @return \think\response\Redirect | \think\response\view
|
|
|
* @throws \cores\exception\BaseException
|
|
|
* @throws \think\db\exception\DataNotFoundException
|
|
|
* @throws \think\db\exception\DbException
|
|
@@ -66,7 +66,7 @@ class User extends Controller
|
|
|
$userId = Session::get('user_id');
|
|
|
if (empty($userId)) {
|
|
|
Session::set('returnuri', '/index/user/orderDetails.html?orderId=' . $orderId);
|
|
|
- return view('passport/logIn');
|
|
|
+ return redirect('/index/passport/login.html');
|
|
|
}
|
|
|
$model = OrderModel::getUserOrderDetail($orderId);
|
|
|
$orderAddress = OrderAddress::get(['order_id' => $orderId]);
|
|
@@ -105,13 +105,13 @@ class User extends Controller
|
|
|
|
|
|
/**
|
|
|
* 我的积分页面
|
|
|
- * @return \think\response\View
|
|
|
+ * @return \think\response\Redirect | \think\response\view
|
|
|
*/
|
|
|
public function myScores()
|
|
|
{
|
|
|
$userId = Session::get('user_id');
|
|
|
if (empty($userId)) {
|
|
|
- return view('passport/logIn');
|
|
|
+ return redirect('/index/passport/login.html');
|
|
|
}
|
|
|
$model = new PointsLogModel;
|
|
|
$list = $model->getList();
|