Browse Source

角色默认第一个

h5_css
yanyan 2 years ago
parent
commit
1a1237dd4a
  1. 16
      subpkg/list/list.vue
  2. 14
      subpkg/role/role.vue

16
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)

14
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){

Loading…
Cancel
Save