No plug-in live video platform of IP camera webpage EasyNVR page number display confusion BUG solution

TSINGSEE blue rhinoceros video R & D team after years of development, its different protocols video platform has been applied to a lot of scenes which, for example, with our urban construction and development is closely related to intelligent transportation , smart city , improve the campus and kindergartens safety of wisdom campus , apart from In addition, it is also possible to build a WeChat public account monitoring live broadcast platform .

1.png

For the EasyNVR video platform, our technology research and development are testing every day, and recently found that in the device list, after editing a certain channel on page 2 and saving or canceling, the page number will be changed to page 1, but it is actually page 2. This is a rare bug, but we have resolved it so far, so let's share the resolution process below.

357.png

358.png

analyse problem

The reproduction step can know that when you click to the second page, editing a certain channel and saving or canceling will cause the page number to change back to the first page, but the data on the page is still the second page. We speculate that the page number has no value, the page value It becomes the default value. So look up the code and set currentPage to a value when the page is initialized. Where is this value obtained?

359.png

360.png

Through routing, we found that the page number can be judged by the value on the routing. So this value can be assigned to currentPage when the page is initialized.

  mounted() {
    this.$store.dispatch("getBreadcrumb", this.breadcrumb);
    this.$refs["search"].focus();
    this.query = this.q;
    this.currentPage = this.$route.params.page
    this.getUsers();
    $(document).on("expanded.pushMenu collapsed.pushMenu", () => {
      $(".channel-info .panel-body").getNiceScroll().resize();
    });
  },

After modifying the code, the page has been corrected and such problems will no longer occur.

361.png

✈ More video solution resource summary

Tsingsee

Guess you like

Origin blog.csdn.net/EasyNVR/article/details/108578583