|
|
@@ -1671,7 +1671,7 @@ export default {
|
|
|
});
|
|
|
e.classname = kk.join("/");
|
|
|
});
|
|
|
- this.tableData = res.data[0];
|
|
|
+ this.tableData = this.groupByName(res.data[0] || []);
|
|
|
console.log(
|
|
|
JSON.parse(JSON.stringify(this.tableData)),
|
|
|
"this.tableData"
|
|
|
@@ -1686,6 +1686,16 @@ export default {
|
|
|
console.error(err);
|
|
|
});
|
|
|
},
|
|
|
+ // 拼音排序
|
|
|
+ groupByName(list) {
|
|
|
+ return [...list].sort((a, b) => {
|
|
|
+ const nameA = (a && a.username ? a.username : "").trim();
|
|
|
+ const nameB = (b && b.username ? b.username : "").trim();
|
|
|
+ return nameA.localeCompare(nameB, "zh-Hans-CN-u-co-pinyin", {
|
|
|
+ sensitivity: "base"
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
// 获取兴趣班
|
|
|
getInterestClass() {
|
|
|
this.tab1Loading = true;
|