adjust
This commit is contained in:
parent
1a6b599e15
commit
10529fff02
@ -3,5 +3,5 @@ ENV = 'production'
|
||||
|
||||
# base api
|
||||
# VUE_APP_BASE_API = '/prod-api'
|
||||
VUE_APP_BASE_API = 'https://adminapi.cebggame.com/api/v1'
|
||||
VUE_APP_BASE_API = 'https://adminapi.kingsome.cn/api/v1'
|
||||
|
||||
|
@ -43,12 +43,12 @@
|
||||
</el-col>
|
||||
<el-col v-show="userRegVisible" :span="10">
|
||||
<el-form-item label-width="120px" label="注册时间>=:" class="postInfo-container-item" prop="user_reg_start_time">
|
||||
<el-date-picker v-model.number="postForm.user_reg_start_time" type="datetime" :format="formattedUTCRegStartDate" value-format="timestamp" placeholder="Select date and time" :required="userRegVisible" style="width:50%" />
|
||||
<el-date-picker v-model.number="postForm.user_reg_start_time" type="datetime" :format="formattedUTCRegStartDate" value-format="timestamp" placeholder="Select date and time" style="width:50%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-show="userRegVisible" :span="10">
|
||||
<el-form-item label-width="120px" label="注册时间<=:" class="postInfo-container-item" prop="user_reg_end_time">
|
||||
<el-date-picker v-model.number="postForm.user_reg_end_time" type="datetime" :format="formattedUTCRegEndDate" value-format="timestamp" placeholder="Select date and time" :required="userRegVisible" style="width:50%" />
|
||||
<el-date-picker v-model.number="postForm.user_reg_end_time" type="datetime" :format="formattedUTCRegEndDate" value-format="timestamp" placeholder="Select date and time" style="width:50%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -125,33 +125,22 @@ export default {
|
||||
expiretime: [{ required: true, message: '请选择过期时间', trigger: 'blur' }],
|
||||
subject: [{ required: true, message: 'subject is required', trigger: 'blur' }],
|
||||
content: [{ required: true, message: 'content is required', trigger: 'blur' }],
|
||||
user_reg_start_time: [
|
||||
{ required: true, message: '用户注册开始时间', trigger: 'blur' },
|
||||
{
|
||||
validator: (rule, value, cb, source, options) => {
|
||||
const errors = []
|
||||
if (this.mailTypeVisible) {
|
||||
user_reg_start_time: [{ required: false, validator: (rule, value, cb, source, options) => {
|
||||
if (this.mailTypeVisible && !this.postForm.user_reg_start_time && this.postForm.user_reg_end_time) {
|
||||
console.log(this.postForm.mailtype)
|
||||
}
|
||||
cb(new Error('用户注册开始时间'))
|
||||
} else {
|
||||
cb()
|
||||
return errors
|
||||
},
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
user_reg_end_time: [
|
||||
{ required: true, message: '用户注册结束时间', trigger: 'blur' },
|
||||
{
|
||||
validator: (rule, value, cb, source, options) => {
|
||||
const errors = []
|
||||
if (this.mailTypeVisible) {
|
||||
}, trigger: 'blur' }],
|
||||
user_reg_end_time: [{ required: false, validator: (rule, value, cb, source, options) => {
|
||||
if (this.mailTypeVisible && this.postForm.user_reg_start_time && !this.postForm.user_reg_end_time) {
|
||||
console.log(this.postForm.mailtype)
|
||||
}
|
||||
cb(new Error('用户注册结束时间'))
|
||||
} else {
|
||||
cb()
|
||||
return errors
|
||||
}
|
||||
}
|
||||
]
|
||||
}, trigger: 'blur' }]
|
||||
},
|
||||
userRegVisible: false,
|
||||
groupMailVisible: true,
|
||||
|
@ -45,6 +45,32 @@
|
||||
prop="content"
|
||||
label="列表"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="start"
|
||||
label="生效时间"
|
||||
width="200"
|
||||
>
|
||||
<template slot-scope="{row}">
|
||||
<span>
|
||||
{{ parseTime(row.start) }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="end"
|
||||
label="失效时间"
|
||||
width="200"
|
||||
>
|
||||
<template slot-scope="{row}">
|
||||
<span>
|
||||
{{ parseTime(row.end) }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="comment"
|
||||
label="注释"
|
||||
/>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
background
|
||||
@ -58,21 +84,30 @@
|
||||
</el-form>
|
||||
<el-dialog title="新增" :visible.sync="dialogFormVisible" :close-on-click-modal="false" style="width:80%" @close="handleDialogClose()">
|
||||
<el-form ref="form" :rules="createrules" :model="form" label-position="left" style="width: 400px; margin-left:50px;">
|
||||
<el-form-item label-width="70px" label="游戏" class="postInfo-container-item" prop="gameid">
|
||||
<el-form-item label-width="80px" label="游戏" class="postInfo-container-item" prop="gameid">
|
||||
<el-select v-model="form.gameid" style="width: 100px">
|
||||
<el-option label="2004" value="2004" />
|
||||
<el-option label="2006" value="2006" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label-width="70px" label="限制" prop="limit" required>
|
||||
<el-form-item label-width="80px" label="限制" prop="limit">
|
||||
<el-radio-group v-model="form.limit">
|
||||
<el-radio :label="0">单码多次</el-radio>
|
||||
<el-radio :label="1">单码单次</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label-width="70px" label="列表:" class="postInfo-container-item" prop="content">
|
||||
<el-form-item label-width="80px" label="列表:" class="postInfo-container-item" prop="content">
|
||||
<el-input v-model="form.content" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label-width="80px" label="生效时间:" class="postInfo-container-item" prop="start">
|
||||
<el-date-picker v-model.number="form.start" type="datetime" value-format="timestamp" placeholder="Select date and time" required style="width:80%" />
|
||||
</el-form-item>
|
||||
<el-form-item label-width="80px" label="失效时间:" class="postInfo-container-item" prop="end">
|
||||
<el-date-picker v-model.number="form.end" type="datetime" value-format="timestamp" placeholder="Select date and time" required style="width:80%" />
|
||||
</el-form-item>
|
||||
<el-form-item label-width="80px" label="注释:" class="postInfo-container-item" prop="comment">
|
||||
<el-input v-model="form.comment" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible = handleDialogClose()">
|
||||
@ -88,6 +123,7 @@
|
||||
|
||||
<script>
|
||||
import { addType, getTypes } from '@/api/giftcode'
|
||||
import { parseTime } from '@/utils'
|
||||
|
||||
export default {
|
||||
name: 'GiftCodeConfig',
|
||||
@ -116,7 +152,10 @@ export default {
|
||||
form: {
|
||||
gameid: '',
|
||||
limit: 0,
|
||||
content: ''
|
||||
content: '',
|
||||
start: '',
|
||||
end: '',
|
||||
comment: ''
|
||||
},
|
||||
rules: {
|
||||
gameid: [{ required: true, validator: (rule, value, callback) => {
|
||||
@ -156,6 +195,7 @@ export default {
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
parseTime,
|
||||
handleDialogClose() {
|
||||
// this.getList()
|
||||
},
|
||||
@ -218,7 +258,10 @@ export default {
|
||||
const data = {
|
||||
'gameid': Number(this.form.gameid),
|
||||
'limit': this.form.limit,
|
||||
'content': this.form.content
|
||||
'content': this.form.content,
|
||||
'start': this.form.start / 1000,
|
||||
'end': this.form.end / 1000,
|
||||
'comment': this.form.comment
|
||||
}
|
||||
addType(data).then(response => {
|
||||
if (response.code === 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user