yshop1.8.2移除idworker,移动端springsecuriry+jwt验证改进,明细可登陆后台查看
This commit is contained in:
@ -7,3 +7,12 @@ export function del(keys) {
|
||||
data: keys
|
||||
})
|
||||
}
|
||||
|
||||
export function delT(keys) {
|
||||
return request({
|
||||
url: 'auth/online/delete',
|
||||
method: 'post',
|
||||
data: keys
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -69,6 +69,24 @@
|
||||
<div slot="header" class="clearfix">
|
||||
<span style="font-weight: bolder">更新日志</span>
|
||||
</div>
|
||||
<div class="text item">
|
||||
<span style="font-weight: bolder">(2020-01-13)yshop1.8.2版本 发布更新如下:</span>
|
||||
</div>
|
||||
<div class="text item">
|
||||
1.移除idworker
|
||||
</div>
|
||||
<div class="text item">
|
||||
2.移动端springsecuriry+jwt验证改进
|
||||
</div>
|
||||
<div class="text item">
|
||||
3.新增注解可匿名访问
|
||||
</div>
|
||||
<div class="text item">
|
||||
4.jwt token redis储存
|
||||
</div>
|
||||
<div class="text item">
|
||||
5.后台新增移动端在线管理会员,后台可监控
|
||||
</div>
|
||||
<div class="text item">
|
||||
<span style="font-weight: bolder">(2020-01-11)yshop1.8.1版本 发布更新如下:</span>
|
||||
</div>
|
||||
@ -84,24 +102,6 @@
|
||||
<div class="text item">
|
||||
4.移动端图片上传修改为统一处理
|
||||
</div>
|
||||
<div class="text item">
|
||||
<span style="font-weight: bolder">(2020-01-10)yshop1.8版本 发布更新如下:</span>
|
||||
</div>
|
||||
<div class="text item">
|
||||
1.新增小程序支付与登录,后台新增小程序跳转页面,
|
||||
</div>
|
||||
<div class="text item">
|
||||
2.后台新增图片素材管理
|
||||
</div>
|
||||
<div class="text item">
|
||||
3.本地上传与七牛云上传合并,修改一个yml即可两者随意切换
|
||||
</div>
|
||||
<div class="text item">
|
||||
4.升级swagger-bootstrap,swaager统一配置迁移到common(防止注解冲突)
|
||||
</div>
|
||||
<div class="text item">
|
||||
5.后台优化操作显示
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</el-col>
|
||||
|
128
src/views/monitor/online/indext.vue
Normal file
128
src/views/monitor/online/indext.vue
Normal file
@ -0,0 +1,128 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<el-input v-model="query.filter" clearable size="small" placeholder="全表模糊搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
|
||||
<rrOperation :crud="crud" />
|
||||
</div>
|
||||
<crudOperation>
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:loading="delLoading"
|
||||
:disabled="crud.selections.length === 0"
|
||||
@click="doDelete(crud.selections)"
|
||||
>
|
||||
强退
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
</div>
|
||||
<!--表格渲染-->
|
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column v-if="columns.visible('userName')" prop="userName" label="用户名" />
|
||||
<el-table-column v-if="columns.visible('nickName')" prop="nickName" label="用户昵称" />
|
||||
<el-table-column v-if="columns.visible('ip')" prop="ip" label="登录IP" />
|
||||
<el-table-column v-if="columns.visible('address')" :show-overflow-tooltip="true" prop="address" label="登录地点" />
|
||||
<el-table-column v-if="columns.visible('browser')" prop="browser" label="浏览器" />
|
||||
<el-table-column v-if="columns.visible('loginTime')" prop="loginTime" label="登录时间">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.loginTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-popover
|
||||
:ref="scope.$index"
|
||||
v-permission="['admin']"
|
||||
placement="top"
|
||||
width="180"
|
||||
>
|
||||
<p>确定强制退出该用户吗?</p>
|
||||
<div style="text-align: right; margin: 0">
|
||||
<el-button size="mini" type="text" @click="$refs[scope.$index].doClose()">取消</el-button>
|
||||
<el-button :loading="delLoading" type="primary" size="mini" @click="delMethod(scope.row.key, scope.$index)">确定</el-button>
|
||||
</div>
|
||||
<el-button slot="reference" size="mini" type="text">强退</el-button>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { delT } from '@/api/monitor/online'
|
||||
import CRUD, { presenter, header, crud } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
|
||||
// crud交由presenter持有
|
||||
const defaultCrud = CRUD({ url: 'auth/online', title: '在线用户' , query: {type : 1} })
|
||||
export default {
|
||||
name: 'OnlineUser',
|
||||
components: { pagination, crudOperation, rrOperation },
|
||||
mixins: [presenter(defaultCrud), header(), crud()],
|
||||
data() {
|
||||
return {
|
||||
delLoading: false,
|
||||
permission: {}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.crud.msg.del = '强退成功!'
|
||||
this.crud.optShow = {
|
||||
add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 获取数据前设置好接口地址
|
||||
beforeInit() {
|
||||
this.url = 'auth/online'
|
||||
return true
|
||||
},
|
||||
doDelete(datas) {
|
||||
this.$confirm(`确认强退选中的${datas.length}个用户?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.delMethod(datas)
|
||||
}).catch(() => {})
|
||||
},
|
||||
// 踢出用户
|
||||
delMethod(key, index) {
|
||||
const ids = []
|
||||
if (key instanceof Array) {
|
||||
key.forEach(val => {
|
||||
ids.push(val.key)
|
||||
})
|
||||
} else ids.push(key)
|
||||
this.delLoading = true
|
||||
delT(ids).then(() => {
|
||||
this.delLoading = false
|
||||
if (this.$refs[index]) {
|
||||
this.$refs[index].doClose()
|
||||
}
|
||||
this.crud.dleChangePage(1)
|
||||
this.crud.delSuccessNotify()
|
||||
this.crud.toQuery()
|
||||
}).catch(() => {
|
||||
this.delLoading = false
|
||||
if (this.$refs[index]) {
|
||||
this.$refs[index].doClose()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
Reference in New Issue
Block a user