/** 旧二维码兼容：guanshiduan → 打手中心管事注册，逻辑不变 */
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?registerType=guanshi';
    if (inviteCode) {
      url += `&inviteCode=${encodeURIComponent(inviteCode)}`;
    }
    wx.reLaunch({ url });
  },
});
