|
@@ -28,8 +28,16 @@
|
|
|
label="游戏营地"
|
|
label="游戏营地"
|
|
|
placeholder="请输入您的营地ID"
|
|
placeholder="请输入您的营地ID"
|
|
|
v-model="form.campId"
|
|
v-model="form.campId"
|
|
|
|
|
+ clearable
|
|
|
:rules="[{ required: true, message: '请输入您的营地ID' }]"
|
|
:rules="[{ required: true, message: '请输入您的营地ID' }]"
|
|
|
- />
|
|
|
|
|
|
|
+ >
|
|
|
|
|
+ <template #extra>
|
|
|
|
|
+ <div class="tip-btn" @click="$router.push('/accountDes')">
|
|
|
|
|
+ <span>查看ID说明</span>
|
|
|
|
|
+ <img src="@assets/icon_inter.png" alt="" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </van-field>
|
|
|
<div class="tips">
|
|
<div class="tips">
|
|
|
<div class="text1">温馨提示</div>
|
|
<div class="text1">温馨提示</div>
|
|
|
<div class="text2">便于游戏公平性,校验官方数据,请认真填写王者荣耀昵称及王者营地1D账号</div>
|
|
<div class="text2">便于游戏公平性,校验官方数据,请认真填写王者荣耀昵称及王者营地1D账号</div>
|
|
@@ -98,27 +106,32 @@ export default {
|
|
|
if (this.checkRoleId) {
|
|
if (this.checkRoleId) {
|
|
|
form.roleId = this.checkRoleId;
|
|
form.roleId = this.checkRoleId;
|
|
|
}
|
|
}
|
|
|
- this.$http.post('/bindGame/bind', form).then(res => {
|
|
|
|
|
- if (!this.checkRoleId) {
|
|
|
|
|
- this.$toast.clear();
|
|
|
|
|
- // res.roleItems=res.roleItems.filter(item=>{
|
|
|
|
|
- // return
|
|
|
|
|
- // })
|
|
|
|
|
- if (res.roleItems.length === 0) {
|
|
|
|
|
- this.$dialog.alert({
|
|
|
|
|
- title: '角色列表为空',
|
|
|
|
|
- message: '当前没有可选择的角色,请赶快打开王者创建吧'
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ this.$http
|
|
|
|
|
+ .post('/bindGame/bind', form)
|
|
|
|
|
+ .then(res => {
|
|
|
|
|
+ if (!this.checkRoleId) {
|
|
|
|
|
+ this.$toast.clear();
|
|
|
|
|
+ // 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 {
|
|
} else {
|
|
|
- this.showRoles = true;
|
|
|
|
|
- this.roleItems = res.roleItems;
|
|
|
|
|
|
|
+ this.$toast.success('绑定成功');
|
|
|
|
|
+ this.$emit('update');
|
|
|
}
|
|
}
|
|
|
- } else {
|
|
|
|
|
- this.$toast.success('绑定成功');
|
|
|
|
|
- this.$emit('update');
|
|
|
|
|
- }
|
|
|
|
|
- this.show = false;
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ this.show = false;
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(e => {
|
|
|
|
|
+ this.$toast(e.error);
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
init(gameInfo, zone) {
|
|
init(gameInfo, zone) {
|
|
|
this.form = { campId: '', gameId: gameInfo.id, zone: zone };
|
|
this.form = { campId: '', gameId: gameInfo.id, zone: zone };
|
|
@@ -138,8 +151,8 @@ export default {
|
|
|
.title {
|
|
.title {
|
|
|
.flex();
|
|
.flex();
|
|
|
img {
|
|
img {
|
|
|
- width: 28px;
|
|
|
|
|
- height: 28px;
|
|
|
|
|
|
|
+ width: 24px;
|
|
|
|
|
+ height: 24px;
|
|
|
}
|
|
}
|
|
|
span {
|
|
span {
|
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
@@ -222,4 +235,19 @@ export default {
|
|
|
background: #313346;
|
|
background: #313346;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+.tip-btn {
|
|
|
|
|
+ .flex();
|
|
|
|
|
+ margin-left: 6px;
|
|
|
|
|
+ span {
|
|
|
|
|
+ font-size: 12px;
|
|
|
|
|
+ color: #6a6d83;
|
|
|
|
|
+ line-height: 17px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ img {
|
|
|
|
|
+ width: 24px;
|
|
|
|
|
+ height: 24px;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|