1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- /**
- * Author: luzheng.liu
- * Time: 2020/12/5 00:49
- */
- namespace app\common\service;
- use app\index\model\SettingModel;
- class CommonService {
- static $setData;
- public static function getSetData() {
- if (empty(self::$setData)){
- $data = (new SettingModel())::where(['id' => 1])->find();
- self::$setData = $data;
- return $data;
- }
- return self::$setData;
- }
- public static function getAuthUrl() {
- $baseUrl = self::getBaeUrl();
- return 'http://mdttest.kydev.net/api/wechat/focusarea/11/28?redirecturi=https://webcast.bizconfstreaming.com/index/user/login';
- }
- public static function getBaeUrl() {
- $data = self::getSetData();
- return "http://{$data['domain']}/api/wechat/focusarea/{$data['site_id']}/{$data['unique_key']}";
- }
- public static function getRedirectUrl() {
- $data = self::getSetData();
- return $data['redirct_url'];
- }
- }
|