Pārlūkot izejas kodu

多版本技淘百问

dev01 1 gadu atpakaļ
vecāks
revīzija
2dfeb8e897
15 mainītis faili ar 2691 papildinājumiem un 484 dzēšanām
  1. BIN
      img/bwlogo.jpg
  2. 1 0
      img/copy.svg
  3. 1 0
      img/light.svg
  4. 1 0
      img/send.svg
  5. 982 224
      package-lock.json
  6. 2 1
      package.json
  7. 338 0
      src/css/answers.css
  8. 195 0
      src/js/answers.js
  9. 240 0
      src/js/answers0.js
  10. 187 0
      src/js/answers1.js
  11. 196 0
      src/js/answers2.js
  12. 200 0
      src/js/answers3.js
  13. 78 0
      template/newMenu/answers.html
  14. 6 0
      webpack.config.js
  15. 264 259
      webpack/entry.config.js

BIN
img/bwlogo.jpg


+ 1 - 0
img/copy.svg

@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 13.58 15.85"><defs><style>.cls-1{fill:#b6b9c1;}</style></defs><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><path class="cls-1" d="M9.44,3a1.14,1.14,0,0,1,1.13,1.13V14.72a1.14,1.14,0,0,1-1.13,1.13H1.13A1.14,1.14,0,0,1,0,14.72V4.15A1.14,1.14,0,0,1,1.13,3ZM9.06,4.53H1.51v9.81H9.06ZM12.45,0a1.13,1.13,0,0,1,1.13,1v10.3a.75.75,0,0,1-1.5.09V1.51H4.53A.76.76,0,0,1,3.78.84V.75A.75.75,0,0,1,4.44,0h8Z"/></g></g></svg>

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 0
img/light.svg


+ 1 - 0
img/send.svg

@@ -0,0 +1 @@
+<svg id="图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19.84 19.84"><defs><style>.cls-1{fill:#3171ec;}</style></defs><polygon class="cls-1" points="18.61 9.92 2.36 19.3 2.36 10.63 7.78 10.63 7.78 9.21 2.36 9.21 2.36 0.54 18.61 9.92"/></svg>

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 982 - 224
package-lock.json


+ 2 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "aft-portal",
-  "version": "2.2.20",
+  "version": "2.2.22",
   "description": "",
   "main": "index.js",
   "scripts": {
@@ -43,6 +43,7 @@
     "webpack-dev-server": "^2.4.1"
   },
   "dependencies": {
+    "@microsoft/fetch-event-source": "^2.0.1",
     "bootstrap": "^3.3.7",
     "bootstrap-loader": "^2.1.0",
     "bootstrap-sass": "^3.3.7",

+ 338 - 0
src/css/answers.css

@@ -0,0 +1,338 @@
+.basic_info {
+  position: relative;
+  /* height: 100vh; */
+  min-height: 100vh;
+  height: 100%;
+  /* width: 100%; */
+  max-width: 980px;
+  padding: 0 20px 200px;
+  margin: auto;
+  background: #fff;
+
+}
+
+.title {
+  text-align: center;
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  justify-content: center;
+}
+
+.logo {
+  width: 200px;
+  height: 200px;
+}
+
+.title div {
+  font-size: 30px;
+  font-weight: 500;
+  color: inherit;
+}
+
+.title div {
+  text-align: left;
+  padding: 0;
+}
+
+.contentCenter {
+  display: flex;
+  flex-grow: 1;
+  flex-flow: column;
+  min-width: 0;
+  /* width: 100%; */
+  margin: auto;
+  font-size: 1rem;
+
+  padding: 0 20px;
+
+}
+
+.basic_ltit {
+  display: flex;
+}
+
+.basic_icon {
+  width: 22px;
+  height: 22px;
+  position: relative;
+  top: -1px;
+  background: url(../../img/light.svg);
+  background-repeat: no-repeat;
+}
+
+.basic_tips {
+  padding-left: 5px;
+  font-size: 16px;
+  color: #3171ec;
+}
+
+.basic_items {
+  background: #f2f4f9;
+  font-size: 16px;
+  color: #727b8e;
+  padding: 10px 15px;
+  border-radius: 5px;
+  margin-top: 12px;
+  cursor: pointer;
+}
+
+.basic_content {
+  position: fixed;
+  bottom: 0;
+  background-color: #fff;
+  border-top: 1px solid #eff2f5;
+  padding: 20px 0 50px;
+  width: 100%;
+
+}
+
+.basic_bottom {
+  display: flex;
+  align-items: center;
+  padding: 6px 6px;
+  border-radius: 10px;
+  box-shadow: 0 0 10px 0 #e5e7ec;
+  border: 1px solid #ced5e0;
+  width: 48%;
+  margin: 0 auto;
+
+}
+
+
+.ant-input {
+  border: 0 solid #cdcdcd;
+  resize: none;
+  /* max-height: 80px; */
+  /* color: #4a515e; */
+  max-height: 200px;
+  font-weight: 400;
+  /* box-sizing: border-box; */
+  margin: 0;
+  font-variant: tabular-nums;
+  list-style: none;
+  font-feature-settings: "tnum";
+  position: relative;
+  display: inline-block;
+  width: 100%;
+  padding: 4px 11px;
+  color: rgba(0, 0, 0, .65);
+  font-size: 16px;
+  line-height: 1.5;
+  background-color: #fff;
+  background-image: none;
+  border-radius: 4px;
+  transition: all .3s;
+
+}
+
+.ant-input:focus {
+  outline: none;
+}
+
+.ant-input::-moz-placeholder {
+  color: #bfbfbf;
+  opacity: 1
+}
+
+.ant-input:-ms-input-placeholder {
+  color: #bfbfbf
+}
+
+.ant-input::-webkit-input-placeholder {
+  color: #bfbfbf
+}
+
+.ant-but {
+  background: none;
+  color: #fff;
+  border: 0;
+  width: 38px;
+  height: 38px;
+  padding: 10px;
+  min-width: 28px;
+  min-height: 28px;
+  border-radius: 50%;
+  text-align: center;
+  padding: 5px;
+  box-shadow: none;
+  cursor: pointer;
+}
+
+/* 记录 */
+.message_question {
+  box-sizing: border-box;
+  color: rgb(73, 80, 87);
+  display: block;
+  font-size: 16px;
+  font-weight: 400;
+  line-height: 24px;
+  margin-top: 15px;
+  text-align: right;
+  text-size-adjust: 100%;
+
+}
+
+.message_answer {
+  margin-top: 15px;
+  text-align: start;
+}
+
+.basic_chat {
+  display: none;
+}
+
+
+.message_question>.message_content {
+  display: inline-block;
+  background-color: rgb(41, 148, 255);
+  box-sizing: border-box;
+  color: #fff;
+  margin-right: 12px;
+  max-width: 100%;
+  text-align: left;
+  border-radius: 20px;
+
+}
+
+.message_answer>.message_content {
+  display: inline-block;
+  background-color: rgb(245, 246, 250);
+  /* background-color: #fff; */
+  box-sizing: border-box;
+  margin-right: 12px;
+  max-width: 100%;
+  text-align: left;
+  border-radius: 20px;
+
+}
+
+.message_content_inner {
+  word-break: break-all;
+  padding: 20px;
+  font-size: 16px;
+}
+
+.copycode {
+  /* white-space: pre-line; */
+  /* display: none; */
+}
+
+.message_btn {
+  width: 100%;
+  display: none;
+  float: left;
+  border-top: 1px solid #eee;
+  color: #afb1b0;
+  padding: 4px 20px;
+}
+
+.copy_btn {
+  padding: 6px 1px;
+  clear: both;
+  position: relative;
+  cursor: pointer;
+  font-size: 12px;
+  color: #9ea6b0;
+  display: flex;
+  flex-wrap: nowrap;
+}
+
+.message_btn .copy_btn i.icon {
+  margin-right: 2px;
+  width: 14px;
+  height: 14px;
+  display: inline-block;
+  background: url(../../img/copy.svg) no-repeat;
+  background-size: 86%;
+  position: relative;
+  top: 3px;
+}
+
+/* 动画 */
+.content {
+  height: 20px;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
+.content>div {
+  width: 5px;
+  height: 5px;
+  margin: 2px;
+  /* background-color: #33e5e5; */
+  background-color: #3171EC;
+  border-radius: 50%;
+  display: inline-block;
+  animation: action 1.5s infinite ease-in-out;
+  animation-fill-mode: both;
+}
+
+.content .point1 {
+  animation-delay: -0.3s;
+}
+
+.content .point2 {
+  animation-delay: -0.1s;
+}
+
+.basic_maintenance{
+  display: flex;
+  height:100vh;
+  align-items: center;
+  justify-content: center;
+  font-size: 30px;
+
+}
+
+@keyframes action {
+
+  0%,
+  80%,
+  100% {
+    transform: scale(0);
+  }
+
+  40% {
+    transform: scale(1.0);
+  }
+}
+
+@media screen and (max-width:768px) {
+  .basic_info {
+    padding: 0 20px 100px;
+    max-width: 100% !important;
+  }
+
+  .logo {
+    width: 120px;
+    height: 120px;
+  }
+
+  .title {
+    padding: 10px 0;
+  }
+
+  .title div {
+    font-size: 16px;
+    font-weight: bold;
+  }
+
+  .contentCenter {
+    padding: 0;
+  }
+
+  .basic_content {
+    padding: 10px 0;
+  }
+
+  .basic_bottom {
+    width: 90%;
+  }
+
+  .message_content_inner {
+    padding: 13px 20px;
+  }
+
+}

+ 195 - 0
src/js/answers.js

@@ -0,0 +1,195 @@
+import 'css/newMenu/public.css';
+import 'css/newMenu/header.css'
+import 'css/answers.css';
+import { fetchEventSource } from '@microsoft/fetch-event-source';
+
+// 
+
+var mytextarea = document.getElementById('textarea');
+
+
+// 提示框渐隐函数
+function msg(mess) {
+  if ($('.smg').hasClass('active')) {
+    return;
+  }
+  $('.smg').addClass('active');
+  $('#msg').val(mess);
+  setTimeout(function () {
+    $('.smg').removeClass('active')
+    $('#msg').val('');
+  }, 2000)
+}
+
+// 点击复制
+$(".chat_item").on('click', '.message_btn', function (e) {
+  $('.copycode').removeClass("copytext");
+  // $(this).find('.copycode').addClass("copytext");
+  $(this).siblings('div').addClass("copytext");
+  const range = document.createRange(); //创建range对象
+  range.selectNode(document.getElementsByClassName('copytext')[0]);
+  const selection = window.getSelection();  //创建 selection对象
+  if (selection.rangeCount > 0) selection.removeAllRanges(); //如果页面已经有选取了的话,会自动删除这个选区,没有选区的话,会把这个选取加入选区
+  selection.addRange(range); //将range对象添加到selection选区当中,会高亮文本块
+  document.execCommand('copy'); //复制选中的文字到剪贴板
+  msg('复制成功')
+  selection.removeRange(range); // 移除选中的元素
+});
+
+// 点击推荐
+$('.basic_items').click(function () {
+  onOk($(this).html());
+});
+
+// 回车事件
+mytextarea.onkeydown = (e) => {
+  if (e.keyCode == 13 && e.shiftKey) {
+    // 阻止原生的换行事件
+    e.preventDefault();
+    // 手动换行
+    mytextarea.value += "\n";
+  } else if (e.keyCode == 13) {
+    // 阻止原生的换行事件
+    e.preventDefault();
+    onOk(mytextarea.value);
+  }
+}
+
+// 点击搜索
+$('.ant-but').click(function () {
+  onOk(mytextarea.value)
+});
+
+// 发送请求
+var sendLoading = false;
+var history = []
+function onOk(val) {
+  if (sendLoading) {
+    return
+  }
+
+  if (!val) {
+    msg('输入的内容不能为空,请说点什么');
+    return
+  }
+  $(".basic_list").css("display", "none");
+  $(".basic_chat").css("display", "block");
+
+  sendLoading = true
+  addUserMessage(val)
+  addBotMessage()
+  window.scrollTo(0, document.documentElement.scrollHeight)
+
+  const url = 'http://172.16.1.160:8800/stream'
+  const ctrl = new AbortController();
+  const eventSource = fetchEventSource(url,
+    {
+      method: 'POST',
+      headers: {
+        'content-type': "application/json"
+      },
+      body: JSON.stringify({ "query": val, "history": history }),
+      signal: ctrl.signal,
+      onmessage(res) {
+        // console.log(res)
+        // 清除remove产生的空格
+        if (par.children.length > 0) {
+          par.innerHTML = ""
+        }
+        if (!!res.data) {
+          let datas = JSON.parse(res.data)
+          if (datas.response) {
+            history = datas.history || []
+            appendMessage(datas.response)
+            if (datas.finished) {
+              sendLoading = false
+              par.nextElementSibling.style.display = "block"
+            }
+          }
+        }
+      },
+      onclose() {
+        console.log("onclose")
+        sendLoading = false
+        ctrl.abort()
+        eventSource.close();
+      },
+      onerror(err) {
+        console.log("onerror", err)
+        sendLoading = false
+        ctrl.abort()
+        eventSource.close();
+      }
+    })
+
+}
+
+// 自适应高度
+bootText('textarea', 60) // 第一个参数是class 或者 id   第二个参数是这个class或者id对象的最小高度
+function bootText(cls, minHeight) {
+  var idArr = $(cls); // 获取传进来的class或者id
+  $.each(idArr, function (k, v) { // 循环遍历 为每一个添加它自己的scrollHeight
+    $(v).css({
+      'min-height': v.scrollHeight + 'px',
+      'height': v.scrollHeight + 'px',
+      'overflow': 'auto'
+    })    // 其实这里换成overflow hidden效果更好 没滚动条
+  });
+  $(cls).on('input prototychange', function () { // 监听的事件 可以换成keyup等等 可以自行封装
+    var that = $(this);
+    that.css('height', '0') // 避免每次改变的时候高度都会增加的问题
+    if (that.val().length <= 0) { // 如果输入框内容空了  回到最小的高度
+      that.css({ 'height': minHeight + 'px', 'min-height': minHeight + 'px' })
+    } else { // 不是空的话 设置高度 
+      that.css('height', that[0].scrollHeight + 'px') // 这里也可以把最小高度一起改变
+    }
+  })
+}
+
+// 添加用户消息到窗口
+function addUserMessage(message) {
+  var messageElement = `
+  <div class="message_question">
+    <div class="message_content">
+      <div class="message_content_inner">
+        ${message}
+      </div>
+    </div>
+  </div>`;
+  $(".chat_item").append(messageElement);
+  mytextarea.value = "";
+}
+
+var par
+// 添加回复消息到窗口
+function addBotMessage() {
+  var messageElement = `
+  <div class="message_answer">
+    <div class="message_content">
+      <div class="message_content_inner copycode">
+        <div class="content" id="loading">
+          <div class="point1"></div>
+          <div class="point2"></div>
+          <div class="point3"></div>
+        </div>
+      </div>
+      <div class="message_btn" id="copy">
+        <div class="copy_btn">
+          <i class="icon"></i>
+          复制
+        </div>
+      </div>
+    </div>
+  </div>`;
+  $(".chat_item").append(messageElement);
+  par = document.getElementById("loading").parentNode;
+  mytextarea.value = "";
+}
+
+// 添加回复消息
+function appendMessage(message) {
+  $('#loading').remove()
+  $('.copycode').css("white-space", "pre-wrap")
+  par.innerHTML = message
+  window.scrollTo(0, document.documentElement.scrollHeight)
+}

+ 240 - 0
src/js/answers0.js

@@ -0,0 +1,240 @@
+import 'css/newMenu/public.css';
+import 'css/newMenu/header.css'
+import 'css/answers.css';
+import { fetchEventSource } from '@microsoft/fetch-event-source';
+
+// 第一版技淘百问(百度)
+
+var mytextarea = document.getElementById('textarea');
+
+
+// 提示框渐隐函数
+function msg(mess) {
+  if ($('.smg').hasClass('active')) {
+    return;
+  }
+  $('.smg').addClass('active');
+  $('#msg').val(mess);
+  setTimeout(function () {
+    $('.smg').removeClass('active')
+    $('#msg').val('');
+  }, 2000)
+}
+
+// 点击复制
+$(".chat_item").on('click', '.message_btn', function (e) {
+  $('.copycode').removeClass("copytext");
+  // $(this).find('.copycode').addClass("copytext");
+  $(this).siblings('div').addClass("copytext");
+  const range = document.createRange(); //创建range对象
+  range.selectNode(document.getElementsByClassName('copytext')[0]);
+  const selection = window.getSelection();  //创建 selection对象
+  if (selection.rangeCount > 0) selection.removeAllRanges(); //如果页面已经有选取了的话,会自动删除这个选区,没有选区的话,会把这个选取加入选区
+  selection.addRange(range); //将range对象添加到selection选区当中,会高亮文本块
+  document.execCommand('copy'); //复制选中的文字到剪贴板
+  msg('复制成功')
+  selection.removeRange(range); // 移除选中的元素
+});
+
+// 点击推荐
+$('.basic_items').click(function () {
+  onOk($(this).html());
+});
+
+// 回车事件
+mytextarea.onkeydown = (e) => {
+  if (e.keyCode == 13 && e.shiftKey) {
+    // 阻止原生的换行事件
+    e.preventDefault();
+    // 手动换行
+    mytextarea.value += "\n";
+  } else if (e.keyCode == 13) {
+    // 阻止原生的换行事件
+    e.preventDefault();
+    onOk(mytextarea.value);
+  }
+}
+
+// 点击搜索
+$('.ant-but').click(function () {
+  onOk(mytextarea.value)
+});
+
+var mesData = [];
+// 发送请求
+var sendLoading = false;
+var resultList = [];
+function onOk(val) {
+  if (sendLoading) {
+    return
+  }
+
+  if (!val) {
+    msg('输入的内容不能为空,请说点什么');
+    return
+  }
+  $(".basic_list").css("display", "none");
+  $(".basic_chat").css("display", "block");
+
+  resultList = []
+  newArr = []
+  i = 0
+
+  mesData.push({
+    role: "user",
+    content: val,
+  })
+  sendLoading = true
+  addUserMessage(val)
+  addBotMessage()
+  window.scrollTo(0, document.documentElement.scrollHeight)
+
+  const url = globalConfig.context + '/chat/send'
+  const ctrl = new AbortController();
+  const eventSource = fetchEventSource(url,
+    {
+      method: 'POST',
+      headers: {
+        'content-type': "application/json"
+      },
+      body: JSON.stringify({ "messages": mesData }),
+      signal: ctrl.signal,
+      onmessage(res) {
+        // console.log("===", res)
+        // 清除remove导致的空格
+        if (par.children.length > 0) {
+          par.innerHTML = ""
+        }
+        let datas = JSON.parse(res.data)
+        if (datas.result) {
+          resultList.push(datas.result)
+          onNewList()
+          // replaceClass(datas.result)
+        } else {
+          replaceClass(datas.error_msg || "")
+          sendLoading = false
+          ctrl.abort()
+          eventSource.close();
+        }
+      },
+      onclose() {
+        sendLoading = false
+        ctrl.abort()
+        eventSource.close();
+      },
+      onerror(err) {
+        mesData.push({
+          role: "assistant",
+          content: par.innerHTML || "",
+        })
+        sendLoading = false
+        ctrl.abort()
+        eventSource.close();
+      }
+    })
+
+}
+
+// 输出内容拆分处理
+var newArr = []
+function onNewList() {
+  if (resultList.length == 1) {
+    if (resultList[0].indexOf("<img src=") != -1) {
+      newArr = resultList
+    } else {
+      newArr = resultList[0].split('')
+    }
+  } else if (resultList.length > 1) {
+    let next = (resultList.slice(resultList.length - 1))[0]
+    newArr = newArr.concat(next.split(''))
+  }
+  typeWriter()
+}
+
+var i = 0;
+function typeWriter() {
+  if (i < newArr.length) {
+    replaceClass(newArr[i])
+    i++
+    setTimeout(typeWriter, 100);
+  } else if (i == newArr.length && i != 0) {
+    // 全部显示即可复制
+    par.nextElementSibling.style.display = "block"
+  }
+}
+
+// 自适应高度
+bootText('textarea', 60) // 第一个参数是class 或者 id   第二个参数是这个class或者id对象的最小高度
+function bootText(cls, minHeight) {
+  var idArr = $(cls); // 获取传进来的class或者id
+  $.each(idArr, function (k, v) { // 循环遍历 为每一个添加它自己的scrollHeight
+    $(v).css({
+      'min-height': v.scrollHeight + 'px',
+      'height': v.scrollHeight + 'px',
+      'overflow': 'auto'
+    })    // 其实这里换成overflow hidden效果更好 没滚动条
+  });
+  $(cls).on('input prototychange', function () { // 监听的事件 可以换成keyup等等 可以自行封装
+    var that = $(this);
+    that.css('height', '0') // 避免每次改变的时候高度都会增加的问题
+    if (that.val().length <= 0) { // 如果输入框内容空了  回到最小的高度
+      that.css({ 'height': minHeight + 'px', 'min-height': minHeight + 'px' })
+    } else { // 不是空的话 设置高度 
+      that.css('height', that[0].scrollHeight + 'px') // 这里也可以把最小高度一起改变
+    }
+  })
+}
+
+// 添加用户消息到窗口
+function addUserMessage(message) {
+  var messageElement = `
+  <div class="message_question">
+    <div class="message_content">
+      <div class="message_content_inner">
+        ${message}
+      </div>
+    </div>
+  </div>`;
+  $(".chat_item").append(messageElement);
+  mytextarea.value = "";
+}
+
+var par
+// 添加回复消息到窗口
+function addBotMessage() {
+  var messageElement = `
+  <div class="message_answer">
+    <div class="message_content">
+      <div class="message_content_inner copycode">
+        <div class="content" id="loading">
+          <div class="point1"></div>
+          <div class="point2"></div>
+          <div class="point3"></div>
+        </div>
+      </div>
+      <div class="message_btn" id="copy">
+        <div class="copy_btn">
+          <i class="icon"></i>
+          复制
+        </div>
+      </div>
+    </div>
+  </div>`;
+  $(".chat_item").append(messageElement);
+  par = document.getElementById("loading").parentNode;
+  mytextarea.value = "";
+}
+
+// 将动画替换为文字
+function replaceClass(innerHTML) {
+  $('#loading').remove()
+  $('.copycode').css("white-space", "pre-wrap")
+  // let html = innerHTML.replace(/\r\n/g, "<br/>")
+  par.innerHTML += innerHTML
+  window.scrollTo(0, document.documentElement.scrollHeight)
+}
+
+
+// $(".basic_info").css("display", "none");
+// $(".basic_content").css("display", "none");
+// $(".basic_maintenance").css("display", "block");

+ 187 - 0
src/js/answers1.js

@@ -0,0 +1,187 @@
+import 'css/newMenu/public.css';
+import 'css/newMenu/header.css'
+import 'css/answers.css';
+import { fetchEventSource } from '@microsoft/fetch-event-source';
+
+// 第二版
+
+var mytextarea = document.getElementById('textarea');
+
+var timestamp = new Date().getTime();
+
+var socket = new WebSocket(`ws://chat.xunmengren.net:11000/ws/${timestamp}`);
+
+// 监听WebSocket连接建立成功的事件
+socket.onopen = function (event) {
+  console.log('WebSocket连接成功');
+};
+
+// 监听WebSocket收到服务器消息的事件
+socket.onmessage = function (event) {
+  var message = JSON.parse(event.data).text;
+  appendMessage(message);
+};
+
+// WebSocket连接关闭,执行相应操作
+socket.onclose = function (event) {
+  console.log('WebSocket连接关闭');
+};
+
+// 监听WebSocket连接错误的事件
+socket.onerror = function (error) {
+  console.error('WebSocket连接错误');
+};
+
+
+// 提示框渐隐函数
+function msg(mess) {
+  if ($('.smg').hasClass('active')) {
+    return;
+  }
+  $('.smg').addClass('active');
+  $('#msg').val(mess);
+  setTimeout(function () {
+    $('.smg').removeClass('active')
+    $('#msg').val('');
+  }, 2000)
+}
+
+// 点击复制
+$(".chat_item").on('click', '.message_btn', function (e) {
+  $('.copycode').removeClass("copytext");
+  $(this).siblings('div').addClass("copytext");
+  const range = document.createRange(); //创建range对象
+  range.selectNode(document.getElementsByClassName('copytext')[0]);
+  const selection = window.getSelection();  //创建 selection对象
+  if (selection.rangeCount > 0) selection.removeAllRanges(); //如果页面已经有选取了的话,会自动删除这个选区,没有选区的话,会把这个选取加入选区
+  selection.addRange(range); //将range对象添加到selection选区当中,会高亮文本块
+  document.execCommand('copy'); //复制选中的文字到剪贴板
+  msg('复制成功')
+  selection.removeRange(range); // 移除选中的元素
+});
+
+// 点击推荐
+$('.basic_items').click(function () {
+  onOk($(this).html());
+});
+
+// 回车事件
+mytextarea.onkeydown = (e) => {
+  if (e.keyCode == 13 && e.shiftKey) {
+    // 阻止原生的换行事件
+    e.preventDefault();
+    // 手动换行
+    mytextarea.value += "\n";
+  } else if (e.keyCode == 13) {
+    // 阻止原生的换行事件
+    e.preventDefault();
+    onOk(mytextarea.value);
+  }
+}
+
+// 点击搜索
+$('.ant-but').click(function () {
+  onOk(mytextarea.value)
+});
+
+var sendLoading = false;
+function onOk(val) {
+  // if (sendLoading) {
+  //   return
+  // }
+  if (!val) {
+    msg('输入的内容不能为空,请说点什么');
+    return
+  }
+  $(".basic_list").css("display", "none");
+  $(".basic_chat").css("display", "block");
+
+  sendLoading = true
+  addUserMessage(val)
+  addBotMessage()
+  window.scrollTo(0, document.documentElement.scrollHeight)
+
+  socket.send(JSON.stringify(
+    {
+      "type": "text",
+      "msg": val
+    }
+  ));
+
+}
+
+// 自适应高度
+bootText('textarea', 60) // 第一个参数是class 或者 id   第二个参数是这个class或者id对象的最小高度
+function bootText(cls, minHeight) {
+  var idArr = $(cls); // 获取传进来的class或者id
+  $.each(idArr, function (k, v) { // 循环遍历 为每一个添加它自己的scrollHeight
+    $(v).css({
+      'min-height': v.scrollHeight + 'px',
+      'height': v.scrollHeight + 'px',
+      'overflow': 'auto'
+    })    // 其实这里换成overflow hidden效果更好 没滚动条
+  });
+  $(cls).on('input prototychange', function () { // 监听的事件 可以换成keyup等等 可以自行封装
+    var that = $(this);
+    that.css('height', '0') // 避免每次改变的时候高度都会增加的问题
+    if (that.val().length <= 0) { // 如果输入框内容空了  回到最小的高度
+      that.css({ 'height': minHeight + 'px', 'min-height': minHeight + 'px' })
+    } else { // 不是空的话 设置高度 
+      that.css('height', that[0].scrollHeight + 'px') // 这里也可以把最小高度一起改变
+    }
+  })
+}
+
+// 添加用户消息到窗口
+function addUserMessage(message) {
+  var messageElement = `
+  <div class="message_question">
+    <div class="message_content">
+      <div class="message_content_inner">
+        ${message}
+      </div>
+    </div>
+  </div>`;
+  $(".chat_item").append(messageElement);
+  mytextarea.value = "";
+}
+
+var par
+// 添加回复消息到窗口
+function addBotMessage() {
+  var messageElement = `
+  <div class="message_answer">
+    <div class="message_content">
+      <div class="message_content_inner copycode" id="copycode">
+        <div class="content" id="loading">
+          <div class="point1"></div>
+          <div class="point2"></div>
+          <div class="point3"></div>
+        </div>
+      </div>
+      <div class="message_btn" id="copy">
+        <div class="copy_btn">
+          <i class="icon"></i>
+          复制
+        </div>
+      </div>
+    </div>
+  </div>`;
+  $(".chat_item").append(messageElement);
+  par = document.getElementById("loading").parentNode;
+  mytextarea.value = "";
+}
+
+// $(".basic_info").css("display", "none");
+// $(".basic_content").css("display", "none");
+// $(".basic_maintenance").css("display", "block");
+
+
+// 添加回复消息
+function appendMessage(message) {
+  $('#loading').remove()
+  $('.copycode').css("white-space", "pre-wrap")
+  par.innerHTML = message
+  window.scrollTo(0, document.documentElement.scrollHeight)
+  par.nextElementSibling.style.display = "block"
+}

+ 196 - 0
src/js/answers2.js

@@ -0,0 +1,196 @@
+import 'css/newMenu/public.css';
+import 'css/newMenu/header.css'
+import 'css/answers.css';
+import { fetchEventSource } from '@microsoft/fetch-event-source';
+
+
+var mytextarea = document.getElementById('textarea');
+
+
+// 提示框渐隐函数
+function msg(mess) {
+  if ($('.smg').hasClass('active')) {
+    return;
+  }
+  $('.smg').addClass('active');
+  $('#msg').val(mess);
+  setTimeout(function () {
+    $('.smg').removeClass('active')
+    $('#msg').val('');
+  }, 2000)
+}
+
+// 点击复制
+$(".chat_item").on('click', '.message_btn', function (e) {
+  $('.copycode').removeClass("copytext");
+  // $(this).find('.copycode').addClass("copytext");
+  $(this).siblings('div').addClass("copytext");
+  const range = document.createRange(); //创建range对象
+  range.selectNode(document.getElementsByClassName('copytext')[0]);
+  const selection = window.getSelection();  //创建 selection对象
+  if (selection.rangeCount > 0) selection.removeAllRanges(); //如果页面已经有选取了的话,会自动删除这个选区,没有选区的话,会把这个选取加入选区
+  selection.addRange(range); //将range对象添加到selection选区当中,会高亮文本块
+  document.execCommand('copy'); //复制选中的文字到剪贴板
+  msg('复制成功')
+  selection.removeRange(range); // 移除选中的元素
+});
+
+// 点击推荐
+$('.basic_items').click(function () {
+  onOk($(this).html());
+});
+
+// 回车事件
+mytextarea.onkeydown = (e) => {
+  if (e.keyCode == 13 && e.shiftKey) {
+    // 阻止原生的换行事件
+    e.preventDefault();
+    // 手动换行
+    mytextarea.value += "\n";
+  } else if (e.keyCode == 13) {
+    // 阻止原生的换行事件
+    e.preventDefault();
+    onOk(mytextarea.value);
+  }
+}
+
+// 点击搜索
+$('.ant-but').click(function () {
+  onOk(mytextarea.value)
+});
+
+// 发送请求
+var sendLoading = false;
+var resultList = [];
+var history = []
+function onOk(val) {
+  if (sendLoading) {
+    return
+  }
+  if (!val) {
+    msg('输入的内容不能为空,请说点什么');
+    return
+  }
+  $(".basic_list").css("display", "none");
+  $(".basic_chat").css("display", "block");
+  resultList = []
+  sendLoading = true
+  addUserMessage(val)
+  addBotMessage()
+  window.scrollTo(0, document.documentElement.scrollHeight)
+
+  $.ajax({
+    method: 'POST',
+    dataType: 'json',
+    url: 'http://127.0.0.1:8000/api',
+    data: JSON.stringify({ prompt: val, history, }),
+  }).done(data => {
+    resultList.push(data.response)
+    history.push(data.history)
+    onNewList()
+  })
+
+}
+
+// 输出内容拆分处理
+var newArr = []
+function onNewList() {
+  if (resultList.length == 1) {
+    if (resultList[0].indexOf("<img src=") != -1) {
+      newArr = resultList
+    } else {
+      newArr = resultList[0].split('')
+    }
+  } else if (resultList.length > 1) {
+    let next = (resultList.slice(resultList.length - 1))[0]
+    newArr = newArr.concat(next.split(''))
+  }
+  typeWriter()
+}
+
+var i = 0;
+function typeWriter() {
+  if (i < newArr.length) {
+    replaceClass(newArr[i])
+    i++
+    setTimeout(typeWriter, 100);
+  } else if (i == newArr.length && i != 0) {
+    // 全部显示即可复制
+    par.nextElementSibling.style.display = "block"
+  }
+}
+
+// 将动画替换为文字
+function replaceClass(innerHTML) {
+  $('#loading').remove()
+  // $('.copycode').css("white-space", "pre-wrap")
+  par.innerHTML += innerHTML
+  window.scrollTo(0, document.documentElement.scrollHeight)
+}
+
+// 自适应高度
+bootText('textarea', 60) // 第一个参数是class 或者 id   第二个参数是这个class或者id对象的最小高度
+function bootText(cls, minHeight) {
+  var idArr = $(cls); // 获取传进来的class或者id
+  $.each(idArr, function (k, v) { // 循环遍历 为每一个添加它自己的scrollHeight
+    $(v).css({
+      'min-height': v.scrollHeight + 'px',
+      'height': v.scrollHeight + 'px',
+      'overflow': 'auto'
+    })    // 其实这里换成overflow hidden效果更好 没滚动条
+  });
+  $(cls).on('input prototychange', function () { // 监听的事件 可以换成keyup等等 可以自行封装
+    var that = $(this);
+    that.css('height', '0') // 避免每次改变的时候高度都会增加的问题
+    if (that.val().length <= 0) { // 如果输入框内容空了  回到最小的高度
+      that.css({ 'height': minHeight + 'px', 'min-height': minHeight + 'px' })
+    } else { // 不是空的话 设置高度 
+      that.css('height', that[0].scrollHeight + 'px') // 这里也可以把最小高度一起改变
+    }
+  })
+}
+
+// 添加用户消息到窗口
+function addUserMessage(message) {
+  var messageElement = `
+  <div class="message_question">
+    <div class="message_content">
+      <div class="message_content_inner">
+        ${message}
+      </div>
+    </div>
+  </div>`;
+  $(".chat_item").append(messageElement);
+  mytextarea.value = "";
+}
+
+var par
+// 添加回复消息到窗口
+function addBotMessage() {
+  var messageElement = `
+  <div class="message_answer">
+    <div class="message_content">
+      <div class="message_content_inner copycode">
+        <div class="content" id="loading">
+          <div class="point1"></div>
+          <div class="point2"></div>
+          <div class="point3"></div>
+        </div>
+      </div>
+      <div class="message_btn" id="copy">
+        <div class="copy_btn">
+          <i class="icon"></i>
+          复制
+        </div>
+      </div>
+    </div>
+  </div>`;
+  $(".chat_item").append(messageElement);
+  par = document.getElementById("loading").parentNode;
+  mytextarea.value = "";
+}
+
+
+// $(".basic_info").css("display", "none");
+// $(".basic_content").css("display", "none");
+// $(".basic_maintenance").css("display", "block");

+ 200 - 0
src/js/answers3.js

@@ -0,0 +1,200 @@
+import 'css/newMenu/public.css';
+import 'css/newMenu/header.css'
+import 'css/answers.css';
+import { fetchEventSource } from '@microsoft/fetch-event-source';
+
+
+var mytextarea = document.getElementById('textarea');
+
+
+var socket = new WebSocket('wss://e30631a21774d87261.gradio.live/queue/join');
+
+// 监听WebSocket连接建立成功的事件
+socket.onopen = function (event) {
+  console.log('WebSocket连接成功');
+};
+
+// 监听WebSocket收到服务器消息的事件
+socket.onmessage = function (event) {
+  console.log("----", event)
+  // if(){
+
+  // }
+  // var message = JSON.parse(event.data).output.data[0][0][1]
+  // appendMessage(message);
+};
+
+// WebSocket连接关闭,执行相应操作
+socket.onclose = function (event) {
+  console.log('WebSocket连接关闭');
+};
+
+// 监听WebSocket连接错误的事件
+socket.onerror = function (error) {
+  console.error('WebSocket连接错误');
+};
+
+
+// 提示框渐隐函数
+function msg(mess) {
+  if ($('.smg').hasClass('active')) {
+    return;
+  }
+  $('.smg').addClass('active');
+  $('#msg').val(mess);
+  setTimeout(function () {
+    $('.smg').removeClass('active')
+    $('#msg').val('');
+  }, 2000)
+}
+
+// 点击复制
+$(".chat_item").on('click', '.message_btn', function (e) {
+  $('.copycode').removeClass("copytext");
+  $(this).siblings('div').addClass("copytext");
+  const range = document.createRange(); //创建range对象
+  range.selectNode(document.getElementsByClassName('copytext')[0]);
+  const selection = window.getSelection();  //创建 selection对象
+  if (selection.rangeCount > 0) selection.removeAllRanges(); //如果页面已经有选取了的话,会自动删除这个选区,没有选区的话,会把这个选取加入选区
+  selection.addRange(range); //将range对象添加到selection选区当中,会高亮文本块
+  document.execCommand('copy'); //复制选中的文字到剪贴板
+  msg('复制成功')
+  selection.removeRange(range); // 移除选中的元素
+});
+
+// 点击推荐
+$('.basic_items').click(function () {
+  onOk($(this).html());
+});
+
+// 回车事件
+mytextarea.onkeydown = (e) => {
+  if (e.keyCode == 13 && e.shiftKey) {
+    // 阻止原生的换行事件
+    e.preventDefault();
+    // 手动换行
+    mytextarea.value += "\n";
+  } else if (e.keyCode == 13) {
+    // 阻止原生的换行事件
+    e.preventDefault();
+    onOk(mytextarea.value);
+  }
+}
+
+// 点击搜索
+$('.ant-but').click(function () {
+  onOk(mytextarea.value)
+});
+
+var sendLoading = false;
+function onOk(val) {
+  // if (sendLoading) {
+  //   return
+  // }
+  if (!val) {
+    msg('输入的内容不能为空,请说点什么');
+    return
+  }
+  $(".basic_list").css("display", "none");
+  $(".basic_chat").css("display", "block");
+
+  sendLoading = true
+  addUserMessage(val)
+  addBotMessage()
+  window.scrollTo(0, document.documentElement.scrollHeight)
+
+  socket.send(JSON.stringify(
+    {
+      data: [
+        val,
+        [],
+        8192,
+        0.8,
+        0.95,
+        null,
+        null
+      ],
+      event_data: null,
+      fn_index: 0,
+      session_hash: "8umlotiueo"
+    }
+  ));
+
+}
+
+// 自适应高度
+bootText('textarea', 60) // 第一个参数是class 或者 id   第二个参数是这个class或者id对象的最小高度
+function bootText(cls, minHeight) {
+  var idArr = $(cls); // 获取传进来的class或者id
+  $.each(idArr, function (k, v) { // 循环遍历 为每一个添加它自己的scrollHeight
+    $(v).css({
+      'min-height': v.scrollHeight + 'px',
+      'height': v.scrollHeight + 'px',
+      'overflow': 'auto'
+    })    // 其实这里换成overflow hidden效果更好 没滚动条
+  });
+  $(cls).on('input prototychange', function () { // 监听的事件 可以换成keyup等等 可以自行封装
+    var that = $(this);
+    that.css('height', '0') // 避免每次改变的时候高度都会增加的问题
+    if (that.val().length <= 0) { // 如果输入框内容空了  回到最小的高度
+      that.css({ 'height': minHeight + 'px', 'min-height': minHeight + 'px' })
+    } else { // 不是空的话 设置高度 
+      that.css('height', that[0].scrollHeight + 'px') // 这里也可以把最小高度一起改变
+    }
+  })
+}
+
+// 添加用户消息到窗口
+function addUserMessage(message) {
+  var messageElement = `
+  <div class="message_question">
+    <div class="message_content">
+      <div class="message_content_inner">
+        ${message}
+      </div>
+    </div>
+  </div>`;
+  $(".chat_item").append(messageElement);
+  mytextarea.value = "";
+}
+
+var par
+// 添加回复消息到窗口
+function addBotMessage() {
+  var messageElement = `
+  <div class="message_answer">
+    <div class="message_content">
+      <div class="message_content_inner copycode" id="copycode">
+        <div class="content" id="loading">
+          <div class="point1"></div>
+          <div class="point2"></div>
+          <div class="point3"></div>
+        </div>
+      </div>
+      <div class="message_btn" id="copy">
+        <div class="copy_btn">
+          <i class="icon"></i>
+          复制
+        </div>
+      </div>
+    </div>
+  </div>`;
+  $(".chat_item").append(messageElement);
+  par = document.getElementById("loading").parentNode;
+  mytextarea.value = "";
+}
+
+
+// $(".basic_info").css("display", "none");
+// $(".basic_content").css("display", "none");
+// $(".basic_maintenance").css("display", "block");
+
+
+// 添加回复消息
+function appendMessage(message) {
+  $('#loading').remove()
+  $('.copycode').css("white-space", "pre-wrap")
+  par.innerHTML = message
+  window.scrollTo(0, document.documentElement.scrollHeight)
+  par.nextElementSibling.style.display = "block"
+}

+ 78 - 0
template/newMenu/answers.html

@@ -0,0 +1,78 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+  <meta charset="UTF-8">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
+  <meta http-equiv="X-UA-Compatible" content="ie=edge">
+  <title>技淘网-技淘百问</title>
+</head>
+
+<body>
+  <div class="container basic_info">
+    <div class="title">
+      <img class="logo" src="../../img/bwlogo.jpg" />
+      <div>
+        <div>我是技淘百问</div>
+        <div>科德全新一代知识增强大语言模型</div>
+        <div>助您高效获取科研领域专业信息</div>
+      </div>
+    </div>
+
+    <div class="contentCenter">
+      <div class="basic_list">
+        <div class="basic_ltit">
+          <div class="basic_icon"></div>
+          <span class="basic_tips">看看大家都在问什么?</span>
+        </div>
+        <div class="basic_items">实用新型专利主要应用哪些领域?</div>
+        <div class="basic_items">实用新型专利主要应用哪些领域?</div>
+        <div class="basic_items">实用新型专利主要应用哪些领域?</div>
+        <div class="basic_items">实用新型专利主要应用哪些领域?</div>
+        <div class="basic_items">实用新型专利主要应用哪些领域?</div>
+        <div class="basic_items">实用新型专利主要应用哪些领域?</div>
+      </div>
+      <div class="basic_chat">
+        <div class="chat_item">
+          <div class="message_question">
+            <div class="message_content">
+              <div class="message_content_inner">
+                写一首关于春天的七言绝句
+              </div>
+            </div>
+          </div>
+
+          <div class="message_answer">
+            <div class="message_content">
+              <div class="message_content_inner copycode">春至天地显新绿,几番风雨润花开。 蜂蝶翩翩舞翠枝,人间清爽迎春来。 莺歌燕舞声声动,百花争艳乐无边。
+                光明万物皆复苏,春风送暖入人心。
+              </div>
+              <div class="message_btn">
+                <div class="copy_btn">
+                  <i class="icon"></i>
+                  复制
+                </div>
+              </div>
+            </div>
+
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+
+  <div class="basic_content">
+    <div class="basic_bottom">
+      <textarea id="textarea" placeholder="在这里输入问题..." size="large" maxlength="500" class="ant-input"></textarea>
+      <button type="button" class="ant-but">
+        <img src="../../img/send.svg">
+      </button>
+    </div>
+  </div>
+
+  <div class="basic_maintenance">系统正在调试中...</div>
+
+  <div class="smg"><input type="text" name="msg" value="" id="msg" /></div>
+</body>
+
+</html>

+ 6 - 0
webpack.config.js

@@ -410,6 +410,12 @@ module.exports = (function () {
         //     chunks: ['newMenu/app/safeguardApp', 'vendors']
         // })
         new HtmlWebpackPlugin({
+          title: '技淘百问',
+          filename: 'html/newMenu/answers.html',
+          template: './template/newMenu/answers.html',
+          chunks: ['newMenu/answers','vendors']
+      }),
+        new HtmlWebpackPlugin({
             title: '高企自评',
             filename: 'html/evaluation/evaluate.html',
             template: './template/newMenu/evaluate.html',

+ 264 - 259
webpack/entry.config.js

@@ -1,262 +1,267 @@
 module.exports = {
-    prod: {
-        'index': './src/js/newMenu/index.js',
-        'eventPlanning': './src/js/eventPlanning.js',
-        'eventDtalis': './src/js/eventDtalis.js',
-        'search': './src/js/search.js',
-        'aboutUs': './src/js/aboutUs.js',
-        'contactUs': './src/js/contactUs.js',
-        'register': './src/js/register.js',
-        'thinkTank': './src/js/thinkTank.js',
-        'technologyTrading/achievementDetail': './src/js/technologyTrading/achievementDetail.js',
-        'technologyTrading/demandDetail': './src/js/technologyTrading/demandDetail.js',
-        'thinkTank/policyDetail': './src/js/thinkTank/policyDetail.js',
-        'thinkTank/policyList': './src/js/thinkTank/policyList.js',
-        'thinkTank/thinkerDetail': './src/js/thinkTank/thinkerDetail.js',
-        //newsApp
-        'news/newsDetailApp': './src/js/news/newsDetailApp.js',
-        'news/appCognizance': './src/js/news/appCognizance.js',
-        'news/agreement': './src/js/news/agreement.js',
-        /* 2018-06  新版科技需求 */
-        'newMenu/demand': './src/js/newMenu/demand.js',
-        'newMenu/achievement': './src/js/newMenu/achievement.js',
-        'newMenu/achievementList': './src/js/newMenu/achievementList.js',
-        'newMenu/demandList': './src/js/newMenu/demandList.js',
-        'newMenu/services': './src/js/newMenu/services.js',
-        'newMenu/serviceList': './src/js/newMenu/serviceList.js',
-        'newMenu/serviceDetails': './src/js/newMenu/serviceDetails.js',
-        'newMenu/shopList': './src/js/newMenu/shopList.js',
-        'newMenu/patentList': './src/js/newMenu/patentList.js',
-        'newMenu/tradingIndex': './src/js/newMenu/tradingIndex.js',
-        'newMenu/patent': './src/js/newMenu/patent.js',
-        'newMenu/companyProfile': './src/js/newMenu/companyProfile.js',
-        'newMenu/continueHigh': './src/js/newMenu/continueHigh.js',
-        'newMenu/practicalPatent': './src/js/newMenu/continueHigh.js',
-        'newMenu/militaryProject': './src/js/newMenu/continueHigh.js',
-        'newMenu/safeguarding': './src/js/newMenu/safeguarding.js',
-        //app
-        'evaluation/evaluate': './src/js/newMenu/evaluate.js',
-        'newMenu/adviserList': './src/js/newMenu/adviserList.js',
-        'newMenu/adviserDetail': './src/js/newMenu/adviserDetail.js',
-        'newMenu/adviser': './src/js/newMenu/adviser.js',
-        'newMenu/safeguardingList': './src/js/newMenu/safeguardingList.js',
-        'newMenu/safeguardingDetail': './src/js/newMenu/safeguardingDetail.js',
-        'newMenu/brandBuild': './src/js/newMenu/loading/brandBuild.js',
-        'newMenu/marketOpen': './src/js/newMenu/loading/marketOpen.js',
-        'newMenu/taxFinance': './src/js/newMenu/loading/taxFinance.js',
-        'newMenu/governmentSupport': './src/js/newMenu/loading/governmentSupport.js',
-        'newMenu/assessment': './src/js/newMenu/loading/assessment.js',
-        'newMenu/Invitation': './src/js/newMenu/loading/Invitation.js',
-        'newMenu/invRegister': './src/js/newMenu/loading/invRegister.js',
-        'newMenu/video': './src/js/video.js',
-        'newMenu/videoDetail': './src/js/videoDetail.js',
-        'facilitator': './src/js/facilitator/facilitator.js',
+  prod: {
+    'answers': './src/js/answers.js',
+    'index': './src/js/newMenu/index.js',
+    'eventPlanning': './src/js/eventPlanning.js',
+    'eventDtalis': './src/js/eventDtalis.js',
+    'search': './src/js/search.js',
+    'aboutUs': './src/js/aboutUs.js',
+    'contactUs': './src/js/contactUs.js',
+    'register': './src/js/register.js',
+    'thinkTank': './src/js/thinkTank.js',
+    'technologyTrading/achievementDetail': './src/js/technologyTrading/achievementDetail.js',
+    'technologyTrading/demandDetail': './src/js/technologyTrading/demandDetail.js',
+    'thinkTank/policyDetail': './src/js/thinkTank/policyDetail.js',
+    'thinkTank/policyList': './src/js/thinkTank/policyList.js',
+    'thinkTank/thinkerDetail': './src/js/thinkTank/thinkerDetail.js',
+    //newsApp
+    'news/newsDetailApp': './src/js/news/newsDetailApp.js',
+    'news/appCognizance': './src/js/news/appCognizance.js',
+    'news/agreement': './src/js/news/agreement.js',
+    /* 2018-06  新版科技需求 */
+    'newMenu/demand': './src/js/newMenu/demand.js',
+    'newMenu/achievement': './src/js/newMenu/achievement.js',
+    'newMenu/achievementList': './src/js/newMenu/achievementList.js',
+    'newMenu/demandList': './src/js/newMenu/demandList.js',
+    'newMenu/services': './src/js/newMenu/services.js',
+    'newMenu/serviceList': './src/js/newMenu/serviceList.js',
+    'newMenu/serviceDetails': './src/js/newMenu/serviceDetails.js',
+    'newMenu/shopList': './src/js/newMenu/shopList.js',
+    'newMenu/patentList': './src/js/newMenu/patentList.js',
+    'newMenu/tradingIndex': './src/js/newMenu/tradingIndex.js',
+    'newMenu/patent': './src/js/newMenu/patent.js',
+    'newMenu/companyProfile': './src/js/newMenu/companyProfile.js',
+    'newMenu/continueHigh': './src/js/newMenu/continueHigh.js',
+    'newMenu/practicalPatent': './src/js/newMenu/continueHigh.js',
+    'newMenu/militaryProject': './src/js/newMenu/continueHigh.js',
+    'newMenu/safeguarding': './src/js/newMenu/safeguarding.js',
+    //app
+    'evaluation/evaluate': './src/js/newMenu/evaluate.js',
+    'newMenu/adviserList': './src/js/newMenu/adviserList.js',
+    'newMenu/adviserDetail': './src/js/newMenu/adviserDetail.js',
+    'newMenu/adviser': './src/js/newMenu/adviser.js',
+    'newMenu/safeguardingList': './src/js/newMenu/safeguardingList.js',
+    'newMenu/safeguardingDetail': './src/js/newMenu/safeguardingDetail.js',
+    'newMenu/brandBuild': './src/js/newMenu/loading/brandBuild.js',
+    'newMenu/marketOpen': './src/js/newMenu/loading/marketOpen.js',
+    'newMenu/taxFinance': './src/js/newMenu/loading/taxFinance.js',
+    'newMenu/governmentSupport': './src/js/newMenu/loading/governmentSupport.js',
+    'newMenu/assessment': './src/js/newMenu/loading/assessment.js',
+    'newMenu/Invitation': './src/js/newMenu/loading/Invitation.js',
+    'newMenu/invRegister': './src/js/newMenu/loading/invRegister.js',
+    'newMenu/video': './src/js/video.js',
+    'newMenu/videoDetail': './src/js/videoDetail.js',
+    'facilitator': './src/js/facilitator/facilitator.js',
 
-        'newMenu/special': './src/js/newMenu/special.js',
-        'newMenu/specialDetail': './src/js/newMenu/specialDetail.js',
-    },
-    watch: {
-        'index': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/newMenu/index.js'
-        ],
-        'eventPlanning': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/eventPlanning.js'
-        ],
-        'eventDtalis': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/eventDtalis.js'
-        ],
-        'search': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/search.js'
-        ],
-        'aboutUs': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/aboutUs.js'
-        ],
-        'contactUs': ['webpack-dev-server/client?http://192.168.1.190',
-            'webpack/hot/only-dev-server',
-            './src/js/contactUs.js'
-        ],
-        'register': ['webpack-dev-server/client?http://192.168.1.190',
-            'webpack/hot/only-dev-server',
-            './src/js/register.js'
-        ],
-        'thinkTank': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/thinkTank.js'
-        ],
-        'technologyTrading/achievementDetail': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/technologyTrading/achievementDetail.js'
-        ],
-        'technologyTrading/demandDetail': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/technologyTrading/demandDetail.js'
-        ],
-        'thinkTank/policyDetail': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/thinkTank/policyDetail.js'
-        ],
-        'thinkTank/thinkerDetail': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/thinkTank/thinkerDetail.js'
-        ],
-        'thinkTank/policyList': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/thinkTank/policyList.js'
-        ],
-        // newsApp 
-        'news/newsDetailApp': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/news/newsDetailApp.js'
-        ],
-        'news/appCognizance': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/news/appCognizance.js'
-        ],
-        'news/agreement': ['webpack-dev-server/client?http://192.168.1.190', // 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.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/newMenu/demand.js'
-        ],
-        'newMenu/achievement': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/newMenu/achievement.js'
-        ],
-        'newMenu/achievementList': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/newMenu/achievementList.js'
-        ],
-        'newMenu/demandList': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/newMenu/demandList.js'
-        ],
-        'newMenu/services': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/newMenu/services.js'
-        ],
-        'newMenu/serviceList': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/newMenu/serviceList.js'
-        ],
-        'newMenu/serviceDetails': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/newMenu/serviceDetails.js'
-        ],
-        'newMenu/shopList': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/newMenu/shopList.js'
-        ],
-        'newMenu/patentList': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/newMenu/patentList.js'
-        ],
-        'newMenu/tradingIndex': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/newMenu/tradingIndex.js'
-        ],
-        'newMenu/patent': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/newMenu/patent.js'
-        ],
-        'newMenu/companyProfile': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/newMenu/companyProfile.js'
-        ],
-        'newMenu/continueHigh': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/newMenu/continueHigh.js'
-        ],
-        'newMenu/practicalPatent': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/newMenu/continueHigh.js'
-        ],
-        'newMenu/militaryProject': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/newMenu/continueHigh.js'
-        ],
-        'newMenu/safeguarding': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/newMenu/safeguarding.js'
-        ],
-        'evaluation/evaluate': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/newMenu/evaluate.js'
-        ],
-        'newMenu/adviserList': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/newMenu/adviserList.js'
-        ],
-        'newMenu/adviserDetail': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/newMenu/adviserDetail.js'
-        ],
-        'newMenu/adviser': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/newMenu/adviser.js'
-        ],
-        'newMenu/safeguardingList': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/newMenu/safeguardingList.js'
-        ],
-        'newMenu/safeguardingDetail': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/newMenu/safeguardingDetail.js'
-        ],
-        'newMenu/brandBuild': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/newMenu/loading/brandBuild.js'
-        ],
-        'newMenu/marketOpen': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/newMenu/loading/marketOpen.js'
-        ],
-        'newMenu/taxFinance': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/newMenu/loading/taxFinance.js'
-        ],
-        'newMenu/governmentSupport': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/newMenu/loading/governmentSupport.js'
-        ],
-        'newMenu/assessment': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/newMenu/loading/assessment.js'
-        ],
-        'newMenu/Invitation': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/newMenu/loading/Invitation.js'
-        ],
-        'newMenu/invRegister': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/newMenu/loading/invRegister.js'
-        ],
-        'newMenu/video': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/video.js'
-        ],
-        'newMenu/videoDetail': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/videoDetail.js'
-        ],
-        'facilitator': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/facilitator/facilitator.js'
-        ],
-        'newMenu/special': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/newMenu/special.js'
-        ],
-        'newMenu/specialDetail': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
-            'webpack/hot/only-dev-server',
-            './src/js/newMenu/specialDetail.js'
-        ],
-    }
+    'newMenu/special': './src/js/newMenu/special.js',
+    'newMenu/specialDetail': './src/js/newMenu/specialDetail.js',
+  },
+  watch: {
+    'index': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/newMenu/index.js'
+    ],
+    'eventPlanning': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/eventPlanning.js'
+    ],
+    'eventDtalis': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/eventDtalis.js'
+    ],
+    'search': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/search.js'
+    ],
+    'aboutUs': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/aboutUs.js'
+    ],
+    'contactUs': ['webpack-dev-server/client?http://192.168.1.190',
+      'webpack/hot/only-dev-server',
+      './src/js/contactUs.js'
+    ],
+    'answers': ['webpack-dev-server/client?http://192.168.1.190',
+    'webpack/hot/only-dev-server',
+    './src/js/answers.js'
+  ],
+    'register': ['webpack-dev-server/client?http://192.168.1.190',
+      'webpack/hot/only-dev-server',
+      './src/js/register.js'
+    ],
+    'thinkTank': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/thinkTank.js'
+    ],
+    'technologyTrading/achievementDetail': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/technologyTrading/achievementDetail.js'
+    ],
+    'technologyTrading/demandDetail': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/technologyTrading/demandDetail.js'
+    ],
+    'thinkTank/policyDetail': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/thinkTank/policyDetail.js'
+    ],
+    'thinkTank/thinkerDetail': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/thinkTank/thinkerDetail.js'
+    ],
+    'thinkTank/policyList': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/thinkTank/policyList.js'
+    ],
+    // newsApp 
+    'news/newsDetailApp': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/news/newsDetailApp.js'
+    ],
+    'news/appCognizance': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/news/appCognizance.js'
+    ],
+    'news/agreement': ['webpack-dev-server/client?http://192.168.1.190', // 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.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/newMenu/demand.js'
+    ],
+    'newMenu/achievement': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/newMenu/achievement.js'
+    ],
+    'newMenu/achievementList': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/newMenu/achievementList.js'
+    ],
+    'newMenu/demandList': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/newMenu/demandList.js'
+    ],
+    'newMenu/services': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/newMenu/services.js'
+    ],
+    'newMenu/serviceList': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/newMenu/serviceList.js'
+    ],
+    'newMenu/serviceDetails': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/newMenu/serviceDetails.js'
+    ],
+    'newMenu/shopList': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/newMenu/shopList.js'
+    ],
+    'newMenu/patentList': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/newMenu/patentList.js'
+    ],
+    'newMenu/tradingIndex': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/newMenu/tradingIndex.js'
+    ],
+    'newMenu/patent': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/newMenu/patent.js'
+    ],
+    'newMenu/companyProfile': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/newMenu/companyProfile.js'
+    ],
+    'newMenu/continueHigh': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/newMenu/continueHigh.js'
+    ],
+    'newMenu/practicalPatent': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/newMenu/continueHigh.js'
+    ],
+    'newMenu/militaryProject': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/newMenu/continueHigh.js'
+    ],
+    'newMenu/safeguarding': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/newMenu/safeguarding.js'
+    ],
+    'evaluation/evaluate': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/newMenu/evaluate.js'
+    ],
+    'newMenu/adviserList': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/newMenu/adviserList.js'
+    ],
+    'newMenu/adviserDetail': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/newMenu/adviserDetail.js'
+    ],
+    'newMenu/adviser': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/newMenu/adviser.js'
+    ],
+    'newMenu/safeguardingList': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/newMenu/safeguardingList.js'
+    ],
+    'newMenu/safeguardingDetail': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/newMenu/safeguardingDetail.js'
+    ],
+    'newMenu/brandBuild': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/newMenu/loading/brandBuild.js'
+    ],
+    'newMenu/marketOpen': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/newMenu/loading/marketOpen.js'
+    ],
+    'newMenu/taxFinance': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/newMenu/loading/taxFinance.js'
+    ],
+    'newMenu/governmentSupport': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/newMenu/loading/governmentSupport.js'
+    ],
+    'newMenu/assessment': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/newMenu/loading/assessment.js'
+    ],
+    'newMenu/Invitation': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/newMenu/loading/Invitation.js'
+    ],
+    'newMenu/invRegister': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/newMenu/loading/invRegister.js'
+    ],
+    'newMenu/video': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/video.js'
+    ],
+    'newMenu/videoDetail': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/videoDetail.js'
+    ],
+    'facilitator': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/facilitator/facilitator.js'
+    ],
+    'newMenu/special': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/newMenu/special.js'
+    ],
+    'newMenu/specialDetail': ['webpack-dev-server/client?http://192.168.1.190', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './src/js/newMenu/specialDetail.js'
+    ],
+  }
 };