公告删除

main
fengxinyhyl 6 months ago
parent 75ac0335ab
commit 7bfcc4a8a2
  1. 13
      app/controller/admin/system/notice/SystemNotice.php
  2. 3
      route/admin/notice.php
  3. 4
      view/admin/.env.development
  4. 8
      view/admin/src/api/system.js
  5. 19
      view/admin/src/views/station/notice/index.vue

@ -69,4 +69,17 @@ class SystemNotice extends BaseController
return app('json')->success('发布成功');
}
/**
* @param SystemNoticeValidate $validate
* @return \think\response\Json
* @author xaboy
* @day 2020/11/6
*/
public function delete()
{
$id = $this->request->param("notice_id");
$this->repository->delete($id);
return app('json')->success('操作成功');
}
}

@ -25,6 +25,9 @@ Route::group(function () {
Route::post('create', '/create')->name('systemNoticeCreate')->option([
'_alias' => '系统公告发布',
]);
Route::post('delete', '/delete')->name('systemNoticeDelete')->option([
'_alias' => '系统公告删除',
]);
})->prefix('admin.system.notice.SystemNotice')->option([
'_path' => '/station/notice',
'_auth' => true,

@ -4,11 +4,11 @@ ENV = 'development'
// http://mer.crmeb.net/admin
# base api
# VUE_APP_BASE_API = 'http://0.0.0.0:8324'
VUE_APP_BASE_API = 'https://b2.njrenzhou.com'
VUE_APP_BASE_API = 'https://admin.huitongzx.cn'
# socket 连接地址
#VUE_APP_WS_URL = 'ws://0.0.0.0:8324'
VUE_APP_WS_URL = 'wss://b2.njrenzhou.com'
VUE_APP_WS_URL = 'wss://admin.huitongzx.cn'
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
# to control whether the babel-plugin-dynamic-import-node plugin is enabled.

@ -212,6 +212,12 @@ export function createNotice(data) {
export function stationNewsList(data) {
return request.get(`notice/lst`, data)
}
/**
* @description 公告列表 -- 删除
*/
export function deleteNotice(data) {
return request.post(`notice/delete`, data)
}
/**
* @description 配置
*/
@ -319,4 +325,4 @@ export function serviceLoginApi(id) {
*/
export function cityDataDelete(id) {
return request.delete(`/store/city/delete/${id}`)
}
}

@ -75,6 +75,11 @@
</el-form>
</template>
</el-table-column>
<el-table-column label="操作" min-width="100" fixed="right" align="center">
<template slot-scope="scope">
<el-button type="text" size="small" @click="handleDelete(scope.row.notice_id, scope.$index)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
@ -163,9 +168,10 @@
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import { stationNewsList, createNotice } from '@/api/system'
import {stationNewsList, createNotice, deleteNotice} from '@/api/system'
import { merCategoryListApi, merSelectApi } from '@/api/product'
import { fromList } from "@/libs/constants.js";
import {expressDeleteApi} from "@/api/freight";
export default {
name: 'SystemLog',
data() {
@ -246,6 +252,17 @@ export default {
this.timeVal = [];
this.getList(1);
},
//
handleDelete(id, idx) {
this.$modalSure().then(() => {
deleteNotice({notice_id: id}).then(({ message }) => {
this.$message.success(message)
this.tableData.data.splice(idx, 1)
}).catch(({ message }) => {
this.$message.error(message)
})
})
},
//
getList(num) {
this.listLoading = true

Loading…
Cancel
Save