Authored by 李奇

修改

@@ -91,7 +91,7 @@ const whSurfController = { @@ -91,7 +91,7 @@ const whSurfController = {
91 id: {type: 'number', empty: true}, 91 id: {type: 'number', empty: true},
92 act_id: {type: 'number', empty: false}, 92 act_id: {type: 'number', empty: false},
93 rule_btn_bg: {type: 'string', empty: true}, 93 rule_btn_bg: {type: 'string', empty: true},
94 - rule: {type: 'string', empty: true}, 94 + rule_url: {type: 'string', empty: true},
95 share_btn_bg: {type: 'string', empty: true}, 95 share_btn_bg: {type: 'string', empty: true},
96 share_url: {type: 'string', empty: true}, 96 share_url: {type: 'string', empty: true},
97 main_bg: {type: 'string', empty: true}, 97 main_bg: {type: 'string', empty: true},
@@ -17,8 +17,8 @@ module.exports = function(Sequelize, DataTypes) { @@ -17,8 +17,8 @@ module.exports = function(Sequelize, DataTypes) {
17 type: DataTypes.STRING(300), 17 type: DataTypes.STRING(300),
18 allowNull: true 18 allowNull: true
19 }, 19 },
20 - rule: {  
21 - type: DataTypes.STRING(2000), 20 + rule_url: {
  21 + type: DataTypes.STRING(500),
22 allowNull: true 22 allowNull: true
23 }, 23 },
24 share_btn_bg: { 24 share_btn_bg: {
@@ -29,6 +29,18 @@ module.exports = function(Sequelize, DataTypes) { @@ -29,6 +29,18 @@ module.exports = function(Sequelize, DataTypes) {
29 type: DataTypes.STRING(500), 29 type: DataTypes.STRING(500),
30 allowNull: true 30 allowNull: true
31 }, 31 },
  32 + share_title: {
  33 + type: DataTypes.STRING(100),
  34 + allowNull: true
  35 + },
  36 + share_desc: {
  37 + type: DataTypes.STRING(150),
  38 + allowNull: true
  39 + },
  40 + share_img: {
  41 + type: DataTypes.STRING(300),
  42 + allowNull: true
  43 + },
32 main_bg: { 44 main_bg: {
33 type: DataTypes.STRING(300), 45 type: DataTypes.STRING(300),
34 allowNull: true 46 allowNull: true
@@ -14,9 +14,12 @@ CREATE TABLE IF NOT EXISTS act_wheel_surf_conf ( @@ -14,9 +14,12 @@ CREATE TABLE IF NOT EXISTS act_wheel_surf_conf (
14 `id` INT(8) NOT NULL PRIMARY KEY AUTO_INCREMENT, 14 `id` INT(8) NOT NULL PRIMARY KEY AUTO_INCREMENT,
15 `act_id` INT(8) NOT NULL DEFAULT 0, 15 `act_id` INT(8) NOT NULL DEFAULT 0,
16 `rule_btn_bg` VARCHAR(300) COMMENT '活动规则按钮', 16 `rule_btn_bg` VARCHAR(300) COMMENT '活动规则按钮',
17 - `rule` VARCHAR(2000) COMMENT '活动规则', 17 + `rule_url` VARCHAR(500) COMMENT '活动规则页链接',
18 `share_btn_bg` VARCHAR(300) COMMENT '活动分享按钮样式', 18 `share_btn_bg` VARCHAR(300) COMMENT '活动分享按钮样式',
19 - `share_url` VARCHAR(500) COMMENT '活动分享链接', 19 + `share_url` VARCHAR(500) COMMENT '分享链接',
  20 + `share_title` VARCHAR(100) COMMENT '分享标题',
  21 + `share_desc` VARCHAR(150) COMMENT '分享描述',
  22 + `share_img` VARCHAR(300) COMMENT '分享图片',
20 `main_bg` VARCHAR(300) COMMENT '活动背景图', 23 `main_bg` VARCHAR(300) COMMENT '活动背景图',
21 `wheel_bg` VARCHAR(300) COMMENT '转盘背景图', 24 `wheel_bg` VARCHAR(300) COMMENT '转盘背景图',
22 `prize_btn_bg` VARCHAR(300) COMMENT '抽奖按钮', 25 `prize_btn_bg` VARCHAR(300) COMMENT '抽奖按钮',
@@ -4,19 +4,31 @@ @@ -4,19 +4,31 @@
4 <div class="base-conf"> 4 <div class="base-conf">
5 <div class="base-left"> 5 <div class="base-left">
6 <Form ref="confForm" :model="conf" :rules="confRules" :label-width="120"> 6 <Form ref="confForm" :model="conf" :rules="confRules" :label-width="120">
7 - <FormItem label="活动规则" required>  
8 - <Input type="textarea" v-model="conf.rule"  
9 - placeholder="请输入活动规则" :maxlength="2000"></Input> 7 + <FormItem label="活动规则页链接" prop="rule_url">
  8 + <Input type="text" v-model="conf.rule_url"
  9 + placeholder="请输入活动规则" :maxlength="500"></Input>
10 </FormItem> 10 </FormItem>
11 - <FormItem label="分享按钮链接" prop="share_url"> 11 + <FormItem label="分享标题" prop="share_title">
  12 + <Input type="text" v-model="conf.share_title"
  13 + placeholder="分享标题" :maxlength="500"></Input>
  14 + </FormItem>
  15 + <FormItem label="分享描述" prop="share_desc">
  16 + <Input type="text" v-model="conf.share_desc"
  17 + placeholder="分享描述" :maxlength="100"></Input>
  18 + </FormItem>
  19 + <FormItem label="分享图片" prop="share_img">
  20 + <Input type="text" v-model="conf.share_img"
  21 + placeholder="分享图片" :maxlength="300"></Input>
  22 + </FormItem>
  23 + <FormItem label="分享链接" prop="share_url">
12 <Input type="text" v-model="conf.share_url" 24 <Input type="text" v-model="conf.share_url"
13 - placeholder="活动分享链接"></Input> 25 + placeholder="分享链接" :maxlength="500"></Input>
14 </FormItem> 26 </FormItem>
15 <FormItem label="提示文案(上)" prop="btm_tip_one"> 27 <FormItem label="提示文案(上)" prop="btm_tip_one">
16 <Input type="text" v-model="conf.btm_tip_one" 28 <Input type="text" v-model="conf.btm_tip_one"
17 placeholder="提示文案(上)"></Input> 29 placeholder="提示文案(上)"></Input>
18 </FormItem> 30 </FormItem>
19 - <FormItem label="提示文案(下)" prop="btm_tip_two"> 31 + <FormItem v-if="false" label="提示文案(下)" prop="btm_tip_two">
20 <Input type="text" v-model="conf.btm_tip_two" 32 <Input type="text" v-model="conf.btm_tip_two"
21 placeholder="提示文案(下)"></Input> 33 placeholder="提示文案(下)"></Input>
22 </FormItem> 34 </FormItem>
@@ -73,6 +85,15 @@ @@ -73,6 +85,15 @@
73 <span ref="upload_img_wheelBg" img-key="wheel_bg">添加</span> 85 <span ref="upload_img_wheelBg" img-key="wheel_bg">添加</span>
74 </Button> 86 </Button>
75 </FormItem> 87 </FormItem>
  88 + <FormItem label="中奖蒙层" prop="win_prize_bg">
  89 + <div class="preview-wrap" v-show="conf.win_prize_bg">
  90 + <Icon type="ios-close" class="del-img" @click="delPreview" img-key="win_prize_bg"/>
  91 + <img class="preview-img" :src="conf.win_prize_bg">
  92 + </div>
  93 + <Button v-show="!conf.win_prize_bg">
  94 + <span ref="upload_img_winPrizeBg" img-key="win_prize_bg">添加</span>
  95 + </Button>
  96 + </FormItem>
76 <FormItem label="活动规则按钮" prop="rule_btn_bg"> 97 <FormItem label="活动规则按钮" prop="rule_btn_bg">
77 <div class="preview-wrap" v-show="conf.rule_btn_bg"> 98 <div class="preview-wrap" v-show="conf.rule_btn_bg">
78 <Icon type="ios-close" class="del-img" @click="delPreview" img-key="rule_btn_bg"/> 99 <Icon type="ios-close" class="del-img" @click="delPreview" img-key="rule_btn_bg"/>
@@ -131,15 +152,6 @@ @@ -131,15 +152,6 @@
131 </div> 152 </div>
132 <div class="base-right"> 153 <div class="base-right">
133 <Form :label-width="120"> 154 <Form :label-width="120">
134 - <FormItem label="次数上限背景图" prop="day_over_limit_bg">  
135 - <div class="preview-wrap" v-show="conf.day_over_limit_bg">  
136 - <Icon type="ios-close" class="del-img" @click="delPreview" img-key="day_over_limit_bg"/>  
137 - <img class="preview-img" :src="conf.day_over_limit_bg">  
138 - </div>  
139 - <Button v-show="!conf.day_over_limit_bg">  
140 - <span ref="upload_img_overBg" img-key="day_over_limit_bg">添加</span>  
141 - </Button>  
142 - </FormItem>  
143 <FormItem label="我的奖品" prop="my_prize_btn_bg"> 155 <FormItem label="我的奖品" prop="my_prize_btn_bg">
144 <div class="preview-wrap" v-show="conf.my_prize_btn_bg"> 156 <div class="preview-wrap" v-show="conf.my_prize_btn_bg">
145 <Icon type="ios-close" class="del-img" @click="delPreview" img-key="my_prize_btn_bg"/> 157 <Icon type="ios-close" class="del-img" @click="delPreview" img-key="my_prize_btn_bg"/>
@@ -149,24 +161,6 @@ @@ -149,24 +161,6 @@
149 <span ref="upload_img_myPrizeBg" img-key="my_prize_btn_bg">添加</span> 161 <span ref="upload_img_myPrizeBg" img-key="my_prize_btn_bg">添加</span>
150 </Button> 162 </Button>
151 </FormItem> 163 </FormItem>
152 - <FormItem label="提示中奖背景图" prop="win_prize_bg">  
153 - <div class="preview-wrap" v-show="conf.win_prize_bg">  
154 - <Icon type="ios-close" class="del-img" @click="delPreview" img-key="win_prize_bg"/>  
155 - <img class="preview-img" :src="conf.win_prize_bg">  
156 - </div>  
157 - <Button v-show="!conf.win_prize_bg">  
158 - <span ref="upload_img_winPrizeBg" img-key="win_prize_bg">添加</span>  
159 - </Button>  
160 - </FormItem>  
161 - <FormItem label="再来一次按钮" prop="try_again_bg">  
162 - <div class="preview-wrap" v-show="conf.try_again_bg">  
163 - <Icon type="ios-close" class="del-img" @click="delPreview" img-key="try_again_bg"/>  
164 - <img class="preview-img" :src="conf.try_again_bg">  
165 - </div>  
166 - <Button v-show="!conf.try_again_bg">  
167 - <span ref="upload_img_tryAgainBg" img-key="try_again_bg">添加</span>  
168 - </Button>  
169 - </FormItem>  
170 </Form> 164 </Form>
171 </div> 165 </div>
172 <div class="bottom-btn"> 166 <div class="bottom-btn">
@@ -191,7 +185,7 @@ @@ -191,7 +185,7 @@
191 conf: { 185 conf: {
192 act_id: 0, 186 act_id: 0,
193 id: 0, 187 id: 0,
194 - rule: '', 188 + rule_url: '',
195 share_url: '', 189 share_url: '',
196 day_limit_times: '', 190 day_limit_times: '',
197 act_total_times: '', 191 act_total_times: '',
@@ -215,9 +209,6 @@ @@ -215,9 +209,6 @@
215 bottomContentCode: '' 209 bottomContentCode: ''
216 }, 210 },
217 confRules: { 211 confRules: {
218 - rule: [  
219 - { required: true, message: '活动规则不能为空', trigger: 'blur' }  
220 - ],  
221 share_url: [ 212 share_url: [
222 { required: true, message: '分享链接不能为空', trigger: 'blur' } 213 { required: true, message: '分享链接不能为空', trigger: 'blur' }
223 ], 214 ],