tremble 4 年之前
父節點
當前提交
046a373a8d

+ 1 - 1
backstage/src/pages/layout/aside.vue

@@ -6,7 +6,7 @@
       <div :class="{active:activeIdx>=2&&activeIdx<=6}"><i class="iconfont iconsys_nav_work"></i>内容管理</div>
       <div @click="go(2,'/dynamic')" :class="{activeFont:activeIdx === 2}">场景管理</div>
       <div @click="go(3,'/spirit')" :class="{activeFont:activeIdx === 3}">文物管理</div>
-      <div @click="go(4,'/upload')" :class="{activeFont:activeIdx === 4}">史料收件</div>
+      <div @click="go(4,'/upload')" :class="{activeFont:activeIdx === 4}">史料收件管理</div>
     </div>
     <div class="aside-item">
       <div :class="{active:activeIdx>=7&&activeIdx<=11}"><i class="iconfont iconsys_nav_system"></i>系统管理</div>

二進制
web/src/assets/images/bg.jpg


+ 28 - 48
web/src/components/popupLayout/Alert.vue

@@ -1,14 +1,13 @@
 <template>
   <popup ref="Message" :show="show">
     <div class="ui-message">
-      <div class="ui-message-header">
-        <img @click="onClose" :src="`${$cdn}images/img_guestbook_close@2x.png`" alt="" />
-        <p>{{title}}</p>
-      </div>
       <div class="ui-message-main">
-        <!-- <img :src="`${$cdn}images/img_guestbook_${icon}@2x.png`" alt="" /> -->
+        <img :src="require('@/assets/images/icon/ic_error_24px.png')" alt="" />
         <span>{{tips}}</span>
       </div>
+      <div class="ui-message-footer">
+          <button @click="onClose" class="ui-button">{{okText}}</button>
+      </div>
     </div>
   </popup>
 </template>
@@ -23,8 +22,7 @@ export default {
     return {
       show: false,
       duration: 0,
-      title: "您的关注,会让我们做得更好!",
-      tips: "留言成功!",
+      tips: "",
       content: "",
       okText: "确定",
       ok: null,
@@ -59,72 +57,54 @@ textarea::placeholder {
 }
 
 .ui-message {
-  width: 400px;
-  height: 240px;
+  width: 330px;
+  min-height: 210px;
   position: relative;
-  background: #f5ede2;
+  background: rgba(160, 28, 38, 0.7);
+  border-radius: 14px;
   padding: 20px 50px;
-  .ui-message-header {
-    text-align: center;
-    margin: 0 auto;
-    p {
-      color: @theme;
-      font-size: 20px;
-      font-weight: bold;
-    }
-    img{
-        position: absolute;
-        right: 6px;
-        top: 6px;
-        width: 24px;
-        height: 24px;
-        cursor: pointer;
-    }
-  }
   .ui-message-main {
       text-align: center;
       width: 100%;
       position: absolute;
-      top: 55%;
+      top: 33px;
       left: 50%;
-      transform: translate(-50%,-50%);
+      transform: translateX(-50%);
+      padding-bottom: 50px;
         >span{
-            display: inline-block;
-            vertical-align: middle;
-            font-size: 14px;
+            display: block;
+            font-size: 16px;
+            margin-top: 20px;
+            color: #FCD67B;
         }
         img{
             vertical-align: middle;
             width: 52px;
             height: 52px;
-            margin-right: 12px;
         }
   }
   .ui-message-footer {
     text-align: center;
-    margin-top: 20px;
+    position: absolute;
+    bottom: 0;
+    left: 50%;
+    transform: translateX(-50%);
+    border-top: rgba(252, 214, 123, 0.2) 1px solid;
+    width: 100%;
     .ui-button {
       display: inline-block;
       cursor: pointer;
       font-size: 14px;
-      width: 104px;
-      height: 38px;
-      line-height: 38px;
-      border: none;
-      background: url("@{cdn}img_guestbook_btnbg_normal@2x.png") no-repeat
-        center center;
-      background-size: 100% 100%;
-      color: #382e2c;
+      width: 100%;
+      height: 48px;
+      line-height: 48px;
+      color: #FCD67B;
+
       &:first-of-type {
         margin-right: 30px;
       }
     }
-    .submit {
-      background: url("@{cdn}img_guestbook_btnbg_first@2x.png") no-repeat center
-        center;
-      background-size: 100% 100%;
-      color: #f5ede2;
-    }
+  
   }
 }
 </style>

+ 2 - 2
web/src/components/popupLayout/Broadcast.vue

@@ -70,7 +70,7 @@ export default {
   top: 0;
   left: 0;
   width: 100%;
- 
+  background: rgba(0, 0, 0, 0.6);
   .ui-con{
     top: 48%;
     left: 50%;
@@ -144,7 +144,7 @@ export default {
       width: 90%;
       margin: 0 auto;
       line-height: 1.5;
-      text-align: justify;
+      text-align: center;
       margin-top: 10px;
       max-height: 80px;
       overflow-y: auto;

+ 25 - 0
web/src/components/popupLayout/index.js

@@ -2,13 +2,38 @@ import Vue from 'vue'
 import UILoading from './Loading.vue'
 import UIBroadcast from './Broadcast.vue'
 import UIMap from './Map.vue'
+import UIAlert from './Alert.vue'
+
 
 
 const Loading = Vue.extend(UILoading)
 const Broadcast = Vue.extend(UIBroadcast)
 const Map = Vue.extend(UIMap)
+const Alert = Vue.extend(UIAlert)
+
+
+let alertInstance = ''
+export function $showAlert(data={}) {
+    if (alertInstance) {
+        return
+    }
+    alertInstance = new Alert({
+        data
+    }).$mount()
 
+    document.body.appendChild(alertInstance.$el)
 
+    Vue.nextTick(() => {
+        alertInstance.show = true
+    })
+}
+
+export function $hideAlert() {
+    if (alertInstance) {
+        document.body.removeChild(alertInstance.$el)
+        alertInstance = ''
+    }
+}
 
 let loadingInstance = ''
 export function $showLoading(data={}) {

+ 21 - 9
web/src/components/uploader.vue

@@ -38,7 +38,9 @@ export default {
   mounted() {
     this.$el.addEventListener("change", (e) => {
       if (!window.FileReader) {
-        alert("无法上传");
+        this.$showAlert({
+            tips:'无法上传'
+        })
         e.target.value = "";
         return;
       }
@@ -61,9 +63,13 @@ export default {
           if (!pass) {
             setTimeout(() => {
             if (this.failString) {
-                alert(`“${item.name}”` + this.failString);
+                this.$showAlert({
+                    tips:`“${item.name}”` + this.failString
+                })
               } else {
-                alert("不支持该文件格式");
+                this.$showAlert({
+                    tips:"不支持该文件格式"
+                })
               }
             }, i * 100);
             return;
@@ -74,10 +80,14 @@ export default {
             e.target.value = "";
             setTimeout(() => {
               if (this.limitFailStr) {
-                alert(`“${item.name}”` + this.limitFailStr);
+                this.$showAlert({
+                    tips:`“${item.name}”` + this.limitFailStr
+                })
               }
               else{
-                alert(`文件大小不能超过${this.limit}MB`);
+                this.$showAlert({
+                    tips:`文件大小不能超过${this.limit}MB`
+                })
               }
             }, i * 100);
             return;
@@ -85,12 +95,14 @@ export default {
         } else if (!fileInfo.checkSizeLimit(this.mediaType, item.size)) {
           setTimeout(() => {
             if (this.limitFailStr) {
-              alert(`“${item.name}”` + this.limitFailStr);
+              this.$showAlert({
+                    tips:`“${item.name}”` + this.limitFailStr
+                })
             }
             else{
-              alert(
-                `上传文件太大,不能超过${fileInfo.mediaMaxSize[this.mediaType]}MB`
-              );
+              this.$showAlert({
+                    tips:`上传文件太大,不能超过${fileInfo.mediaMaxSize[this.mediaType]}MB`
+                })
             }
             
           }, i * 100);

+ 17 - 8
web/src/components/welcome/index.vue

@@ -3,10 +3,10 @@
     <template v-show="!isVideo">
       <img class="bg" :style="{'z-index': isVideo?-1:0}" :src="require('@/assets/images/bg.jpg')" alt="">
       <div class="we_title">欢迎访问信息工程大学数字史馆</div>
-      <span class="btn" @click="showVideo">点击预览</span>
+      <span v-if="!isVideo" class="btn" @click="showVideo">开始预览</span>
     </template>
-    <video @click="autoplay" ref="welcome" preload loop :src="require('@/assets/video/welcome.mp4')"></video>
-    <span v-if="isVideo" class="btn" @click="$bus.$emit('toggleWelcome',false)">跳过</span>
+    <video @click="autoplay" ref="welcome" preload="auto" loop :src="require('@/assets/video/welcome.mp4')"></video>
+    <span v-if="isVideo" class="btn jump" @click="$bus.$emit('toggleWelcome', false)">跳过</span>
   </div>
 </template>
 
@@ -60,9 +60,10 @@ export default {
     top: 35%;
     left: 50%;
     transform: translate(-50%,-50%);
-    font-size: 34px;
+    font-size: 48px;
     color: #FCD67B;
-    letter-spacing: 2px;
+    letter-spacing: 6px;
+    font-weight: bold;
   }
   >video{
     width: 100%;
@@ -73,13 +74,21 @@ export default {
     left: 50%;
     transform: translate(-50%,-50%);
     z-index: 9999;
-    font-size: 16px;
-    color: #fff;
+    font-size: 18px;
+    color: #FCD67B;
     background-color: #A01C26;
     border-radius: 44px;
     display: inline-block;
     cursor: pointer;
-    padding: 10px 40px;
+    letter-spacing: 2px;
+    padding: 12px 60px;
+  }
+  .jump{
+    transform: none;
+    bottom: 47px;
+    right: 66px;
+    top: auto;
+    left: auto;
   }
 }
 </style>

+ 4 - 0
web/src/mixins/index.js

@@ -5,6 +5,8 @@ import {
   $showLoading,
   $showBroadcast,
   $showMap,
+  $showAlert,
+  $hideAlert,
   $hideBroadcast,
   $hideMap
 } from '@/components/popupLayout'
@@ -24,6 +26,8 @@ Vue.mixin({
       $hideBroadcast,
       $hideMap,
       $showMap,
+      $showAlert,
+      $hideAlert,
       $randomWord(randomFlag, min, max) {//随机字符串
         var str = "",
             range = min,

+ 3 - 1
web/src/pages/Home.vue

@@ -216,7 +216,9 @@ export default {
             url: '/api/web/material/getCode'
         })
         if (result.code != 0) {
-            return alert('获取展区列表失败')
+            return this.$showAlert({
+                tips:'无法获取史料收件箱标识码'
+            })
         }
         this.isShowFile = true
         this.fileCode = result.data

+ 6 - 2
web/src/views/collection/pc.vue

@@ -102,7 +102,9 @@ export default {
         url: '/api/web/zoneList'
       })
       if (result.code != 0) {
-        return alert('获取展区列表失败')
+        return this.$showAlert({
+                    tips:'获取展区列表失败'
+                })
       }
       this.typeLi = result.data
       this.getCollection()
@@ -121,7 +123,9 @@ export default {
         url: '/api/web/goodsList'
       })
       if (result.code != 0) {
-        return alert('获取文物列表失败')
+        return this.$showAlert({
+                    tips:'获取文物列表失败'
+                })
       }
       this.list = result.data.list
       this.paging.total = result.data.total

+ 12 - 4
web/src/views/uploadflie/index.vue

@@ -101,7 +101,9 @@ export default {
   methods:{
     async save(){
       if (!this.desc) {
-        return alert('请填写史料说明')
+        return this.$showAlert({
+                    tips:'请填写史料说明'
+                })
       }
       let params = {
           "code": this.fileCode,
@@ -116,7 +118,9 @@ export default {
       })
 
       if (result.code === 0) {
-        alert('提交成功')
+        this.$showAlert({
+            tips:'提交成功'
+        })
         this.$bus.$emit('toggleUploadFile',false)
       }
     },
@@ -127,7 +131,9 @@ export default {
         url: '/api/web/material/delete'
       })
       if (!result.code === 0) {
-        alert('删除失败,请稍后再试')
+        this.$showAlert({
+            tips:'删除失败,请稍后再试'
+        })
         this.$bus.$emit('toggleUploadFile',false)
       }
       this.fileList.splice(i,1);
@@ -136,7 +142,9 @@ export default {
     },
     onFileChange(data) {
       if (this.fileList.length>4) {
-        return alert('上传文件数量不超过5个')
+        return this.$showAlert({
+            tips:'上传文件数量不超过5个'
+        })
       }
       
       console.log(data);