Browse Source

角色默认第一个

h5_css
yanyan 3 years ago
parent
commit
1a1237dd4a
  1. 16
      subpkg/list/list.vue
  2. 10
      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)

10
subpkg/role/role.vue

@ -54,6 +54,7 @@
sceneId:"",
sceneName:"",
roleName:"",
first:true,
roleId:"",
roleList:[],
practice:"startbtn"
@ -75,9 +76,18 @@
if (res.data.length > 3) {
this.showButton = true
}
res.data.forEach(item=>{
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
//uni.$showMsg('数据请求成功!')
},

Loading…
Cancel
Save