|
|
@@ -158,16 +158,16 @@ class PurchaseOrderController extends BaseController
|
|
|
|
|
|
if (getenv('YII_ENV') == 'production') {
|
|
|
//阿东的创始人才能查看采购单
|
|
|
- if ($this->mainId == 742) {
|
|
|
+ if (in_array($this->mainId, [742])) {
|
|
|
$staff = $this->shopAdmin;
|
|
|
- if (isset($staff['founder']) == false || $staff['founder'] != 2) {
|
|
|
+ if (isset($staff->founder) == false || $staff->founder != 2) {
|
|
|
util::fail('没有权限');
|
|
|
}
|
|
|
}
|
|
|
- }else{
|
|
|
- if ($this->mainId == 661) {
|
|
|
+ } else {
|
|
|
+ if (in_array($this->mainId, [644])) {
|
|
|
$staff = $this->shopAdmin;
|
|
|
- if (isset($staff['founder']) == false || $staff['founder'] != 2) {
|
|
|
+ if (isset($staff->founder) == false || $staff->founder != 2) {
|
|
|
util::fail('没有权限');
|
|
|
}
|
|
|
}
|
|
|
@@ -197,16 +197,16 @@ class PurchaseOrderController extends BaseController
|
|
|
|
|
|
if (getenv('YII_ENV') == 'production') {
|
|
|
//阿东的创始人才能查看采购单
|
|
|
- if ($this->mainId == 742) {
|
|
|
+ if (in_array($this->mainId, [742])) {
|
|
|
$staff = $this->shopAdmin;
|
|
|
- if (isset($staff['founder']) == false || $staff['founder'] != 2) {
|
|
|
+ if (isset($staff->founder) == false || $staff->founder != 2) {
|
|
|
util::fail('没有权限');
|
|
|
}
|
|
|
}
|
|
|
- }else{
|
|
|
- if ($this->mainId == 644) {
|
|
|
+ } else {
|
|
|
+ if (in_array($this->mainId, [644])) {
|
|
|
$staff = $this->shopAdmin;
|
|
|
- if (isset($staff['founder']) == false || $staff['founder'] != 2) {
|
|
|
+ if (isset($staff->founder) == false || $staff->founder != 2) {
|
|
|
util::fail('没有权限');
|
|
|
}
|
|
|
}
|