新增实名用户列表
This commit is contained in:
parent
93fb3bc46f
commit
65d61c5ebc
|
|
@ -38,3 +38,41 @@ export function summary_query(params) {
|
||||||
params
|
params
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实名信息列表
|
||||||
|
* @param {*} params
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export function userInfo_list(params) {
|
||||||
|
return $http({
|
||||||
|
url: "/czg/userInfo/list",
|
||||||
|
method: "get",
|
||||||
|
params
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实名信息修改
|
||||||
|
* @param {*} data
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export function userInfo(data) {
|
||||||
|
return $http({
|
||||||
|
url: "/czg/userInfo",
|
||||||
|
method: "put",
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 实名删除
|
||||||
|
* @param {*} data
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export function userInfoDel(data) {
|
||||||
|
return $http({
|
||||||
|
url: "/czg/userInfo",
|
||||||
|
method: "DELETE",
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@ export const productUrl='dj-admin';
|
||||||
// const baseUrl = "http://192.168.1.7:8100/czg/"
|
// const baseUrl = "http://192.168.1.7:8100/czg/"
|
||||||
// const baseUrl = "https://api.tianjinzhitongdaohe.com/czg/"
|
// const baseUrl = "https://api.tianjinzhitongdaohe.com/czg/"
|
||||||
|
|
||||||
const baseUrl = "https://web-api.hnsiyao.cn/czg/" //测试
|
// const baseUrl = "https://web-api.hnsiyao.cn/czg/" //测试
|
||||||
// const baseUrl = "https://web.hnsiyao.cn/czg/" // 线上
|
const baseUrl = "https://web.hnsiyao.cn/czg/" // 线上
|
||||||
|
|
||||||
export default{
|
export default{
|
||||||
baseUrl
|
baseUrl
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,194 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
<el-form :inline="true" :model="query" class="demo-form-inline">
|
||||||
|
<el-form-item label="手机号">
|
||||||
|
<el-input v-model="query.phone" placeholder="请输入手机号"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="用户名">
|
||||||
|
<el-input v-model="query.name" placeholder="请输入用户名"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="getTableData">查询</el-button>
|
||||||
|
<el-button @click="resetHandle">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-table :data="tableData.list" v-loading="tableData.loading" border stripe>
|
||||||
|
<el-table-column label="用户ID" prop="userId"></el-table-column>
|
||||||
|
<el-table-column label="用户名" prop="name"></el-table-column>
|
||||||
|
<el-table-column label="手机号" prop="mobile"></el-table-column>
|
||||||
|
<el-table-column label="实名信息" prop="certName" width="300">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div>姓名:{{ scope.row.certName }}</div>
|
||||||
|
<div>身份证号:{{ scope.row.certNo }}</div>
|
||||||
|
<div>银行卡号:{{ scope.row.accountNo }}</div>
|
||||||
|
<div>开户行:{{ scope.row.bankName }}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="180" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button size="mini" type="primary" @click="edit(scope.row)">编辑</el-button>
|
||||||
|
<el-button size="mini" type="danger" @click="del(scope.row)">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
<div class="pagination">
|
||||||
|
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
||||||
|
:page-sizes="[10, 20, 30, 40]" :page-size="tableData.limit" :current-page="tableData.page"
|
||||||
|
layout="total,sizes, prev, pager, next,jumper" :total="tableData.total">
|
||||||
|
</el-pagination>
|
||||||
|
</div>
|
||||||
|
<el-dialog title="编辑" width="600px" :visible.sync="visible" @close="onClose">
|
||||||
|
<el-form :model="form" :rules="rules" ref="form" label-width="100px" label-position="left">
|
||||||
|
<el-form-item label="姓名" prop="certName">
|
||||||
|
<el-input v-model="form.certName" placeholder="请输入姓名"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="身份证号" prop="certNo">
|
||||||
|
<el-input v-model="form.certNo" placeholder="请输入身份证号"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="银行卡号" prop="accountNo">
|
||||||
|
<el-input v-model="form.accountNo" placeholder="请输入银行卡号"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="预留手机号" prop="mobile">
|
||||||
|
<el-input v-model="form.mobile" placeholder="请输入预留手机号"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="开户行" prop="bankName">
|
||||||
|
<el-input v-model="form.bankName" placeholder="请输入开户行"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer" style="display: flex; justify-content: flex-end;">
|
||||||
|
<el-button size="small" @click="visible = false"> 取 消 </el-button>
|
||||||
|
<el-button size="small" type="primary" :loading="confirmLoading"
|
||||||
|
@click="confirmHandle">确定</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { userInfo_list, userInfo, userInfoDel } from "@/api/withdraw.js";
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
query: {
|
||||||
|
phone: "",
|
||||||
|
name: "",
|
||||||
|
},
|
||||||
|
resetQuery: {},
|
||||||
|
tableData: {
|
||||||
|
page: 1,
|
||||||
|
limit: 10,
|
||||||
|
total: 0,
|
||||||
|
list: [],
|
||||||
|
loading: false
|
||||||
|
},
|
||||||
|
visible: false,
|
||||||
|
confirmLoading: false,
|
||||||
|
form: {
|
||||||
|
userId: '',
|
||||||
|
certName: "",
|
||||||
|
certNo: "",
|
||||||
|
accountNo: "",
|
||||||
|
mobile: "",
|
||||||
|
bankName: "",
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
certName: [{ required: true, message: "请输入姓名", trigger: "blur" }],
|
||||||
|
certNo: [{ required: true, message: "请输入身份证号", trigger: "blur" }],
|
||||||
|
accountNo: [{ required: true, message: "请输入银行卡号", trigger: "blur" }],
|
||||||
|
mobile: [{ required: true, message: "请输入预留手机号", trigger: "blur" }],
|
||||||
|
bankName: [{ required: true, message: "请输入开户行", trigger: "blur" }],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.resetQuery = { ...this.query };
|
||||||
|
this.getTableData()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 确定编辑
|
||||||
|
confirmHandle() {
|
||||||
|
this.$refs.form.validate(async valid => {
|
||||||
|
if (valid) {
|
||||||
|
try {
|
||||||
|
this.confirmLoading = true
|
||||||
|
await userInfo(this.form)
|
||||||
|
this.visible = false
|
||||||
|
this.$message.success('编辑成功')
|
||||||
|
this.getTableData()
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
this.confirmLoading = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 关闭弹窗, 重置表单
|
||||||
|
onClose() {
|
||||||
|
this.$refs.form.resetFields();
|
||||||
|
},
|
||||||
|
// 编辑
|
||||||
|
edit(row) {
|
||||||
|
this.form = { ...row }
|
||||||
|
this.visible = true
|
||||||
|
},
|
||||||
|
// 删除
|
||||||
|
del(row) {
|
||||||
|
console.log(row);
|
||||||
|
this.$confirm('是否删除该用户信息?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(async () => {
|
||||||
|
try {
|
||||||
|
await userInfoDel({ userId: row.userId })
|
||||||
|
this.$message.success('删除成功')
|
||||||
|
this.getTableData()
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
}).catch(() => { })
|
||||||
|
},
|
||||||
|
// 重置
|
||||||
|
resetHandle() {
|
||||||
|
this.query = { ...this.resetQuery }
|
||||||
|
this.tableData.page = 1
|
||||||
|
this.getTableData()
|
||||||
|
},
|
||||||
|
// 分页数量
|
||||||
|
handleSizeChange(size) {
|
||||||
|
this.tableData.page = 1;
|
||||||
|
this.tableData.limit = size;
|
||||||
|
this.getTableData();
|
||||||
|
},
|
||||||
|
// 分页
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
this.tableData.page = val;
|
||||||
|
this.getTableData();
|
||||||
|
},
|
||||||
|
// 获取数据
|
||||||
|
async getTableData() {
|
||||||
|
try {
|
||||||
|
this.tableData.loading = true
|
||||||
|
const { data } = await userInfo_list({
|
||||||
|
page: this.tableData.page,
|
||||||
|
limit: this.tableData.limit,
|
||||||
|
phone: this.query.phone,
|
||||||
|
name: this.query.name,
|
||||||
|
})
|
||||||
|
this.tableData.list = data.data.list
|
||||||
|
this.tableData.total = data.data.totalCount
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
this.tableData.loading = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
@ -1,54 +1,61 @@
|
||||||
<template>
|
<template>
|
||||||
<el-tabs v-model = "activeName" @tab-click = "handleClick">
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||||
<!-- <el-tab-pane label = "会员列表" name = "first"> -->
|
<el-tab-pane label="会员列表" name="first">
|
||||||
<div style = "margin-right:2%;text-align: right;">
|
<div style="margin-right:2%;text-align: right;">
|
||||||
<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" :disabled="!isAuth('viplist:add')" @click="add">添加
|
<el-button style="margin-left:15px;" size="mini" type="primary" icon="document"
|
||||||
</el-button>
|
:disabled="!isAuth('viplist:add')" @click="add">添加
|
||||||
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-table v-loading = "tableDataLoading" :data = "tableData.list" >
|
<el-table v-loading="tableDataLoading" :data="tableData.list">
|
||||||
<el-table-column fixed prop = "id" label = "编号" width = "50"></el-table-column>
|
<el-table-column fixed prop="id" label="编号" width="50"></el-table-column>
|
||||||
<el-table-column prop = "vipNameType" label = "会员类型" width = "150">
|
<el-table-column prop="vipNameType" label="会员类型" width="150">
|
||||||
<template slot-scope = "scope">
|
<template slot-scope="scope">
|
||||||
<span v-if = "scope.row.vipNameType == 0">月会员</span>
|
<span v-if="scope.row.vipNameType == 0">月会员</span>
|
||||||
<span v-if = "scope.row.vipNameType == 1">季会员</span>
|
<span v-if="scope.row.vipNameType == 1">季会员</span>
|
||||||
<span v-if = "scope.row.vipNameType == 2">年会员</span>
|
<span v-if="scope.row.vipNameType == 2">年会员</span>
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop = "money" label = "会员价格" >
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="payDiamond" label="钻石价格">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label = "操作" width = "180" align="center" fixed="right">
|
|
||||||
<template slot-scope = "scope">
|
|
||||||
<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" :disabled="!isAuth('viplist:update')" @click="updata(scope.row)">修改
|
|
||||||
</el-button>
|
|
||||||
<el-button size = "mini" type = "danger" :disabled="!isAuth('viplist:delete')" @click = "deletes(scope.row)">删除</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="money" label="会员价格">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="payDiamond" label="钻石价格">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="180" align="center" fixed="right">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button style="margin-left:15px;" size="mini" type="primary" icon="document"
|
||||||
|
:disabled="!isAuth('viplist:update')" @click="updata(scope.row)">修改
|
||||||
|
</el-button>
|
||||||
|
<el-button size="mini" type="danger" :disabled="!isAuth('viplist:delete')"
|
||||||
|
@click="deletes(scope.row)">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<div style = "text-align: center;margin-top: 10px;float:right">
|
<div style="text-align: center;margin-top: 10px;float:right">
|
||||||
<el-pagination @size-change = "handleSizeChange" @current-change = "handleCurrentChange" :page-sizes = "[5, 10, 15, 20]"
|
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
||||||
:page-size = "limit" :current-page = "page" layout = "total,sizes, prev, pager, next,jumper"
|
:page-sizes="[5, 10, 15, 20]" :page-size="limit" :current-page="page"
|
||||||
:total = "tableData.totalCount">
|
layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalCount">
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
</div>
|
</div>
|
||||||
<!-- </el-tab-pane> -->
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="实名用户" name="realName">
|
||||||
|
<RealNameList ref="RealNameList" />
|
||||||
|
</el-tab-pane>
|
||||||
<el-dialog title="添加" :visible.sync="dialogFormVisible" center>
|
<el-dialog title="添加" :visible.sync="dialogFormVisible" center>
|
||||||
<div style="margin-bottom: 10px;">
|
<div style="margin-bottom: 10px;">
|
||||||
<span style="width: 200px;display: inline-block;text-align: right;">会员类型:</span>
|
<span style="width: 200px;display: inline-block;text-align: right;">会员类型:</span>
|
||||||
<el-radio-group v-model="vipNameType">
|
<el-radio-group v-model="vipNameType">
|
||||||
<el-radio :label="0">月会员</el-radio>
|
<el-radio :label="0">月会员</el-radio>
|
||||||
<el-radio :label="1">季会员</el-radio>
|
<el-radio :label="1">季会员</el-radio>
|
||||||
<el-radio :label="2">年会员</el-radio>
|
<el-radio :label="2">年会员</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-bottom: 10px;">
|
<div style="margin-bottom: 10px;">
|
||||||
<span style="width: 200px;display: inline-block;text-align: right;">会员价格:</span>
|
<span style="width: 200px;display: inline-block;text-align: right;">会员价格:</span>
|
||||||
<el-input style="width:50%;" v-model="money" type="number" min="0" placeholder="请输入会员价格" ></el-input>
|
<el-input style="width:50%;" v-model="money" type="number" min="0" placeholder="请输入会员价格"></el-input>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-bottom: 10px;">
|
<div style="margin-bottom: 10px;">
|
||||||
<span style="width: 200px;display: inline-block;text-align: right;">钻石价格:</span>
|
<span style="width: 200px;display: inline-block;text-align: right;">钻石价格:</span>
|
||||||
<el-input style="width:50%;" v-model="payDiamond" type="number" min="0" placeholder="请输入钻石价格" ></el-input>
|
<el-input style="width:50%;" v-model="payDiamond" type="number" min="0"
|
||||||
|
placeholder="请输入钻石价格"></el-input>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
|
|
@ -58,12 +65,12 @@
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-dialog title="修改" :visible.sync="dialogFormVisible1" center>
|
<el-dialog title="修改" :visible.sync="dialogFormVisible1" center>
|
||||||
<div style="margin-bottom: 10px;">
|
<div style="margin-bottom: 10px;">
|
||||||
<span style="width: 200px;display: inline-block;text-align: right;">会员类型:</span>
|
<span style="width: 200px;display: inline-block;text-align: right;">会员类型:</span>
|
||||||
<el-radio-group v-model="vipNameType">
|
<el-radio-group v-model="vipNameType">
|
||||||
<el-radio :label="0">月会员</el-radio>
|
<el-radio :label="0">月会员</el-radio>
|
||||||
<el-radio :label="1">季会员</el-radio>
|
<el-radio :label="1">季会员</el-radio>
|
||||||
<el-radio :label="2">年会员</el-radio>
|
<el-radio :label="2">年会员</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-bottom: 10px;">
|
<div style="margin-bottom: 10px;">
|
||||||
<span style="width: 200px;display: inline-block;text-align: right;">会员价格:</span>
|
<span style="width: 200px;display: inline-block;text-align: right;">会员价格:</span>
|
||||||
|
|
@ -71,7 +78,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-bottom: 10px;">
|
<div style="margin-bottom: 10px;">
|
||||||
<span style="width: 200px;display: inline-block;text-align: right;">钻石价格:</span>
|
<span style="width: 200px;display: inline-block;text-align: right;">钻石价格:</span>
|
||||||
<el-input style="width:50%;" v-model="payDiamond" type="number" min="0" placeholder="请输入钻石价格" ></el-input>
|
<el-input style="width:50%;" v-model="payDiamond" type="number" min="0"
|
||||||
|
placeholder="请输入钻石价格"></el-input>
|
||||||
</div>
|
</div>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button @click="dialogFormVisible1 = false">取 消</el-button>
|
<el-button @click="dialogFormVisible1 = false">取 消</el-button>
|
||||||
|
|
@ -82,229 +90,233 @@
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
import RealNameList from './components/realNameList.vue'
|
||||||
data () {
|
export default {
|
||||||
return {
|
components: {
|
||||||
activeName:'first',
|
RealNameList
|
||||||
page: 1,
|
},
|
||||||
limit: 10,
|
data() {
|
||||||
classify: 1,
|
return {
|
||||||
id:'',
|
activeName: 'first',
|
||||||
vipNameType: -1,
|
page: 1,
|
||||||
money: '',
|
limit: 10,
|
||||||
payDiamond:'',
|
classify: 1,
|
||||||
tableDataLoading:false,
|
id: '',
|
||||||
dialogFormVisible:false,
|
vipNameType: -1,
|
||||||
dialogFormVisible1:false,
|
money: '',
|
||||||
tableData:{},
|
payDiamond: '',
|
||||||
}
|
tableDataLoading: false,
|
||||||
},
|
dialogFormVisible: false,
|
||||||
methods: {
|
dialogFormVisible1: false,
|
||||||
// 多选
|
tableData: {},
|
||||||
changeFun (val) {
|
|
||||||
this.checkBoxData = val
|
|
||||||
},
|
|
||||||
// tabs切换
|
|
||||||
handleClick (tab, event) {
|
|
||||||
if (tab._props.label == '轮播图') {
|
|
||||||
this.page = 1
|
|
||||||
this.limit = 5
|
|
||||||
this.classify = 1
|
|
||||||
this.dataSelect()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
handleSizeChange (val) {
|
|
||||||
this.limit = val
|
|
||||||
this.dataSelect()
|
|
||||||
},
|
|
||||||
handleCurrentChange (val) {
|
|
||||||
this.page = val
|
|
||||||
this.dataSelect()
|
|
||||||
},
|
|
||||||
// 查询列表
|
|
||||||
select() {
|
|
||||||
this.page = 1
|
|
||||||
this.limit = 10
|
|
||||||
this.dataSelect()
|
|
||||||
},
|
|
||||||
// 添加
|
|
||||||
add(){
|
|
||||||
this.vipNameType = -1
|
|
||||||
this.money = ''
|
|
||||||
this.payDiamond = ''
|
|
||||||
this.id = ''
|
|
||||||
this.dialogFormVisible = true
|
|
||||||
},
|
|
||||||
updata(row){
|
|
||||||
this.vipNameType = row.vipNameType
|
|
||||||
this.money = row.money
|
|
||||||
this.payDiamond = row.payDiamond
|
|
||||||
this.id = row.id
|
|
||||||
this.dialogFormVisible1 = true
|
|
||||||
},
|
|
||||||
vipAdd(){
|
|
||||||
if (this.vipNameType == -1) {
|
|
||||||
this.$notify({
|
|
||||||
title: '提示',
|
|
||||||
duration: 1800,
|
|
||||||
message: '请选择会员类型',
|
|
||||||
type: 'warning'
|
|
||||||
});
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (this.money === '') {
|
|
||||||
this.$notify({
|
|
||||||
title: '提示',
|
|
||||||
duration: 1800,
|
|
||||||
message: '请输入会员价格',
|
|
||||||
type: 'warning'
|
|
||||||
});
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (this.payDiamond === '') {
|
|
||||||
this.$notify({
|
|
||||||
title: '提示',
|
|
||||||
duration: 1800,
|
|
||||||
message: '请输入钻石价格',
|
|
||||||
type: 'warning'
|
|
||||||
});
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.$http({
|
|
||||||
url: this.$http.adornUrl('vipDetails/insertVipDetails'),
|
|
||||||
method: 'post',
|
|
||||||
data: this.$http.adornData({
|
|
||||||
'vipNameType':this.vipNameType,
|
|
||||||
'money':this.money,
|
|
||||||
'payDiamond':this.payDiamond,
|
|
||||||
})
|
|
||||||
}).then(({data}) => {
|
|
||||||
|
|
||||||
if(data.code == 0){
|
|
||||||
this.$message({
|
|
||||||
message: '操作成功',
|
|
||||||
type: 'success',
|
|
||||||
duration: 1500,
|
|
||||||
onClose: () => {
|
|
||||||
this.dialogFormVisible = false
|
|
||||||
this.dataSelect()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}else{
|
|
||||||
this.$message({
|
|
||||||
message: data.msg,
|
|
||||||
type: 'warning',
|
|
||||||
duration: 1500,
|
|
||||||
onClose: () => {
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
vipUpdata(){
|
|
||||||
if (this.money === '') {
|
|
||||||
this.$notify({
|
|
||||||
title: '提示',
|
|
||||||
duration: 1800,
|
|
||||||
message: '请输入会员价格',
|
|
||||||
type: 'warning'
|
|
||||||
});
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (this.payDiamond === '') {
|
|
||||||
this.$notify({
|
|
||||||
title: '提示',
|
|
||||||
duration: 1800,
|
|
||||||
message: '请输入钻石价格',
|
|
||||||
type: 'warning'
|
|
||||||
});
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$http({
|
|
||||||
url: this.$http.adornUrl('vipDetails/updateVipDetails'),
|
|
||||||
method: 'post',
|
|
||||||
data: this.$http.adornData({
|
|
||||||
'vipNameType':this.vipNameType,
|
|
||||||
'money':this.money,
|
|
||||||
'payDiamond':this.payDiamond,
|
|
||||||
'id':this.id
|
|
||||||
})
|
|
||||||
}).then(({data}) => {
|
|
||||||
|
|
||||||
if(data.code == 0){
|
|
||||||
this.dialogFormVisible1 = false
|
|
||||||
this.$message({
|
|
||||||
message: '操作成功',
|
|
||||||
type: 'success',
|
|
||||||
duration: 1500,
|
|
||||||
onClose: () => {
|
|
||||||
this.dataSelect()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}else{
|
|
||||||
this.$message({
|
|
||||||
message: data.msg,
|
|
||||||
type: 'warning',
|
|
||||||
duration: 1500,
|
|
||||||
onClose: () => {
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 删除banner图
|
|
||||||
deletes (row) {
|
|
||||||
let delid = row.id
|
|
||||||
this.$confirm(`确定删除此条信息?`, '提示', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
|
||||||
this.$http({
|
|
||||||
url: this.$http.adornUrl(`vipDetails/deleteVipDetails?id=${delid}`),
|
|
||||||
method: 'post',
|
|
||||||
params: this.$http.adornParams({})
|
|
||||||
}).then(({data}) => {
|
|
||||||
this.$message({
|
|
||||||
message: '删除成功',
|
|
||||||
type: 'success',
|
|
||||||
duration: 1500,
|
|
||||||
onClose: () => {
|
|
||||||
this.dataSelect()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}).catch(() => {
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 获取数据列表
|
|
||||||
dataSelect () {
|
|
||||||
this.tableDataLoading = true
|
|
||||||
this.$http({
|
|
||||||
url: this.$http.adornUrl('vipDetails/selectVipDetailsList'),
|
|
||||||
method: 'get',
|
|
||||||
params: this.$http.adornParams({
|
|
||||||
'page': this.page,
|
|
||||||
'limit': this.limit
|
|
||||||
})
|
|
||||||
}).then(({data}) => {
|
|
||||||
if (data && data.code === 0) {
|
|
||||||
this.tableDataLoading = false
|
|
||||||
let returnData = data.data
|
|
||||||
this.tableData = returnData
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted () {
|
|
||||||
this.dataSelect()
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 多选
|
||||||
|
changeFun(val) {
|
||||||
|
this.checkBoxData = val
|
||||||
|
},
|
||||||
|
// tabs切换
|
||||||
|
handleClick(tab, event) {
|
||||||
|
if (tab._props.label == '轮播图') {
|
||||||
|
this.page = 1
|
||||||
|
this.limit = 5
|
||||||
|
this.classify = 1
|
||||||
|
this.dataSelect()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleSizeChange(val) {
|
||||||
|
this.limit = val
|
||||||
|
this.dataSelect()
|
||||||
|
},
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
this.page = val
|
||||||
|
this.dataSelect()
|
||||||
|
},
|
||||||
|
// 查询列表
|
||||||
|
select() {
|
||||||
|
this.page = 1
|
||||||
|
this.limit = 10
|
||||||
|
this.dataSelect()
|
||||||
|
},
|
||||||
|
// 添加
|
||||||
|
add() {
|
||||||
|
this.vipNameType = -1
|
||||||
|
this.money = ''
|
||||||
|
this.payDiamond = ''
|
||||||
|
this.id = ''
|
||||||
|
this.dialogFormVisible = true
|
||||||
|
},
|
||||||
|
updata(row) {
|
||||||
|
this.vipNameType = row.vipNameType
|
||||||
|
this.money = row.money
|
||||||
|
this.payDiamond = row.payDiamond
|
||||||
|
this.id = row.id
|
||||||
|
this.dialogFormVisible1 = true
|
||||||
|
},
|
||||||
|
vipAdd() {
|
||||||
|
if (this.vipNameType == -1) {
|
||||||
|
this.$notify({
|
||||||
|
title: '提示',
|
||||||
|
duration: 1800,
|
||||||
|
message: '请选择会员类型',
|
||||||
|
type: 'warning'
|
||||||
|
});
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.money === '') {
|
||||||
|
this.$notify({
|
||||||
|
title: '提示',
|
||||||
|
duration: 1800,
|
||||||
|
message: '请输入会员价格',
|
||||||
|
type: 'warning'
|
||||||
|
});
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.payDiamond === '') {
|
||||||
|
this.$notify({
|
||||||
|
title: '提示',
|
||||||
|
duration: 1800,
|
||||||
|
message: '请输入钻石价格',
|
||||||
|
type: 'warning'
|
||||||
|
});
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl('vipDetails/insertVipDetails'),
|
||||||
|
method: 'post',
|
||||||
|
data: this.$http.adornData({
|
||||||
|
'vipNameType': this.vipNameType,
|
||||||
|
'money': this.money,
|
||||||
|
'payDiamond': this.payDiamond,
|
||||||
|
})
|
||||||
|
}).then(({ data }) => {
|
||||||
|
|
||||||
|
if (data.code == 0) {
|
||||||
|
this.$message({
|
||||||
|
message: '操作成功',
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.dialogFormVisible = false
|
||||||
|
this.dataSelect()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
message: data.msg,
|
||||||
|
type: 'warning',
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
vipUpdata() {
|
||||||
|
if (this.money === '') {
|
||||||
|
this.$notify({
|
||||||
|
title: '提示',
|
||||||
|
duration: 1800,
|
||||||
|
message: '请输入会员价格',
|
||||||
|
type: 'warning'
|
||||||
|
});
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.payDiamond === '') {
|
||||||
|
this.$notify({
|
||||||
|
title: '提示',
|
||||||
|
duration: 1800,
|
||||||
|
message: '请输入钻石价格',
|
||||||
|
type: 'warning'
|
||||||
|
});
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl('vipDetails/updateVipDetails'),
|
||||||
|
method: 'post',
|
||||||
|
data: this.$http.adornData({
|
||||||
|
'vipNameType': this.vipNameType,
|
||||||
|
'money': this.money,
|
||||||
|
'payDiamond': this.payDiamond,
|
||||||
|
'id': this.id
|
||||||
|
})
|
||||||
|
}).then(({ data }) => {
|
||||||
|
|
||||||
|
if (data.code == 0) {
|
||||||
|
this.dialogFormVisible1 = false
|
||||||
|
this.$message({
|
||||||
|
message: '操作成功',
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.dataSelect()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
message: data.msg,
|
||||||
|
type: 'warning',
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 删除banner图
|
||||||
|
deletes(row) {
|
||||||
|
let delid = row.id
|
||||||
|
this.$confirm(`确定删除此条信息?`, '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl(`vipDetails/deleteVipDetails?id=${delid}`),
|
||||||
|
method: 'post',
|
||||||
|
params: this.$http.adornParams({})
|
||||||
|
}).then(({ data }) => {
|
||||||
|
this.$message({
|
||||||
|
message: '删除成功',
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.dataSelect()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 获取数据列表
|
||||||
|
dataSelect() {
|
||||||
|
this.tableDataLoading = true
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl('vipDetails/selectVipDetailsList'),
|
||||||
|
method: 'get',
|
||||||
|
params: this.$http.adornParams({
|
||||||
|
'page': this.page,
|
||||||
|
'limit': this.limit
|
||||||
|
})
|
||||||
|
}).then(({ data }) => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this.tableDataLoading = false
|
||||||
|
let returnData = data.data
|
||||||
|
this.tableData = returnData
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.dataSelect()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.customWidth {
|
.customWidth {
|
||||||
width: 80% !important;
|
width: 80% !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue