作者 张关杰

Merge branch 'develop' of http://47.244.231.31:8099/zhl/globalso-v6 into bate

@@ -46,7 +46,7 @@ class BTemplateModuleProjectLogic extends BaseLogic @@ -46,7 +46,7 @@ class BTemplateModuleProjectLogic extends BaseLogic
46 public function moduleProjectSave(){ 46 public function moduleProjectSave(){
47 try { 47 try {
48 $this->param['operator_id'] = $this->user['id']; 48 $this->param['operator_id'] = $this->user['id'];
49 - $this->param['project_id'] = $this->user['project_id']; 49 + $this->param['project_id'] = isset($this->param['project_id']) ? $this->param['project_id'] : $this->user['project_id'];
50 $this->model->add($this->param); 50 $this->model->add($this->param);
51 }catch (\Exception $e){ 51 }catch (\Exception $e){
52 $this->fail('系统错误,请联系管理员'); 52 $this->fail('系统错误,请联系管理员');
@@ -34,7 +34,7 @@ class TranslateLogic extends BaseLogic @@ -34,7 +34,7 @@ class TranslateLogic extends BaseLogic
34 if($this->param['url'] == 'All'){ 34 if($this->param['url'] == 'All'){
35 $info = $this->model->read(['url'=>$this->param['url'],'language_id'=>$this->param['language_id'],'type'=>$this->param['type']]); 35 $info = $this->model->read(['url'=>$this->param['url'],'language_id'=>$this->param['language_id'],'type'=>$this->param['type']]);
36 if(!empty($info) && !empty($info['data'])){ 36 if(!empty($info) && !empty($info['data'])){
37 - $translateInfo = json_decode($info['data']); 37 + $translateInfo = json_decode($info['data'],true);
38 foreach ($translateInfo as $k => $v){ 38 foreach ($translateInfo as $k => $v){
39 $data[] = [$k=>$v]; 39 $data[] = [$k=>$v];
40 } 40 }
@@ -48,7 +48,7 @@ class TranslateLogic extends BaseLogic @@ -48,7 +48,7 @@ class TranslateLogic extends BaseLogic
48 // 原始校对内容 48 // 原始校对内容
49 $info = $this->model->read(['url'=>$this->param['url'],'language_id'=>$this->param['language_id'],'type'=>$this->param['type']]); 49 $info = $this->model->read(['url'=>$this->param['url'],'language_id'=>$this->param['language_id'],'type'=>$this->param['type']]);
50 if($info !== false){ 50 if($info !== false){
51 - $data_read = json_decode($info['data']); 51 + $data_read = json_decode($info['data'],true);
52 foreach ($data_read as $k => $v){ 52 foreach ($data_read as $k => $v){
53 $data[] = [$k => $v]; 53 $data[] = [$k => $v];
54 } 54 }
@@ -130,7 +130,7 @@ class TranslateLogic extends BaseLogic @@ -130,7 +130,7 @@ class TranslateLogic extends BaseLogic
130 $info = $this->model->read(['url'=>$this->param['url'],'language_id'=>$this->param['language_id'],'type'=>$this->param['type']]); 130 $info = $this->model->read(['url'=>$this->param['url'],'language_id'=>$this->param['language_id'],'type'=>$this->param['type']]);
131 $data = []; 131 $data = [];
132 if(!empty($info) && !empty($info['data'])){ 132 if(!empty($info) && !empty($info['data'])){
133 - $translateInfo = json_decode($info['data']); 133 + $translateInfo = json_decode($info['data'],true);
134 foreach ($translateInfo as $k => $v){ 134 foreach ($translateInfo as $k => $v){
135 $data[] = [$k=>$v]; 135 $data[] = [$k=>$v];
136 } 136 }
@@ -151,7 +151,7 @@ class TranslateLogic extends BaseLogic @@ -151,7 +151,7 @@ class TranslateLogic extends BaseLogic
151 } 151 }
152 $new_list = $this->getUrlImageRead($url); 152 $new_list = $this->getUrlImageRead($url);
153 $old_list = []; 153 $old_list = [];
154 - $data_read = json_decode($info['data']); 154 + $data_read = json_decode($info['data'],true);
155 foreach ($data_read as $k=>$v){ 155 foreach ($data_read as $k=>$v){
156 $old_list[] = $k; 156 $old_list[] = $k;
157 $data[] = [ 157 $data[] = [
@@ -282,10 +282,10 @@ class TranslateLogic extends BaseLogic @@ -282,10 +282,10 @@ class TranslateLogic extends BaseLogic
282 'language_id'=>$this->param['language_id'], 282 'language_id'=>$this->param['language_id'],
283 'alias'=>$this->param['alias'], 283 'alias'=>$this->param['alias'],
284 ]; 284 ];
285 - $param['data'] = json_encode($data); 285 + $param['data'] = json_encode($data,true);
286 $this->model->add($param); 286 $this->model->add($param);
287 }else{ 287 }else{
288 - $data = json_encode($data); 288 + $data = json_encode($data,true);
289 $this->model->edit(['data'=>$data],['language_id'=>$this->param['language_id'],'url'=>$this->param['url'],'type'=>$this->param['type']]); 289 $this->model->edit(['data'=>$data],['language_id'=>$this->param['language_id'],'url'=>$this->param['url'],'type'=>$this->param['type']]);
290 } 290 }
291 }catch (\Exception $e){ 291 }catch (\Exception $e){