增加用户积分删减
This commit is contained in:
parent
6fa7d0bb8a
commit
448530bc29
|
@ -59,7 +59,7 @@ export function lists(key:string,status:Number) {
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export function black(id: number) {
|
export function black(id: number) {
|
||||||
return axios.post<Black>('/admin/api/v1/jobuser/black', { id });
|
return axios.post<any>('/admin/api/v1/jobuser/black', { id });
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -67,8 +67,8 @@ export function black(id: number) {
|
||||||
* @param id 解禁用户
|
* @param id 解禁用户
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export function OutBlack(id: number) {
|
export function OutBlack(id: any) {
|
||||||
return axios.post<Black>('/admin/api/v1/jobuser/outblack', { id });
|
return axios.post<any>('/admin/api/v1/jobuser/outblack', { id });
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -76,7 +76,7 @@ export function OutBlack(id: number) {
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export function getSonId(id: number) {
|
export function getSonId(id: number) {
|
||||||
return axios.post<Black>('/admin/api/v1/jobuser/getSonId', { id });
|
return axios.post<any>('/admin/api/v1/jobuser/getSonId', { id });
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -85,7 +85,7 @@ export function getSonId(id: number) {
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export function del(id: number) {
|
export function del(id: number) {
|
||||||
return axios.post<Black>('/admin/api/v1/jobuser/del', { id });
|
return axios.post<any>('/admin/api/v1/jobuser/del', { id });
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -94,7 +94,7 @@ export function del(id: number) {
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export function set_user_password(id: number,password:string) {
|
export function set_user_password(id: number,password:string) {
|
||||||
return axios.post<Black>('/admin/api/v1/jobuser/set_user_password', { id,password });
|
return axios.post<any>('/admin/api/v1/jobuser/set_user_password', { id,password });
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -103,7 +103,7 @@ export function set_user_password(id: number,password:string) {
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export function set_user_remark(id: number,remark:string) {
|
export function set_user_remark(id: number,remark:string) {
|
||||||
return axios.post<Black>('/admin/api/v1/jobuser/set_user_remark', { id,remark });
|
return axios.post<any>('/admin/api/v1/jobuser/set_user_remark', { id,remark });
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -112,13 +112,24 @@ export function set_user_remark(id: number,remark:string) {
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export function get_user_withdraw(id: number) {
|
export function get_user_withdraw(id: number) {
|
||||||
return axios.post<Black>('/admin/api/v1/jobuser/get_user_withdraw', { id });
|
return axios.post<any>('/admin/api/v1/jobuser/get_user_withdraw', { id });
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
* 获取用户在线时长
|
||||||
* @param 获取用户在线时长
|
* @param username 用户名
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export function get_user_wphone(username:string) {
|
export function get_user_wphone(username:string) {
|
||||||
return axios.post<Black>('/admin/api/v1/jobuser/get_user_wphone', { username });
|
return axios.post<any>('/admin/api/v1/jobuser/get_user_wphone', { username });
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 增减用户积分
|
||||||
|
* @param id 用户id
|
||||||
|
* @param money 积分
|
||||||
|
* @param memo 备注
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export function add_money(id:number,money:number,memo:string) {
|
||||||
|
return axios.post<any>('/admin/api/v1/jobuser/add_money', { id,money,memo });
|
||||||
}
|
}
|
|
@ -79,6 +79,7 @@
|
||||||
<template #cell="{ record }">
|
<template #cell="{ record }">
|
||||||
<a-space>
|
<a-space>
|
||||||
<a-button @click="handleBeforeOk_withdraw(record.id)">提现记录</a-button>
|
<a-button @click="handleBeforeOk_withdraw(record.id)">提现记录</a-button>
|
||||||
|
<a-button @click="show_money(record.id)">增减积分</a-button>
|
||||||
<a-button @click="show_group(record.id)">修改密码</a-button>
|
<a-button @click="show_group(record.id)">修改密码</a-button>
|
||||||
<a-button @click="set_remark(record.id)">修改备注</a-button>
|
<a-button @click="set_remark(record.id)">修改备注</a-button>
|
||||||
<a-button v-if="record.status == 1" status="danger" @click="showConfirm(record.id)">封禁</a-button>
|
<a-button v-if="record.status == 1" status="danger" @click="showConfirm(record.id)">封禁</a-button>
|
||||||
|
@ -123,12 +124,31 @@
|
||||||
</template>
|
</template>
|
||||||
<withdrawitem :data="withdraw"></withdrawitem>
|
<withdrawitem :data="withdraw"></withdrawitem>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
|
<a-modal v-model:visible="modal_visible_money" width="800px" @before-ok="handleBeforeOk_money">
|
||||||
|
<template #title>
|
||||||
|
增减用户积分
|
||||||
|
</template>
|
||||||
|
<!-- <a-col :span="8"> -->
|
||||||
|
|
||||||
|
<a-form-item field="money" label="积分" validate-trigger="blur">
|
||||||
|
<a-space direction="vertical" size="large">
|
||||||
|
<a-input-number v-model="money.money" placeholder="请输入积分负数为减" allow-clear />
|
||||||
|
</a-space>
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item field="money" label="备注" validate-trigger="blur">
|
||||||
|
<a-space direction="vertical" size="large">
|
||||||
|
<a-input v-model="money.memo" placeholder="请输入备注" allow-clear />
|
||||||
|
</a-space>
|
||||||
|
</a-form-item>
|
||||||
|
|
||||||
|
<!-- </a-col> -->
|
||||||
|
</a-modal>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, ref, reactive, watch, nextTick, onMounted } from 'vue';
|
import { computed, ref, reactive, watch, nextTick, onMounted } from 'vue';
|
||||||
import { lists, black, OutBlack, del, set_user_password, set_user_remark,get_user_withdraw } from '@/api/jobuser';
|
import { lists, black, OutBlack, del, set_user_password, set_user_remark,get_user_withdraw, add_money } from '@/api/jobuser';
|
||||||
import { Modal } from '@arco-design/web-vue';
|
import { Modal } from '@arco-design/web-vue';
|
||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
|
@ -146,6 +166,11 @@ const modal_visible_remark = ref(false)
|
||||||
//用户提现记录弹窗
|
//用户提现记录弹窗
|
||||||
const modal_visible_withdraw = ref(false)
|
const modal_visible_withdraw = ref(false)
|
||||||
|
|
||||||
|
//增减用户积分
|
||||||
|
const modal_visible_money = ref(false)
|
||||||
|
|
||||||
|
const money=reactive({money:0,memo:"系统赠送"})
|
||||||
|
|
||||||
const remark = ref("")
|
const remark = ref("")
|
||||||
const password = ref("")
|
const password = ref("")
|
||||||
let data = ref<DataItem[]>([])
|
let data = ref<DataItem[]>([])
|
||||||
|
@ -157,6 +182,12 @@ const show_group = (id: number) => {
|
||||||
userid.value = id
|
userid.value = id
|
||||||
modal_visible.value = true
|
modal_visible.value = true
|
||||||
}
|
}
|
||||||
|
//展示增减用户积分弹窗
|
||||||
|
const show_money = (id: number) => {
|
||||||
|
userid.value = id
|
||||||
|
modal_visible_money.value = true
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const set_remark = (id: number) => {
|
const set_remark = (id: number) => {
|
||||||
userid.value = id
|
userid.value = id
|
||||||
|
@ -232,6 +263,17 @@ const handleBlock = async (id: string) => {
|
||||||
Message.error('拉黑失败')
|
Message.error('拉黑失败')
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const handleBeforeOk_money=async ()=>{
|
||||||
|
const res = await add_money(userid.value,money.money,money.memo);
|
||||||
|
if (res.code == 200) {
|
||||||
|
Message.success('操作成功')
|
||||||
|
getAll()
|
||||||
|
} else {
|
||||||
|
Message.error('操作失败')
|
||||||
|
}
|
||||||
|
}
|
||||||
const queryParams = ref({
|
const queryParams = ref({
|
||||||
key: "",
|
key: "",
|
||||||
status: 1
|
status: 1
|
||||||
|
|
Loading…
Reference in New Issue