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.showVerify = true
this.item = item this.item = item
} else { } else {
uni.navigateTo({ this.getRoleList(item.guid,item.name);
url: '/subpkg/role/role?guid=' + item.guid + '&name=' + 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() { close() {
this.showVerify = false this.showVerify = false
}, },
@ -166,9 +184,10 @@
icon: 'none' icon: 'none'
}) })
} }
uni.navigateTo({ this.getRoleList(this.item.guid,this.item.name);
url: '/subpkg/role/role?guid=' + this.item.guid + '&name=' + this.item.name // uni.navigateTo({
}) // url: '/subpkg/role/role?guid=' + this.item.guid + '&name=' + this.item.name
// })
}, },
input(e) { input(e) {
clearTimeout(this.timer) clearTimeout(this.timer)

Loading…
Cancel
Save