@@ 99-111 (lines=13) @@ | ||
96 | * |
|
97 | * @return array|bool 是一张图片,可以直接展示或者下载 |
|
98 | */ |
|
99 | public function showqrcode($ticket = '') |
|
100 | { |
|
101 | Api::setApiUrl('https://mp.weixin.qq.com/'); |
|
102 | ||
103 | $this->apitype = 'cgi-bin'; |
|
104 | $this->module = 'showqrcode'; |
|
105 | ||
106 | $queryStr = ['ticket' => $ticket]; |
|
107 | ||
108 | $res = $this->_get('', $queryStr); |
|
109 | ||
110 | return $res; |
|
111 | } |
|
112 | ||
113 | /** |
|
114 | * 通过ticket换取二维码 链接 |
@@ 115-132 (lines=18) @@ | ||
112 | * |
|
113 | * @return string [是一张图片,可以直接展示或者下载] |
|
114 | */ |
|
115 | public function show($ticket = '') |
|
116 | { |
|
117 | Api::setApiUrl('https://mp.weixin.qq.com/'); |
|
118 | ||
119 | $this->module = 'showqrcode'; |
|
120 | ||
121 | $queryStr = ['ticket' => $ticket]; |
|
122 | ||
123 | $res = $this->_get('', $queryStr); |
|
124 | ||
125 | if (!$res) { |
|
126 | $this->setError('二维码获取失败'); |
|
127 | ||
128 | return false; |
|
129 | } |
|
130 | ||
131 | return $res; |
|
132 | } |
|
133 | } |
|
134 |