|
|
@@ -107,7 +107,7 @@ class StoreProduct extends BaseModel
|
|
|
$type = $data['type']; // 某些模板需要购物车数量 1 = 需要查询,0 = 不需要
|
|
|
|
|
|
$store_user = 0;
|
|
|
- if ($user['admin_id']) {
|
|
|
+ if ($uid && $user['admin_id']) {
|
|
|
$admin = SystemAdmin::where('id', $user['admin_id'])->find();
|
|
|
$store_user = SystemStore::where('id', $admin['store_id'] ?? 0)->value('see');
|
|
|
}
|
|
|
@@ -164,7 +164,7 @@ class StoreProduct extends BaseModel
|
|
|
{
|
|
|
$user = User::getUserInfo($uid);
|
|
|
$store_user = 0;
|
|
|
- if ($user['admin_id']) {
|
|
|
+ if ($uid && $user['admin_id']) {
|
|
|
$admin = SystemAdmin::where('id', $user['admin_id'])->find();
|
|
|
$store_user = SystemStore::where('id', $admin['store_id'] ?? 0)->value('see');
|
|
|
}
|
|
|
@@ -214,7 +214,7 @@ class StoreProduct extends BaseModel
|
|
|
->order('sort DESC, id DESC');
|
|
|
$user = User::getUserInfo($uid);
|
|
|
$store_user = 0;
|
|
|
- if ($user['admin_id']) {
|
|
|
+ if ($uid && $user['admin_id']) {
|
|
|
$admin = SystemAdmin::where('id', $user['admin_id'])->find();
|
|
|
$store_user = SystemStore::where('id', $admin['store_id'] ?? 0)->value('see');
|
|
|
}
|
|
|
@@ -250,7 +250,7 @@ class StoreProduct extends BaseModel
|
|
|
->order('sort DESC, id DESC');
|
|
|
$user = User::getUserInfo($uid);
|
|
|
$store_user = 0;
|
|
|
- if ($user['admin_id']) {
|
|
|
+ if ($uid && $user['admin_id']) {
|
|
|
$admin = SystemAdmin::where('id', $user['admin_id'])->find();
|
|
|
$store_user = SystemStore::where('id', $admin['store_id'] ?? 0)->value('see');
|
|
|
}
|
|
|
@@ -291,7 +291,7 @@ class StoreProduct extends BaseModel
|
|
|
->order('sort DESC, id DESC');
|
|
|
$user = User::getUserInfo($uid);
|
|
|
$store_user = 0;
|
|
|
- if ($user['admin_id']) {
|
|
|
+ if ($uid && $user['admin_id']) {
|
|
|
$admin = SystemAdmin::where('id', $user['admin_id'])->find();
|
|
|
$store_user = SystemStore::where('id', $admin['store_id'] ?? 0)->value('see');
|
|
|
}
|
|
|
@@ -318,7 +318,7 @@ class StoreProduct extends BaseModel
|
|
|
->order('sort DESC, id DESC');
|
|
|
$user = User::getUserInfo($uid);
|
|
|
$store_user = 0;
|
|
|
- if ($user['admin_id']) {
|
|
|
+ if ($uid && $user['admin_id']) {
|
|
|
$admin = SystemAdmin::where('id', $user['admin_id'])->find();
|
|
|
$store_user = SystemStore::where('id', $admin['store_id'] ?? 0)->value('see');
|
|
|
}
|
|
|
@@ -395,7 +395,7 @@ class StoreProduct extends BaseModel
|
|
|
->order('sort DESC, id DESC');
|
|
|
$user = User::getUserInfo($uid);
|
|
|
$store_user = 0;
|
|
|
- if ($user['admin_id']) {
|
|
|
+ if ($uid && $user['admin_id']) {
|
|
|
$admin = SystemAdmin::where('id', $user['admin_id'])->find();
|
|
|
$store_user = SystemStore::where('id', $admin['store_id'] ?? 0)->value('see');
|
|
|
}
|
|
|
@@ -429,7 +429,7 @@ class StoreProduct extends BaseModel
|
|
|
->field($field)->order('sort DESC,id DESC');
|
|
|
$user = User::getUserInfo($uid);
|
|
|
$store_user = 0;
|
|
|
- if ($user['admin_id']) {
|
|
|
+ if ($uid && $user['admin_id']) {
|
|
|
$admin = SystemAdmin::where('id', $user['admin_id'])->find();
|
|
|
$store_user = SystemStore::where('id', $admin['store_id'] ?? 0)->value('see');
|
|
|
}
|