后端代码展示:
$where = [
['name' => 'dvtv_s_id', 'oper' => '=', 'value' => $this->sid],
['name' => 'dvtv_dv_id', 'oper' => '=', 'value' => $dv_id],
];
$cache_model = new App_Model_Douyin_MysqlVideoTempVideoStorage();
$template_list = $cache_model->getList($where,$this->index,$this->count);
foreach ($template_list as &$item) {
$item['score'] = 100 - min($item['dvtv_score'], 100);
$use_platform = empty($item['dvtv_use_platform']) ? [] : json_decode($item['dvtv_use_platform'], 1);
$use_platform = array_unique($use_platform);
$item['used_count'] = count($use_platform);
$item['used_platform'] = $use_platform;
}