feat(期刊\曲库): 更新部分接口

dev
zhangjiabao 8 months ago
parent aa6b705810
commit 8c781de7e0

@ -29,9 +29,9 @@ export default {
* @param {*} id
* @returns
*/
publish(id) {
publish(id, type, time) {
return request({
url: `/luoo-music/cms/journal/publish/${id}`,
url: `/luoo-music/cms/journal/publish/${id}?isScheduled=${type}&state=${time}`,
method: "put"
});
},
@ -49,9 +49,9 @@ export default {
},
/**
* 更新
* @param {*} id
* @param {*} data
* @returns
* @param {*} id
* @param {*} data
* @returns
*/
update(id, data) {
return request({

@ -2,7 +2,7 @@
* @Author: zhangjiabao
* @Date: 2024-01-24 10:09:33
* @LastEditors: zhangjiabao
* @LastEditTime: 2024-01-25 16:25:59
* @LastEditTime: 2024-01-26 10:14:39
* @FilePath: /luoo_manage_fe/src/views/article/articleModify.vue
-->
<!--
@ -443,8 +443,7 @@ export default {
state: "1",
tags: [3, 5, 11],
updateTime: "2023-01-01",
url:
"https://luoow.wxwenku.com/999/01._Belmondo_(Große_Liebe)_Annett_Louisan.mp3",
url: "https://luoow.wxwenku.com/999/03._Du_und_ich_Klee.mp3",
userId: "1"
},
{
@ -460,8 +459,7 @@ export default {
state: "1",
tags: [3, 5, 11],
updateTime: "2023-01-01",
url:
"https://luoow.wxwenku.com/999/01._Belmondo_(Große_Liebe)_Annett_Louisan.mp3",
url: "https://luoow.wxwenku.com/999/03._Du_und_ich_Klee.mp3",
userId: "1"
}
];

@ -256,6 +256,55 @@
<el-button size="small" @click="handleDialogCancel"></el-button>
</span>
</el-dialog>
<el-dialog
title="发布"
class="popup-dialog"
:visible="true"
v-if="publishDialog.visible"
width="40%"
:before-close="handlePublishDialogBeforeClose"
>
<el-form>
<el-form-item label="发布方式:">
<el-button
:type="publishDialog.type === 0 ? 'primary' : 'default'"
@click="publishDialog.type = 0"
>立即发布</el-button
>
<el-button
:type="publishDialog.type === 1 ? 'primary' : 'default'"
@click="publishDialog.type = 1"
>定时发布</el-button
>
</el-form-item>
<el-form-item label=" ">
<el-date-picker
v-if="publishDialog.type === 1"
v-model="publishDialog.time"
value-format="yyyy-MM-dd hh:mm:ss"
start-placeholder="选择时间"
size="medium"
style="width: 280px;"
type="datetime"
placeholder="选择日期时间"
>
</el-date-picker>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button
v-if="modifyDialog.type === 0 || modifyDialog.type === 1"
size="small"
type="primary"
@click="handlePublishDialogSubmit"
>确定</el-button
>
<el-button size="small" @click="handlePublishDialogCancel"
>取消</el-button
>
</span>
</el-dialog>
<el-drawer
title="高级筛选"
v-if="queryForm.superFilterDialog.visible"
@ -316,6 +365,13 @@ export default {
visible: false,
type: 0, // 0for 1for 2for
data: {} //
},
//
publishDialog: {
visible: false,
type: 0, // 0for 1for
time: null,
id: null
}
};
},
@ -401,8 +457,7 @@ export default {
state: "1",
tags: [3, 5, 11],
updateTime: "2023-01-01",
url:
"https://luoow.wxwenku.com/999/01._Belmondo_(Große_Liebe)_Annett_Louisan.mp3",
url: "https://luoow.wxwenku.com/999/03._Du_und_ich_Klee.mp3",
userId: "1627863701048659968"
}
],
@ -587,15 +642,10 @@ export default {
* 发布点击事件
*/
handlePublishClick(row) {
articleApi.publish(row.id).then(res => {
if (res.code === 200) {
this.$message.success(res.message);
this.fetchData(this.queryForm.lastQuery);
return;
} else {
this.$message.error(res.message);
}
});
this.publishDialog.id = row.id;
this.publishDialog.time = null;
this.publishDialog.type = 0;
this.publishDialog.visible = true;
},
/**
* 详情点击事件
@ -625,6 +675,12 @@ export default {
handleDialogCancel() {
this.modifyDialog.visible = false;
},
/**
* 弹窗取消按扭点击事件
*/
handlePublishDialogCancel() {
this.publishDialog.visible = false;
},
/**
* 弹窗确定按扭点击事件
*/
@ -677,6 +733,27 @@ export default {
}
});
},
/**
* 发布弹窗确认按扭
*/
handlePublishDialogSubmit() {
articleApi
.publish(
this.publishDialog.id,
this.publishDialog.type,
this.publishDialog.time
)
.then(res => {
if (res.code === 200) {
this.$message.success(res.message);
this.fetchData(this.queryForm.lastQuery);
this.publishDialog.visible = false;
return;
} else {
this.$message.error(res.message);
}
});
},
/**
* 弹窗重置
*/
@ -697,6 +774,13 @@ export default {
this.queryForm.superFilterDialog.visible = false;
done();
},
/**
* 弹窗关闭按扭点击事件
*/
handlePublishDialogBeforeClose(done) {
this.publishDialog.visible = false;
done();
},
/**
* 分页组件页数变化事件
*/

@ -332,8 +332,7 @@ export default {
state: "1",
tags: [3, 5, 11],
updateTime: "2023-01-01",
url:
"https://luoow.wxwenku.com/999/01._Belmondo_(Große_Liebe)_Annett_Louisan.mp3",
url: "https://luoow.wxwenku.com/999/03._Du_und_ich_Klee.mp3",
userId: "1627863701048659968"
},
{
@ -349,8 +348,7 @@ export default {
state: "1",
tags: [3, 5, 11],
updateTime: "2023-01-01",
url:
"https://luoow.wxwenku.com/999/01._Belmondo_(Große_Liebe)_Annett_Louisan.mp3",
url: "https://luoow.wxwenku.com/999/03._Du_und_ich_Klee.mp3",
userId: "1627863701048659968"
}
];

Loading…
Cancel
Save