114 lines
2.5 KiB
Vue
114 lines
2.5 KiB
Vue
<template>
|
|
<div class="vipcfg-box">
|
|
<h3 style="text-align:center ;"> VIP升级配置</h3>
|
|
<div v-for="(item, i) in tableData" :key="i" class="lf_cfg">
|
|
<el-button type="success" size="mini" @click="action_cfg()" icon="el-icon-edit" style="">编辑</el-button>
|
|
<div class="lf_cfg_content">
|
|
<div>
|
|
vip升级价格:<span>{{ item.vipUpPrice }}</span>
|
|
</div>
|
|
<div>
|
|
svip升级价格:<span>{{ item.sVipUpPrice }}</span>
|
|
</div>
|
|
<div>
|
|
vip升级节省价格:<span>{{ item.vipUpCheapPrice }}</span>
|
|
</div>
|
|
<div>
|
|
svip升级节省价格:<span>{{ item.sVipUpCheapPrice }}</span>
|
|
</div>
|
|
<div>
|
|
新手卡倒计时(小时):<span>{{ item.timeConfig }}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- 编辑VIP -->
|
|
<edit ref="edit" @handlerChannelList="getConfig"></edit>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import API from '@/api'
|
|
import Edit from './components/edit'
|
|
export default {
|
|
data() {
|
|
return {
|
|
dialogVisible: false,
|
|
loading: false,
|
|
// 列表数据
|
|
tableData: [],
|
|
pageData: {},
|
|
total: 0,
|
|
// VIP升级配置列表请求参数
|
|
params: {
|
|
pageNumber: 1,
|
|
pageSize: 10,
|
|
},
|
|
}
|
|
},
|
|
components: {
|
|
Edit
|
|
},
|
|
created() {
|
|
this.getConfig()
|
|
},
|
|
methods: {
|
|
// 请求VIP升级配置列表
|
|
getConfig(type) {
|
|
this.loading = true
|
|
if (type === 'status') {
|
|
this.params.pageNumber = 1
|
|
}
|
|
API.getConfig(this.params)
|
|
.then((res) => {
|
|
if (res.code === 200 && res.data) {
|
|
this.tableData = [res.data]
|
|
this.pageData = res.data
|
|
} else {
|
|
this.tableData = []
|
|
this.pageData = {}
|
|
}
|
|
this.loading = false
|
|
})
|
|
.catch(() => {
|
|
this.loading = false
|
|
})
|
|
},
|
|
//编辑VIP升级配置
|
|
action_cfg() {
|
|
this.$refs.edit.open(this.pageData)
|
|
}
|
|
},
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
.lf_cfg {
|
|
.lf_cfg_content {
|
|
margin-top: 30px;
|
|
display: flex;
|
|
justify-content: space-around;
|
|
flex-wrap: wrap;
|
|
div {
|
|
margin-bottom: 10px;
|
|
span {
|
|
color: cadetblue;
|
|
}
|
|
.el-button {
|
|
background: rgba(230,55,101,.8) ;
|
|
margin-left: 20px;
|
|
span {
|
|
color: #ffffff;
|
|
}
|
|
}
|
|
}
|
|
.btn_style {
|
|
padding: 4px 8px;
|
|
color: #000000;
|
|
background: #327720;
|
|
border: 1px solid #999999;
|
|
border-radius: 20px;
|
|
}
|
|
}
|
|
}
|
|
</style>
|