|
@@ -273,7 +273,7 @@ class Goods extends Base
|
|
|
public function getWxCode()
|
|
|
{
|
|
|
$goods_id = $this->request->post('goods_id');
|
|
|
- $version = $this->request->post('version', 'release');
|
|
|
+ $version = $this->request->post('version', 'trial');
|
|
|
if (empty($goods_id)) {
|
|
|
$this->error('参数错误');
|
|
|
}
|
|
@@ -298,20 +298,21 @@ class Goods extends Base
|
|
|
\think\Log::write($e->getMessage());
|
|
|
$this->error("获取微信二维码失败!");
|
|
|
}
|
|
|
- } else {
|
|
|
- $config = get_addon_config('shop');
|
|
|
- if ($config['wxapp']) {
|
|
|
- $localFile = ROOT_PATH . 'public' . $config['wxapp'];
|
|
|
- if (is_file($localFile)) {
|
|
|
- $resource = file_get_contents($localFile);
|
|
|
- } else {
|
|
|
- $resource = Http::get(cdnurl($config['wxapp'], true));
|
|
|
- }
|
|
|
- }
|
|
|
- if (config('app_debug')) {
|
|
|
- Log::write($fileStream);
|
|
|
- }
|
|
|
}
|
|
|
+ // } else {
|
|
|
+ // $config = get_addon_config('shop');
|
|
|
+ // if ($config['wxapp']) {
|
|
|
+ // $localFile = ROOT_PATH . 'public' . $config['wxapp'];
|
|
|
+ // if (is_file($localFile)) {
|
|
|
+ // $resource = file_get_contents($localFile);
|
|
|
+ // } else {
|
|
|
+ // $resource = Http::get(cdnurl($config['wxapp'], true));
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // if (config('app_debug')) {
|
|
|
+ // Log::write($fileStream);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
if (!$resource) {
|
|
|
Log::write($fileStream);
|
|
|
$this->error("获取二维码失败!");
|