Kirin 3 years ago
parent
commit
8a24832fcf

+ 1 - 1
app/admin/controller/system/SystemStore.php

@@ -225,7 +225,7 @@ class SystemStore extends AuthController
      */
      */
     public function check_apply($id = 0)
     public function check_apply($id = 0)
     {
     {
-        $store = SystemStoreApply::get($id);
+        $store = SystemStoreApply::getDetail($id);
         $users = User::field('uid,nickname,phone')->select();
         $users = User::field('uid,nickname,phone')->select();
         $this->assign(compact('store', 'users'));
         $this->assign(compact('store', 'users'));
 
 

+ 16 - 0
app/models/system/SystemStoreApply.php

@@ -84,4 +84,20 @@ class SystemStoreApply extends BaseModel
         };
         };
         return isset($data) ? $data : [];
         return isset($data) ? $data : [];
     }
     }
+
+    /**
+     * 获取门店信息
+     * @param int $id
+     * @return array|\think\Model|null
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
+     */
+    public static function getDetail($id)
+    {
+
+        $storeInfo = self::verificWhere()->where('id', $id)->find();
+        $storeInfo['address'] = $storeInfo['address'] ? explode(',', $storeInfo['address']) : [];
+        return $storeInfo;
+    }
 }
 }