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

10
subpkg/role/role.vue

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

Loading…
Cancel
Save