瀏覽代碼

feat:增加各种新功能等

xzh 4 年之前
父節點
當前提交
d3765aa7c4

+ 227 - 0
shurufa/css/index.css

@@ -0,0 +1,227 @@
+*{
+  padding: 0;
+  margin: 0;
+     font-family:"Microsoft YaHei",微软雅黑,"MicrosoftJhengHei",华文细黑,STHeiti,MingLiu;
+     line-height: 1;
+}
+
+::-webkit-scrollbar {
+  width: 0.6rem;
+  height: 1rem;
+  background-color: #71471d;
+
+}
+
+::-webkit-scrollbar-thumb {
+  height: 5rem;
+  background-color: #EA9649;
+  outline: 0.5rem solid #EA9649;
+  outline-offset: -0.5rem;
+}
+
+::-webkit-scrollbar-thumb:hover {
+  height: 5rem;
+  background-color: #EA9649;
+}
+
+li{
+  list-style: none;
+}
+html,body{
+  width: 100%;
+  height: 100%;
+  font-size: 34px;
+}
+
+body{
+  position: relative;
+  color: #EA9649;
+  max-width: 100%;
+  margin: 0 auto;
+}
+
+button,input{
+    border: none;
+    outline: none;
+    background: none;
+    font-size: 1rem;		
+}
+
+
+
+.body{
+  width: 100%;
+  height: 100%;
+}
+
+.bg{
+  width: 100%;
+  top: 0;
+  position: absolute;
+  z-index: -1;
+}
+
+.content{
+  width: 90%;
+  margin: 0 auto;
+}
+
+.title{
+  text-align: center;
+  padding-top: 6%;
+}
+
+.input{
+  display: flex;
+  width: 100%;
+  font-size: 0;
+  position: relative;
+}
+
+.input input{
+  border: #EA9649 0.13rem solid;
+  border-right: none;
+  background: none;
+  color: #EA9649;
+  padding-left: 0.63rem;
+  padding-right: 2.63rem;
+  margin: 0;
+  flex: 30;
+}
+
+.input span{
+  display: inline-block;
+  height: 1rem;
+  padding: 0.63rem 1.25rem;
+  border-top: #EA9649 0.13rem solid;
+  border-bottom: #EA9649 0.13rem solid;
+  flex: 1;
+  text-align: center;
+}
+
+.input span img{
+  vertical-align: middle;
+  display: inline-block;
+  height: 100%;
+  opacity: 0;
+}
+
+.input .button{
+  flex: 3;
+  padding: 0.63rem 1.25rem;
+  background: #EA9649;
+  border-top: #EA9649 0.13rem solid;
+  border-bottom: #EA9649 0.13rem solid;
+  margin: 0;
+  font-size:1rem;
+  line-height: 1rem;
+  height: 1rem;
+  margin: 0 auto;
+  color: #000;
+  min-width: 15%;
+  text-align: center;
+}
+
+.result{
+  width: 100%;
+  margin: 0.63rem 0;
+  min-height: 1.88rem;
+}
+
+.result li{
+  list-style: none;
+  display: inline-block;
+  margin-right: 0.38rem;
+  padding: 0.13rem 0.25rem;
+  vertical-align: middle;
+}
+
+.result li:last-of-type{
+  margin-right: 0;
+}
+.result li img{
+  width: 1.25rem;
+  vertical-align: middle;
+}
+
+
+.result .active{
+  background: #EA9649;
+  color: #000;
+}
+
+#canvasWrap {
+  position:relative;
+  margin:0 auto;
+  width:100%;
+  height:40%;
+  min-height: 20rem;
+  border:0.13rem solid #EA9649;
+  font-size: 0;
+}
+
+#clear{
+  opacity: 0;
+}
+
+.cls{
+  text-align: center;
+  width: 100%;
+  position: fixed;
+  left: 50%;
+  transform: translateX(-50%);
+}
+
+.cls img{
+  width: 1.88rem;
+}
+
+.result-page{
+  display: none;
+}
+
+.reload{
+  margin-top: 0.5rem;
+  text-align: right;
+}
+
+#reload{
+  width: 1rem;
+}
+
+.result-page ul {
+  margin-left: 0.63rem;
+  margin-top: 0.5rem;
+  user-select: none;
+}
+
+.result-page ul li{
+  display: flex;
+  align-items: center;
+  margin-top: 0.63rem;
+  font-size: 1.2rem;
+}
+
+.result-page ul li img{
+  width: 7rem;
+  height: 7rem;
+  margin-right: 1.88rem;
+}
+.result-page ul li span{
+  width: 15.63rem;
+  line-height: 1.5;
+}
+
+.no-result{
+  text-align: center;
+  margin-top: 5rem;
+  display: none;
+}
+
+.no-result img{
+  width: 14.38rem;
+  height:auto;
+}
+.no-result p{
+  line-height: 1.5;
+}

二進制
shurufa/images/bg.png


二進制
shurufa/images/bodang.png


二進制
shurufa/images/close.png


二進制
shurufa/images/cls.png


二進制
shurufa/images/no-result.png


二進制
shurufa/images/reload.png


二進制
shurufa/images/二维码按钮.png


二進制
shurufa/images/搜索按钮.png


二進制
shurufa/images/暂停按钮.png


二進制
shurufa/images/点赞按钮(已触发).png


二進制
shurufa/images/点赞按钮(未触发).png


+ 57 - 0
shurufa/index.html

@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="UTF-8">
+  <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no">
+  <link rel="stylesheet" href="./css/index.css">
+  <title>手写</title>
+</head>
+<body>
+  <div class="body">
+    <!-- <img id="bg" class="bg" src="./images/bg.png" alt=""> -->
+    <div class="content">
+      <!-- <div class="title">搜索页面</div> -->
+      <div class="input">
+        <input id="input" type="text">
+        <span>
+          <img id="clsipt" src="./images/close.png" alt="">
+        </span>
+        <div id="search" class="button">搜索</div>
+      </div>
+      
+      <!-- 搜索页面 -->
+      <div class="search-page">
+        <ul class="result">
+          <li>
+            <ul id="result"></ul>
+          </li>
+          <li><img id="clear" src="./images/close.png" alt=""></li>
+        </ul>
+        <div id="canvasWrap">
+          <canvas id="canvas"></canvas>
+        </div>
+      </div>
+
+      <div class="result-page">
+        <div class="reload">
+          <img id="reload" src="./images/reload.png" alt="">
+        </div>
+        <ul>
+        </ul>
+        <div class="no-result">
+          <img src="./images/no-result.png" alt="">
+          <p>暂时没有结果呢,<br/>请试一下其他关键字</p>
+        </div>
+      </div>
+
+      <!-- <div class="cls">
+        <img src="./images/cls.png" alt="">
+      </div> -->
+
+    </div>
+  </div>
+  <script src="./js/jquery.min.js"></script>
+  <script src="./js/handwritingapi.js"></script>
+  <script src="./js/index.js?t=20200919"></script>
+</body>
+</html>

+ 295 - 0
shurufa/js/handwritingapi.js

@@ -0,0 +1,295 @@
+QQShuru = {};
+QQShuru.Util = {};
+QQShuru.Util.Browser = {};
+QQShuru.Util.Browser.isIE = (navigator.appName == "Microsoft Internet Explorer");
+
+QQShuru.Util.Ajax = {};
+QQShuru.Util.Ajax.get = function(a, c) {
+    var b = document.createElement("script");
+    b.setAttribute("charset", "utf-8");
+    b.id = Math.random();
+    document.getElementsByTagName("head")[0].appendChild(b);
+    b.src = a + "&c=" + c;
+    if (QQShuru.Util.Browser.isIE) {
+        b.onreadystatechange = function() {
+            if (b.readyState == "loaded") {
+                document.getElementsByTagName("head")[0].removeChild(b)
+            }
+        }
+    } else {
+        b.onload = function() {
+            document.getElementsByTagName("head")[0].removeChild(b)
+        }
+    }
+};
+QQShuru.Util.Event = {};
+QQShuru.Util.Event.addEvent = function() {
+    if (QQShuru.Util.Browser.isIE) {
+        return function(b, c, a) {
+            b.attachEvent("on" + c, a)
+        }
+    } else {
+        return function(b, c, a, d) {
+            b.addEventListener(c, a, d || false)
+        }
+    }
+} ();
+QQShuru.Util.Event.remEvent = function() {
+    if (QQShuru.Util.Browser.isIE) {
+        return function(b, c, a) {
+            b.detachEvent("on" + c, a)
+        }
+    } else {
+        return function(b, c, a, d) {
+            b.removeEventListener(c, a, d || false)
+        }
+    }
+} ();
+QQShuru.Util.Event.getPoint = function(a) {
+    if (QQShuru.Util.Browser.isIE) {
+        return [a.x, a.y]
+    } else {
+        return [a.layerX, a.layerY]
+    }
+};
+/*
+    初始化函数
+*   params:obj
+*   obj={
+*       canvasId:canvas的id  --required
+*       lineColor:  默认#606060  ,
+*       lineWidth:  默认10
+*       backBtnId: 退一步按钮id
+*       clearBtnId:清空canvas按钮id
+*       callback:func  每次请求后回调
+*   }
+*
+*
+*/
+QQShuru.HWPanel = function(obj) {
+    var o = QQShuru.Util.Browser.isIE;
+    var m = QQShuru.Util.Event.addEvent;
+    var j = QQShuru.Util.Event.remEvent;
+    var B = QQShuru.Util.Event.getPoint;
+    var h = document;
+    var H = document.body;
+    var z = document.documentElement;
+    var f = [];
+    var K = [];
+    var O = [];
+
+    var i = document.querySelector(obj.canvasId);
+    var v = o ? 1 : 0;
+    var a = 2;
+    var N = i.clientWidth;//canvas宽度
+    var R = i.clientHeight;//canvas高度
+    var c = obj.lineColor?obj.lineColor:"#606060"; //线条颜色
+    var y = obj.lineWidth?obj.lineWidth:10;//线条宽度
+    var t = "round";
+    var J = !!i.getContext;
+    if (J) {
+        var Q = i.getContext("2d");
+        Q.lineCap = t;
+        Q.lineJoin = t;
+        Q.lineWidth = y;
+        Q.strokeStyle = c
+    }
+    var L = false;
+    var P = false;
+    var u = 0;
+    var T = [];
+    var r = 0;
+    var e = [],
+        d = [],
+        I = [];
+    var D = [],
+        C = [];
+    pointsDeltaXY = [];
+    var k = [0, 0];
+    //鼠标按下事件
+    var l = function(W) {
+        if (v !== W.button) {
+            return
+        }
+        var Y = B(W);
+        if (!Y) {
+            return
+        }
+        L = true;
+        r = 0;
+        e = [];
+        d = [];
+        I = [];
+        D = [];
+        C = [];
+        pointsDeltaXY = [];
+        e[r] = Y[0];
+        d[r] = Y[1];
+        I[r * 2] = Y[0];
+        I[r * 2 + 1] = Y[1];
+        D[r] = Y[0];
+        C[r] = Y[1];
+        pointsDeltaXY[r * 2] = Y[0];
+        pointsDeltaXY[r * 2 + 1] = Y[1];
+        if (J) {
+            Q.beginPath();
+            Q.moveTo(Y[0], Y[1])
+        }
+        k[0] = Y[0];
+        k[1] = Y[1];
+        r++;
+        if (o) {
+            m(i, "losecapture", n);
+            i.setCapture()
+        } else {
+            m(window, "blur", n)
+        }
+    };
+    //鼠标移动事件
+    var A = function(W) {
+        if (!L) {
+            return
+        }
+        var Y = B(W);//坐标
+        if (!Y) {
+            return
+        }
+        e[r] = Y[0];
+        d[r] = Y[1];
+        I[r * 2] = Y[0];
+        I[r * 2 + 1] = Y[1];
+        D[r] = Y[0] - k[0];
+        C[r] = Y[1] - k[1];
+        pointsDeltaXY[r * 2] = D[r];
+        pointsDeltaXY[r * 2 + 1] = C[r];
+        if (J) {
+            Q.lineTo(Y[0], Y[1]);
+            Q.stroke()
+        } else {
+            var X = T[u].e.path;
+            X.value = X.value.replace(" e", "," + Y[0] + "," + Y[1] + " e")
+        }
+        k[0] = Y[0];
+        k[1] = Y[1];
+        r++
+    };
+    //鼠标松开事件
+    var n = function(W) {
+        if (!L) {
+            return
+        }
+        L = false;
+        if (1 === r) {
+            if (!J) {
+                T[u].e.style.visibility = "hidden"
+            }
+            return
+        }
+        if (J) {
+            Q.closePath();
+            var Z = i.cloneNode(false);
+            Z.style.display = "none";
+            Z.getContext("2d").drawImage(i, 0, 0);
+            T[u] = {
+                e: Z
+            };
+            Z = null
+        }
+        var aa = T[u];
+        aa.count = r;
+        aa.x = e.slice(0);
+        aa.y = d.slice(0);
+        aa.xy = I.slice(0);
+        aa.deltaX = D.slice(0);
+        aa.deltaY = C.slice(0);
+        aa.deltaXY = pointsDeltaXY.slice(0);
+        u++;
+        var X = [];
+        for (var Y = 0; Y < r; Y++) {
+            X[Y] = "[" + e[Y] + ", " + d[Y] + "]"
+        }
+        if (o) {
+            j(i, "losecapture", n);
+            i.releaseCapture()
+        } else {
+            j(window, "blur", n)
+        }
+        if (1 === u) {
+            i.className = "writting"
+        }
+        s(u);
+    };
+    //清空所有
+    var V = function(W) {
+        if (0 === u) {
+            return
+        }
+        var ab = "";
+        if (J) {
+            Q.clearRect(0, 0, N, R)
+        }
+        for (var Z = 0; Z < u; Z++) {
+            T[Z].e.style.visibility = "hidden"
+        }
+        u = 0;
+        i.className = ""
+    };
+    //退一笔
+    var g = function(W) {
+        if (0 === u) {
+            return
+        }
+        if (1 === u) {
+            V();
+            return
+        }
+        u--;
+        if (J) {
+            Q.clearRect(0, 0, N, R);
+            Q.drawImage(T[u - 1].e, 0, 0)
+        }
+        T[u].e.style.visibility = "hidden";
+        s(u)
+    };
+    var p = function(W, ab) {
+        var aa = ab || W.length;
+        var Z = "";
+        var ad = "";
+        for (var X = 0; X < aa; ++X) {
+            var ac = W[X];
+            ad = X ? ",eb,": "";
+            var Y = ad + ac.deltaXY.join(",");
+            Z += Y
+        }
+        return Z
+    };
+    this.ajax_callback = function(X) {
+        obj.callback&&obj.callback(X)
+    };
+    QQShuru.HWPanel.ajax_callback = this.ajax_callback;
+    var s = function(Y) {
+        var Z = p(T, Y);
+        var ab = "QQShuru.HWPanel.ajax_callback";
+        var W = "https://handwriting.shuru.qq.com/cloud/cgi-bin/cloud_hw_pub.wsgi";
+        var aa = "track_str=" + Z + "&cmd=0";
+        var X = W + "?" + aa;
+        QQShuru.Util.Ajax.get(X, ab)
+    };
+    m(i, "mousedown", l);
+    m(i, "mousemove", A);
+    m(i, "mouseup", n);
+    m(i, "dblclick", V);
+    m(i, "contextmenu",
+        function(W) {
+            o ? (W.returnValue = false) : W.preventDefault()
+        });
+    m(h, "mouseup", n);
+    if(obj.backBtnId){
+        m(document.querySelector(obj.backBtnId), "click", g);
+    }
+    if(obj.clearBtnId){
+        m(document.querySelector(obj.clearBtnId), "click", V);
+    }
+    this.clear=V;//暴露清空canvas的方法到外部
+    this.back=g;//暴露退一步的方法到外部
+};

+ 150 - 0
shurufa/js/index.js

@@ -0,0 +1,150 @@
+$(function(){
+  // let base = 'http://119.23.129.199:8100/'
+  let base = '/'
+  
+  var stopClick = false
+
+  function getQueryString(value) {
+    var reg = new RegExp("(^|&)" + value + "=([^&]*)(&|$)", "i");
+    var r = window.location.search.substr(1).match(reg);
+    if (r != null) return unescape(r[2]); return null;
+  }
+    $('#canvas').attr('width',$('#canvasWrap').width())
+    $('#canvas').attr('height',$('#canvasWrap').height())
+
+    init()
+  
+    $('#clear').click(function () {
+      $('#clear').css('opacity',0)
+      $('#result').html('')
+    })
+
+    $('#clsipt').click(function () {
+      $('#input').val('')
+      $('#clsipt').css('opacity',0)
+      $('.search-page').show()
+      $('.result-page').hide()
+    })
+    
+    $('#input').on('input propertychange', function() {
+      var count = $(this).val().length;
+      $('#clsipt').css('opacity',count?1:0)
+     });
+  
+    $('#search').click(function () {
+      search()
+    })
+
+    $('#reload').click(function () {
+      location.reload()
+    })
+
+    let startY = ''
+    let lastY = ''
+
+    let mMove = function (event) {
+      event.stopPropagation()
+      event.preventDefault()
+      let deltaY = event.clientY - startY
+      stopClick = true
+
+      if (lastY == deltaY) {
+        return
+      }
+      let de = document.documentElement.scrollTop||document.body.scrollTop
+      dic = lastY>deltaY? 1:-1
+      let to = de + dic * 15
+      window.scrollTo(0,to)
+      // lastY>deltaY?window.scrollTo(deltaY):'下'
+      lastY = deltaY
+    }
+
+    $('.body').mousedown(function (e) {
+      startY = e.clientY
+      stopClick = false
+      $('.body').mousemove(mMove)
+    })
+
+    $('.body').mouseup(function (e) {
+      $('.body').off('mousemove',mMove)
+    })
+  function callbackfunc(ret){
+    let html = ''
+
+    ret.cand.forEach(item => {
+      html+=`<li>${item}</li>`
+    });
+    $('#clear').css('opacity',1)
+    $('#result').html(html)
+    $('#result').undelegate()
+    $('#result').delegate('li','click',function (e) {
+      e.stopPropagation()
+      e.preventDefault()
+      let target = e.target
+      $('#input').val($('#input').val() + $(target).text())
+      $('#clsipt').css('opacity',1)
+      $('#clear').click()
+    })
+  
+  }
+
+  function search() {
+    let data = {
+      id: getQueryString('id') || '',
+      name: $('#input').val(),
+    }
+    $.ajax({
+      url: base + 'api/searchCollection',
+      type: "POST",
+      data: JSON.stringify(data),
+      dataType: "json",
+      contentType: "application/json;charset=utf-8",
+      success: function (data) {
+        if (data.code!=0) {
+          return alert(data.msg)
+        }
+        $('.search-page').hide()
+      
+        if (data.data.length<=0) {
+          $('.result-page').fadeIn()
+          $('.result-page ul').hide()
+          $('.no-result').fadeIn()
+        }
+
+        else{
+          $('.no-result').hide()
+          $('.result-page').fadeIn()
+          $('.result-page ul').fadeIn()
+
+          let html = ``
+          data.data.forEach(item=>{
+            html += `<li data-id="${item.id}">
+                      <img src="${item.pic}" data-id="${item.id}" alt="">
+                      <span data-id="${item.id}">${item.name}</span>
+                    </li>`
+          })
+          $('.result-page ul').html(html)
+          let arr = Array.from(document.querySelectorAll(".result-page ul li"))
+          arr.forEach(function(dom) {
+            dom.addEventListener("mouseup", function(e) {
+              let id = e.target.dataset.id
+              setTimeout(function() {
+                (window.resultCallback&&!stopClick) && window.resultCallback(parseInt(id)); 
+              });
+            });
+          });
+        }
+
+      }
+  })
+  }
+
+  function init() {
+      QQShuru.HWPanel({
+          canvasId:"#canvas",
+          lineColor:"#EA9649",
+          clearBtnId:"#clear",
+          callback:callbackfunc
+      });
+  }
+})

文件差異過大導致無法顯示
+ 4 - 0
shurufa/js/jquery.min.js


+ 25 - 21
src/configue/http.js

@@ -7,7 +7,7 @@ const vue = new Vue()
 let loading = ''
 
 // 配置请求域名
-
+let layoutBoxIsShow
 const serverName = isProduction ? '/zhoushan' : 'http://119.23.129.199:8110/zhoushan'
 // http://119.23.129.199:8100/
 const exceptUrls = ['/login']
@@ -49,34 +49,38 @@ axios.interceptors.response.use(
       case 102:
         break
       case 5001:
-        window.localStorage.setItem('token', '')
-        vue.$alert('登录状态失效,请重新登录', '提示', {
-          confirmButtonText: '确定',
-          callback: function () {
-            router.push('/login')
-          }
-        })
-        break
-      case 0:
-        break
-    }
-    return data
-  },
-  error => {
-    loading.close()
-    if (error.response) {
-      switch (error.response.code) {
-        case 5001:
+        if (!layoutBoxIsShow) {
+          layoutBoxIsShow = true
           window.localStorage.setItem('token', '')
           vue.$alert('登录状态失效,请重新登录', '提示', {
             confirmButtonText: '确定',
             callback: function () {
+              layoutBoxIsShow = false
               router.push('/login')
             }
           })
-          break
-      }
+        }
+        break
+      case 0:
+        break
     }
+    return data
+  },
+  error => {
+    loading.close()
+    // if (error.response) {
+    //   switch (error.response.code) {
+    //     case 5001:
+    //       window.localStorage.setItem('token', '')
+    //       vue.$alert('登录状态失效,请重新登录', '提示', {
+    //         confirmButtonText: '确定',
+    //         callback: function () {
+    //           router.push('/login')
+    //         }
+    //       })
+    //       break
+    //   }
+    // }
     return Promise.reject(error)
   }
 )

+ 1 - 1
src/pages/cultural-relic/index.vue

@@ -40,7 +40,7 @@
             <li class="theme-color" @click="gotoShow(item)" v-for="(item,i) in tableData" :key="i">
               <div class="li-img">
                 <el-image :fit="'cover'" style="width:100%;height:100%;" :src="item.unityPic"></el-image>
-                <div class="liulan"><span>浏览量: {{Math.round(Math.random()*100000)}}</span> 点赞数: {{Math.round(Math.random()*1000)}}</div>
+                <!-- <div class="liulan"><span>浏览量: {{Math.round(Math.random()*100000)}}</span> 点赞数: {{Math.round(Math.random()*1000)}}</div> -->
               </div>
               <div>{{item.timeName}} {{item.typeName}} <span @click.stop="del(item)" class="del">删除</span></div>
               <p>{{item.name}}</p>

+ 14 - 4
src/pages/display/index.vue

@@ -41,6 +41,12 @@
           </el-table-column>
           <el-table-column label="操作">
             <template slot-scope="scope">
+              <!-- <a href="javascript:;" @click="up(scope.row, scope.$index)">
+                <img class="icon" src="@/assets/img/up-arrow.png" alt="">
+              </a>
+              <a href="javascript:;"  @click="down(scope.row, scope.$index)">
+                <img class="icon" src="@/assets/img/down-arrow.png" alt="">
+              </a> -->
               <span class="o-span" @click="goto(scope.row)">编辑</span>
               <span class="o-span" @click="del(scope.row)">删除</span>
             </template>
@@ -75,10 +81,10 @@ export default {
   data () {
     // 这里存放数据
     let data = [
-      {
-        prop: 'idx',
-        label: '序号'
-      },
+      // {
+      //   prop: 'idx',
+      //   label: '序号'
+      // },
       {
         prop: 'name',
         label: '展示方案'
@@ -88,6 +94,10 @@ export default {
         label: '展示类别'
       },
       {
+        prop: 'orderNum',
+        label: '排序'
+      },
+      {
         prop: 'date',
         label: '发布时间'
       }

+ 11 - 10
src/pages/editPages/cultural-relic/index.vue

@@ -33,7 +33,9 @@
                 <el-option v-for="(item,i) in tlist" :key="i" :label="item.name" :value="item.id"></el-option>
               </el-select>
             </el-form-item>
-
+            <el-form-item label="文物排序:">
+              <el-input v-model="form.num" placeholder="请输入文物排序"></el-input>
+            </el-form-item>
             <el-form-item label="文物年代:" >
               <el-input v-model="form.typeTime" maxlength="50" show-word-limit placeholder="请输入文物年代"></el-input>
             </el-form-item>
@@ -106,10 +108,10 @@
                     </div>
                   </div>
                   <div class="el-upload__tip" slot="tip">
-                    支持扩展名:.jpg, .jpgc, .png
+                    支持扩展名:.jpg, .jpgc, .png,图片最长边不可以超过1024
                   </div>
                 </el-upload>
-                <div class="el-upload__tip">*海报规定尺寸比例:3:4 </div>
+                <!-- <div class="el-upload__tip">*海报规定尺寸比例:3:4 </div> -->
               </el-form-item>
             </template>
 
@@ -130,7 +132,7 @@
               <span class="wwtxt" style="color:#C0C4CC">建议上传512*512的png格式图片</span>
             </el-form-item>
 
-            <el-form-item label="文物展示:">
+            <el-form-item label="动画封面:">
                <el-upload
                 class="avatar-uploader"
                 :action="uploadUrl"
@@ -144,7 +146,7 @@
                 <img v-if="form.unityPic" :src="form.unityPic" class="avatar">
                 <i v-else class="el-icon-plus avatar-uploader-icon"></i>
               </el-upload>
-              <span class="wwtxt" style="color:#C0C4CC">仅支持上传文物展示的JPG格式文件</span>
+              <span class="wwtxt" style="color:#C0C4CC">建议上传最长边不超过1024的JPG格式图片</span>
             </el-form-item>
 
             <!-- <el-form-item label="四维模库:" style="width:340px;">
@@ -285,7 +287,7 @@ export default {
         typeId: 2,
         timeId: 1,
         typeTime: '',
-        num: '',
+        num: 0,
         discoveryTime: '',
         venue: '',
         modelUrl: '',
@@ -316,7 +318,7 @@ export default {
   },
   watch: {
     'form.description' (val) {
-      this.form.description1 = val.replace(/<("[^"]*"|'[^']*'|[^'">])*>/g, '').replace(/&nbsp/g, '').replace(/<\/\w*>/g, '\n')
+      this.form.description1 = val.replace(/<\/[^>]*>/g, '\n').replace(/<[^>]*>/g, '').replace(/&nbsp/g, '')
     }
   },
   methods: {
@@ -328,7 +330,6 @@ export default {
     },
     getQrCodeImages (img) {
       this.form.qrCode = img
-      console.log(this.form.qrCode)
     },
     getModelImages (img) {
       this.form.unityPic = img
@@ -443,7 +444,7 @@ export default {
       let type = this.isTypeBySend(file.name, typeArr)
       if (!type) {
         this.loading = false
-        this.$message.error('仅支持上传文物展示的JPG格式文件')
+        this.$message.error('仅支持上传动画封面的JPG格式文件')
         return type
       }
     },
@@ -565,7 +566,7 @@ export default {
         typeId: 2,
         timeId: 1,
         typeTime: '',
-        num: '',
+        num: 0,
         discoveryTime: '',
         venue: '',
         modelUrl: '',

+ 8 - 5
src/pages/editPages/display/index.vue

@@ -10,10 +10,12 @@
         <div class="top-title">方案信息:</div>
         <div class="form-con">
           <el-form ref="form" :model="form" label-width="100px">
-            <el-form-item label="方案名称:" required="" style="width:318px;">
+            <el-form-item label="方案名称:" required style="width:318px;">
               <el-input v-model="form.name"></el-input>
             </el-form-item>
-
+            <el-form-item label="方案排序:"  style="width:318px;">
+              <el-input v-model="form.orderNum"></el-input>
+            </el-form-item>
             <el-form-item label="展示说明:">
               <vue-editor v-model="form.description" />
             </el-form-item>
@@ -216,7 +218,8 @@ export default {
         state: 0,
         description: '',
         webUrl: '',
-        webUrl2: ''
+        webUrl2: '',
+        orderNum: 0
       },
       tableData: [],
       oldList: [],
@@ -322,8 +325,8 @@ export default {
       return false
     },
     onSubmit () {
-      let { name, id, typeId, equipmentId, state, description, webUrl, webUrl2 } = this.form
-      let data = { name, typeId, equipmentId, state, description, webUrl, webUrl2 }
+      let { name, id, typeId, equipmentId, state, description, webUrl, webUrl2, orderNum } = this.form
+      let data = { name, typeId, equipmentId, state, description, webUrl, webUrl2, orderNum }
       if (!name) {
         this.$notify.error({
           title: '错误',

+ 8 - 7
src/router/index.js

@@ -23,7 +23,7 @@ import showCulturalRelic from '@/pages/showPages/cultural-relic'
 
 import User from '@/pages/user'
 
-import Home from '@/pages/home'
+// import Home from '@/pages/home'
 
 Vue.use(Router)
 const originalPush = Router.prototype.push
@@ -37,13 +37,14 @@ export default new Router({
       path: '/',
       // name: 'mainLayout',
       component: Layout,
+      redirect: '/display',
       children: [
-        {
-          path: '/',
-          name: 'home',
-          component: Home,
-          meta: {index: -1}
-        },
+        // {
+        //   path: '/',
+        //   name: 'home',
+        //   component: Home,
+        //   meta: {index: -1}
+        // },
         {
           path: '/message',
           name: 'message',