Merge branch 'master' of http://gitea.zianxin.com:8418/zianxin/biz-pc-cloud
This commit is contained in:
commit
e50453010e
4 files changed
+81
-4
No files matched your search
@@ -0,0 +1,20 @@
|
||||
# port 端口号
|
||||
VITE_PORT = 8888
|
||||
|
||||
#浏览器自动打开
|
||||
VITE_OPEN = true
|
||||
|
||||
# 本地环境
|
||||
ENV = 'local'
|
||||
|
||||
|
||||
# ADMIN 服务地址
|
||||
VITE_ADMIN_PROXY_PATH = http://localhost:9999/
|
||||
|
||||
|
||||
# 图片访问基础地址
|
||||
VITE_IMAGE_BASE_PATH = http://localhost:9999
|
||||
|
||||
|
||||
# 代码生成服务地址
|
||||
VITE_GEN_PROXY_PATH = http://192.168.110.156:5003
|
||||
@@ -1,5 +1,21 @@
|
||||
import request from "/@/utils/request"
|
||||
|
||||
export function adminBindCard(data?: Object) {
|
||||
return request({
|
||||
url: "/wallet/wallet-active/bind-card",
|
||||
method: "post",
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
export function cancelAdminBindCard(data?: Object) {
|
||||
return request({
|
||||
url: "/wallet/wallet-active/cancel-bind-card",
|
||||
method: "post",
|
||||
params: data,
|
||||
})
|
||||
}
|
||||
|
||||
export function refreshAvatar(query?: Object) {
|
||||
return request({
|
||||
url: "/wallet/wallet-active/refresh-avatar",
|
||||
|
||||
@@ -65,7 +65,7 @@ const onSubmit = async () => {
|
||||
if (!valid) return false
|
||||
try {
|
||||
loading.value = true
|
||||
// fastCreateCard(form)
|
||||
await walletActiveApi.adminBindCard(form)
|
||||
useMessage().success("绑定成功")
|
||||
visible.value = false
|
||||
emit("refresh")
|
||||
|
||||
@@ -74,10 +74,33 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="200">
|
||||
<template #default="{ row }">
|
||||
<el-button v-if="row.isActiveHardware == 1" icon="Postcard" text type="primary" @click="doRefreshAvatar(row)"
|
||||
<el-button
|
||||
v-auth="'wallet_walletActive_refresh_active'"
|
||||
v-if="row.isActiveHardware == 1"
|
||||
icon="Postcard"
|
||||
text
|
||||
type="primary"
|
||||
@click="doRefreshAvatar(row)"
|
||||
>重新激活</el-button
|
||||
>
|
||||
<el-button icon="Postcard" text type="primary" @click="bindUserFormDialogRef.openDialog(row.id)">绑定用户</el-button>
|
||||
<el-button
|
||||
v-auth="'wallet_walletActive_bind_card'"
|
||||
v-if="!row.userId"
|
||||
icon="Paperclip"
|
||||
text
|
||||
type="primary"
|
||||
@click="bindUserFormDialogRef.openDialog(row.id)"
|
||||
>绑定用户</el-button
|
||||
>
|
||||
<el-button
|
||||
v-auth="'wallet_walletActive_cancel_bind_card'"
|
||||
v-if="row.userId"
|
||||
icon="Scissor"
|
||||
text
|
||||
type="primary"
|
||||
@click="doCancelBind(row)"
|
||||
>取消绑定</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="false"
|
||||
icon="edit-pen"
|
||||
@@ -101,7 +124,7 @@
|
||||
|
||||
<script setup lang="ts" name="systemWalletActive">
|
||||
import { BasicTableProps, useTable } from "/@/hooks/table"
|
||||
import { refreshAvatar, pageJoin, delObjs } from "/@/api/wallet/wallet-active"
|
||||
import { refreshAvatar, cancelAdminBindCard, pageJoin, delObjs } from "/@/api/wallet/wallet-active"
|
||||
import { useMessage, useMessageBox } from "/@/hooks/message"
|
||||
import { useDict } from "/@/hooks/dict"
|
||||
import { ElLoading } from "element-plus"
|
||||
@@ -165,6 +188,24 @@ const doRefreshAvatar = async (row: any) => {
|
||||
}
|
||||
}
|
||||
|
||||
// 取消绑定
|
||||
const doCancelBind = async (row: any) => {
|
||||
let loading: any = null
|
||||
try {
|
||||
await useMessage().delConfirm("是否取消绑定")
|
||||
loading = ElLoading.service({
|
||||
lock: true,
|
||||
text: "提交中",
|
||||
background: "rgba(0, 0, 0, 0.7)",
|
||||
})
|
||||
await cancelAdminBindCard({ activeId: row.id })
|
||||
useMessage().success("取消绑定成功")
|
||||
getDataList()
|
||||
} finally {
|
||||
setTimeout(() => loading.close(), 1000)
|
||||
}
|
||||
}
|
||||
|
||||
// 删除操作
|
||||
const handleDelete = async (ids: string[]) => {
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user