Commit e558aa38 authored by 刘怀志's avatar 刘怀志

商家管理暂存-4

parent 45484c51
......@@ -14,16 +14,16 @@ import Qs from 'qs'
// 1. 查询新闻资讯列表
export function listSysContentNewsInformation(query) {
return request({
url: '/syscontentnewsinformation/querySysContentNewsInformationByPagination',
url: '/cmsnews/querySysContentNewsInformationByPagination',
method: 'get',
params: query
})
}
// 2. 查询新闻资讯详细信息
export function getSysContentNewsInformation(businessId) {
export function getcmsnews(businessId) {
return request({
url: '/syscontentnewsinformation/detail/' + businessId,
url: '/cmsnews/detail/' + businessId,
method: 'get'
})
}
......@@ -32,7 +32,7 @@ export function getSysContentNewsInformation(businessId) {
export function addSysContentNewsInformation(data) {
data = Qs.stringify(data)
return request({
url: '/syscontentnewsinformation/add',
url: '/cmsnews/add',
method: 'post',
data: data
})
......@@ -43,7 +43,7 @@ export function updateSysContentNewsInformation(data) {
const businessId = data.businessId
data = Qs.stringify(data)
return request({
url: '/syscontentnewsinformation/update/' + businessId,
url: '/cmsnews/update/' + businessId,
method: 'post',
data
})
......@@ -52,7 +52,7 @@ export function updateSysContentNewsInformation(data) {
// 5. 逻辑删除新闻资讯
export function delSysContentNewsInformation(businessId) {
return request({
url: '/syscontentnewsinformation/delete/' + businessId,
url: '/cmsnews/delete/' + businessId,
method: 'delete'
})
}
......@@ -60,7 +60,7 @@ export function delSysContentNewsInformation(businessId) {
// 6. 导出新闻资讯
export function exportSysContentNewsInformation(query) {
return request({
url: '/syscontentnewsinformation/export',
url: '/cmsnews/export',
method: 'get',
params: query,
responseType: 'blob'
......@@ -71,7 +71,7 @@ export function updateStatus(data) {
const businessId = data.businessId
data = Qs.stringify(data)
return request({
url: '/syscontentnewsinformation/updateStatus/' + businessId,
url: '/cmsnews/updateStatus/' + businessId,
method: 'put',
data: data
})
......
......@@ -1015,34 +1015,19 @@ export default {
this.importLoading = false
this.upload.open = true
} else { // 根据后台需求数据格式
console.log('this.fileList', this.fileList)
var formData = new FormData() // 当前为空
formData.append('file', this.fileList)
formData.append('deptId', this.upload.deptId)
importSysUserExcel(formData).then(res => {
if (res.code === 200) {
if (res.data.filename === null) {
this.$message.success('导入成功')
this.fileList = []
// 导入成功后关闭弹出框
this.importLoading = false
this.upload.open = false
// 导入成功后刷新页面
this.getList()
} else {
uploadFalseFile({ fileName: res.data.filename }).then(res => {
const blob = new Blob([res])
const downloadElement = document.createElement('a')
const href = window.URL.createObjectURL(blob) // 创建下载的链接
downloadElement.href = href
downloadElement.download = '模板错误提示' + '.txt' // 下载后文件名
document.body.appendChild(downloadElement)
downloadElement.click() // 点击下载
document.body.removeChild(downloadElement) // 下载完成移除元素
window.URL.revokeObjectURL(href) // 释放掉blob对象
this.importLoading = false
})
}
this.$message.success('导入成功')
this.fileList = []
// 导入成功后关闭弹出框
this.importLoading = false
this.upload.open = false
// 导入成功后刷新页面
this.getList()
} else if (res.code === 41020) {
this.$message.info('上传超时,请重新上传')
this.importLoading = false
......@@ -1051,7 +1036,7 @@ export default {
this.importLoading = false
}
}).catch(err => {
this.$message.success(err.message)
// this.$message.success(err.message)
this.importLoading = false
})
}
......
......@@ -61,7 +61,7 @@ module.exports = {
[process.env.VUE_APP_BASE_API]: {
// target: `http://49.232.167.247:20024/`,
// target: `http://192.168.1.23:8090/`, // 飞龙后端
target: `http://192.168.10.182:8099/`, // 奕霖后端
target: `http://192.168.10.189:8099/`, // 奕霖后端
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment