修改删除内容

master
于肖磊 2026-02-12 13:43:14 +08:00
parent e2685aca9d
commit 3103eca5b6
2 changed files with 52 additions and 44 deletions

View File

@ -39,6 +39,7 @@
</template>
<script>
const app = getApp();
export default {
props: {
propComment: {
@ -83,7 +84,13 @@
},
//
comment_like(e) {
this.$emit('comment_like', this.propId, e);
if (!app.globalData.is_single_page_check()) {
return false;
}
var user = app.globalData.get_user_info(this, 'comment_like', e);
if (user != false) {
this.$emit('comment_like', this.propId, e);
}
},
//
upload_show_event(e) {
@ -99,12 +106,14 @@
},
//
handle_dropdown_item_click(e) {
const item = e.currentTarget.dataset.value || {};
console.log('点击:', item.label);
// uni.showToast({ title: item.label, icon: 'none' });
//
// this.$emit('close-dropdown', this.propId);
this.$emit('dropdown_item_click', this.propId, item);
if (!app.globalData.is_single_page_check()) {
return false;
}
var user = app.globalData.get_user_info(this, 'comment_like', e);
if (user != false) {
const item = e.currentTarget.dataset.value || {};
this.$emit('dropdown_item_click', this.propId, item);
}
}
}
}

View File

@ -1179,14 +1179,8 @@
}
},
//
comment_like(id, e) {
if (!app.globalData.is_single_page_check()) {
return false;
}
var user = app.globalData.get_user_info(this, 'comment_like', e);
if (user != false) {
this.set_givethumbs_num(this.current_video_id, id);
}
comment_like(id) {
this.set_givethumbs_num(this.current_video_id, id);
},
handle_slider_change(e) {
const seek_time = e.detail.value;
@ -1275,38 +1269,43 @@
this.active_dropdown_id = null;
}
this.popup_report_status = true;
debugger;
// //
// if (data.action == 'delete') {
// //
// uni.showModal({
// title: '',
// content: '',
// success: (res) => {
// if (res.confirm) {
// //
// this.delete_comment(id);
// }
// }
// });
// } else if (data.action == 'report') {
// //
// }
//
if (data.action == 'delete') {
//
uni.showModal({
title: '确认删除',
content: '确定删除此评论吗?',
success: (res) => {
if (res.confirm) {
//
this.delete_comment(id);
}
}
});
} else if (data.action == 'report') {
//
}
},
//
delete_comment(comment_id) {
//
this.$http.post(this.delete_comment_url, {
comment_id: comment_id
}).then((res) => {
if (res.data.code == 200) {
//
this.get_comment_list();
} else {
uni.showToast({
title: res.data.msg || '删除失败',
icon: 'none'
});
uni.request({
url: app.globalData.get_request_url("delete", "index", "video"),
method: 'POST',
data: {
ids: comment_id,
},
dataType: 'json',
success: res => {
const data = res.data;
if (data.code == 0) {
} else {
if (app.globalData.is_login_check(res.data)) {
app.globalData.showToast(res.data.msg);
} else {
app.globalData.showToast(this.$t('common.sub_error_retry_tips'));
}
}
}
});
},