删除动态

main
wangdong 6 months ago
parent 68af2d1f64
commit a0e5a7c14e
  1. 8
      api/squareDynamic/index.js
  2. 30
      pages/squareDynamic/index.vue

@ -4,7 +4,8 @@ import request from '@/utils/request'
const api = { const api = {
publishDynamic: 'square/add', publishDynamic: 'square/add',
getDynamic: 'square/list', getDynamic: 'square/list',
dynamicLike: 'square/dynamicLike' dynamicLike: 'square/dynamicLike',
dynamicDelete: 'square/delete'
} }
// 发布动态 // 发布动态
@ -22,3 +23,8 @@ export function getDynamic(param) {
export function dynamicLike(param) { export function dynamicLike(param) {
return request.post(api.dynamicLike, { ...param }) return request.post(api.dynamicLike, { ...param })
} }
// 动态删除
export function deleteDynamic(param) {
return request.post(api.dynamicDelete, { ...param })
}

@ -402,21 +402,21 @@
}) })
}, },
deleteDynamic(item) { deleteDynamic(item) {
// Api.deleteDynamic({ Api.deleteDynamic({
// id: item.id squareId: item.square_id
// }) })
// .then(result => { .then(result => {
// console.log(result); console.log(result);
// uni.showToast({ uni.showToast({
// icon: 'success', icon: 'success',
// title: '', title: '删除成功',
// }); });
// this.finished = false; this.finished = false;
// this.page = 1; this.page = 1;
// this.dynamicList = []; this.dynamicList = [];
// this.getDynamicList(); this.getDynamicList();
// }) })
// .finally(() => {}) .finally(() => {})
}, },
}, },
}; };

Loading…
Cancel
Save