1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- /*
- |--------------------------------------------------------------------------
- | tester 体验者设置
- |--------------------------------------------------------------------------
- */
- namespace Component\Src;
- use Dever;
- use Main\Lib\Wechat;
- class User
- {
- public function logo($id)
- {
- $info = Dever::db('component/user')->one($id);
- $oauth = Dever::db('main/oauth')->one($info['oauth_id']);
- $wechat = new Wechat($info['project_id'], 'component');
- $oauth['oauth'] = $oauth['id'];
- $oauth['path'] = 'pages/index/index';
- $param = $wechat->param('applet_qrcode', $oauth);
- $url = $param['url'];
- $html['LOGO'] = '<img src="'.$info['pic'].'" width="150" />';
- $html['正式版'] = '<img src="'.$info['qrcode'].'" width="150" />';
- if ($url) {
- //$version = Dever::db('component/version')->one($id);
- $html['体验版'] = '<img src="'.$url.'" width="150" />';
- }
-
- $html = Dever::table($html);
- return $html;
- }
- public function qrcode($uid, $id)
- {
- $version = Dever::db('component/version_log')->one($id);
- $info = Dever::db('component/user')->one($uid);
- $oauth = Dever::db('main/oauth')->one($info['oauth_id']);
- $wechat = new Wechat($info['project_id'], 'component');
- $oauth['oauth'] = $oauth['id'];
- $oauth['path'] = 'pages/index/index';
- $param = $wechat->param('applet_qrcode', $oauth);
- $url = $param['url'];
- $html['返回信息'] = $version['result'];
- if ($url) {
- $html['体验版'] = '<img src="'.$url.'" width="150" />';
- }
- $html = Dever::table($html);
- return $html;
- }
- }
|