🐞 fix(battle): 修改warType字段类型
This commit is contained in:
@@ -202,7 +202,12 @@ export default class GameController extends Controller {
|
||||
} else if (part[0] === 'battleCode') {
|
||||
battleCode = part[1];
|
||||
} else if (part[0] === 'warType') {
|
||||
warType = part[1];
|
||||
// 检测 part[1] 类型
|
||||
if (typeof part[1] === 'number') {
|
||||
warType = part[1];
|
||||
} else if (typeof part[1] === 'string' && !isNaN(parseInt(part[1]))) {
|
||||
warType = parseInt(part[1]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!part.filename) {
|
||||
|
||||
Reference in New Issue
Block a user