|
|
@@ -101,8 +101,18 @@ export default {
|
|
|
this.$http.post('/bindGame/bind', form).then(res => {
|
|
|
if (!this.checkRoleId) {
|
|
|
this.$toast.clear();
|
|
|
- this.showRoles = true;
|
|
|
- this.roleItems = res.roleItems;
|
|
|
+ // res.roleItems=res.roleItems.filter(item=>{
|
|
|
+ // return
|
|
|
+ // })
|
|
|
+ if (res.roleItems.length === 0) {
|
|
|
+ this.$dialog.alert({
|
|
|
+ title: '角色列表为空',
|
|
|
+ message: '当前没有可选择的角色,请赶快打开王者创建吧'
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.showRoles = true;
|
|
|
+ this.roleItems = res.roleItems;
|
|
|
+ }
|
|
|
} else {
|
|
|
this.$toast.success('绑定成功');
|
|
|
this.$emit('update');
|