作者 lyh

未续费项目增加搜索

... ... @@ -330,7 +330,7 @@ class TranslateController extends BaseController
$this->pageSixList($data,$count,$v,1,15);
}
$blogInfo = $routeMapModel->read(['route'=>'blog']);
if($blogInfo === false){
if($blogInfo === false && ($this->user['is_show_blog'] == 1)){
$blogModel = new Blog();
$count = $blogModel->formatQuery(['status'=>1])->count();
$v['route'] = 'blog';
... ...
... ... @@ -61,7 +61,11 @@ class TranslateLogic extends BaseLogic
$param['url'] = $this->param['url'];
$info = $this->model->with('translate_data')->where($param)->first();
//获取当前URl的所有文本内容
$text_array = $this->getUrlRead($url);
try {
$text_array = $this->getUrlRead($url);
}catch (\Exception $e){
$text_array = [];
}
// 原始校对程序
$old_key = [];//key值组成数据
$data_read = json_decode($info && $info['translate_data'] ? $info['translate_data']['data'] : '',JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
... ...