Authored by huangyi

Merge branch 'feature/wheel-surf' of http://git.yoho.cn/fe/yoho-activity-platfor…

…m into feature/wheel-surf
... ... @@ -91,7 +91,7 @@ const whSurfController = {
id: {type: 'number', empty: true},
act_id: {type: 'number', empty: false},
rule_btn_bg: {type: 'string', empty: true},
rule: {type: 'string', empty: true},
rule_url: {type: 'string', empty: true},
share_btn_bg: {type: 'string', empty: true},
share_url: {type: 'string', empty: true},
main_bg: {type: 'string', empty: true},
... ...
... ... @@ -17,8 +17,8 @@ module.exports = function(Sequelize, DataTypes) {
type: DataTypes.STRING(300),
allowNull: true
},
rule: {
type: DataTypes.STRING(2000),
rule_url: {
type: DataTypes.STRING(500),
allowNull: true
},
share_btn_bg: {
... ... @@ -29,6 +29,18 @@ module.exports = function(Sequelize, DataTypes) {
type: DataTypes.STRING(500),
allowNull: true
},
share_title: {
type: DataTypes.STRING(100),
allowNull: true
},
share_desc: {
type: DataTypes.STRING(150),
allowNull: true
},
share_img: {
type: DataTypes.STRING(300),
allowNull: true
},
main_bg: {
type: DataTypes.STRING(300),
allowNull: true
... ...
... ... @@ -14,9 +14,12 @@ CREATE TABLE IF NOT EXISTS act_wheel_surf_conf (
`id` INT(8) NOT NULL PRIMARY KEY AUTO_INCREMENT,
`act_id` INT(8) NOT NULL DEFAULT 0,
`rule_btn_bg` VARCHAR(300) COMMENT '活动规则按钮',
`rule` VARCHAR(2000) COMMENT '活动规则',
`rule_url` VARCHAR(500) COMMENT '活动规则页链接',
`share_btn_bg` VARCHAR(300) COMMENT '活动分享按钮样式',
`share_url` VARCHAR(500) COMMENT '活动分享链接',
`share_url` VARCHAR(500) COMMENT '分享链接',
`share_title` VARCHAR(100) COMMENT '分享标题',
`share_desc` VARCHAR(150) COMMENT '分享描述',
`share_img` VARCHAR(300) COMMENT '分享图片',
`main_bg` VARCHAR(300) COMMENT '活动背景图',
`wheel_bg` VARCHAR(300) COMMENT '转盘背景图',
`prize_btn_bg` VARCHAR(300) COMMENT '抽奖按钮',
... ...
... ... @@ -4,19 +4,31 @@
<div class="base-conf">
<div class="base-left">
<Form ref="confForm" :model="conf" :rules="confRules" :label-width="120">
<FormItem label="活动规则" required>
<Input type="textarea" v-model="conf.rule"
placeholder="请输入活动规则" :maxlength="2000"></Input>
<FormItem label="活动规则页链接" prop="rule_url">
<Input type="text" v-model="conf.rule_url"
placeholder="请输入活动规则" :maxlength="500"></Input>
</FormItem>
<FormItem label="分享按钮链接" prop="share_url">
<FormItem label="分享标题" prop="share_title">
<Input type="text" v-model="conf.share_title"
placeholder="分享标题" :maxlength="500"></Input>
</FormItem>
<FormItem label="分享描述" prop="share_desc">
<Input type="text" v-model="conf.share_desc"
placeholder="分享描述" :maxlength="100"></Input>
</FormItem>
<FormItem label="分享图片" prop="share_img">
<Input type="text" v-model="conf.share_img"
placeholder="分享图片" :maxlength="300"></Input>
</FormItem>
<FormItem label="分享链接" prop="share_url">
<Input type="text" v-model="conf.share_url"
placeholder="活动分享链接"></Input>
placeholder="分享链接" :maxlength="500"></Input>
</FormItem>
<FormItem label="提示文案(上)" prop="btm_tip_one">
<Input type="text" v-model="conf.btm_tip_one"
placeholder="提示文案(上)"></Input>
</FormItem>
<FormItem label="提示文案(下)" prop="btm_tip_two">
<FormItem v-if="false" label="提示文案(下)" prop="btm_tip_two">
<Input type="text" v-model="conf.btm_tip_two"
placeholder="提示文案(下)"></Input>
</FormItem>
... ... @@ -73,6 +85,15 @@
<span ref="upload_img_wheelBg" img-key="wheel_bg">添加</span>
</Button>
</FormItem>
<FormItem label="中奖蒙层" prop="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="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"/>
... ... @@ -131,15 +152,6 @@
</div>
<div class="base-right">
<Form :label-width="120">
<FormItem label="次数上限背景图" prop="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">
<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"/>
... ... @@ -149,24 +161,6 @@
<span ref="upload_img_myPrizeBg" img-key="my_prize_btn_bg">添加</span>
</Button>
</FormItem>
<FormItem label="提示中奖背景图" prop="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">
<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>
</FormItem>
</Form>
</div>
<div class="bottom-btn">
... ... @@ -191,7 +185,7 @@
conf: {
act_id: 0,
id: 0,
rule: '',
rule_url: '',
share_url: '',
day_limit_times: '',
act_total_times: '',
... ... @@ -215,9 +209,6 @@
bottomContentCode: ''
},
confRules: {
rule: [
{ required: true, message: '活动规则不能为空', trigger: 'blur' }
],
share_url: [
{ required: true, message: '分享链接不能为空', trigger: 'blur' }
],
... ...