Authored by 李奇

fixed:中奖概率类型浮点

... ... @@ -206,6 +206,7 @@ class ActWheelSurfModel extends global.yoho.BaseModel {
break;
}
}
if (getPrize.type !== 1) {
// 校验剩余库存
if (getPrize.total_left > 0) {
... ... @@ -229,7 +230,7 @@ class ActWheelSurfModel extends global.yoho.BaseModel {
} else if (getPrize.type === 2) {
try {
// 调用java接口
// 调用java接口
sendResult = await this.get({
data: {
method: 'app.redpac.addRedpac',
... ...
... ... @@ -54,7 +54,7 @@ CREATE TABLE IF NOT EXISTS act_wheel_surf_prize (
`img` VARCHAR(300) COMMENT '奖品图片',
`total` INT(8) DEFAULT 0 COMMENT '奖品总数',
`total_left` INT(8) DEFAULT 0 COMMENT '奖品总数',
`chance` INT(8) DEFAULT 0 COMMENT '中奖概率',
`chance` FLOAT DEFAULT 0 COMMENT '中奖概率',
`prize_idx` INT(2) NOT NULL COMMENT '圆盘上奖品位置序号',
`create_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
) DEFAULT CHARSET=utf8;
... ...
... ... @@ -41,17 +41,19 @@
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="2">同时限制以上两种</Option>
<Select v-model="conf.times_type" @on-change="limitChange">
<Option :value="1">只限制每天最大抽奖次数</Option>
<Option :value="2">只限制每人参与活动最大抽奖次数</Option>
<Option :value="3">同时限制以上两种</Option>
</Select>
</FormItem>
<FormItem label="每天最大抽奖次数" prop="day_limit_times">
<Input type="text" v-model="conf.day_limit_times"
<FormItem label="每天最大抽奖次数" prop="day_limit_times" v-show="conf.times_type == 1 || conf.times_type == 3">
<Input type="text"
v-model="conf.day_limit_times"
placeholder="每天最大抽奖次数"></Input>
</FormItem>
<FormItem label="每人参与活动最大抽奖次数" prop="act_total_times">
<FormItem v-show="conf.times_type == 2 || conf.times_type == 3" label="每人参与活动最大抽奖次数"
prop="act_total_times">
<Input type="text" v-model="conf.act_total_times"
placeholder="每人参与活动最大抽奖次数"></Input>
</FormItem>
... ... @@ -211,17 +213,14 @@
day_limit_times: [
{ required: true, message: '每天最大次数不能为空', trigger: 'blur' }
],
act_total_times: [
{ required: true, message: '每天最大次数不能为空', trigger: 'blur' }
],
btm_tip_one: [
{ required: true, message: '提示文案(上)不能为空', trigger: 'blur' }
],
btm_tip_two: [
{ required: true, message: '提示文案(下)不能为空', trigger: 'blur' }
],
bottomContentCode: [
{ required: true, message: '底部资源码不能为空', trigger: 'blur' }
],
times_type: [
{ required: true}
]
}
}
... ... @@ -269,6 +268,9 @@
this.conf[imgKey] = url;
});
});
},
limitChange() {
}
},
mounted() {
... ...