游戏中心复盘

  1. 手机端的调试 对手机端的调试不是很熟悉

  2. 涉及到次数的,一定要添加防抖

    function throttle(fn, limit = 2000) {
      let flag = true
      return function() {
        if (flag) {
          fn.apply(this, arguments)
          flag = false
          setTimeout(() => { flag = true },  )
        }
      }
    }

  // mounted 里面
    self = this;
    this.debounceFn=
    throttle((num)=>{
        self.openPacket(num)
    })

    doLottery(num) {
      this.debounceFn(num)
    },
  1. 次数的更新 这一次,涉及到次数,times 或者 composetimes 都没有处理好

    NativeInterface.emit(Enum.INTERFACE_EVENT.UPDATE_TIMES);

    有个疑问点 为什么我的 写的锁 锁不住 ?
  1. 埋点问题 postTask 和 dolottery 不一样, 两者的区分点在与游戏逻辑。

// dolottery
* true  logger.makeActivityLog('activity_prize_got');
* false logger.makeActivityLog('activity_prize_failed');//调抽奖接口返回错误、异常埋点

//postTask
* true

* false  logger.makeActivityLog('activity_prizebad_juge'); // 获取lottery失败次数
  1. 弹窗组件

对这个组件的不熟悉用法,涉及到多个 mixin 的组合,无法区分时机与用法

DialogBuilder.of(this).alert(
  util.createComponentProxy(_BigTitle, { title: "恭喜你!" }),
  util.createComponentProxy(_LotteryResult, { award: realAward[0] })
);

DialogBuilder.of(this).confirm(
  util.createComponentProxy(_BigTitle, { title: "合成成功!" }),
  util.createComponentProxy(_LotteryResult, {
    award: award,
    awardNameColor: "#fcff29",
    tipsColor: "rgba(0,0,0,.5)",
  })
);
  1. 样式问题 css 基础排版问题

  • 导流活动对排版布局的不合理使用,例如:将粗暴的采用 flex 布局。

  • 对引用组件样式修改恐惧

引用组件 如果 大范围修改,采用自己写的覆盖 小范围,寻找相对于 class 类名。

  1. token

self.$store.commit("setAccessToken", token);
NativeInterface.goBackDirectly();
  1. google 浏览器对自动播放做了限制

let bgAudio = document.getElementById("bgaudio").play();
if (bgAudio !== undefined) {
  bgAudio
    .catch((error) => {
      console.log("error: ", error);
      // Auto-play was prevented
      // Show a UI element to let the user manually start playback
    })
    .then(() => {
      // Auto-play started
    });
}

最后更新于

这有帮助吗?