tremble 3 years ago
parent
commit
b888b138ad

+ 1 - 1
new_backstage/public/index.html

@@ -5,7 +5,7 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
     <link rel="icon" href="<%= BASE_URL %>favicon.png">
-    <title>中国人民武装警察部队新疆生产建设兵团总</title>
+    <title>中国人民武装警察部队新疆生产建设兵团总</title>
   </head>
   <body>
     <noscript>

+ 1 - 1
new_backstage/src/assets/font/iconfont.json

@@ -1,6 +1,6 @@
 {
   "id": "1855608",
-  "name": "中国人民武装警察部队新疆生产建设兵团总",
+  "name": "中国人民武装警察部队新疆生产建设兵团总",
   "font_family": "iconfont",
   "css_prefix_text": "icon",
   "description": "展示界面和管理后台",

+ 1 - 1
new_backstage/src/components/table/index.vue

@@ -21,7 +21,7 @@
             style="min-width:180px;width:auto;height:220px;"
             :fit="'cover'"
             :src="scope.row[item.prop]||(item.default?require('@/assets/img/defaultImg.jpg'):'')"
-          :preview-src-list="[scope.row[item.prop]]">
+          :preview-src-list="[scope.row[item.prop]||(item.default?require('@/assets/img/defaultImg.jpg'):'')]">
         </el-image>
 
             

+ 2 - 3
new_backstage/src/mixins/index.js

@@ -82,9 +82,8 @@ Vue.prototype.collectType = {
 
 Vue.prototype.juese = {
   sys_admin: "系统管理员",
-  sys_high: "高级管理员",
-  sys_normal: "普通用户",
-  sys_visitor: "游客",
+  sys_content: "内容管理员",
+  sys_audit: "审核管理员"
 };
 
 Vue.prototype.sex = {

+ 3 - 3
new_backstage/src/pages/content/collection/data.js

@@ -21,7 +21,7 @@ let raw = {
       label: "提交人",
     },
     {
-      prop: "updateTime",
+      prop: "createTime",
       label: "提交时间",
     },
     {
@@ -59,7 +59,7 @@ let raw = {
       label: "提交人",
     },
     {
-      prop: "updateTime",
+      prop: "createTime",
       label: "提交时间",
     },
     {
@@ -97,7 +97,7 @@ let raw = {
       label: "提交人",
     },
     {
-      prop: "updateTime",
+      prop: "createTime",
       label: "提交时间",
     },
     {

+ 1 - 1
new_backstage/src/pages/content/interaction/data.js

@@ -85,7 +85,7 @@ let raw = {
       label: "提交人",
     },
     {
-      prop: "updateTime",
+      prop: "createTime",
       label: "提交时间",
     },
     {

+ 1 - 1
new_backstage/src/pages/content/study/componets/info.vue

@@ -20,7 +20,7 @@
         :height="500"
         :htmlstr="form.content"
         @blur="handleBlur"
-        v-if="form.status!=3"
+        v-if="!(status!==0&&status!==2)"
       />
       <div class="showHtml" v-else v-html="form.content"></div>
     </el-form-item>

+ 2 - 2
new_backstage/src/pages/content/study/data.js

@@ -21,7 +21,7 @@ let raw = {
       label: "提交人",
     },
     {
-      prop: "updateTime",
+      prop: "createTime",
       label: "提交时间",
     },
     {
@@ -59,7 +59,7 @@ let raw = {
       label: "提交人",
     },
     {
-      prop: "updateTime",
+      prop: "createTime",
       label: "提交时间",
     },
     {

+ 2 - 2
new_backstage/src/pages/content/sweep/data.js

@@ -18,7 +18,7 @@ let raw = {
       label: "缅怀次数",
     },
     {
-      prop: "updateTime",
+      prop: "createTime",
       label: "提交时间",
     },
     {
@@ -56,7 +56,7 @@ let raw = {
       label: "缅怀内容",
     },
     {
-      prop: "updateTime",
+      prop: "createTime",
       label: "提交时间",
     },
     {

+ 8 - 4
new_backstage/src/pages/layout/head.vue

@@ -3,7 +3,7 @@
 <div class='header card'>
   <div class="header-title">
     <img src="@/assets/img/logo.png" alt="">
-    <span>中国人民武装警察部队新疆生产建设兵团总</span>
+    <span>中国人民武装警察部队新疆生产建设兵团总</span>
   </div>
   <div class="header-user">
     <div class="avatars" @click="handleAvatar">
@@ -29,8 +29,7 @@ export default {
       isShowEdit:false,
       ran:'',
       userId:'',
-      userInfo:{},
-      role: window.localStorage.getItem("role") == 'sys_admin'
+      userInfo:{}
     }
   },
   watch: {
@@ -41,7 +40,12 @@ export default {
   methods: {
     handleAvatar(){
 
-      if (!this.role) {
+      let role =  window.localStorage.getItem("role")
+    
+      console.log(this.juese[role]);
+      
+
+      if (!this.juese[role]) {
         return
       }
       this.isShowEdit=true

+ 2 - 2
new_backstage/src/pages/login/index.vue

@@ -4,13 +4,13 @@
   <div class="layout-con">
     <div class="logo">
       <img :src="require('@/assets/img/logo.png')" alt="">
-      <span>中国人民武装警察部队新疆生产建设兵团总</span>
+      <span>中国人民武装警察部队新疆生产建设兵团总</span>
     </div>
     <img class="bg" :src="require('@/assets/img/bg.jpg')" alt="">
     <div class="mask"></div>
     <div class="middle">
       <div class="middle-left">
-        <div>中国人民武装警察部队新疆生产建设兵团总<br/>管理后台</div>
+        <div>中国人民武装警察部队新疆生产建设兵团总<br/>管理后台</div>
       </div>
       <div class="middle-right">
         <el-form class="middle-form" :rules="ruleLogin" status-icon :model="formLogin" ref="formLogin">

+ 2 - 2
web/public/static/js/manage.js

@@ -143,14 +143,14 @@ Manage.prototype.switchBgmState = function(state) {
     console.log("begin play bgm");
     g_play = 1;
     g_playAudio = g_bgAudio;
-    $("#volume a img").attr("src", "./images/Volume btn_off.png");
+    $("#volume a img").attr("src", "./static/images/Volume btn_off.png");
     $("#volume").attr("title", "关闭声音");
     g_tourAudio && g_tourAudio.pause();
   };
   var paused = function() {
     g_play = 0;
     g_playAudio == g_bgAudio && (g_playAudio = null);
-    $("#volume a img").attr("src", "./images/Volume btn_on.png");
+    $("#volume a img").attr("src", "./static/images/Volume btn_on.png");
     $("#volume").attr("title", "打开声音");
   };
 

+ 29 - 6
web/src/components/Danmaku.vue

@@ -12,7 +12,7 @@
           v-for="(item) in showDanmakuData"
           :key="item"
         >
-          <span> {{ item }}</span>
+          <span v-html="item"></span>
         </li>
       </transition-group>
     </div>
@@ -31,7 +31,7 @@
           :src="closeIcon || ''"
           v-if="!isShowList"
         />
-        <button class="send-btn primary" @click="sendDanmakuSelf(danmu)">发送</button>
+        <button class="send-btn primary" @click="leaveMsg">发送</button>
       </div>
       <ul class="show-list" v-show="isShowSelectList">
         <li
@@ -39,8 +39,8 @@
           v-for="(item, key) in quotes"
           :key="key"
           @click="sendDanmaku(key)"
+          v-html="item"
         >
-          {{ item }}
         </li>
       </ul>
     </div>
@@ -76,6 +76,9 @@
 </template>
 
 <script>
+import { saveBarrage } from "@/config/api";
+
+
 export default {
   name: "danmaku",
   props: {
@@ -86,6 +89,13 @@ export default {
         ];
       },
     },
+    danmuArr: {
+      type: Array,
+      default: function() {
+        return [
+        ];
+      },
+    },
     showIcon: {
       type: String,
       required: true,
@@ -146,12 +156,25 @@ export default {
       this.isNotInputAction = true;
       this.danmu=''
     },
+    async leaveMsg(){
+      let tmp = this.danmu.trim()
+      if (!tmp) {
+        return alert('弹幕不能为空')
+      }
+      saveBarrage({
+        content: tmp,
+      },res=>{
+        if (res.code==0) {
+          this.sendDanmakuSelf(tmp)
+        }
+      })
+    },
     autoPopAnimation() {
       if (!this.isNotInputAction) {
         this.timer = setInterval(() => {
-          if (this.autoIndex <= this.quotes.length) {
-            if (this.quotes[this.autoIndex]) {
-              this.showDanmakuData.push(this.quotes[this.autoIndex]);
+          if (this.autoIndex <= this.danmuArr.length) {
+            if (this.danmuArr[this.autoIndex]) {
+              this.showDanmakuData.push(this.danmuArr[this.autoIndex]);
               this.autoIndex++;
             } else {
               clearInterval(this.timer);

+ 4 - 4
web/src/components/showCollection.vue

@@ -81,15 +81,15 @@
         <ul class="swiper-wrapper swiper-wrapper-n">
           <li
             class="swiper-slide"
-            v-for="(item, index) in item.file"
+            v-for="(sub, index) in item.file"
             :key="index"
           >
             <div class="sl-item">
               <img
                 v-viewer
-                :src="item.filePath"
+                :src="sub.filePath"
               />
-              <p>{{ item.name }}</p>
+              <p>{{ item.entity.name }}</p>
             </div>
           </li>
         </ul>
@@ -143,7 +143,7 @@ export default {
     swiperOption() {
       return {
         slidesPerView: "auto",
-        loop:true,
+        loop: this.item.file.length>1,
         navigation: {
           nextEl: ".nsw2",
           prevEl: ".psw2",

+ 28 - 0
web/src/config/api.js

@@ -109,6 +109,21 @@ export function saveMsg(type,data, cb) {
   });
 }
 
+//提交弹幕接口
+export function saveBarrage(data, cb) {
+  let params = {
+    ...data
+  };
+
+  axios({
+    method: "post",
+    data: params,
+    url: `cms/web/manage/barrageSave`,
+  }).then((res) => {
+    cb(res);
+  });
+}
+
 //获取详情
 export function getDetailById(type,data, cb) {
   axios({
@@ -167,6 +182,8 @@ export function getQuestionGroupDetail(data, cb) {
 }
 
 
+
+
 //提交留言接口
 export function submitAnswers(data, cb) {
   let params = {
@@ -255,3 +272,14 @@ export function dianzan(cb) {
     cb(res);
   });
 }
+
+
+//获取知识详情
+export function getNewsDetail(data, cb=()=>{}) {
+  axios({
+    method: "get",
+    url: `api/web/news/detail/${data.id}`,
+  }).then((res) => {
+    cb(res);
+  });
+}

+ 4 - 3
web/src/views/dynamic/list.vue

@@ -32,7 +32,7 @@
 </template>
 
 <script>
-import { getList } from "@/config/api";
+import { getList, getNewsDetail } from "@/config/api";
 import {title} from './data'
 
 import lrLayout from '@/components/lrLayout'
@@ -74,8 +74,8 @@ export default {
       this.searchKey = data
       this.getData()
     },
-    async addViews(item) {
-      (await this.$http.get(`/api/web/news/view/${item.id}`)).data;
+    async addViews(id) {
+      getNewsDetail({id})
     },
     handleItem(item) {
       this.$router.push({ params: { type: item.id } });
@@ -83,6 +83,7 @@ export default {
     handleLi(item){
       console.log(item);
       if (item.type == 'share') {
+        this.addViews(item.id)
         let url = item.shareUrl.indexOf('http')>-1?item.shareUrl:`http://${item.shareUrl}`
         window.open(url,'_blank')
       }

+ 2 - 2
web/src/views/scene/components/comment/Message.vue

@@ -40,9 +40,9 @@
               </div>
               <div class="body">
                 <span>{{item.content}}</span>
-                <div class="txtSameHovers">
+                <div class="txtSameHovers"  @click="showComment(item,i)">
                   <img :src="require(`@/assets/images/btnlist/item_comment.png`)" alt="">
-                  <span @click="showComment(item,i)">评论</span>
+                  <span>评论</span>
                 </div>
               </div>
               <ul class="response-text" v-if="item.children">

+ 7 - 3
web/src/views/scene/gui/menu.vue

@@ -184,18 +184,20 @@
         <ul class="btn-list">
           <li @click.stop="handleItem(item)" v-for="(item, i) in btnlist" :key="i">
             <img
+              :title="item.title"
               :src="require(`@/assets/images/btnlist/${item.id}${btnlistActive==item.id?`_${theme}`:''}.png`)"
             />
           </li>
           <li @click="isBgm=!isBgm">
             <img
+              title="音乐"
               :src="require(`@/assets/images/btnlist/bgm${isBgm?`_${theme}`:''}.png`)"
             />
           </li>
         </ul>
 
          <ul class="btn-list">
-          <li class="like" @click="handleLike">
+          <li title="点赞" class="like" @click="handleLike">
             <img :src="require(`@/assets/images/btnlist/like.png`)"/>
             <span>{{likeNum}} 点赞</span>
             <transition name="likeAddAnimate">
@@ -254,7 +256,7 @@
           rel="tooltip"
           title="{[{ VIEW_FULLSCREEN }]}"
         >
-          <a>
+          <a title="全屏">
             <i class="icon icon-fullscreen"></i>
           </a>
         </div>
@@ -266,7 +268,7 @@
           title="{[{ EXIT_FULLSCREEN }]}"
           style="display: none"
         >
-          <a>
+          <a title="退出全屏">
             <i class="icon icon-fullscreen-exit"></i>
           </a>
         </div>
@@ -286,10 +288,12 @@ let menuli = [
   {
     id: "comment",
     path: "",
+    title:'留言'
   },
   {
     id: "question",
     path: "",
+    title:'答题'
   }
 ];
 

+ 15 - 3
web/src/views/scene/scene.vue

@@ -62,7 +62,8 @@
 
       <Danmaku
         class="danmaku"
-        :quotes="danmu"
+        :quotes="quotes"
+        :danmuArr="danmu"
         :showIcon="require(`@/assets/images/icon/danmu_open_${theme}.png`)"
         :closeIcon="require('@/assets/images/icon/danmu_close.png')"
         :arrowIcon="require('@/assets/images/icon/danmu_top.png')"
@@ -89,7 +90,7 @@ import exhibition from '@/components/exhibition';
 
 import vpopup from './components/popup.vue'
 
-import { checkLogin, getUserInfo  } from "@/config/api";
+import { checkLogin, getUserInfo,getList  } from "@/config/api";
 
 export default {
   name: 'Home',
@@ -139,6 +140,7 @@ export default {
     })
     this.starLoad()
     this.getUserInfo()
+    this.getData()
   },
   methods:{
     getUserInfo() {
@@ -195,13 +197,22 @@ export default {
         $(document).off('keydown')
       }
     },
+    async getData() {
+      let params = {
+        pageNum: 1,
+        pageSize: 1000,
+      };
+      getList("barrage", params, (res) => {
+        this.danmu = res.data.list.map(item=>item.content)
+      });
+    }
   },
   beforeDestroy(){
     this.destroy();
   },
   data(){
       return {
-        danmu:[
+        quotes:[
           "很漂亮的线上展馆,支持!",
           "足不出户就能浏览参观,太棒了!",
           "期待能有机会到实体馆参观。",
@@ -210,6 +221,7 @@ export default {
           "展馆的信息介绍很详细,干货满满!",
           "向人民解放军致敬"
           ],
+        danmu:[],
         showExhibition: false,
         cp:''
       }

+ 1 - 1
web/src/views/user/register.vue

@@ -8,7 +8,7 @@
     <div class="register">
       <p class="title primaryColor">欢迎申请新疆生产建设兵团总队账号</p>
       <p class="sub">
-        新疆生产建设兵团总队管理系统实行实名制注册,请如实填写下信息,我们将对用户资料实行实名制验证,信息不实的将被锁定。
+        新疆生产建设兵团总队管理系统实行实名制注册,请如实填写下信息,我们将对用户资料实行实名制验证,信息不实的将被锁定。
       </p>
       <div class="form">
         <ul

+ 1 - 1
web/src/views/user/userinfo.vue

@@ -74,7 +74,7 @@ const registerInfo = [
       {
         label: "通信地址",
         key: "address",
-        maxLength: 100,
+        maxLength: 50,
         val: "",
         showValidate: true,
         validate: "",