| xqd
@@ -758,24 +758,26 @@ class AlbumController extends Controller
|
|
|
continue;
|
|
|
}
|
|
|
$cat = AlbumCatModel::find($goods->cat_id);
|
|
|
- if(empty($cat)) continue;
|
|
|
- $action = '点击了您的'.$cat->name.'分类下的商品 '.$goods->name.'的'.$goods_data['detail'];
|
|
|
- }elseif($val->action==6){
|
|
|
- $detail = json_decode($val->detail,true);
|
|
|
+ if (empty($cat)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ $action = '点击了您的' . $cat->name . '分类下的商品 ' . $goods->name . '的' . $goods_data['detail'];
|
|
|
+ } elseif ($val->action == 6) {
|
|
|
+ $detail = json_decode($val->detail, true);
|
|
|
$address = $detail['detail'];
|
|
|
- $action = '查看了您的地址'.$address.',并且点击了导航';
|
|
|
- }elseif($val->action==7){
|
|
|
- $detail = json_decode($val->detail,true);
|
|
|
+ $action = '查看了您的地址' . $address . ',并且点击了导航';
|
|
|
+ } elseif ($val->action == 7) {
|
|
|
+ $detail = json_decode($val->detail, true);
|
|
|
$phone = $detail['detail'];
|
|
|
- $action = '查看了您的电话'.$phone.',并且点击了拨号';
|
|
|
+ $action = '查看了您的电话' . $phone . ',并且点击了拨号';
|
|
|
}
|
|
|
-
|
|
|
- $user = AlbumUserModel::where([['open_id',$val->open_id],['store_id',$val->store_id]])->select(['username','avatar','phone'])->first();
|
|
|
- // dd(111);
|
|
|
+ $user = AlbumUserModel::where([
|
|
|
+ ['open_id',$val->open_id],['store_id',$val->store_id]
|
|
|
+ ])->select(['username','avatar','phone'])->first();
|
|
|
$data_res[] = [
|
|
|
- 'time'=>$val->created_at,
|
|
|
- 'action'=>$action,
|
|
|
- 'user'=>$user
|
|
|
+ 'time' => $val->created_at,
|
|
|
+ 'action' => $action,
|
|
|
+ 'user' => $user
|
|
|
];
|
|
|
}
|
|
|
return $this->api(compact('data_res'));
|
| xqd
@@ -896,7 +898,9 @@ class AlbumController extends Controller
|
|
|
public function albumGetDataCat(Request $request)
|
|
|
{
|
|
|
$userAuth = Auth('api')->user();
|
|
|
- if(!$userAuth) return $this->error(ErrorCode::CLIENT_WRONG_PARAMS, '未登录!');
|
|
|
+ if (!$userAuth) {
|
|
|
+ return $this->error(ErrorCode::CLIENT_WRONG_PARAMS, '未登录!');
|
|
|
+ }
|
|
|
$validator = Validator::make($request->all(), [
|
|
|
'store_id' => 'required',
|
|
|
'parent_id' => 'required'
|