fix:项目初始化
This commit is contained in:
@@ -0,0 +1,650 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-row>
|
||||
<el-form :inline="true" :model="searchData" class="form-inline" label-width="80px" size="mini">
|
||||
<el-form-item>
|
||||
<el-input @clear="clear('id')" clearable placeholder="请输入用户ID" v-model.number="searchData.id" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select @clear="clear('vipType')" clearable placeholder="请选择用户VIP等级" v-model.number="searchData.vipType">
|
||||
<el-option
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
v-for="item in vipTypeList"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input @clear="clear('nickName')" clearable placeholder="请输入用户昵称" v-model="searchData.nickName" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input @clear="clear('account')" clearable placeholder="请输入用户账号" v-model="searchData.account" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input @clear="clear('mobile')" clearable placeholder="请输入用户手机号" v-model="searchData.mobile" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select @clear="clear('type')" clearable placeholder="请选择用户类型" v-model="searchData.type">
|
||||
<el-option
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
v-for="item in userTypeList"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input @clear="clear('inviteCode')" clearable placeholder="请输入用户邀请码" v-model="searchData.inviteCode" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select @clear="clear('status')" clearable placeholder="请选择账号状态" v-model="searchData.status">
|
||||
<el-option :value="0" label="正常" />
|
||||
<el-option :value="1" label="封禁" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input @clear="clear('districtCode')" clearable placeholder="请输入商区码" v-model="searchData.districtCode" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input
|
||||
@clear="clear('SuperiorUserId')"
|
||||
clearable
|
||||
placeholder="请输入用户上级ID"
|
||||
v-model="searchData.SuperiorUserId" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="onSearch" icon="el-icon-search" plain type="primary">搜索</el-button>
|
||||
<el-button @click="refreshView" icon="el-icon-refresh" plain type="info">刷新</el-button>
|
||||
<el-button @click="exportExcel" icon="el-icon-download" plain type="primary">导出</el-button>
|
||||
<el-button type="success" plain @click="viewCode">点击查看验证码</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-table
|
||||
:data="userData"
|
||||
element-loading-text="拼命加载中"
|
||||
border
|
||||
height="700"
|
||||
highlight-current-row
|
||||
style="width: 100%"
|
||||
v-loading="loading"
|
||||
:row-style="{ height: '70px' }">
|
||||
<el-table-column align="center" label="用户ID" width="100" fixed="left">
|
||||
<template slot-scope="scope">{{ scope.row.id }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="昵称" width="100">
|
||||
<template slot-scope="scope">{{ scope.row.nickName }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="账号" width="100">
|
||||
<template slot-scope="scope">{{ scope.row.account }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="用户头像" width="100">
|
||||
<template slot-scope="scope">
|
||||
<ShowImg style="width: 50px; height: 50px; margin: 0 auto" :urls="scope.row.avatar"></ShowImg>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="普通会员" width="100">
|
||||
<el-table-column align="center" label="普通会员" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{
|
||||
scope.row.normalVip.cardName
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" label="会员到期时间" width="160">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.normalVip.vipExpire | BeiJingTime
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="暗网" width="100">
|
||||
<el-table-column align="center" label="暗网会员" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{
|
||||
scope.row.darkVip.cardName
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" label="会员到期时间" width="160">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.darkVip.vipExpire | BeiJingTime
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="全网通" width="100">
|
||||
<el-table-column align="center" label="全网通会员" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{
|
||||
scope.row.supremeVip.cardName
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" label="会员到期时间" width="160">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.supremeVip.vipExpire | BeiJingTime
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="直播" width="100">
|
||||
<el-table-column align="center" label="直播会员" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{
|
||||
scope.row.liveVip.cardName
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" label="会员到期时间" width="160">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.liveVip.vipExpire | BeiJingTime
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" label="用户类型" width="">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.type | changeUserType
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="商户认证" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button :type="scope.row.auth ? 'success' : 'danger'" plain size="mini">{{ scope.row.auth ? "已认证" :
|
||||
"未认证" }}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="会员到期时间" width="160">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.vipExpire | BeiJingTime
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="充值余额(金币)" width="135">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.recharge | changeMoneyYuan
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="收益余额" width="135">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.income | changeMoneyYuan
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="作品收益" width="120">
|
||||
<template slot-scope="scope">{{ scope.row.workIncome | changeMoneyYuan }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="设备" width="100">
|
||||
<template slot-scope="scope">{{ scope.row.device }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="app版本" width="100">
|
||||
<template slot-scope="scope">{{ scope.row.appVer }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="每周可缓存总次数" width="100">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.downLoadTotal
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="购买视频折扣" width="100">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.movieDiscount
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="观影券数量" width="120">
|
||||
<template slot-scope="scope">{{ scope.row.movieTickets }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="免费抽奖次数" width="120">
|
||||
<template slot-scope="scope">{{ scope.row.lotteryFreeCount }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="免费AI脱衣次数" width="120">
|
||||
<template slot-scope="scope">{{ scope.row.aiFreeRemoveClothCount }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="免费AI换脸次数" width="120">
|
||||
<template slot-scope="scope">{{ scope.row.aiFreeChangeFaceCount }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="Ai女友积分" width="120">
|
||||
<template slot-scope="scope">{{ scope.row.aiMateScore }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="积分" width="120">
|
||||
<template slot-scope="scope">{{ scope.row.points }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="签到返现收益" width="120">
|
||||
<template slot-scope="scope">{{ scope.row.checkinCashbackIncome / 100 }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="在线时长" width="120">
|
||||
<template slot-scope="scope">{{ scope.row.onlineTimeSecDay }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="总在线时长" width="120">
|
||||
<template slot-scope="scope">{{ scope.row.onlineTimeSecTotal }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="最后在线时间" width="120">
|
||||
<template slot-scope="scope">{{ scope.row.onlineTimeAt }}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" label="手机号码" width="150">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.country + scope.row.mobile
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="状态" width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-button :type="scope.row.status === 1 ? 'danger' : 'success'" plain size="mini">{{ scope.row.status ===
|
||||
1 ? "已封号" : "正常" }}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="年龄" width="100">
|
||||
<template slot-scope="scope">{{ scope.row.age }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="最后购买时间" width="160">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.vipLastPayTime | BeiJingTime
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="邀请码" width="100">
|
||||
<template slot-scope="scope">{{ scope.row.inviteCode }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="设备唯一标示" width="200" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">{{ scope.row.devID }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="系统类型" width="100">
|
||||
<template slot-scope="scope">{{ scope.row.sysType }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="邀请数" width="100">
|
||||
<template slot-scope="scope">{{ scope.row.invites }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="上级邀请码" width="100">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.agentInviteCode
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="商区码" width="100">
|
||||
<template slot-scope="scope">{{ scope.row.districtCode }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="是否直推" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button :type="scope.row.isDirect ? 'success' : 'danger'" plain size="mini">{{ scope.row.isDirect ?
|
||||
"直推" : "非直推" }}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="最后登陆Ip" width="120">
|
||||
<template slot-scope="scope">{{ scope.row.lastIp }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="注册IP" width="120">
|
||||
<template slot-scope="scope">{{ scope.row.regIp }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="简介" width="100" show-overflow-tooltip>
|
||||
<template slot-scope="scope">{{ scope.row.introduction }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="注册时间" width="160">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.createdAt | BeiJingTime
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="最后活跃" width="160">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.lastLoginAt | BeiJingTime
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="更新时间" width="160">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.updatedAt | BeiJingTime
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" fixed="right" label="操作" width="650">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="primary" @click="openQr(scope.$index, scope.row)">查看二维码</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.status === 0"
|
||||
@click="banUser(scope.row, 'status')"
|
||||
size="mini"
|
||||
type="danger">封禁</el-button>
|
||||
<el-button v-else @click="unbanUser(scope.row, 'status')" size="mini" type="success">解封</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.slient === 0"
|
||||
@click="changeStatus(scope.row, 'slient')"
|
||||
size="mini"
|
||||
type="warning">禁言</el-button>
|
||||
<el-button @click="handleEdit(scope.$index, scope.row)" size="mini" type="primary">编辑</el-button>
|
||||
<el-dropdown trigger="click">
|
||||
<el-button type="primary" size="mini">
|
||||
会员积分金币操作<i class="el-icon-arrow-down el-icon--right"></i>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item> <span
|
||||
@click="handleEditMovieTickets(scope.$index, scope.row)">观影券及积分</span></el-dropdown-item>
|
||||
<el-dropdown-item> <span
|
||||
@click="handleEditVip(scope.$index, scope.row)">编辑标准会员</span></el-dropdown-item>
|
||||
<el-dropdown-item> <span @click="handleEditVip(1, scope.row)">编辑猎奇会员</span></el-dropdown-item>
|
||||
<el-dropdown-item> <span @click="handleEditVip(3, scope.row)">编辑直播会员</span></el-dropdown-item>
|
||||
<el-dropdown-item> <span @click="handleEditVip(2, scope.row)">编辑全网通会员</span></el-dropdown-item>
|
||||
<el-dropdown-item><span @click="addIncCoin(scope.$index, scope.row)">编辑金币</span></el-dropdown-item>
|
||||
<el-dropdown-item><span @click="addCoupon(scope.$index, scope.row)">编辑优惠券</span></el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
<el-button @click="BindBankCard(scope.$index, scope.row)" size="mini" type="success">绑定银行卡</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="table-pagination">
|
||||
<el-pagination
|
||||
:current-page="searchData.page"
|
||||
:page-size="searchData.pageSize"
|
||||
:page-sizes="[10, 20, 30, 50, 100]"
|
||||
:total="total"
|
||||
@current-change="handleCurrentChange"
|
||||
@size-change="handleSizeChange"
|
||||
layout="total, sizes, prev, pager, next, jumper" />
|
||||
</div>
|
||||
<Edit :data="editData" v-if="editVisible" @close="closeEdit" />
|
||||
<EditVip :data="editData" v-if="editVipVisible" @close="closeEdit"></EditVip>
|
||||
<AddIncCoin :data="editData" v-if="addIncCoinVisible" @close="closeEdit"></AddIncCoin>
|
||||
<EditGameCoin :data="editData" v-if="addGamecoinVisible" @close="closeEdit"></EditGameCoin>
|
||||
<BanUser :data="editData" v-if="banUserVisible" @close="closeEdit"></BanUser>
|
||||
<WaterList :data="editData" v-if="BankCard" @close="closeEdit"></WaterList>
|
||||
<!-- 查看验证码 -->
|
||||
<ViewCode ref="showCode" />
|
||||
<Coupon :data="editData" v-if="couponVisible" @close="closeEdit"></Coupon>
|
||||
<MovieTickets :data="editMovieTicketsData" v-if="editMovieTicketsVisible" @close="closeEdit"></MovieTickets>
|
||||
<ShowQR :data='editData' v-if="QRVisible" @close="closeEdit"></ShowQR>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
getUserList,
|
||||
userExport,
|
||||
userUpdate,
|
||||
userUnBan
|
||||
} from '@/api/user/userList'
|
||||
import { vipTypeList, userTypeList } from '@/filters/user/userList'
|
||||
import Edit from './components/AddOrEdit'
|
||||
import EditVip from './components/EditVip'
|
||||
import AddIncCoin from './components/AddIncCoin'
|
||||
import EditGameCoin from './components/EditGameCoin'
|
||||
import ShowImg from '@/components/ShowImg/index.vue'
|
||||
import BanUser from './components/banUser'
|
||||
import ViewCode from './components/viewVerificationCode'
|
||||
import Coupon from './components/coupon'
|
||||
import MovieTickets from './components/MovieTickets'
|
||||
import WaterList from './components/waterList.vue'
|
||||
import { BeiJingTime } from '@/filters/index'
|
||||
import { getVipCardList } from '@/api/commodity/vipcard'
|
||||
import ShowQR from './components/showQR.vue'
|
||||
export default {
|
||||
name: 'UserList',
|
||||
components: {
|
||||
Edit,
|
||||
ShowImg,
|
||||
EditVip,
|
||||
AddIncCoin,
|
||||
EditGameCoin,
|
||||
BanUser,
|
||||
ViewCode,
|
||||
Coupon,
|
||||
MovieTickets,
|
||||
WaterList,
|
||||
ShowQR
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
vipTypeList: vipTypeList(),
|
||||
userTypeList: userTypeList(),
|
||||
// 列表加载状态
|
||||
loading: false,
|
||||
// 请求或搜索数据参数
|
||||
searchData: {
|
||||
id: undefined, // 用户id
|
||||
account: undefined,
|
||||
vipType: undefined, // vip等级
|
||||
nickName: undefined, // 昵称
|
||||
mobile: undefined, // 手机号码
|
||||
inviteCode: undefined, // 邀请码
|
||||
status: undefined, // string 账号状态; 0:正常 1:封禁
|
||||
type: undefined, // 用户类型
|
||||
SuperiorUserId: undefined, // 用户上级id
|
||||
districtCode: undefined, // 被邀请的inviteCode
|
||||
page: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
|
||||
// 用户列表数据
|
||||
userData: [],
|
||||
// 数据总条数
|
||||
total: 0,
|
||||
// 编辑数据
|
||||
editData: {},
|
||||
// 编辑观影券数据
|
||||
editMovieTicketsData: {},
|
||||
editMovieTicketsVisible: false,
|
||||
// 新增或编辑弹出框
|
||||
editVisible: false,
|
||||
editVipVisible: false,
|
||||
// 添加金币弹窗
|
||||
addIncCoinVisible: false,
|
||||
addGamecoinVisible: false, // 添加游戏币弹窗
|
||||
// 封禁用户弹窗
|
||||
banUserVisible: false,
|
||||
couponVisible: false,
|
||||
// 会员类型列表
|
||||
newVipTypeList: [],
|
||||
// 银行卡绑定弹窗
|
||||
BankCard: false,
|
||||
QRVisible: false
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.newGetVipCardList()
|
||||
},
|
||||
methods: {
|
||||
openQr(index, row) {
|
||||
this.QRVisible = true
|
||||
this.editData = {
|
||||
userId: row.id
|
||||
}
|
||||
},
|
||||
// TODO:请求用户VIP类型数据
|
||||
async newGetVipCardList() {
|
||||
getVipCardList({ pageSize: 100, pageNum: 1 }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
if (res.data.list && res.data.list.length) {
|
||||
this.newVipTypeList = res.data.list
|
||||
} else {
|
||||
this.newVipTypeList = []
|
||||
}
|
||||
|
||||
this.getUserData()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// TODO:禁言
|
||||
changeStatus(row, key) {
|
||||
const data = { ...row }
|
||||
if (row[key] === 0) {
|
||||
data[key] = 1
|
||||
} else if (row[key] === 1) {
|
||||
data[key] = 0
|
||||
}
|
||||
userUpdate(data).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success('更新成功')
|
||||
this.getUserData()
|
||||
} else {
|
||||
this.$message.error('更新失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// TODO:请求用户列表数据
|
||||
getUserData() {
|
||||
this.loading = true
|
||||
getUserList(this.searchData).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.userData = res.data.list
|
||||
this.total = res.data.total
|
||||
} else {
|
||||
this.userData = []
|
||||
this.total = 0
|
||||
this.$message.error('请求失败')
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// TODO:导出用户列表数据
|
||||
exportExcel() {
|
||||
const data = { ...this.searchData }
|
||||
data.pageSize = this.searchData.pageSize
|
||||
data.page = this.searchData.page
|
||||
userExport(data).then((res) => {
|
||||
if (res.code) {
|
||||
this.$message.error('导出列表失败!')
|
||||
} else {
|
||||
const a = document.createElement('a')
|
||||
var blob = new Blob([res], {
|
||||
type: 'application/vnd.ms-excel;charset=utf-8'
|
||||
})
|
||||
const t = BeiJingTime(new Date())
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
a.setAttribute('href', url)
|
||||
a.download = `用户列表${t}.xlsx`
|
||||
document.body.appendChild(a)
|
||||
a.click()
|
||||
document.body.removeChild(a)
|
||||
}
|
||||
})
|
||||
},
|
||||
// TODO:用户解封
|
||||
unbanUser(row) {
|
||||
userUnBan({ userId: row.id }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success('解封成功')
|
||||
this.getUserData()
|
||||
} else {
|
||||
this.$message.error('解封失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
clear(key) {
|
||||
this.searchData[key] = undefined
|
||||
this.getUserData()
|
||||
},
|
||||
/**
|
||||
* 点击按钮查看验证码
|
||||
*/
|
||||
viewCode() {
|
||||
this.$refs['showCode'].openDialog()
|
||||
},
|
||||
// 搜索按钮
|
||||
onSearch() {
|
||||
this.searchData.page = 1
|
||||
this.searchData.pageSize = 10
|
||||
this.searchData.SuperiorUserId = this.searchData.SuperiorUserId
|
||||
? Number(this.searchData.SuperiorUserId)
|
||||
: ''
|
||||
this.getUserData()
|
||||
},
|
||||
// 刷新
|
||||
refreshView() {
|
||||
this.searchData.page = 1
|
||||
this.searchData.pageSize = 10
|
||||
this.getUserData()
|
||||
},
|
||||
// 切换每页数据量
|
||||
handleSizeChange(val) {
|
||||
this.searchData.pageSize = val
|
||||
this.getUserData()
|
||||
},
|
||||
// 切换页数
|
||||
handleCurrentChange(val) {
|
||||
this.searchData.page = val
|
||||
this.getUserData()
|
||||
},
|
||||
|
||||
// 关闭编辑弹窗
|
||||
closeEdit() {
|
||||
this.editData = {}
|
||||
this.editVisible = false
|
||||
this.editVipVisible = false
|
||||
// this.addFansGroupVisible = false
|
||||
this.banUserVisible = false
|
||||
this.addIncCoinVisible = false
|
||||
this.addGamecoinVisible = false
|
||||
this.couponVisible = false
|
||||
this.editMovieTicketsVisible = false
|
||||
this.BankCard = false
|
||||
this.QRVisible = false
|
||||
this.getUserData()
|
||||
},
|
||||
handleEditMovieTickets(index, row) {
|
||||
this.editMovieTicketsVisible = true
|
||||
this.editMovieTicketsData = row
|
||||
},
|
||||
// 编辑
|
||||
handleEdit(index, row) {
|
||||
this.editVisible = true
|
||||
this.editData = row
|
||||
},
|
||||
// 编辑VIP
|
||||
handleEditVip(index, row) {
|
||||
this.editVipVisible = true
|
||||
if (index === 0) {
|
||||
this.editData = {
|
||||
...row.normalVip,
|
||||
userId: row.id,
|
||||
cardCategory: index
|
||||
}
|
||||
} else if (index === 1) {
|
||||
this.editData = {
|
||||
...row.darkVip,
|
||||
userId: row.id,
|
||||
cardCategory: index
|
||||
}
|
||||
} else if (index === 2) {
|
||||
this.editData = {
|
||||
...row.supremeVip,
|
||||
userId: row.id,
|
||||
cardCategory: index
|
||||
}
|
||||
} else if (index === 3) {
|
||||
this.editData = {
|
||||
...row.liveVip,
|
||||
userId: row.id,
|
||||
cardCategory: index
|
||||
}
|
||||
}
|
||||
},
|
||||
// 编辑金币
|
||||
addIncCoin(index, row) {
|
||||
this.addIncCoinVisible = true
|
||||
this.editData = row
|
||||
},
|
||||
// 编辑优惠券
|
||||
addCoupon(index, row) {
|
||||
this.couponVisible = true
|
||||
this.editData = row
|
||||
},
|
||||
// 编辑游戏币
|
||||
addGameCoin(index, row) {
|
||||
this.addGamecoinVisible = true
|
||||
this.editData = row
|
||||
},
|
||||
|
||||
banUser(row) {
|
||||
this.editData = row
|
||||
this.banUserVisible = true
|
||||
},
|
||||
|
||||
// 绑定银行卡
|
||||
BindBankCard(index, row) {
|
||||
console.log('银行卡添加')
|
||||
this.BankCard = true
|
||||
this.editData = row
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user