Arondight / Adachi-BOT

一个在 QQ 中运行的原神助手
MIT License
343 stars 74 forks source link

影流之层岩 #767

Closed mark9804 closed 2 years ago

mark9804 commented 2 years ago
image
mark9804 commented 2 years ago

是不是上下层分开来算的,我还没打

mark9804 commented 2 years ago
[
{
      "level": 0,
      "exploration_percentage": 0,
      "icon": "https://upload-bbs.mihoyo.com/game_record/genshin/city_icon/UI_ChapterIcon_ChasmsMaw.png",
      "name": "璃月层岩巨渊·地下矿区",
      "type": "Offering",
      "offerings": [
        {
          "name": "流明石触媒",
          "level": 0,
          "icon": "https://upload-bbs.mihoyo.com/game_record/genshin/city_icon/UI_ChapterOffering_Lumenstone.png"
        }
      ],
      "id": 7,
      "parent_id": 6,
      "map_url": "https://webstatic.mihoyo.com/ys/app/interactive-map/index.html?bbs_presentation_style=no_header&lang=zh-cn&_markerFps=24#/map/9?&center=0.00,1.00&zoom=-1.00",
      "strategy_url": "",
      "background_image": "https://upload-bbs.mihoyo.com/game_record/genshin/city_icon/UI_ChapterBackground_ChasmsMaw.png",
      "inner_icon": "https://upload-bbs.mihoyo.com/game_record/genshin/city_icon/UI_ChapterInnerIcon_ChasmsMaw.png",
      "cover": "https://upload-bbs.mihoyo.com/game_record/genshin/city_icon/UI_ChapterCover_ChasmsMaw.png"
    },
    {
      "level": 0,
      "exploration_percentage": 0,
      "icon": "https://upload-bbs.mihoyo.com/game_record/genshin/city_icon/UI_ChapterIcon_ChasmsMaw.png",
      "name": "璃月层岩巨渊",
      "type": "Offering",
      "offerings": [
        {
          "name": "流明石触媒",
          "level": 0,
          "icon": "https://upload-bbs.mihoyo.com/game_record/genshin/city_icon/UI_ChapterOffering_Lumenstone.png"
        }
      ],
      "id": 6,
      "parent_id": 0,
      "map_url": "https://webstatic.mihoyo.com/ys/app/interactive-map/index.html?bbs_presentation_style=no_header&lang=zh-cn&_markerFps=24#/map/2?&center=2917.44,-2500.29&zoom=0.00",
      "strategy_url": "",
      "background_image": "https://upload-bbs.mihoyo.com/game_record/genshin/city_icon/UI_ChapterBackground_ChasmsMaw.png",
      "inner_icon": "https://upload-bbs.mihoyo.com/game_record/genshin/city_icon/UI_ChapterInnerIcon_ChasmsMaw.png",
      "cover": "https://upload-bbs.mihoyo.com/game_record/genshin/city_icon/UI_ChapterCover_ChasmsMaw.png"
    }
]
mark9804 commented 2 years ago

看看到时候会不会共享探索度

"id": 7,
"parent_id": 6,
"strategy_url": "",
mark9804 commented 2 years ago

找到肝佬的图了,不共通,而且后端返回的数据顺序有改变

image
mark9804 commented 2 years ago

地上矿区 地下矿区 触媒等级

昨天拿手机传的图没折叠 ![image](https://user-images.githubusercontent.com/9006264/160874704-12d1277f-4ee6-4473-8b04-1b4727d981bd.png)![image](https://user-images.githubusercontent.com/9006264/160874731-a7cf6ef3-3190-4b2b-8eee-3a75bcedcb87.png)![image](https://user-images.githubusercontent.com/9006264/160874747-37079021-ce1f-4af4-aac4-7cc451f41486.png)
Arondight commented 2 years ago

借道记个备忘新副本名字岩中幽谷需要在配置文件里写一下(虽然我没找到入口)

mark9804 commented 2 years ago

虽然我没找到入口

在门口机关盘上面放一个岩造物,然后跑到小地图上锄头的位置,用开山炮轰那个最不一样的石头,岩波会正好传到机关盘的位置,把你放的岩造物摧毁,然后通过共鸣的方式够到堵门的石头

我也思考了很久策划在这里放了三块大跳石是有什么深意,跳上去用了一下元素视野才发现有一门炮,,, 原神 3_31_2022 3_02_25 PM

Arondight commented 2 years ago

感谢,晚上试一下

mark9804 commented 2 years ago

米忽悠排序怎么排的,猴子排序法是吧

image
Arondight commented 2 years ago

我给你整个 lodash ,写个数组用 index 排序吧

mark9804 commented 2 years ago

算了,不用白不用,来一个 lodash 吧

mark9804 commented 2 years ago

新副本名字岩中幽谷需要在配置文件里写一下

我顺路提交了

Arondight commented 2 years ago

我搞个 lodash 上来

const a = ["一二三", "三四五", "七八九"];
const o = [{ p: "三四五" }, { p: "七八九" }, { p: "没有哦" }, { p: "一二三" }];
console.log(lodash.sortBy(o, (c) => (a.includes(c.p) ? a.indexOf(c.p) : Number.MAX_SAFE_INTEGER)));
Arondight commented 2 years ago
<!DOCTYPE html>
<html lang="zh-cn">
  <head>
    <meta charset="UTF-8" />
    <title>lodash test</title>
    <script src="./vue.global.js"></script>
    <script src="./lodash.min.js"></script>
    <link rel="icon" href="data:," />
  </head>
  <body>
    <div id="app">
      <p>{{ test }}</p>
    </div>
    <script type="module">
      const { createApp } = Vue;
      const App = {
        data() {
          return {
            test: _.isEqual(1, 0),
          };
        },
      };

      createApp(App).mount("#app");
    </script>
  </body>
</html>
mark9804 commented 2 years ago

用我会用,不过老大哥在 head 里面加载脚本的写法要注意一下,脚本加载时会阻塞渲染的,在实际极端情况下假如用户网速是10k/s,头部要加载一个 300k 的脚本,那理想情况下有十秒钟时间用户啥内容都看不到

Arondight commented 2 years ago

那么要怎么办捏

mark9804 commented 2 years ago

Async, defer, preload, server push(最后一种我不了解) https://webspeedtools.com/async-vs-defer-vs-preload-vs-server-push/

https://javascript.info/script-async-defer

我项目里用的是 preload

Arondight commented 2 years ago

为啥 vue 没有 preload 呢

mark9804 commented 2 years ago

为啥 vue 没有 preload 呢

其实是因为我懒得改了,而且我觉得在这个项目里面没必要,vue 没加载出来的话页面就是空白的,不需要考虑先给用户渲染个大饼

Arondight commented 2 years ago

啊这,我以为有什么特殊性

mark9804 commented 2 years ago

我们项目 vue 不加载的话就是空网页,那我还不如让他加载,无所谓了

Arondight commented 2 years ago

为了避免 eslint 太多抱怨,建议起个别名

const lodash = window._;
const chain = lodash.chain(o);
mark9804 commented 2 years ago

为了避免 eslint 太多抱怨,建议起个别名

ok

mark9804 commented 2 years ago

昨晚的 cd15cb5 改了一下探索度的显示逻辑,把判断该显示什么内容的工作上调到了 app.js ,理论上写一个 reduce 就完事了

https://github.com/Arondight/Adachi-BOT/blob/cd15cb5a4714199ed69f0df24205d84a2dc9cf3d/src/views/component/card/cardComponents.js#L88-L91

就是这两行实现属实难看,想不到在不新建 component 的情况下进行键值对循环的方法