Browse Source

修改配置接口未传视频修改

dev
qiqi 7 hours ago
parent
commit
fe3da7705a
  1. 3
      content-config.html

3
content-config.html

@ -510,6 +510,7 @@
let currentFile = null; let currentFile = null;
let currentImageUrl = ''; let currentImageUrl = '';
let currentVideoUrl = '';
function showToast(msg) { function showToast(msg) {
toastEl.textContent = msg; toastEl.textContent = msg;
@ -534,6 +535,7 @@
}); });
if (res && res.code === 200 && res.data && res.data.img_url) { if (res && res.code === 200 && res.data && res.data.img_url) {
currentImageUrl = res.data.img_url; currentImageUrl = res.data.img_url;
currentVideoUrl = res.data.video;
showPreview(currentImageUrl); showPreview(currentImageUrl);
} }
} catch (e) { } catch (e) {
@ -635,6 +637,7 @@
const formData = new FormData(); const formData = new FormData();
formData.append('id', 1); formData.append('id', 1);
formData.append('url', currentImageUrl); formData.append('url', currentImageUrl);
formData.append('video', currentVideoUrl);
const res = await saveContentConfigApi(formData); const res = await saveContentConfigApi(formData);
if (res && res.code === 200) { if (res && res.code === 200) {
showToast('保存配置成功'); showToast('保存配置成功');

Loading…
Cancel
Save