1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- /*
- |--------------------------------------------------------------------------
- | domain 服务域名设置
- |--------------------------------------------------------------------------
- */
- namespace Component\Src;
- use Dever;
- use Main\Lib\Wechat;
- class Domain extends Core
- {
- public $table = 'domain';
- public function value($info)
- {
- $list = Dever::db('component/domain')->state(array('option_project_id' => $info['project_id']));
- $info['value'] = array();
- foreach ($list as $k => $v) {
- if (!in_array($v['value'], $info['value'])) {
- $info['value'][] = $v['value'];
- }
- }
- return $info['value'];
- }
- public function handle($oauth, $info, $delete, $user, $wechat)
- {
- $value = $this->value($info);
- $oauth['domain'] = $value;
- $oauth['method'] = 'applet_domain';
- return $oauth;
- }
- }
|