|
@@ -80,11 +80,25 @@ class Api
|
|
|
|
|
|
if ($model) {
|
|
|
$config = array();
|
|
|
+ $config['background'] = '';
|
|
|
+ if (isset($set['width']) && $set['width']) {
|
|
|
+ $template['width'] = $set['width'];
|
|
|
+ }
|
|
|
+ if (isset($set['height']) && $set['height']) {
|
|
|
+ $template['height'] = $set['height'];
|
|
|
+ }
|
|
|
+
|
|
|
if (isset($set['background']) && $set['background']) {
|
|
|
$config['background'] = Dever::local($set['background']);
|
|
|
unset($set['background']);
|
|
|
- } else {
|
|
|
+ } elseif ($template['create'] == 2 && $template['background']) {
|
|
|
$config['background'] = Dever::local($template['background']);
|
|
|
+ } elseif ($template['create'] == 1) {
|
|
|
+
|
|
|
+ $config['background'] = array
|
|
|
+ (
|
|
|
+ $template['width'], $template['height']
|
|
|
+ );
|
|
|
}
|
|
|
|
|
|
$config['param'] = array();
|
|
@@ -116,7 +130,7 @@ class Api
|
|
|
$set[$key] = $value['value'];
|
|
|
}
|
|
|
if (isset($set[$key])) {
|
|
|
- if ($value['position_type'] == 8) {
|
|
|
+ if ($value['position_type'] == 10) {
|
|
|
$position = explode(',', $value['position']);
|
|
|
} else {
|
|
|
$position = $value['position_type'];
|
|
@@ -150,9 +164,10 @@ class Api
|
|
|
|
|
|
$fonts = array
|
|
|
(
|
|
|
- 1 => 'PingFang_Regular.ttf',
|
|
|
- 2 => 'PingFang_Bold.ttf',
|
|
|
- 3 => 'PingFang_Medium.ttf',
|
|
|
+ 1 => 'simsun.ttc',
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
);
|
|
|
|
|
|
$param['font'] = dirname(__FILE__) . DIRECTORY_SEPARATOR . '../fonts/'.$fonts[$value['fonts']];
|