作者 lyh

gx

@@ -369,10 +369,30 @@ class ImageController extends Controller @@ -369,10 +369,30 @@ class ImageController extends Controller
369 $settingInfo = $imageSettingModel->read(['project_id'=>$project_id]); 369 $settingInfo = $imageSettingModel->read(['project_id'=>$project_id]);
370 if($settingInfo !== false){ 370 if($settingInfo !== false){
371 if($settingInfo['status'] == 1 && !empty($settingInfo['image_data'])){ 371 if($settingInfo['status'] == 1 && !empty($settingInfo['image_data'])){
372 - $settingInfo['image_data'] = json_decode($settingInfo['image_data'],true); 372 + $image_data = json_decode($settingInfo['image_data'],true);
  373 + foreach ($image_data as $k => $v){
  374 + $arr = implode('/',$v);
  375 + if ($arr[0] == 'image') {
  376 + $arr[1] = urlSafeBase64Encode($arr[1]);
  377 + }
  378 + $image_data[$k] = $v;
  379 + }
373 } 380 }
374 if($settingInfo['status'] == 2 && !empty($settingInfo['str_data'])){ 381 if($settingInfo['status'] == 2 && !empty($settingInfo['str_data'])){
375 - $settingInfo['str_data'] = json_decode($settingInfo['str_data'],true); 382 + $str_data = json_decode($settingInfo['str_data'],true);
  383 + foreach ($str_data as $k => $v){
  384 + $arr = implode('/',$v);
  385 + if ($arr[0] == 'text') {
  386 + $arr[1] = urlSafeBase64Encode($arr[1]);
  387 + }
  388 + if ($arr[0] == 'font') {
  389 + $arr[1] = urlSafeBase64Encode($arr[1]);
  390 + }
  391 + if ($arr[0] == 'fill') {
  392 + $arr[1] = urlSafeBase64Encode($arr[1]);
  393 + }
  394 + $str_data[$k] = $arr;
  395 + }
376 } 396 }
377 } 397 }
378 return null; 398 return null;