ConfigForm.php 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. /**
  3. * 重庆赤晓店信息科技有限公司
  4. * https://www.chixiaodian.com
  5. * Copyright (c) 2023 赤店商城 All rights reserved.
  6. */
  7. /*
  8. * @Author: your name
  9. * @Date: 2021-03-02 09:50:20
  10. * @LastEditTime: 2021-05-20 18:08:04
  11. * @LastEditors: Please set LastEditors
  12. * @Description: In User Settings Edit
  13. * @FilePath: \admin_php\modules\client\models\v1\StoreConfigForm.php
  14. */
  15. namespace app\modules\alliance\models;
  16. use app\constants\StoreImageFrom;
  17. use app\models\AppNavbar;
  18. use app\models\District;
  19. use app\models\Option;
  20. use yii\base\Model;
  21. class ConfigForm extends Model
  22. {
  23. public static function getConfig()
  24. {
  25. // 服务器图片
  26. $form = new StoreImageFrom();
  27. $wxappImg = $form->search();
  28. // $lang = '';
  29. // if (is_platform()) {
  30. // $lang = Option::get('lang', 0, 'saas', 'zh-CN')['value'];
  31. // } else {
  32. // $lang = Option::get('language', get_store_id(), 'display', 'zh-CN')['value'];
  33. // }
  34. // $store_info = self::getStore($store_id);
  35. // $store_info['latitude'] = $lat;
  36. // $store_info['longitude'] = $long;
  37. // $store_info['distance'] = $distance;
  38. // $store_info['mobile'] = $store->contact_tel;
  39. // $store_info['address'] = $store->address;
  40. // $store_info['province_name'] = District::findOne($store->province_id)->name;
  41. // $store_info['city_name'] = District::findOne($store->city_id)->name;
  42. // $store_info['district_name'] = District::findOne($store->district_id)->name;
  43. // $store_info['cover_url'] = $store->logo;
  44. $config = [
  45. 'images' => $wxappImg
  46. //'share_setting' => $share_form->getShareSetting()['data'],
  47. // 'wx_bar_title' => [],
  48. // 'store_name' => $store_name ? $store_name['value'] : '',
  49. // 'contact_tel' => $contact_tel ? $contact_tel['value'] : '',
  50. // 'store' => $store_info,
  51. // 'navbar' => self::getNav(),
  52. // 'platform_appid' => Option::getSaasWechat()['sp_appid'],
  53. // 'language' => $lang
  54. ];
  55. return $config;
  56. }
  57. }