option-video.html 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>操作视频-创业帮</title>
  6. <meta name="keywords" content="操作视频-创业帮">
  7. <meta name="description" content="操作视频-创业帮">
  8. <meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,shrink-to-fit=no,user-scalable=no" name="viewport" viewport="cover">
  9. <meta name="apple-mobile-web-app-capable" content="yes">
  10. <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
  11. <meta content="telephone=no" name="format-detection">
  12. <meta content="email=no" name="format-detection">
  13. <meta name="apple-mobile-web-app-title" content="操作视频-创业帮">
  14. <meta http-equiv="Cache-Control" content="no-siteapp">
  15. <link rel="stylesheet" href="./static/css/main.css">
  16. </head>
  17. <body class="option-video pt0 pb0" style="padding-top:0;">
  18. <div id="app" ref="container" v-cloak>
  19. <van-nav-bar class="option_video_title titlef16 whit_icon" left-arrow title="创业帮视频介绍" v-if="toptitleisshow" @click-left="goback">
  20. <template #left>
  21. <van-icon name="arrow-left"> </van-icon>
  22. </template>
  23. </van-nav-bar>
  24. <div class="video_banner strong_colorroll">
  25. <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
  26. <van-list v-model="loading" :finished="finished" @load="onLoad" finished-text="没有更多数据了" :immediate-check="false">
  27. <div class="imgbox mt16" v-for="item in videolist" :key="item.Id" @click="videodetaillist(item.Id)"><img :src="item.BannerPic" alt=""></div>
  28. </van-list>
  29. </van-pull-refresh>
  30. </div>
  31. </div>
  32. <script src="./static/js/klm-vv.min.js"></script>
  33. <script src="./static/js/appfunc.min.js"></script>
  34. <script src="./static/js/klm-axios-config.js"></script>
  35. <script src="./static/js/publicfn.js"></script>
  36. <script>
  37. // 通过 CDN 引入时不会自动注册 Lazyload 组件
  38. // 可以通过下面的方式手动注册
  39. Vue.use(vant.Lazyload);
  40. PublicLib.SetStatusBarBgColor({bgcolor:'ffffff'});
  41. // 在 #app 标签下渲染一个按钮组件
  42. let app = new Vue({
  43. el: '#app',
  44. data() {
  45. return {
  46. toptitleisshow:false,
  47. videolist:[],
  48. loading: false,
  49. finished: false,
  50. refreshing: false,
  51. pageinfo:{
  52. PageSize:10,
  53. PageNum:1
  54. },
  55. }
  56. },
  57. created() {
  58. this.toptitleisshow = toptitleisshow;
  59. this.getvideotypelist();
  60. },
  61. methods: {
  62. onLoad() {
  63. if (this.refreshing) {
  64. this.videolist = [];
  65. this.refreshing = false;
  66. this.pageinfo.PageNum = 0;
  67. };
  68. this.pageinfo.PageNum++;
  69. this.getvideotypelist();
  70. },
  71. onRefresh() {
  72. this.finished = false;
  73. this.loading = true;
  74. this.onLoad();
  75. },
  76. goback(){
  77. PublicLib.GoBack({Level:1});
  78. },
  79. videodetaillist(id){
  80. PublicLib.putCookieInfo('videoId', id);
  81. PublicLib.Goto({Url:'option-video-detail'});
  82. },
  83. async getvideotypelist(){
  84. //- PublicLib.ShowLoading({Message:''});
  85. const BrandId = PublicLib.getCookieInfo('productMachineId');
  86. const UserId = PublicLib.getCookieInfo('userId');
  87. const res = await getRequest('api/v1/appvideo/list?t='+Math.random(6),JSON.stringify({...this.pageinfo}));
  88. if(res.status !== '1')return tips('操作视频分类列表获取失败!');
  89. //- PublicLib.HideLoading();
  90. if(res.data.length < this.pageinfo.PageSize) {
  91. this.finished = true;
  92. };
  93. this.videolist.push(...res.data);
  94. this.loading = false;
  95. },
  96. }
  97. });
  98. </script>
  99. </body>
  100. </html>