/** 旧二维码兼容：dashouduan → 打手中心，inviteCode 自动注册逻辑不变 */
import { parseSceneOptions } from '../../utils/base-page.js';

Page({
  onLoad(options) {
    const parsed = parseSceneOptions(options || {});
    const inviteCode = parsed.inviteCode || options.inviteCode || '';
    let url = '/pages/fighter/fighter';
    if (inviteCode) {
      url += `?inviteCode=${encodeURIComponent(inviteCode)}`;
    }
    wx.reLaunch({ url });
  },
});
