liting2017 hace 6 años
padre
commit
3b47a848c4
Se han modificado 3 ficheros con 46 adiciones y 44 borrados
  1. 10 8
      src/js/video.js
  2. 2 2
      webpack.config.js
  3. 34 34
      webpack/entry.config.js

+ 10 - 8
src/js/video.js

@@ -112,13 +112,14 @@ $(function () {
     function jumpFun() {
         videoHtml = '';
         $(".contImg ul li").on("click", function () {
-            nutt = $(this).index();
             let loginTxt = $('.head_login')[0];
             if (loginTxt && ($(loginTxt).text()) == '登录') {
                 $('.head_login').click();
                 window.location.hash = 'jump';
                 return false;
             }
+            nutt = $(this).index();
+            console.log(nutt)
             let urls = $(this).find('input').val();
             videoHtml = `<source src="http://118.190.205.7:8000${urls}" type="video/mp4">`;
             $('.videoPlay').show(100);
@@ -126,9 +127,9 @@ $(function () {
             $('#videoAt').html(videoHtml);
             let videoNew = document.getElementById('videoAt');
             videoNew.load();
-            videoCz();
         })
     }
+    videoCz();
     //视频操作
     function videoCz() {
         //关闭按钮
@@ -137,17 +138,18 @@ $(function () {
             $('.videoPlay').hide(100);
             $('.videoPlay').removeClass('active');
             video.pause();
+            nutt=0;
         });
         //点击上一个,下一个
         $('.videoPre').click(function () {
+            nutt-=1;
             if (nutt < 0) {
-                msg('第一个');
+                msg('已经到第一个了.');
                 nutt = 0;
                 return false;
             };
             let video = document.getElementById('videoAt');
             video.pause();
-            nutt--;
             let urlT = $('.contImg ul li').eq(nutt).find('input').val();
             videoHtml = `<source src="http://118.190.205.7:8000${urlT}" type="video/mp4">`;
             $('#videoAt').html(videoHtml);
@@ -155,14 +157,14 @@ $(function () {
             videoNew.load();
         });
         $('.videoNext').click(function () {
-            if (nutt == $('.contImg ul li').length - 1) {
+            nutt+=1;
+            if (nutt > $('.contImg ul li').length - 1) {
                 nutt = $('.contImg ul li').length - 1;
-                msg('最后一个');
-                return;
+                msg('已经到最后一个了.');
+                return false;
             }
             let video = document.getElementById('videoAt');
             video.pause();
-            nutt++;
             let urlT = $('.contImg ul li').eq(nutt).find('input').val();
             videoHtml = `<source src="http://118.190.205.7:8000${urlT}" type="video/mp4">`;
             $('#videoAt').html(videoHtml);

+ 2 - 2
webpack.config.js

@@ -497,7 +497,7 @@ module.exports = (function () {
         }));
     }
 
-    let staticHost = 'http://192.168.0.190:80';
+    let staticHost = 'http://192.168.0.188:80';
     switch (argv.env.deploy) {
         case 'test':
             staticHost = 'http://statics.jishutao.com';
@@ -529,7 +529,7 @@ module.exports = (function () {
         plugins: plugins,
         devServer: {
             disableHostCheck: true,
-            host: '192.168.0.190',
+            host: '192.168.0.188',
             port: 80,
             allowedHosts: ['192.168.0.190', '192.168.0.99', '192.168.0.20'],
             headers: {

+ 34 - 34
webpack/entry.config.js

@@ -49,141 +49,141 @@ module.exports = {
         'newMenu/video': './src/js/video.js',
     },
     watch: {
-        'index': ['webpack-dev-server/client?http://192.168.0.190', // WebpackDevServer host and port
+        'index': ['webpack-dev-server/client?http://192.168.0.188', // WebpackDevServer host and port
             'webpack/hot/only-dev-server',
             './src/js/newMenu/index.js'
         ],
-        'search': ['webpack-dev-server/client?http://192.168.0.190', // WebpackDevServer host and port
+        'search': ['webpack-dev-server/client?http://192.168.0.188', // WebpackDevServer host and port
             'webpack/hot/only-dev-server',
             './src/js/search.js'
         ],
-         'aboutUs': ['webpack-dev-server/client?http://192.168.0.190', // WebpackDevServer host and port
+         'aboutUs': ['webpack-dev-server/client?http://192.168.0.188', // WebpackDevServer host and port
             'webpack/hot/only-dev-server',
             './src/js/aboutUs.js'
         ],
-        'contactUs': ['webpack-dev-server/client?http://192.168.0.190',
+        'contactUs': ['webpack-dev-server/client?http://192.168.0.188',
             'webpack/hot/only-dev-server',
             './src/js/contactUs.js'
         ],
-        'register': ['webpack-dev-server/client?http://192.168.0.190',
+        'register': ['webpack-dev-server/client?http://192.168.0.188',
             'webpack/hot/only-dev-server',
             './src/js/register.js'
         ],
-        'thinkTank': ['webpack-dev-server/client?http://192.168.0.190', // WebpackDevServer host and port
+        'thinkTank': ['webpack-dev-server/client?http://192.168.0.188', // WebpackDevServer host and port
             'webpack/hot/only-dev-server',
             './src/js/thinkTank.js'
         ],
-        'technologyTrading/achievementDetail': ['webpack-dev-server/client?http://192.168.0.190', // WebpackDevServer host and port
+        'technologyTrading/achievementDetail': ['webpack-dev-server/client?http://192.168.0.188', // WebpackDevServer host and port
             'webpack/hot/only-dev-server',
             './src/js/technologyTrading/achievementDetail.js'
         ],
-        'technologyTrading/demandDetail': ['webpack-dev-server/client?http://192.168.0.190', // WebpackDevServer host and port
+        'technologyTrading/demandDetail': ['webpack-dev-server/client?http://192.168.0.188', // WebpackDevServer host and port
             'webpack/hot/only-dev-server',
             './src/js/technologyTrading/demandDetail.js'
         ],
-        'thinkTank/policyDetail': ['webpack-dev-server/client?http://192.168.0.190', // WebpackDevServer host and port
+        'thinkTank/policyDetail': ['webpack-dev-server/client?http://192.168.0.188', // WebpackDevServer host and port
             'webpack/hot/only-dev-server',
             './src/js/thinkTank/policyDetail.js'
         ],
-        'thinkTank/thinkerDetail': ['webpack-dev-server/client?http://192.168.0.190', // WebpackDevServer host and port
+        'thinkTank/thinkerDetail': ['webpack-dev-server/client?http://192.168.0.188', // WebpackDevServer host and port
             'webpack/hot/only-dev-server',
             './src/js/thinkTank/thinkerDetail.js'
         ],
-        'thinkTank/policyList': ['webpack-dev-server/client?http://192.168.0.190', // WebpackDevServer host and port
+        'thinkTank/policyList': ['webpack-dev-server/client?http://192.168.0.188', // WebpackDevServer host and port
             'webpack/hot/only-dev-server',
             './src/js/thinkTank/policyList.js'
         ],
         // newsApp 
-        'news/newsDetailApp': ['webpack-dev-server/client?http://192.168.0.190', // WebpackDevServer host and port
+        'news/newsDetailApp': ['webpack-dev-server/client?http://192.168.0.188', // WebpackDevServer host and port
             'webpack/hot/only-dev-server',
             './src/js/news/newsDetailApp.js'
         ],
-        'news/appCognizance': ['webpack-dev-server/client?http://192.168.0.190', // WebpackDevServer host and port
+        'news/appCognizance': ['webpack-dev-server/client?http://192.168.0.188', // WebpackDevServer host and port
             'webpack/hot/only-dev-server',
             './src/js/news/appCognizance.js'
         ],
-        'news/agreement': ['webpack-dev-server/client?http://192.168.0.190', // WebpackDevServer host and port
+        'news/agreement': ['webpack-dev-server/client?http://192.168.0.188', // WebpackDevServer host and port
             'webpack/hot/only-dev-server',
             './src/js/news/agreement.js'
         ],
         /* 2018-06 新版科技需求 */
-        'newMenu/demand': ['webpack-dev-server/client?http://192.168.0.190', // WebpackDevServer host and port
+        'newMenu/demand': ['webpack-dev-server/client?http://192.168.0.188', // WebpackDevServer host and port
             'webpack/hot/only-dev-server',
             './src/js/newMenu/demand.js'
         ],
-        'newMenu/achievement': ['webpack-dev-server/client?http://192.168.0.190', // WebpackDevServer host and port
+        'newMenu/achievement': ['webpack-dev-server/client?http://192.168.0.188', // WebpackDevServer host and port
             'webpack/hot/only-dev-server',
             './src/js/newMenu/achievement.js'
         ],
-        'newMenu/achievementList': ['webpack-dev-server/client?http://192.168.0.190', // WebpackDevServer host and port
+        'newMenu/achievementList': ['webpack-dev-server/client?http://192.168.0.188', // WebpackDevServer host and port
             'webpack/hot/only-dev-server',
             './src/js/newMenu/achievementList.js'
         ],
-        'newMenu/demandList': ['webpack-dev-server/client?http://192.168.0.190', // WebpackDevServer host and port
+        'newMenu/demandList': ['webpack-dev-server/client?http://192.168.0.188', // WebpackDevServer host and port
             'webpack/hot/only-dev-server',
             './src/js/newMenu/demandList.js'
         ],
-        'newMenu/services': ['webpack-dev-server/client?http://192.168.0.190', // WebpackDevServer host and port
+        'newMenu/services': ['webpack-dev-server/client?http://192.168.0.188', // WebpackDevServer host and port
             'webpack/hot/only-dev-server',
             './src/js/newMenu/services.js'
         ],
-        'newMenu/serviceList': ['webpack-dev-server/client?http://192.168.0.190', // WebpackDevServer host and port
+        'newMenu/serviceList': ['webpack-dev-server/client?http://192.168.0.188', // WebpackDevServer host and port
             'webpack/hot/only-dev-server',
             './src/js/newMenu/serviceList.js'
         ],
-        'newMenu/serviceDetails': ['webpack-dev-server/client?http://192.168.0.190', // WebpackDevServer host and port
+        'newMenu/serviceDetails': ['webpack-dev-server/client?http://192.168.0.188', // WebpackDevServer host and port
             'webpack/hot/only-dev-server',
             './src/js/newMenu/serviceDetails.js'
         ],
-        'newMenu/shopList': ['webpack-dev-server/client?http://192.168.0.190', // WebpackDevServer host and port
+        'newMenu/shopList': ['webpack-dev-server/client?http://192.168.0.188', // WebpackDevServer host and port
             'webpack/hot/only-dev-server',
             './src/js/newMenu/shopList.js'
         ],
-        'newMenu/patentList': ['webpack-dev-server/client?http://192.168.0.190', // WebpackDevServer host and port
+        'newMenu/patentList': ['webpack-dev-server/client?http://192.168.0.188', // WebpackDevServer host and port
             'webpack/hot/only-dev-server',
             './src/js/newMenu/patentList.js'
         ],
-        'newMenu/tradingIndex': ['webpack-dev-server/client?http://192.168.0.190', // WebpackDevServer host and port
+        'newMenu/tradingIndex': ['webpack-dev-server/client?http://192.168.0.188', // WebpackDevServer host and port
             'webpack/hot/only-dev-server',
             './src/js/newMenu/tradingIndex.js'
         ],
-        'newMenu/patent': ['webpack-dev-server/client?http://192.168.0.190', // WebpackDevServer host and port
+        'newMenu/patent': ['webpack-dev-server/client?http://192.168.0.188', // WebpackDevServer host and port
             'webpack/hot/only-dev-server',
             './src/js/newMenu/patent.js'
         ],
-        'newMenu/companyProfile': ['webpack-dev-server/client?http://192.168.0.190', // WebpackDevServer host and port
+        'newMenu/companyProfile': ['webpack-dev-server/client?http://192.168.0.188', // WebpackDevServer host and port
             'webpack/hot/only-dev-server',
             './src/js/newMenu/companyProfile.js'
         ],
-        'newMenu/continueHigh': ['webpack-dev-server/client?http://192.168.0.190', // WebpackDevServer host and port
+        'newMenu/continueHigh': ['webpack-dev-server/client?http://192.168.0.188', // WebpackDevServer host and port
             'webpack/hot/only-dev-server',
             './src/js/newMenu/continueHigh.js'
         ],
-        'newMenu/practicalPatent': ['webpack-dev-server/client?http://192.168.0.190', // WebpackDevServer host and port
+        'newMenu/practicalPatent': ['webpack-dev-server/client?http://192.168.0.188', // WebpackDevServer host and port
             'webpack/hot/only-dev-server',
             './src/js/newMenu/continueHigh.js'
         ],
-        'newMenu/militaryProject': ['webpack-dev-server/client?http://192.168.0.190', // WebpackDevServer host and port
+        'newMenu/militaryProject': ['webpack-dev-server/client?http://192.168.0.188', // WebpackDevServer host and port
             'webpack/hot/only-dev-server',
             './src/js/newMenu/continueHigh.js'
         ],
-        'newMenu/safeguarding': ['webpack-dev-server/client?http://192.168.0.190', // WebpackDevServer host and port
+        'newMenu/safeguarding': ['webpack-dev-server/client?http://192.168.0.188', // WebpackDevServer host and port
             'webpack/hot/only-dev-server',
             './src/js/newMenu/safeguarding.js'
         ],
-        'evaluation/evaluate': ['webpack-dev-server/client?http://192.168.0.190', // WebpackDevServer host and port
+        'evaluation/evaluate': ['webpack-dev-server/client?http://192.168.0.188', // WebpackDevServer host and port
             'webpack/hot/only-dev-server',
             './src/js/newMenu/evaluate.js'
         ],
-        'newMenu/adviserList': ['webpack-dev-server/client?http://192.168.0.190', // WebpackDevServer host and port
+        'newMenu/adviserList': ['webpack-dev-server/client?http://192.168.0.188', // WebpackDevServer host and port
             'webpack/hot/only-dev-server',
             './src/js/newMenu/adviserList.js'
         ],
-        'newMenu/adviserDetail': ['webpack-dev-server/client?http://192.168.0.190', // WebpackDevServer host and port
+        'newMenu/adviserDetail': ['webpack-dev-server/client?http://192.168.0.188', // WebpackDevServer host and port
             'webpack/hot/only-dev-server',
             './src/js/newMenu/adviserDetail.js'
         ],
-        'newMenu/adviser': ['webpack-dev-server/client?http://192.168.0.190', // WebpackDevServer host and port
+        'newMenu/adviser': ['webpack-dev-server/client?http://192.168.0.188', // WebpackDevServer host and port
             'webpack/hot/only-dev-server',
             './src/js/newMenu/adviser.js'
         ],