Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = 麻瓜后台管理系统
|
||||
VUE_APP_TITLE = 恋香后台管理系统
|
||||
|
||||
# 生产环境配置
|
||||
ENV = 'production'
|
||||
|
||||
VUE_APP_SYSTEM_HOME = '麻瓜'
|
||||
VUE_APP_SYSTEM_HOME = '恋香'
|
||||
|
||||
# 若依管理系统/生产环境
|
||||
VUE_APP_BASE_API = '/prod-api'
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 26 KiB |
53
src/api/cai/anchorTop.js
Normal file
53
src/api/cai/anchorTop.js
Normal file
@@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询主播限时置顶列表
|
||||
export function listAnchorTop(query) {
|
||||
return request({
|
||||
url: '/cai/anchorTop/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询主播限时置顶详细
|
||||
export function getAnchorTop(id) {
|
||||
return request({
|
||||
url: '/cai/anchorTop/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function getAnchorTopByUserCode(usercode) {
|
||||
return request({
|
||||
url: '/cai/anchorTop/getAnchorTopByUserCode',
|
||||
method: 'get',
|
||||
params: {'usercode': usercode}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 新增主播限时置顶
|
||||
export function addAnchorTop(data) {
|
||||
return request({
|
||||
url: '/cai/anchorTop',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改主播限时置顶
|
||||
export function updateAnchorTop(data) {
|
||||
return request({
|
||||
url: '/cai/anchorTop',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除主播限时置顶
|
||||
export function delAnchorTop(id) {
|
||||
return request({
|
||||
url: '/cai/anchorTop/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询会员价格列表
|
||||
// 查询会员价格设置列表
|
||||
export function listMemberPrice(query) {
|
||||
return request({
|
||||
url: '/cai/memberPrice/list',
|
||||
@@ -9,7 +9,7 @@ export function listMemberPrice(query) {
|
||||
})
|
||||
}
|
||||
|
||||
// 查询会员价格详细
|
||||
// 查询会员价格设置详细
|
||||
export function getMemberPrice(id) {
|
||||
return request({
|
||||
url: '/cai/memberPrice/' + id,
|
||||
@@ -17,7 +17,7 @@ export function getMemberPrice(id) {
|
||||
})
|
||||
}
|
||||
|
||||
// 新增会员价格
|
||||
// 新增会员价格设置
|
||||
export function addMemberPrice(data) {
|
||||
return request({
|
||||
url: '/cai/memberPrice',
|
||||
@@ -26,7 +26,7 @@ export function addMemberPrice(data) {
|
||||
})
|
||||
}
|
||||
|
||||
// 修改会员价格
|
||||
// 修改会员价格设置
|
||||
export function updateMemberPrice(data) {
|
||||
return request({
|
||||
url: '/cai/memberPrice',
|
||||
@@ -35,7 +35,7 @@ export function updateMemberPrice(data) {
|
||||
})
|
||||
}
|
||||
|
||||
// 删除会员价格
|
||||
// 删除会员价格设置
|
||||
export function delMemberPrice(id) {
|
||||
return request({
|
||||
url: '/cai/memberPrice/' + id,
|
||||
|
||||
@@ -35,6 +35,14 @@ export function updatePayConfig(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export function updatePayConfigStatus(data) {
|
||||
return request({
|
||||
url: '/cai/payConfig/status',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除支付配置
|
||||
export function delPayConfig(id) {
|
||||
return request({
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 23 KiB |
@@ -314,3 +314,10 @@ export const sensitiveTypeList = [
|
||||
{ value: 2, label: '黑名单', listClass: listClass.danger},
|
||||
]
|
||||
|
||||
// 1-生效 2-过期 3-待生效
|
||||
|
||||
export const topStatusList = [
|
||||
{ value: 1, label: '生效', listClass: listClass.primary},
|
||||
{ value: 2, label: '过期', listClass: listClass.info},
|
||||
{ value: 3, label: '待生效', listClass: listClass.warning},
|
||||
]
|
||||
|
||||
@@ -34,6 +34,28 @@
|
||||
v-hasPermi="['cai:anchor:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAnchorTop"
|
||||
v-hasPermi="['cai:anchorTop:add']"
|
||||
>新增主播置顶
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="info"
|
||||
plain
|
||||
icon="el-icon-query"
|
||||
size="mini"
|
||||
@click="handleAnchorTopList"
|
||||
v-hasPermi="['cai:anchorTop:list']"
|
||||
>主播置顶快速查询
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
@@ -138,6 +160,8 @@
|
||||
<add-anchor-dialog v-if="addAnchorDialogVisible" ref="addAnchorDialog" @refreshDataList="getList" />
|
||||
<update-anchor-dialog v-if="updateAnchorDialogVisible" ref="updateAnchorDialog" @refreshDataList="getList" />
|
||||
<anchor-info-dialog v-if="anchorInfoDialogVisible" ref="anchorInfoDialog" />
|
||||
<add-anchor-top-dialog v-if="addAnchorTopDialogVisible" ref="addAnchorTopDialog" @refreshDataList="getList" />
|
||||
<anchor-top-dialog v-if="anchorTopDialogVisible" ref="anchorTopDialog" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -147,10 +171,13 @@ import {genderList, userStatusList, videoStatusList} from '@/constant/statusMap'
|
||||
import AddAnchorDialog from "@/views/cai/anchor/add-anchor-dialog";
|
||||
import UpdateAnchorDialog from "@/views/cai/anchor/update-anchor-dialog";
|
||||
import AnchorInfoDialog from "@/views/cai/anchor/anchor-info-dialog";
|
||||
import AddAnchorTopDialog from '@/views/cai/anchorTop/add-anchor-top-dialog.vue'
|
||||
import AnchorTopDialog from '@/views/cai/anchorTop/anchor-top-dialog.vue'
|
||||
|
||||
export default {
|
||||
name: "Anchor",
|
||||
components:{
|
||||
AddAnchorTopDialog,AnchorTopDialog,
|
||||
AddAnchorDialog,UpdateAnchorDialog,AnchorInfoDialog
|
||||
},
|
||||
data() {
|
||||
@@ -160,6 +187,8 @@ export default {
|
||||
addAnchorDialogVisible: false,
|
||||
updateAnchorDialogVisible: false,
|
||||
anchorInfoDialogVisible: false,
|
||||
addAnchorTopDialogVisible: false,
|
||||
anchorTopDialogVisible: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
@@ -286,6 +315,19 @@ export default {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
handleAnchorTop(){
|
||||
this.addAnchorTopDialogVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addAnchorTopDialog.init()
|
||||
})
|
||||
},
|
||||
handleAnchorTopList(){
|
||||
this.anchorTopDialogVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.anchorTopDialog.init()
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
145
src/views/cai/anchorTop/add-anchor-top-dialog.vue
Normal file
145
src/views/cai/anchorTop/add-anchor-top-dialog.vue
Normal file
@@ -0,0 +1,145 @@
|
||||
<template>
|
||||
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="700px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-form-item :label="systemName+'号'" prop="usercode">
|
||||
<el-autocomplete
|
||||
class="inline-input"
|
||||
v-model="form.usercode"
|
||||
:fetch-suggestions="querySearch"
|
||||
placeholder="请输入内容"
|
||||
@select="handleSelect"
|
||||
></el-autocomplete>
|
||||
</el-form-item>
|
||||
<el-form-item label="昵称" v-if="info.nickname">
|
||||
{{ info.nickname }} 【{{ info.usercode }}】
|
||||
</el-form-item>
|
||||
<el-form-item label="性别" v-if="info.gender">
|
||||
<cai-dict-tag :options="genderList" :value="info.gender" />
|
||||
</el-form-item>
|
||||
<el-form-item label="头像" v-if="info.avatar">
|
||||
<image-avatar :src="info.avatar"/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
注意:只有主播才可以上推荐置顶
|
||||
</el-form-item>
|
||||
<el-form-item label="开始时间" prop="beginTime">
|
||||
<el-date-picker
|
||||
v-model="form.beginTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="选择置顶开始时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="结束时间" prop="endTime">
|
||||
<el-date-picker
|
||||
v-model="form.endTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="选择置顶结束时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="比重" prop="sortBy">
|
||||
<el-input v-model="form.sortBy" placeholder="请输入推广比重,数字越大排名越靠前" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="open = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getUserByUsercode, listUserByUserCode } from '@/api/cai/user'
|
||||
import { genderList } from '@/constant/statusMap'
|
||||
import { addAnchorTop, getAnchorTopByUserCode } from '@/api/cai/anchorTop'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
systemName: process.env.VUE_APP_SYSTEM_HOME,
|
||||
genderList,
|
||||
open: false,
|
||||
title: '',
|
||||
form:{
|
||||
usercode: undefined,
|
||||
sortBy: undefined,
|
||||
beginTime: undefined,
|
||||
endTime: undefined
|
||||
},
|
||||
info:{
|
||||
},
|
||||
memberPriceList:[],
|
||||
// 表单校验
|
||||
rules: {
|
||||
usercode: [
|
||||
{ required: true, message: "数据不能为空", trigger: "blur" }
|
||||
],
|
||||
sortBy: [
|
||||
{ required: true, message: "数据不能为空", trigger: "blur" }
|
||||
],
|
||||
beginTime: [
|
||||
{ required: true, message: "数据不能为空", trigger: "blur" }
|
||||
],
|
||||
endTime: [
|
||||
{ required: true, message: "数据不能为空", trigger: "blur" }
|
||||
]
|
||||
},
|
||||
buttonLoading: false,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
init (usercode) {
|
||||
this.open = true;
|
||||
this.title = "新增或修改主播置顶"
|
||||
this.info = {};
|
||||
this.$nextTick(() => {
|
||||
this.$refs['form'].resetFields();
|
||||
console.log(usercode)
|
||||
if(usercode){
|
||||
getAnchorTopByUserCode(usercode).then(response => {
|
||||
if(response.data){
|
||||
this.form = response.data;
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
querySearch(querySearch,cb){
|
||||
listUserByUserCode(querySearch).then(res => {
|
||||
cb(res.data.map((terminal) => {
|
||||
return {
|
||||
value: terminal,
|
||||
name: terminal,
|
||||
};
|
||||
}))
|
||||
})
|
||||
},
|
||||
handleSelect(item){
|
||||
getUserByUsercode(item.value).then(res => {
|
||||
this.info = res.data
|
||||
})
|
||||
},
|
||||
// 表单提交
|
||||
submitForm () {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.buttonLoading = true;
|
||||
addAnchorTop(this.form).then(data => {
|
||||
this.$modal.msgSuccess("操作主播置顶成功");
|
||||
this.buttonLoading = false;
|
||||
this.open = false
|
||||
this.$emit('refreshDataList')
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
144
src/views/cai/anchorTop/anchor-top-dialog.vue
Normal file
144
src/views/cai/anchorTop/anchor-top-dialog.vue
Normal file
@@ -0,0 +1,144 @@
|
||||
<template>
|
||||
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="1000px" append-to-body>
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item :label="systemName+'号'" prop="usercode">
|
||||
<el-input
|
||||
v-model="queryParams.usercode"
|
||||
:placeholder="'请输入'+systemName+'号'"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号" prop="mobile">
|
||||
<el-input
|
||||
v-model="queryParams.mobile"
|
||||
placeholder="请输入手机号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="置顶状态" prop="topStatus">
|
||||
<el-select v-model="queryParams.topStatus" placeholder="置顶状态" clearable size="small">
|
||||
<el-option
|
||||
v-for="dict in topStatusList"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="loading" :data="anchorTopList" >
|
||||
<el-table-column label="置顶状态" align="center" prop="topStatus">
|
||||
<template v-slot="scope">
|
||||
<cai-dict-tag :options="topStatusList" :value="scope.row.topStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="systemName+'号'" align="center" prop="usercode"/>
|
||||
<el-table-column label="昵称" align="center" prop="nickname"/>
|
||||
<el-table-column label="手机" align="center" prop="mobile" width="120"/>
|
||||
<el-table-column label="头像" align="center" prop="avatar">
|
||||
<template v-slot="scope">
|
||||
<image-avatar :src="scope.row.avatar"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="性别" align="center" prop="gender">
|
||||
<template v-slot="scope">
|
||||
<cai-dict-tag :options="genderList" :value="scope.row.gender"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="年龄" align="center" prop="age"/>
|
||||
<el-table-column label="开启时间" align="center" prop="beginTime" width="160" fixed="right"/>
|
||||
<el-table-column label="结束时间" align="center" prop="endTime" width="160" fixed="right"/>
|
||||
<el-table-column label="比重" align="center" prop="sortBy" fixed="right"/>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="open = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { genderList, topStatusList, userStatusList, videoStatusList } from '@/constant/statusMap'
|
||||
import { listAnchorTop } from '@/api/cai/anchorTop'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
genderList, userStatusList, videoStatusList,topStatusList,
|
||||
systemName: process.env.VUE_APP_SYSTEM_HOME,
|
||||
addAnchorTopDialogVisible: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 主播限时置顶表格数据
|
||||
anchorTopList: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
usercode: undefined,
|
||||
nickname: undefined,
|
||||
mobile: undefined,
|
||||
topStatus: undefined
|
||||
},
|
||||
open: false,
|
||||
title: '',
|
||||
buttonLoading: false,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
init () {
|
||||
this.open = true;
|
||||
this.title = "主播置顶快速查询"
|
||||
this.getList()
|
||||
},
|
||||
/** 查询主播限时置顶列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
listAnchorTop(this.queryParams).then(response => {
|
||||
this.anchorTopList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm('queryForm')
|
||||
this.handleQuery()
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
233
src/views/cai/anchorTop/index.vue
Normal file
233
src/views/cai/anchorTop/index.vue
Normal file
@@ -0,0 +1,233 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item :label="systemName+'号'" prop="usercode">
|
||||
<el-input
|
||||
v-model="queryParams.usercode"
|
||||
:placeholder="'请输入'+systemName+'号'"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号" prop="mobile">
|
||||
<el-input
|
||||
v-model="queryParams.mobile"
|
||||
placeholder="请输入手机号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="置顶状态" prop="topStatus">
|
||||
<el-select v-model="queryParams.topStatus" placeholder="置顶状态" clearable size="small">
|
||||
<el-option
|
||||
v-for="dict in topStatusList"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['cai:anchorTop:add']"
|
||||
>新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['cai:anchorTop:edit']"
|
||||
>修改
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['cai:anchorTop:remove']"
|
||||
>删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="anchorTopList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center"/>
|
||||
<el-table-column label="置顶状态" align="center" prop="topStatus">
|
||||
<template v-slot="scope">
|
||||
<cai-dict-tag :options="topStatusList" :value="scope.row.topStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="systemName+'号'" align="center" prop="usercode"/>
|
||||
<el-table-column label="昵称" align="center" prop="nickname"/>
|
||||
<el-table-column label="手机" align="center" prop="mobile" width="120"/>
|
||||
<el-table-column label="头像" align="center" prop="avatar">
|
||||
<template v-slot="scope">
|
||||
<image-avatar :src="scope.row.avatar"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="性别" align="center" prop="gender">
|
||||
<template v-slot="scope">
|
||||
<cai-dict-tag :options="genderList" :value="scope.row.gender"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="年龄" align="center" prop="age"/>
|
||||
<el-table-column label="开启时间" align="center" prop="beginTime" width="160"/>
|
||||
<el-table-column label="结束时间" align="center" prop="endTime" width="160"/>
|
||||
<el-table-column label="比重" align="center" prop="sortBy"/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['cai:anchorTop:edit']"
|
||||
>修改
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['cai:anchorTop:remove']"
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<add-anchor-top-dialog v-if="addAnchorTopDialogVisible" ref="addAnchorTopDialog" @refreshDataList="getList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { delAnchorTop, listAnchorTop } from '@/api/cai/anchorTop'
|
||||
import { genderList, topStatusList, userStatusList, videoStatusList } from '@/constant/statusMap'
|
||||
import AddAnchorTopDialog from '@/views/cai/anchorTop/add-anchor-top-dialog.vue'
|
||||
import UpdateAnchorDialog from '@/views/cai/anchor/update-anchor-dialog.vue'
|
||||
|
||||
export default {
|
||||
name: 'AnchorTop',
|
||||
components: { UpdateAnchorDialog, AddAnchorTopDialog },
|
||||
data() {
|
||||
return {
|
||||
genderList, userStatusList, videoStatusList,topStatusList,
|
||||
systemName: process.env.VUE_APP_SYSTEM_HOME,
|
||||
addAnchorTopDialogVisible: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 主播限时置顶表格数据
|
||||
anchorTopList: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
usercode: undefined,
|
||||
nickname: undefined,
|
||||
mobile: undefined,
|
||||
topStatus: undefined
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
/** 查询主播限时置顶列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
listAnchorTop(this.queryParams).then(response => {
|
||||
this.anchorTopList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm('queryForm')
|
||||
this.handleQuery()
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.addAnchorTopDialogVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addAnchorTopDialog.init()
|
||||
})
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.addAnchorTopDialogVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addAnchorTopDialog.init(row.usercode)
|
||||
})
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids
|
||||
this.$modal.confirm('是否确认删除主播限时置顶的数据项?').then(() => {
|
||||
this.loading = true
|
||||
return delAnchorTop(ids)
|
||||
}).then(() => {
|
||||
this.loading = false
|
||||
this.getList()
|
||||
this.$modal.msgSuccess('删除成功')
|
||||
}).catch(() => {
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -69,6 +69,7 @@
|
||||
<el-table-column :label="'拦截用户'+systemName+'号'" align="center" prop="userUsercode"/>
|
||||
<el-table-column label="拦截编号" align="center" prop="traceNo"/>
|
||||
<el-table-column label="理由" align="center" prop="filterReason"/>
|
||||
<el-table-column label="拦截时间" align="center" prop="createTime"/>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
|
||||
160
src/views/cai/memberPrice/index.vue
Normal file
160
src/views/cai/memberPrice/index.vue
Normal file
@@ -0,0 +1,160 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="memberPriceList" @selection-change="handleSelectionChange">
|
||||
<el-table-column label="编号" align="center" prop="id" />
|
||||
<el-table-column label="类型" align="center" prop="memberType" >
|
||||
<template v-slot="scope">
|
||||
<cai-dict-tag :options="memberTypeList" :value="scope.row.memberType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="名称" align="center" prop="name" />
|
||||
<el-table-column label="价格" align="center" prop="price" />
|
||||
<el-table-column label="图片地址" align="center" prop="img" >
|
||||
<template v-slot="scope">
|
||||
<image-avatar :src="scope.row.img"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="有效期/天" align="center" prop="expires" >
|
||||
<template v-slot="scope">
|
||||
<el-tag v-if="scope.row.longs === 1" type="primary">永久</el-tag>
|
||||
<span v-if="scope.row.longs === 0" >{{ scope.row.expires }}天</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="status" >
|
||||
<template v-slot="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.status"
|
||||
:active-value="0"
|
||||
:inactive-value="1"
|
||||
@change="handleStatusChange(scope.row)"
|
||||
></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['cai:memberPrice:edit']"
|
||||
>修改</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<member-price-update-dialog v-if="memberPriceUpdateVisible" ref="memberPriceUpdate" @refreshDataList="getList" />
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {listMemberPrice, updateMemberPrice} from "@/api/cai/memberPrice";
|
||||
import {memberTypeList, yesOrNoList} from "@/constant/statusMap";
|
||||
import MemberPriceUpdateDialog from "@/views/cai/memberPrice/member-price-update-dialog.vue";
|
||||
import GoodsAddOrUpdateDialog from "@/views/cai/goods/goods-add-or-update-dialog.vue";
|
||||
|
||||
export default {
|
||||
name: "MemberPrice",
|
||||
components: {GoodsAddOrUpdateDialog, MemberPriceUpdateDialog},
|
||||
data() {
|
||||
return {
|
||||
memberTypeList,yesOrNoList,
|
||||
memberPriceUpdateVisible: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 会员价格设置表格数据
|
||||
memberPriceList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询会员价格设置列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listMemberPrice(this.queryParams).then(response => {
|
||||
this.memberPriceList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.memberPriceUpdateVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.memberPriceUpdate.init(row.id)
|
||||
})
|
||||
},
|
||||
handleStatusChange(row) {
|
||||
let text = row.status === 0 ? '开启' : '取消'
|
||||
this.$confirm('确认要' + text + '[' + row.name + ']吗?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
return updateMemberPrice({ id: row.id, status: row.status })
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess(text + '成功')
|
||||
}).catch(function() {
|
||||
row.status = row.status === 1 ? 0 : 1
|
||||
})
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
100
src/views/cai/memberPrice/member-price-update-dialog.vue
Normal file
100
src/views/cai/memberPrice/member-price-update-dialog.vue
Normal file
@@ -0,0 +1,100 @@
|
||||
<template>
|
||||
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="700px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="类型" prop="memberType">
|
||||
<el-select v-model="form.memberType" size="small" disabled>
|
||||
<el-option
|
||||
v-for="dict in memberTypeList"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input v-model="form.name" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="价格" prop="price">
|
||||
<el-input v-model="form.price" placeholder="价格" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="open = false">取 消</el-button>
|
||||
</div>
|
||||
|
||||
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {memberTypeList} from "@/constant/statusMap";
|
||||
import {getMemberPrice, updateMemberPrice} from "@/api/cai/memberPrice";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
memberTypeList,
|
||||
open: false,
|
||||
title: '',
|
||||
form:{
|
||||
id: undefined,
|
||||
name: undefined,
|
||||
price: undefined,
|
||||
memberType: undefined,
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
memberType: [
|
||||
{ required: true, message: "数据不能为空", trigger: "blur" }
|
||||
],
|
||||
price: [
|
||||
{ required: true, message: "数据不能为空", trigger: "blur" }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: "数据不能为空", trigger: "blur" }
|
||||
],
|
||||
},
|
||||
buttonLoading: false,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
init (id) {
|
||||
this.form.id = id || undefined;
|
||||
this.title = "修改充值配置";
|
||||
this.open = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs['form'].resetFields();
|
||||
if(this.form.id){
|
||||
getMemberPrice(id).then(response => {
|
||||
this.form = response.data;
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
// 表单提交
|
||||
submitForm () {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.buttonLoading = true;
|
||||
updateMemberPrice({
|
||||
id: this.form.id,
|
||||
price: this.form.price
|
||||
}).then(data => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.$modal.buttonLoading = false;
|
||||
this.open = false
|
||||
this.$emit('refreshDataList')
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -86,7 +86,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {delPayConfig, listPayConfig, updatePayConfig} from "@/api/cai/payConfig";
|
||||
import {delPayConfig, listPayConfig, updatePayConfig, updatePayConfigStatus} from "@/api/cai/payConfig";
|
||||
import {payConfigTypeList} from "@/constant/statusMap";
|
||||
import PayConfigAddOrUpdateDialog from "@/views/cai/payConfig/pay-config-add-or-update-dialog";
|
||||
|
||||
@@ -170,7 +170,7 @@ export default {
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
return updatePayConfig({ id: row.id, enableStatus: row.enableStatus })
|
||||
return updatePayConfigStatus({ id: row.id, enableStatus: row.enableStatus })
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess(text + '成功')
|
||||
}).catch(function() {
|
||||
|
||||
@@ -99,6 +99,7 @@
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="领奖金额" align="center" prop="rankAwardValue" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
<el-table-column label="举报人" align="center">
|
||||
<el-table-column label="头像" align="center" prop="avatar">
|
||||
<template v-slot="scope">
|
||||
<image-avatar :value="scope.row.avatar"/>
|
||||
<image-avatar :src="scope.row.avatar"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="systemName+'号'" align="center" prop="usercode"/>
|
||||
@@ -69,7 +69,7 @@
|
||||
<el-table-column label="举报对象" align="center">
|
||||
<el-table-column label="头像" align="center" prop="reportAvatar">
|
||||
<template v-slot="scope">
|
||||
<image-avatar :value="scope.row.reportAvatar"/>
|
||||
<image-avatar :src="scope.row.reportAvatar"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="昵称" align="center" prop="reportNickname"/>
|
||||
|
||||
@@ -35,8 +35,8 @@ module.exports = {
|
||||
proxy: {
|
||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
// target: `http://localhost:8080`,
|
||||
target: `http://124.222.254.188:9779/prod-api`,
|
||||
target: `http://localhost:8080`,
|
||||
// target: `http://124.222.254.188:9779/prod-api`,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||
|
||||
Reference in New Issue
Block a user