From 1a1237dd4ad42dbe28bacde125b6326d685aed23 Mon Sep 17 00:00:00 2001 From: yanyan Date: Sat, 11 May 2024 10:44:37 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=92=E8=89=B2=E9=BB=98=E8=AE=A4=E7=AC=AC?= =?UTF-8?q?=E4=B8=80=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- subpkg/list/list.vue | 16 ++++++++-------- subpkg/role/role.vue | 14 ++++++++++++-- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/subpkg/list/list.vue b/subpkg/list/list.vue index 46ed8b3..3df2e51 100644 --- a/subpkg/list/list.vue +++ b/subpkg/list/list.vue @@ -145,10 +145,10 @@ this.showVerify = true this.item = item } else { - this.getRoleList(item.guid,item.name); - // 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 + }) } } }, @@ -185,10 +185,10 @@ icon: 'none' }) } - this.getRoleList(this.item.guid,this.item.name); - // 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) diff --git a/subpkg/role/role.vue b/subpkg/role/role.vue index f0651b2..ad6f26c 100644 --- a/subpkg/role/role.vue +++ b/subpkg/role/role.vue @@ -54,6 +54,7 @@ sceneId:"", sceneName:"", roleName:"", + first:true, roleId:"", roleList:[], practice:"startbtn" @@ -75,10 +76,19 @@ if (res.data.length > 3) { this.showButton = true } + res.data.forEach(item=>{ - this.$set(item, 'choose', 'false') + if (!this.first){ + this.$set(item, 'choose', 'false') + }else{ + this.$set(item, 'choose', 'true') + this.roleId = item.guid + this.practice = 'startbtn.active' + } + this.first = false; }) - this.roleList = res.data + + this.roleList = res.data //uni.$showMsg('数据请求成功!') }, chooseRole(item){