|
@@ -54,27 +54,28 @@ class Api extends Base
|
|
|
}
|
|
|
|
|
|
|
|
|
- public function poster() {
|
|
|
+ public function poster()
|
|
|
+ {
|
|
|
$id = Dever::input('product_id');
|
|
|
$template = Dever::input('template', 'share');
|
|
|
$path = Dever::input('path', 'template/home/index');
|
|
|
$info = Dever::db('product/info')->one($id);
|
|
|
-
|
|
|
- $filename = $this->data['uid'] . ',' . $id;
|
|
|
+ $scene = $this->data['uid'] . ',' . $id;
|
|
|
|
|
|
$send['project'] = Dever::input('project', 1);
|
|
|
- $send['send'] = $filename;
|
|
|
+ $send['send'] = $scene;
|
|
|
$send['width'] = 152;
|
|
|
$send['path'] = $path;
|
|
|
- $logo = Dever::load('wechat_applet/code.get', $send);
|
|
|
+
|
|
|
|
|
|
$model = array
|
|
|
(
|
|
|
|
|
|
|
|
|
- 'logo' => Dever::local($logo),
|
|
|
+
|
|
|
);
|
|
|
- $img = Dever::load('poster/api')->get($filename, $template, $model);
|
|
|
+ $template = $info['share'];
|
|
|
+ $img = Dever::load('poster/api')->get($scene, $template, $model);
|
|
|
return $img;
|
|
|
}
|
|
|
|