Browse Source

只有一个角色时,直接演练

h5_css
yanyan 2 years ago
parent
commit
8c90faef7a
  1. 31
      subpkg/list/list.vue

31
subpkg/list/list.vue

@ -145,12 +145,30 @@
this.showVerify = true
this.item = item
} else {
uni.navigateTo({
url: '/subpkg/role/role?guid=' + item.guid + '&name=' + item.name
})
this.getRoleList(item.guid,item.name);
// uni.navigateTo({
// url: '/subpkg/role/role?guid=' + item.guid + '&name=' + item.name
// })
}
}
},
async getRoleList(guid,name) {
const {
data: res
} = await uni.$http.post('/small/project/role/listAll',{sceneId: guid,name:""})
if (!res.success) return uni.$showMsg()
console.log(res.data.length )
if (res.data.length === 1) {
uni.navigateTo({
url: '/subpkg/practice/practice?roleId='+res.data[0].roleId+'&sceneId='+guid
})
} else {
uni.navigateTo({
url: '/subpkg/role/role?guid=' + guid + '&name=' + name
})
}
},
close() {
this.showVerify = false
},
@ -166,9 +184,10 @@
icon: 'none'
})
}
uni.navigateTo({
url: '/subpkg/role/role?guid=' + this.item.guid + '&name=' + this.item.name
})
this.getRoleList(this.item.guid,this.item.name);
// uni.navigateTo({
// url: '/subpkg/role/role?guid=' + this.item.guid + '&name=' + this.item.name
// })
},
input(e) {
clearTimeout(this.timer)

Loading…
Cancel
Save