Commit 2c7aca0a authored by 秦海涛's avatar 秦海涛

update

parent cb09d474
......@@ -118,6 +118,7 @@ Component({
type: "fail",
content: "最多选择20个宝贝",
});
return;
}
const { item } = e.target.dataset;
......
const { passUrlList } = require('../../../cmpUtils/const');
import { validateRangeNumber } from "../../../utils/validate";
Component({
mixins: [],
......@@ -87,7 +88,7 @@ Component({
},
onSaveTask() {
const { title, link, value, taskRateType, times, itemIds } = this.data;
if(!title) {
if(!title.trim()) {
my.showToast({
type: 'fail',
content: '请输入任务标题'
......@@ -111,7 +112,7 @@ Component({
return;
}
if(!value || !Number.isInteger(+value)) {
if(!value || !validateRangeNumber(value, [1, 999])) {
my.showToast({
type: 'fail',
content: '请输入正确的任务奖励'
......
......@@ -12,7 +12,7 @@ Component({
didUpdate() {},
methods: {
onChange(e) {
this.props.onChange && this.props.onChange(e.detail.value, e.target.dataset.name);
this.props.onChange && this.props.onChange(e);
},
async handleTapGeneralRule() {
console.log(this.props.generateRuleInfo, 'this.props.generateRuleInfo')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment