Commit 35968a8a authored by zhanglw's avatar zhanglw

xxx

parent 36930614
import request from '@/utils/request' import request from '@/utils/request'
// import qs from 'qs' import qs from 'qs'
export const HttpReq = { export const HttpReq = {
// 后台管理接口列表 // 后台管理接口列表
...@@ -7,13 +7,19 @@ export const HttpReq = { ...@@ -7,13 +7,19 @@ export const HttpReq = {
// 获取所有软件工具 // 获取所有软件工具
getApp: function(data) { getApp: function(data) {
return request({ return request({
url: '/apps/getApp', url: 'apps/getApp',
method: 'post', method: 'post',
data: data data: data
}).then((res) => { }).then((res) => {
return res return res
}) })
}, },
getAppAll: function(params) {
return request({
url: 'apps/getApp?' + qs.stringify(params, { indices: false }),
method: 'get'
})
},
api: null api: null
}, },
// web端接口列表 // web端接口列表
......
...@@ -38,7 +38,7 @@ module.exports = { ...@@ -38,7 +38,7 @@ module.exports = {
/** /**
* 底部文字,支持html语法 * 底部文字,支持html语法
*/ */
footerTxt: '© 2018-2022', footerTxt: '© 2023 GEMHO',
/** /**
* 备案号 * 备案号
*/ */
......
...@@ -18,6 +18,7 @@ service.interceptors.request.use( ...@@ -18,6 +18,7 @@ service.interceptors.request.use(
if (getToken()) { if (getToken()) {
config.headers['Authorization'] = getToken() // 让每个请求携带自定义token 请根据实际情况自行修改 config.headers['Authorization'] = getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
} }
config.headers['accept'] = '*/*'
config.headers['Content-Type'] = 'application/json' config.headers['Content-Type'] = 'application/json'
return config return config
}, },
......
...@@ -6,11 +6,11 @@ ...@@ -6,11 +6,11 @@
<el-select v-model="query.type" clearable placeholder="请选择分类" style="width: 150px"> <el-select v-model="query.type" clearable placeholder="请选择分类" style="width: 150px">
<el-option v-for="item in dict.tools_class" :key="item.value" :label="item.label" :value="item.value" /> <el-option v-for="item in dict.tools_class" :key="item.value" :label="item.label" :value="item.value" />
</el-select> </el-select>
<el-input v-model="query.name" clearable placeholder="请输入标签名称" style="width:280px;" /> <el-input v-model="query.tag" clearable placeholder="请输入标签名称" style="width:280px;" />
<el-select v-model="query.type" clearable placeholder="请选择状态" style="width: 150px"> <el-select v-model="query.download" clearable placeholder="请选择状态" style="width: 150px">
<el-option v-for="item in dict.norm_status" :key="item.value" :label="item.label" :value="item.value" /> <el-option v-for="item in dict.norm_status" :key="item.value" :label="item.label" :value="item.value" />
</el-select> </el-select>
<date-range-picker v-model="query.updateTime" size="mini" start-placeholder="上架开始日期" style="width: 320px" /> <date-range-picker v-model="query.uploadtime" size="mini" start-placeholder="上架开始日期" style="width: 320px" />
<el-button type="success" icon="el-icon-search" @click="toSearch">搜索</el-button> <el-button type="success" icon="el-icon-search" @click="toSearch">搜索</el-button>
<el-button type="warning" icon="el-icon-refresh" @click="clearLimit">重置</el-button> <el-button type="warning" icon="el-icon-refresh" @click="clearLimit">重置</el-button>
</div> </div>
...@@ -28,20 +28,20 @@ ...@@ -28,20 +28,20 @@
<el-table id="dataTable" ref="dataTable" v-loading="loading" :data="tableData" tooltip-effect="dark" style="width:auto;min-height: 70vh" @selection-change="handleSelectionChange"> <el-table id="dataTable" ref="dataTable" v-loading="loading" :data="tableData" tooltip-effect="dark" style="width:auto;min-height: 70vh" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" /> <el-table-column type="selection" width="55" />
<el-table-column type="index" width="55" label="序号" :index="indexMethod" /> <el-table-column type="index" width="55" label="序号" :index="indexMethod" />
<el-table-column prop="productId" label="ID" width="100" /> <el-table-column prop="id" label="ID" width="100" />
<el-table-column prop="productName" label="小工具名称" /> <el-table-column prop="name" label="小工具名称" />
<el-table-column prop="productType" label="分类" width="140" :formatter="(row, col, val)=>{return dict.label.tools_class[val]}" /> <el-table-column prop="type" label="分类" width="140" :formatter="(row, col, val)=>{return dict.label.tools_class[val]}" />
<el-table-column prop="productName" label="标签" /> <el-table-column prop="tag" label="标签" />
<el-table-column label="状态" width="100"> <el-table-column label="状态" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<div :style="'color:'+textColors[scope.row.status]">{{ dict.label.norm_status[scope.row.status] }}</div> <div :style="'color:'+textColors[scope.row.status]">{{ dict.label.norm_status[scope.row.download] }}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="updateTime" label="最后维护日期" align="center" width="180" /> <el-table-column prop="uploadtime" label="最后维护日期" align="center" width="180" />
<el-table-column label="操作" align="center" width="200"> <el-table-column label="操作" align="center" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip v-show="scope.row.status==5" content="下架"><el-button round plain type="danger" icon="el-icon-download" @click="batchOperate(0, scope.row)" /></el-tooltip> <el-tooltip content="下架"><el-button round plain type="danger" icon="el-icon-download" @click="batchOperate(0, scope.row)" /></el-tooltip>
<el-tooltip v-show="scope.row.status==4" content="上架"><el-button round plain type="success" icon="el-icon-finished" @click="batchOperate(1, scope.row)" /></el-tooltip> <el-tooltip content="上架"><el-button round plain type="success" icon="el-icon-finished" @click="batchOperate(1, scope.row)" /></el-tooltip>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -65,7 +65,7 @@ export default { ...@@ -65,7 +65,7 @@ export default {
'#000', '#32cd32', '#bba'], '#000', '#32cd32', '#bba'],
loading: false, loading: false,
page: 1, page: 1,
pageSize: 20, pageSize: 10,
total: 0, total: 0,
query: {}, query: {},
tableData: [], tableData: [],
...@@ -91,13 +91,13 @@ export default { ...@@ -91,13 +91,13 @@ export default {
Object.keys(this.query).length !== 0 && Object.keys(this.query).forEach(item => { Object.keys(this.query).length !== 0 && Object.keys(this.query).forEach(item => {
if (this.query[item] === null || this.query[item] === '') this.query[item] = undefined if (this.query[item] === null || this.query[item] === '') this.query[item] = undefined
}) })
HttpReq.backstageApi.getApp({ HttpReq.backstageApi.getAppAll({
page: this.page - 1, pageNum: this.page,
pageSize: this.pageSize, pageSize: this.pageSize,
...this.query ...this.query
}).then((res) => { }).then((res) => {
// this.tableData = res.data.data this.tableData = res.list
// this.total = res.data.total this.total = res.totalCount
}) })
}, },
batchOperate(type, row) { batchOperate(type, row) {
......
...@@ -87,7 +87,7 @@ export default { ...@@ -87,7 +87,7 @@ export default {
}, },
created() { created() {
// 获取验证码 // 获取验证码
this.getCode() // this.getCode()
// 获取用户名密码等Cookie // 获取用户名密码等Cookie
this.getCookie() this.getCookie()
// token 过期提示 // token 过期提示
...@@ -142,7 +142,7 @@ export default { ...@@ -142,7 +142,7 @@ export default {
this.$router.push({ path: this.redirect || '/backstage/dashboard' }) this.$router.push({ path: this.redirect || '/backstage/dashboard' })
}).catch(() => { }).catch(() => {
this.loading = false this.loading = false
this.getCode() // this.getCode()
}) })
} else { } else {
console.log('error submit!!') console.log('error submit!!')
......
...@@ -27,6 +27,13 @@ module.exports = { ...@@ -27,6 +27,13 @@ module.exports = {
errors: true errors: true
}, },
proxy: { proxy: {
'/apps': {
target: process.env.VUE_APP_BASE_API,
changeOrigin: true,
pathRewrite: {
'^/apps': 'apps'
}
},
'/api': { '/api': {
target: process.env.VUE_APP_BASE_API, target: process.env.VUE_APP_BASE_API,
changeOrigin: true, changeOrigin: true,
......
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