12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- <?php
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- namespace app\shopapi\logic;
-
- use app\common\basics\Logic;
- use app\common\model\shop\Shop;
- use app\common\server\ConfigServer;
- use app\common\server\UrlServer;
-
-
- class IndexLogic extends Logic
- {
-
-
-
- public static function config()
- {
- $config = [
- 'platform_name' => ConfigServer::get('website', 'name'),
- ];
- return $config;
- }
-
-
-
- public static function copyright($shop_id)
- {
- $result = Shop::where('id',$shop_id)->json(['other_qualifications'],true)->field('business_license,other_qualifications')->findOrEmpty()->toArray();
- $business_license = $result['business_license'] ? UrlServer::getFileUrl($result['business_license']) : '';
- foreach ($result['other_qualifications'] as &$val) {
- $other_qualifications[] = UrlServer::getFileUrl($val);
- }
- if (!empty($business_license)) {
- array_unshift($other_qualifications,$business_license);
- }
-
- return $other_qualifications;
- }
-
- }
|