col_prefix.'template_id']; if($row[$this->col_prefix . 'out_template_id']) { if (in_array($row['control_type'], ['xhs', 'youzan'])) { return <<编辑 EOF; } return ''; } $finder_id = $_GET['_finder']['finder_id']; $type = $row['template_type']; if ($row[$this->col_prefix.'control_type'] == 'lodop') { $act = 'editLodopTemplate'; } elseif ($type == 'delivery') { $act = 'editDeliveryTmpl'; $act1 = 'copyDeliveryTmpl'; } elseif ($type == 'stock') { $act = 'editStockTmpl'; $act1 = 'copyStockTmpl'; } else { $act = 'editTmpl'; $act1 = 'copyTmpl'; } $button = ''; if (in_array($type, array('delivery','stock'))) { if ($row[$this->col_prefix.'is_default'] == 'true') { $button = sprintf('取消默认',$row['template_id'],$finder_id); } else { $button = sprintf('设置默认',$row['template_id'],$finder_id); } } $button .= <<编辑 EOF; if ($row[$this->col_prefix.'control_type'] != 'lodop') { $button.= <<复制 EOF; } if (!in_array($type,array('delivery','stock'))) { $button.= <<下载 EOF; } return $button; } var $column_isdefault = "是否默认"; var $column_isdefault_width = "60"; var $column_isdefault_order = '32'; var $column_isdefault_order_field = 'is_default'; /** * column_isdefault * @param mixed $row row * @return mixed 返回值 */ public function column_isdefault($row) { $is_default = $row[$this->col_prefix.'is_default']; $title = ''; if ($is_default == 'false') { $title = '否'; } else { $title = '是'; } return $title; } public $column_custom_template_url = "自定义区"; public $column_custom_template_url_width = "260"; public $column_custom_template_url_order = "31"; /** * column_custom_template_url * @param mixed $row row * @return mixed 返回值 */ public function column_custom_template_url($row) { $control_type = $row[$this->col_prefix . 'control_type']; if(in_array($control_type, ['douyin','kuaishou'])) { $template_data = @json_decode($row[$this->col_prefix . 'template_data'], 1); return $template_data['custom_template_url']; } if(in_array($control_type, ['xhs'])) { $template_data = @json_decode($row[$this->col_prefix . 'template_data'], 1); return $template_data['customerTemplateUrl']; } // if (in_array($control_type, ['youzan'])) { // return $row[$this->col_prefix . 'template_select']; // } if (!in_array($control_type, ['jd','cainiao','pdd'])) { return '-'; } $template_select = (array)@unserialize($row[$this->col_prefix . 'template_select']); return $template_select['user_url']; } public $column_template_url = "标准模板"; public $column_template_url_width = "260"; public $column_template_url_order = "30"; /** * column_template_url * @param mixed $row row * @return mixed 返回值 */ public function column_template_url($row) { $control_type = $row[$this->col_prefix . 'control_type']; if(in_array($control_type, ['douyin','kuaishou'])) { $template_data = @json_decode($row[$this->col_prefix . 'template_data'], 1); return $template_data['template_url']; } if(in_array($control_type, ['xhs'])) { $template_data = @json_decode($row[$this->col_prefix . 'template_data'], 1); return $template_data['standardTemplateUrl']; } /*if (!in_array($control_type, ['jd','cainiao','pdd'])) { return '-'; }*/ return $row[$this->col_prefix . 'template_data']; } } ?>