Commit 0d54cd25 authored by 王波's avatar 王波

Merge branch 'b-template-component-addDataBoard' into 'b-template-component'

B端修改:toast、排行榜1开始

See merge request !23
parents af54692f 1b56cd1d
...@@ -154,11 +154,13 @@ Component({ ...@@ -154,11 +154,13 @@ Component({
my.hideLoading(); my.hideLoading();
if (success) { if (success) {
this.backList(); this.backList();
my.hideLoading();
} else { } else {
this.showFailToast(message); this.showFailToast(message);
} }
} else {
my.hideLoading();
} }
my.hideLoading();
}, 1000), }, 1000),
showFailToast(text) { showFailToast(text) {
my.showToast({ my.showToast({
......
...@@ -75,6 +75,10 @@ export const rankTableValidator = (rule, value, callback, source, options) => { ...@@ -75,6 +75,10 @@ export const rankTableValidator = (rule, value, callback, source, options) => {
if (value.some(v => !v.name)) return new Error('名次配置错误, 请检查'); if (value.some(v => !v.name)) return new Error('名次配置错误, 请检查');
const rankArr = (value.map(v => v.rank.split('-'))); const rankArr = (value.map(v => v.rank.split('-')));
// 判断是从第1名开始,因为之前就做了排序,所以判断有 1 就可以了
const rankArrStr = rankArr.toString();
if (rankArrStr.indexOf('1') === -1) return new Error('必须从第一名开始配置');
// 判断排名连续 // 判断排名连续
let validInfo = { let validInfo = {
......
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