|
|
@@ -30,6 +30,9 @@
|
|
|
<div class="text1">{{ item.rongYaoRole.roleName }}</div>
|
|
|
<div class="text2">营地ID:{{ item.rongYaoRole.userId }}</div>
|
|
|
</div>
|
|
|
+ <div class="account-btn" @click="activate(item.active, item.id)" :class="{ active: item.active }">
|
|
|
+ {{ item.active ? '使用中' : '空闲' }}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -105,6 +108,18 @@ export default {
|
|
|
});
|
|
|
|
|
|
// this.wait();
|
|
|
+ },
|
|
|
+ activate(active, id) {
|
|
|
+ if (active) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.$http
|
|
|
+ .post('/bindGame/activate', {
|
|
|
+ id: id
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ this.getInfo();
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
@@ -239,4 +254,12 @@ export default {
|
|
|
.account-box {
|
|
|
padding: 10px 0;
|
|
|
}
|
|
|
+.account-btn {
|
|
|
+ font-size: 12px;
|
|
|
+ color: #ffffff;
|
|
|
+ line-height: 24px;
|
|
|
+ &.active {
|
|
|
+ color: #ffe3a3;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|