888
This commit is contained in:
@@ -70,8 +70,9 @@ const useUserStore = defineStore("user", {
|
||||
return loginAPI
|
||||
.login(form)
|
||||
.then((res) => {
|
||||
if (res.data.success === true) {
|
||||
if (res.success === true) {
|
||||
this.setToken(res.data.token)
|
||||
// this.setToken(res.data.token)
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
|
||||
@@ -26,6 +26,23 @@ const useTreeDataStore = defineStore("treeDataStore", {
|
||||
},
|
||||
setCurrentNode(nodeKey) {
|
||||
this.currentNode = nodeKey
|
||||
},
|
||||
// 获取轮次信息中差中间的是哪几个轮次
|
||||
getRoundMiddleInfo() {
|
||||
let roundLength = this.treeData.length
|
||||
// 取出最后一个key的值
|
||||
let lastKey = parseInt(this.treeData[this.treeData.length - 1].key) + 1
|
||||
// 遍历数组,找出key最大值
|
||||
let key_list = []
|
||||
this.treeData.forEach((item) => {
|
||||
key_list.push(parseInt(item.key))
|
||||
})
|
||||
if (roundLength !== lastKey) {
|
||||
let cha = lastKey - roundLength
|
||||
return lastKey - cha - 1
|
||||
} else {
|
||||
return roundLength
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user