...
|
...
|
@@ -3,12 +3,8 @@ |
|
|
<TabPane label="基础配置">
|
|
|
<div class="base-conf">
|
|
|
<div class="base-left">
|
|
|
<Form ref="confForm" :models="conf" :rules="confRules" :label-width="120">
|
|
|
<FormItem label="活动规则" prop="rule">
|
|
|
<Input type="textarea" v-model="conf.rule"
|
|
|
placeholder="请输入活动规则" :maxlength="2000"></Input>
|
|
|
</FormItem>
|
|
|
<FormItem label="分享链接" prop="rule">
|
|
|
<Form ref="confForm" :model="conf" :rules="confRules" :label-width="120">
|
|
|
<FormItem label="分享按钮链接" prop="share_url">
|
|
|
<Input type="text" v-model="conf.share_url"
|
|
|
placeholder="活动分享链接"></Input>
|
|
|
</FormItem>
|
...
|
...
|
@@ -20,87 +16,145 @@ |
|
|
<Input type="text" v-model="conf.btm_tip_two"
|
|
|
placeholder="提示文案(下)"></Input>
|
|
|
</FormItem>
|
|
|
<FormItem label="跳转链接(左)" prop="jump_url_left">
|
|
|
<Input type="text" v-model="conf.jump_url_left"
|
|
|
placeholder="活动底部链接(左)"></Input>
|
|
|
<FormItem label="底部按钮1链接" prop="jump_btn_left_url">
|
|
|
<Input type="text" v-model="conf.jump_btn_left_url"
|
|
|
placeholder="底部按钮1链接"></Input>
|
|
|
</FormItem>
|
|
|
<FormItem label="底部按钮2链接" prop="jump_btn_middle_url">
|
|
|
<Input type="text" v-model="conf.jump_btn_middle_url"
|
|
|
placeholder="底部按钮2链接"></Input>
|
|
|
</FormItem>
|
|
|
<FormItem label="跳转链接(右)" prop="jump_url_right">
|
|
|
<Input type="text" v-model="conf.jump_url_right"
|
|
|
placeholder="活动底部链接(右)"></Input>
|
|
|
<FormItem label="底部按钮3链接" prop="jump_btn_right_url">
|
|
|
<Input type="text" v-model="conf.jump_btn_right_url"
|
|
|
placeholder="底部按钮3链接"></Input>
|
|
|
</FormItem>
|
|
|
<FormItem label="活动次数限制" prop="times_type">
|
|
|
<Select v-model="conf.times_type">
|
|
|
<Option :value="0">只限制每天最大参与次数</Option>
|
|
|
<Option :value="1">只限制每人参与活动最大次数</Option>
|
|
|
<Option :value="0">只限制每天最大抽奖次数</Option>
|
|
|
<Option :value="1">只限制每人参与活动最大抽奖次数</Option>
|
|
|
<Option :value="2">同时限制以上两种</Option>
|
|
|
</Select>
|
|
|
</FormItem>
|
|
|
<FormItem label="活动最大参与次数" prop="act_total_times">
|
|
|
<Input type="text" v-model="conf.act_total_times"
|
|
|
placeholder="活动最大参与次数"></Input>
|
|
|
</FormItem>
|
|
|
<FormItem label="每天最大抽奖次数" prop="day_limit_times">
|
|
|
<Input type="text" v-model="conf.day_limit_times"
|
|
|
placeholder="每天最大抽奖次数"></Input>
|
|
|
</FormItem>
|
|
|
<FormItem label="每人参与活动最大抽奖次数" prop="act_total_times">
|
|
|
<Input type="text" v-model="conf.act_total_times"
|
|
|
placeholder="每人参与活动最大抽奖次数"></Input>
|
|
|
</FormItem>
|
|
|
</Form>
|
|
|
</div>
|
|
|
<div class="base-middle">
|
|
|
<Form :label-width="120">
|
|
|
<FormItem label="主背景图" prop="main_bg">
|
|
|
<img class="preview-img" v-show="conf.main_bg" :src="conf.main_bg">
|
|
|
<div class="preview-wrap" v-show="conf.main_bg">
|
|
|
<Icon type="ios-close" class="del-img" @click="delPreview" img-key="main_bg"/>
|
|
|
<img class="preview-img" :src="conf.main_bg">
|
|
|
</div>
|
|
|
<Button v-show="!conf.main_bg">
|
|
|
<span ref="upload_img_mainBg" img-key="main_bg">添加</span>
|
|
|
</Button>
|
|
|
</FormItem>
|
|
|
<FormItem label="转盘背景图" prop="wheel_bg">
|
|
|
<img class="preview-img" v-show="conf.wheel_bg" :src="conf.wheel_bg">
|
|
|
<div class="preview-wrap" v-show="conf.wheel_bg">
|
|
|
<Icon type="ios-close" class="del-img" @click="delPreview" img-key="wheel_bg"/>
|
|
|
<img class="preview-img" :src="conf.wheel_bg">
|
|
|
</div>
|
|
|
<Button v-show="!conf.wheel_bg">
|
|
|
<span ref="upload_img_wheelBg" img-key="wheel_bg">添加</span>
|
|
|
</Button>
|
|
|
</FormItem>
|
|
|
<FormItem label="活动规则按钮" prop="rule_btn_bg">
|
|
|
<img class="preview-img" v-show="conf.rule_btn_bg" :src="conf.rule_btn_bg">
|
|
|
<div class="preview-wrap" v-show="conf.rule_btn_bg">
|
|
|
<Icon type="ios-close" class="del-img" @click="delPreview" img-key="rule_btn_bg"/>
|
|
|
<img class="preview-img" :src="conf.rule_btn_bg">
|
|
|
</div>
|
|
|
<Button v-show="!conf.rule_btn_bg">
|
|
|
<span ref="upload_img_ruleBg" img-key="rule_btn_bg">添加</span>
|
|
|
</Button>
|
|
|
</FormItem>
|
|
|
<FormItem label="分享按钮" prop="share_btn_bg">
|
|
|
<img class="preview-img" v-show="conf.share_btn_bg" :src="conf.share_btn_bg">
|
|
|
<div class="preview-wrap" v-show="conf.share_btn_bg">
|
|
|
<Icon type="ios-close" class="del-img" @click="delPreview" img-key="share_btn_bg"/>
|
|
|
<img class="preview-img" :src="conf.share_btn_bg">
|
|
|
</div>
|
|
|
<Button v-show="!conf.share_btn_bg">
|
|
|
<span ref="upload_img_shareBg" img-key="share_btn_bg">添加</span>
|
|
|
</Button>
|
|
|
</FormItem>
|
|
|
<FormItem label="抽奖按钮" prop="prize_btn_bg">
|
|
|
<img class="preview-img" v-show="conf.prize_btn_bg" :src="conf.prize_btn_bg">
|
|
|
<div class="preview-wrap" v-show="conf.prize_btn_bg">
|
|
|
<Icon type="ios-close" class="del-img" @click="delPreview" img-key="prize_btn_bg"/>
|
|
|
<img class="preview-img" :src="conf.prize_btn_bg">
|
|
|
</div>
|
|
|
<Button v-show="!conf.prize_btn_bg">
|
|
|
<span ref="upload_img_tryBg" img-key="prize_btn_bg">添加</span>
|
|
|
</Button>
|
|
|
</FormItem>
|
|
|
<FormItem label="底部按钮1" prop="jump_btn_left_bg">
|
|
|
<div class="preview-wrap" v-show="conf.jump_btn_left_bg">
|
|
|
<Icon type="ios-close" class="del-img" @click="delPreview" img-key="jump_btn_left_bg"/>
|
|
|
<img class="preview-img" :src="conf.jump_btn_left_bg">
|
|
|
</div>
|
|
|
<Button v-show="!conf.jump_btn_left_bg">
|
|
|
<span ref="upload_img_jumpBtnLeftBg" img-key="jump_btn_left_bg">添加</span>
|
|
|
</Button>
|
|
|
</FormItem>
|
|
|
<FormItem label="底部按钮2" prop="jump_btn_middle_bg">
|
|
|
<div class="preview-wrap" v-show="conf.jump_btn_middle_bg">
|
|
|
<Icon type="ios-close" class="del-img" @click="delPreview" img-key="jump_btn_middle_bg"/>
|
|
|
<img class="preview-img" :src="conf.jump_btn_middle_bg">
|
|
|
</div>
|
|
|
<Button v-show="!conf.jump_btn_middle_bg">
|
|
|
<span ref="upload_img_jumpBtnMiddleBg" img-key="jump_btn_middle_bg">添加</span>
|
|
|
</Button>
|
|
|
</FormItem>
|
|
|
<FormItem label="底部按钮3" prop="jump_btn_right_bg">
|
|
|
<div class="preview-wrap" v-show="conf.jump_btn_right_bg">
|
|
|
<Icon type="ios-close" class="del-img" @click="delPreview" img-key="jump_btn_right_bg"/>
|
|
|
<img class="preview-img" :src="conf.jump_btn_right_bg">
|
|
|
</div>
|
|
|
<Button v-show="!conf.jump_btn_right_bg">
|
|
|
<span ref="upload_img_jumpBtnRightBg" img-key="jump_btn_right_bg">添加</span>
|
|
|
</Button>
|
|
|
</FormItem>
|
|
|
</Form>
|
|
|
</div>
|
|
|
<div class="base-right">
|
|
|
<Form :label-width="120">
|
|
|
<FormItem label="次数上限背景图" prop="day_over_limit_bg">
|
|
|
<img class="preview-img" v-show="conf.day_over_limit_bg" :src="conf.day_over_limit_bg">
|
|
|
<div class="preview-wrap" v-show="conf.day_over_limit_bg">
|
|
|
<Icon type="ios-close" class="del-img" @click="delPreview" img-key="day_over_limit_bg"/>
|
|
|
<img class="preview-img" :src="conf.day_over_limit_bg">
|
|
|
</div>
|
|
|
<Button v-show="!conf.day_over_limit_bg">
|
|
|
<span ref="upload_img_overBg" img-key="day_over_limit_bg">添加</span>
|
|
|
</Button>
|
|
|
</FormItem>
|
|
|
<FormItem label="我的奖品" prop="my_prize_btn_bg">
|
|
|
<img class="preview-img" v-show="conf.my_prize_btn_bg" :src="conf.my_prize_btn_bg">
|
|
|
<div class="preview-wrap" v-show="conf.my_prize_btn_bg">
|
|
|
<Icon type="ios-close" class="del-img" @click="delPreview" img-key="my_prize_btn_bg"/>
|
|
|
<img class="preview-img" :src="conf.my_prize_btn_bg">
|
|
|
</div>
|
|
|
<Button v-show="!conf.my_prize_btn_bg">
|
|
|
<span ref="upload_img_myPrizeBg" img-key="my_prize_btn_bg">添加</span>
|
|
|
</Button>
|
|
|
</FormItem>
|
|
|
<FormItem label="提示中奖背景图" prop="win_prize_bg">
|
|
|
<img class="preview-img" v-show="conf.win_prize_bg" :src="conf.win_prize_bg">
|
|
|
<div class="preview-wrap" v-show="conf.win_prize_bg">
|
|
|
<Icon type="ios-close" class="del-img" @click="delPreview" img-key="win_prize_bg"/>
|
|
|
<img class="preview-img" :src="conf.win_prize_bg">
|
|
|
</div>
|
|
|
<Button v-show="!conf.win_prize_bg">
|
|
|
<span ref="upload_img_winPrizeBg" img-key="win_prize_bg">添加</span>
|
|
|
</Button>
|
|
|
</FormItem>
|
|
|
<FormItem label="再来一次按钮" prop="try_again_bg">
|
|
|
<img class="preview-img" v-show="conf.try_again_bg" :src="conf.try_again_bg">
|
|
|
<div class="preview-wrap" v-show="conf.try_again_bg">
|
|
|
<Icon type="ios-close" class="del-img" @click="delPreview" img-key="try_again_bg"/>
|
|
|
<img class="preview-img" :src="conf.try_again_bg">
|
|
|
</div>
|
|
|
<Button v-show="!conf.try_again_bg">
|
|
|
<span ref="upload_img_tryAgainBg" img-key="try_again_bg">添加</span>
|
|
|
</Button>
|
...
|
...
|
@@ -135,8 +189,12 @@ |
|
|
act_total_times: '',
|
|
|
btm_tip_one: '',
|
|
|
btm_tip_two: '',
|
|
|
jump_url_left: '',
|
|
|
jump_url_right: '',
|
|
|
jump_btn_left_url: '',
|
|
|
jump_btn_middle_url: '',
|
|
|
jump_btn_right_url: '',
|
|
|
jump_btn_left_bg: '',
|
|
|
jump_btn_middle_bg: '',
|
|
|
jump_btn_right_bg: '',
|
|
|
wheel_bg: '',
|
|
|
main_bg: '',
|
|
|
prize_btn_bg: '',
|
...
|
...
|
@@ -151,20 +209,23 @@ |
|
|
rule: [
|
|
|
{ required: true, message: '活动规则不能为空', trigger: 'blur' }
|
|
|
],
|
|
|
name: [
|
|
|
{ required: true, message: '奖品名称不能为空', trigger: 'blur' }
|
|
|
],
|
|
|
type: [
|
|
|
{ required: true}
|
|
|
share_url: [
|
|
|
{ required: true, message: '分享链接不能为空', trigger: 'blur' }
|
|
|
],
|
|
|
value: [
|
|
|
day_limit_times: [
|
|
|
{ required: true, message: '奖品值不能为空', trigger: 'blur' }
|
|
|
],
|
|
|
total: [
|
|
|
act_total_times: [
|
|
|
{ required: true, message: '奖品总数不能为空', trigger: 'blur' }
|
|
|
],
|
|
|
chance: [
|
|
|
{ required: true, message: '中奖概率不能为空', trigger: 'blur' }
|
|
|
btm_tip_one: [
|
|
|
{ required: true, message: '提示文案(上)不能为空', trigger: 'blur' }
|
|
|
],
|
|
|
btm_tip_two: [
|
|
|
{ required: true, message: '提示文案(下)不能为空', trigger: 'blur' }
|
|
|
],
|
|
|
times_type: [
|
|
|
{ required: true}
|
|
|
]
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -197,6 +258,9 @@ |
|
|
}
|
|
|
});
|
|
|
},
|
|
|
delPreview(e) {
|
|
|
this.conf[e.currentTarget.getAttribute('img-key')] = '';
|
|
|
},
|
|
|
bindUpload() {
|
|
|
Object.keys(this.$refs)
|
|
|
.filter(key => /^upload_img_/ig.test(key))
|
...
|
...
|
@@ -224,6 +288,7 @@ |
|
|
<style lang="scss">
|
|
|
.ivu-tabs {
|
|
|
height: 100%;
|
|
|
overflow-y: auto;
|
|
|
}
|
|
|
|
|
|
.bottom-btn {
|
...
|
...
|
@@ -261,6 +326,25 @@ |
|
|
}
|
|
|
}
|
|
|
|
|
|
.preview-wrap {
|
|
|
position: relative;
|
|
|
|
|
|
.del-img {
|
|
|
position: absolute;
|
|
|
top: -10px;
|
|
|
left: -4px;
|
|
|
font-size: 24px;
|
|
|
font-weight: bold;
|
|
|
cursor: pointer;
|
|
|
border-radius: 50%;
|
|
|
background-color: #000;
|
|
|
opacity: 0.3;
|
|
|
width: 24px;
|
|
|
height: 24px;
|
|
|
color: #ffffff;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
.preview-img {
|
|
|
height: 60px;
|
|
|
width: auto;
|
...
|
...
|
|