tremble 4 vuotta sitten
vanhempi
commit
efba4c0ebb
56 muutettua tiedostoa jossa 1913 lisäystä ja 726 poistoa
  1. BIN
      new_backstage/src/assets/img/logo.png
  2. 6 3
      new_backstage/src/components/table/index.vue
  3. 1 1
      new_backstage/src/configue/http.js
  4. 24 10
      new_backstage/src/mixins/index.js
  5. 12 7
      new_backstage/src/pages/content/collection/edit.vue
  6. 1 1
      new_backstage/src/pages/content/collection/index.vue
  7. 23 13
      new_backstage/src/pages/content/interaction/edit.vue
  8. 1 1
      new_backstage/src/pages/content/interaction/index.vue
  9. 44 33
      new_backstage/src/pages/content/study/edit.vue
  10. 1 1
      new_backstage/src/pages/content/study/index.vue
  11. 56 43
      new_backstage/src/pages/content/sweep/edit.vue
  12. 1 1
      new_backstage/src/pages/content/sweep/index.vue
  13. 8 3
      new_backstage/src/pages/layout/aside.vue
  14. 6 2
      new_backstage/src/pages/layout/head.vue
  15. 4 0
      new_backstage/src/pages/login/index.vue
  16. 3 0
      new_backstage/src/pages/system/role/componets/manage.vue
  17. 9 2
      new_backstage/src/pages/system/role/index.vue
  18. 1 1
      new_backstage/src/pages/system/user/edit.vue
  19. 5 1
      new_backstage/src/pages/system/user/index.vue
  20. 0 15
      web/public/index.html
  21. 36 0
      web/public/scene.html
  22. 0 1
      web/public/static/css/main.css
  23. 50 151
      web/public/static/js/main_2020_show.js
  24. 3 2
      web/public/static/js/myShow.js
  25. BIN
      web/src/assets/images/btnlist/cpbg_huyangjin.png
  26. BIN
      web/src/assets/images/btnlist/datiwan_huyangjin.png
  27. BIN
      web/src/assets/images/btnlist/datiwan_yangtaojin.png
  28. BIN
      web/src/assets/images/btnlist/item_comment.png
  29. BIN
      web/src/assets/images/icon/logo.png
  30. 95 1
      web/src/assets/theme/theme.less
  31. 6 5
      web/src/components/Paging.vue
  32. 72 8
      web/src/config/api.js
  33. 2 2
      web/src/config/route.js
  34. 1 1
      web/src/main.js
  35. 25 0
      web/src/pages/index.js
  36. 99 0
      web/src/pages/index.vue
  37. 23 0
      web/src/pages/scene.js
  38. 50 0
      web/src/pages/scene.vue
  39. 21 1
      web/src/router/index.js
  40. 2 2
      web/src/views/home/Carousel.vue
  41. 13 3
      web/src/views/layout/header.vue
  42. 6 1
      web/src/views/layout/index.vue
  43. 371 0
      web/src/views/scene/components/comment/Message.vue
  44. 32 0
      web/src/views/scene/components/comment/index.vue
  45. 3 2
      web/src/views/scene/components/popup.vue
  46. 3 2
      web/src/views/scene/components/question/datiing.vue
  47. 1 0
      web/src/views/scene/components/question/paiming.vue
  48. 91 15
      web/src/views/scene/gui/menu.vue
  49. 13 177
      web/src/views/scene/index.vue
  50. 245 0
      web/src/views/scene/scene.vue
  51. 6 2
      web/src/views/spirit/index.vue
  52. 165 40
      web/src/views/user/forget.vue
  53. 186 103
      web/src/views/user/modify.vue
  54. 4 0
      web/src/views/user/register.vue
  55. 77 69
      web/src/views/user/userinfo.vue
  56. 6 0
      web/vue.config.js

BIN
new_backstage/src/assets/img/logo.png


+ 6 - 3
new_backstage/src/components/table/index.vue

@@ -39,7 +39,7 @@
         </template>
 
         <template v-else-if="item.prop === 'isEnabled'">
-          <span v-if="scope.row.roleKey=='sys_admin'">-</span>
+          <span v-if="scope.row.roleKey">-</span>
             <el-switch
             @change="(e)=>{handleDisableSwitch(e,scope.row)}"
             v-else
@@ -67,6 +67,7 @@
         <template slot-scope="scope">
           <template v-if="isNull(scope.row.status)">
             <span v-if="activeSub['查看']" class="o-span" @click="goto(scope.row)">查看</span>
+            <span v-if="activeSub['删除']" :class="{disabletxt:scope.row.display}" class="o-span" @click="$emit('del',{item:scope.row,type})">删除</span>
           </template>
 
           <template v-else>
@@ -81,9 +82,11 @@
 
             <!-- 审核不通过||草稿中 -->
             <span v-if="(scope.row.status==2||scope.row.status==0) && activeSub['编辑']" class="o-span" @click="goto(scope.row)">编辑</span> 
+
+             <!-- 草稿中且有删除权限 -->  
+            <span v-if="activeSub['删除']&&scope.row.status===0" :class="{disabletxt:scope.row.display}" class="o-span" @click="$emit('del',{item:scope.row,type})">删除</span>
           </template>
-          
-          <span v-if="activeSub['删除']||scope.row.status===0" :class="{disabletxt:scope.row.display}" class="o-span" @click="$emit('del',{item:scope.row,type})">删除</span>
+
           <span v-if="!activeSub['查看']&&!activeSub['提交']&&!activeSub['审核']&&!activeSub['编辑']&&!activeSub['删除']">-</span>
         </template>
       </el-table-column>

+ 1 - 1
new_backstage/src/configue/http.js

@@ -8,7 +8,7 @@ const vue = new Vue();
 var isProduction = process.env.NODE_ENV === "production";
 let loading = "";
 
-const serverName = isProduction ? "/" : "http://192.168.0.135:8003/";
+const serverName = isProduction ? "/" : "http://192.168.0.245:8003/";
 
 const serverLocation = window.location.hostname;
 

+ 24 - 10
new_backstage/src/mixins/index.js

@@ -231,22 +231,36 @@ Vue.mixin({
       if (hadTwoParam) {
           item = data
           type = hadTwoParam
+          this.confirm("提交后,信息将保存并且进入审核,是否继续?", () => {
+            this.save('submit',()=>{
+              apply(type, { id: item.id }, () => {
+                this.$alert("提交成功", "提示", {
+                  confirmButtonText: "确定",
+                  callback: () => {
+                    let tmp = this.getList ? "getList" : "backList";
+                    this[tmp]();
+                  },
+                });
+              });
+            })
+          });
       }
       else{
         item = data.item
         type = data.type
-      }
-      this.confirm("提交后,信息将进入审核,是否继续?", () => {
-        apply(type, { id: item.id }, () => {
-          this.$alert("提交成功", "提示", {
-            confirmButtonText: "确定",
-            callback: () => {
-              let tmp = this.getList ? "getList" : "backList";
-              this[tmp]();
-            },
+        this.confirm("提交后,信息将进入审核,是否继续?", () => {
+          apply(type, { id: item.id }, () => {
+            this.$alert("提交成功", "提示", {
+              confirmButtonText: "确定",
+              callback: () => {
+                let tmp = this.getList ? "getList" : "backList";
+                this[tmp]();
+              },
+            });
           });
         });
-      });
+      }
+      
     },
     determine() {
       let { isAudit } = this.$route.query;

+ 12 - 7
new_backstage/src/pages/content/collection/edit.vue

@@ -71,7 +71,7 @@ export default {
   },
   methods: {
     
-    save() {
+    save(submit='',cb=null) {
       this.validate(() => {
         let fileIds = this.filelist.map((item) => item.id).join(",");
         let params = {
@@ -87,12 +87,17 @@ export default {
           ...this.form,
         };
         save(this.val, params, () => {
-          this.$alert("编辑成功", "提示", {
-            confirmButtonText: "确定",
-            callback: () => {
-              this.backList()
-            },
-          });
+          if (submit) {
+            cb&&cb()
+          }
+          else{
+            this.$alert("编辑成功", "提示", {
+              confirmButtonText: "确定",
+              callback: () => {
+                this.backList()
+              },
+            });
+          }
         });
       });
     },

+ 1 - 1
new_backstage/src/pages/content/collection/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <main-top>
-      <div slot="con">
+      <div slot="con" v-if="activeSub['新增']">
         <el-button @click="goto({ id: 'none',status: 0 })" type="primary"
           >新增</el-button
         >

+ 23 - 13
new_backstage/src/pages/content/interaction/edit.vue

@@ -77,32 +77,34 @@ export default {
     this.getDetail();
   },
   methods: {
-    save() {
+    save(submit = "", cb = null) {
       this.validate(() => {
         let flag = true;
         this.form.answer.forEach((item) => {
-          if(!item.correct){
+          if (!item.correct) {
             flag = false;
-            return
+            return;
           }
           if (!item.question) {
             flag = false;
-            return
+            return;
           } else {
             if (item.answer.length < 2) {
               flag = false;
-              return
+              return;
             }
             item.answer.forEach((sub) => {
               if (!sub.name) {
                 flag = false;
-                return
+                return;
               }
             });
           }
         });
         if (!flag) {
-          return this.$alert("请完善题目和选项(每道题至少设置两个选项,且设置正确答案)");
+          return this.$alert(
+            "请完善题目和选项(每道题至少设置两个选项,且设置正确答案)"
+          );
         }
         saveQuestion(this.form.answer, (res) => {
           save(
@@ -113,12 +115,20 @@ export default {
               id: this.id == "none" ? null : this.id,
             },
             () => {
-              this.$alert(`${this.id == "none"?'添加成功':'保存成功'}`, "提示", {
-                confirmButtonText: "确定",
-                callback: () => {
-                  this.backList();
-                },
-              });
+              if (submit) {
+                cb && cb();
+              } else {
+                this.$alert(
+                  `${this.id == "none" ? "添加成功" : "保存成功"}`,
+                  "提示",
+                  {
+                    confirmButtonText: "确定",
+                    callback: () => {
+                      this.backList();
+                    },
+                  }
+                );
+              }
             }
           );
         });

+ 1 - 1
new_backstage/src/pages/content/interaction/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <main-top>
-      <div slot="con">
+      <div slot="con" v-if="activeSub['新增']">
         <el-button
           v-if="
             $route.params.type == 'questionGroup' ||

+ 44 - 33
new_backstage/src/pages/content/study/edit.vue

@@ -10,16 +10,24 @@
       :status="status"
       @cancel="backList"
       @save="save"
-      @submit="submit({id},val)"
+      @submit="submit({ id }, val)"
       @determine="determine"
     >
       <template slot-scope="{ form }" slot="content">
-        <component :data="form" :is="cp" :class="{disable:status!==0&&status!==2&&type=='share'}" />
+        <component
+          :data="form"
+          :is="cp"
+          :class="{ disable: status !== 0 && status !== 2 && type == 'share' }"
+        />
       </template>
     </editcon>
 
-    <editdialog :type="val" :show='showAudit' @close="showAudit=false" :id="id"/>
-
+    <editdialog
+      :type="val"
+      :show="showAudit"
+      @close="showAudit = false"
+      :id="id"
+    />
   </div>
 </template>
 
@@ -30,22 +38,22 @@ import vshare from "./componets/share";
 import vinfo from "./componets/info";
 
 import { formKey, rules } from "./data";
-import {save,getDetail} from "@/configue/api";
+import { save, getDetail } from "@/configue/api";
 
 export default {
   components: {
     vshare,
-    vinfo
+    vinfo,
   },
   data() {
     let { type, id, status } = this.$route.params;
     return {
-      val:'news',
+      val: "news",
       type,
-      id:String(id),
-      status:Number(status),
+      id: String(id),
+      status: Number(status),
       form: "",
-      showAudit:false
+      showAudit: false,
     };
   },
   computed: {
@@ -60,10 +68,10 @@ export default {
     },
   },
   mounted() {
-    this.getDetail()
+    this.getDetail();
   },
   methods: {
-    save() {
+    save(submit = "", cb = null) {
       this.validate(() => {
         let params = {
           content: "",
@@ -71,32 +79,35 @@ export default {
           display: 0,
           name: "",
           shareUrl: "",
-          id: this.id=='none'?null :this.id,
-          type:this.type,
-          ...this.form
-        }
-        save(this.val,params,()=>{
-          this.$alert('编辑成功', '提示', {
-              confirmButtonText: '确定',
+          id: this.id == "none" ? null : this.id,
+          type: this.type,
+          ...this.form,
+        };
+        save(this.val, params, () => {
+          if (submit) {
+            cb && cb();
+          } else {
+            this.$alert("编辑成功", "提示", {
+              confirmButtonText: "确定",
               callback: () => {
-                this.backList()
-              }
-            })
-        })
+                this.backList();
+              },
+            });
+          }
+        });
       });
     },
 
-    async getDetail(){
-      if(this.id == 'none'){
-        this.form = this.cloneObject(formKey[this.$route.params.type])
-      } else{
-        await getDetail(this.val,{id:this.id},res=>{
-          this.form = {...this.form,...res.data}
-          this.form['display'] = Boolean(this.form['display'])
-        })
+    async getDetail() {
+      if (this.id == "none") {
+        this.form = this.cloneObject(formKey[this.$route.params.type]);
+      } else {
+        await getDetail(this.val, { id: this.id }, (res) => {
+          this.form = { ...this.form, ...res.data };
+          this.form["display"] = Boolean(this.form["display"]);
+        });
       }
-    }
-
+    },
   },
 };
 </script>

+ 1 - 1
new_backstage/src/pages/content/study/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <main-top>
-      <div slot="con">
+      <div slot="con" v-if="activeSub['新增']">
         <el-button @click="goto({ id: 'none',status: 0 })" type="primary"
           >新增</el-button
         >

+ 56 - 43
new_backstage/src/pages/content/sweep/edit.vue

@@ -10,15 +10,24 @@
       :status="status"
       @cancel="backList"
       @save="save"
-      @submit="submit({id},type)"
+      @submit="submit({ id }, type)"
       @determine="determine"
     >
       <template slot-scope="{ form }" slot="content">
-        <component :data="form" :is="cp" :class="{disable:status!==0&&status!==2}"/>
+        <component
+          :data="form"
+          :is="cp"
+          :class="{ disable: status !== 0 && status !== 2 }"
+        />
       </template>
     </editcon>
 
-    <editdialog :type="type" :show='showAudit' @close="showAudit=false" :id="id"/>
+    <editdialog
+      :type="type"
+      :show="showAudit"
+      @close="showAudit = false"
+      :id="id"
+    />
   </div>
 </template>
 
@@ -29,22 +38,22 @@ import vmartyr from "./componets/martyr";
 import vmourn from "./componets/mourn";
 
 import { formKey, rules } from "./data";
-import {save,getDetail} from "@/configue/api";
+import { save, getDetail } from "@/configue/api";
 
 export default {
   components: {
     vmartyr,
-    vmourn
+    vmourn,
   },
   data() {
     let { type, id, status } = this.$route.params;
-    
+
     return {
       type,
-      id:String(id),
-      status:Number(status),
-      form: '',
-      showAudit:false
+      id: String(id),
+      status: Number(status),
+      form: "",
+      showAudit: false,
     };
   },
   computed: {
@@ -59,48 +68,52 @@ export default {
     },
   },
   mounted() {
-    this.getDetail()
+    this.getDetail();
   },
   methods: {
-    save() {
+    save(submit = "", cb = null) {
       this.validate(() => {
         let params = {
-          "birthday": "",
-          "description": "",
-          "dieDay": "",
-          "diePlace": "",
-          "display": 0,
-          "honor": "",
-          "nation": "",
-          "nativePlace": "",
-          "politicsStatus": "",
-          "realName": "",
-          "sex": 0,
-          "thumb": "",
-          "id": this.id=='none'?null :this.id,
-          ...this.form
-        }
-        save(this.type,params,()=>{
-          this.$alert('编辑成功', '提示', {
-              confirmButtonText: '确定',
+          birthday: "",
+          description: "",
+          dieDay: "",
+          diePlace: "",
+          display: 0,
+          honor: "",
+          nation: "",
+          nativePlace: "",
+          politicsStatus: "",
+          realName: "",
+          sex: 0,
+          thumb: "",
+          id: this.id == "none" ? null : this.id,
+          ...this.form,
+        };
+        save(this.type, params, () => {
+          if (submit) {
+            cb && cb();
+          } else {
+            this.$alert("编辑成功", "提示", {
+              confirmButtonText: "确定",
               callback: () => {
-                this.backList()
-              }
-            })
-        })
+                this.backList();
+              },
+            });
+          }
+        });
       });
     },
 
-    async getDetail(){
-      if(this.id == 'none'){
-        this.form = this.cloneObject(formKey[this.$route.params.type])
-      } else{
-        await getDetail(this.type,{id:this.id},res=>{
-          this.form = {...this.form,...res.data}
-          this.form['display'] = Boolean(this.form['display'])
-        })
+    async getDetail() {
+      if (this.id == "none") {
+        this.form = this.cloneObject(formKey[this.$route.params.type]);
+      } else {
+        await getDetail(this.type, { id: this.id }, (res) => {
+          this.form = { ...this.form, ...res.data };
+          this.form["display"] = Boolean(this.form["display"]);
+        });
       }
-    }
+    },
   },
 };
 </script>

+ 1 - 1
new_backstage/src/pages/content/sweep/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <main-top>
-      <div slot='con'>
+      <div slot='con' v-if="activeSub['新增']">
         <el-button v-if="$route.params.type == 'martyr'" @click="goto({ id: 'none',status: 0 })" type="primary">登记</el-button>
       </div>
     </main-top>

+ 8 - 3
new_backstage/src/pages/layout/aside.vue

@@ -73,14 +73,19 @@ export default {
           }
         })
 
-        if (window.localStorage.getItem("role") == 'sys_admin') {
           if (item.type == "system") {
-            tmp = item
+            if (window.localStorage.getItem("role") == 'sys_admin') {
+                tmp = item
+            }
+            else{
+              tmp = ''
+            }
           }
-        }
         return tmp ? Object.assign(item,tmp) : tmp
       });
 
+      console.log(this.tmpRoute);
+
       let temp = this.tmpRoute.filter(item=>{
           return item.key == this.activeIdx
         })

+ 6 - 2
new_backstage/src/pages/layout/head.vue

@@ -32,7 +32,11 @@ export default {
       userInfo:{}
     }
   },
-  watch: {},
+  watch: {
+    isShowEdit(){
+      this.getDetail()
+    }
+  },
   methods: {
     logoutcomfirm(){
       this.confirm('确定退出登录?',()=>{
@@ -94,7 +98,7 @@ export default {
 }
 .header-title img{
   vertical-align: middle;
-  max-width: 76px;
+  max-width: 56px;
   margin-right: 4px;
 }
 .header-title span{

+ 4 - 0
new_backstage/src/pages/login/index.vue

@@ -134,6 +134,10 @@ export default {
        height: auto;
        display: flex;
         align-items: center;
+        >img{
+          width: 60px;
+          margin-right: 10px;
+        }
         span{
           color: #fff;
           font-size: 24px;

+ 3 - 0
new_backstage/src/pages/system/role/componets/manage.vue

@@ -28,6 +28,9 @@ export default {
         item.children.forEach((sub) => {
           if (sub.children) {
             sub.children.forEach((son) => {
+              if (sub.name=='英烈信息'&&son.name=='新增') {
+                son.name='登记'
+              }
               if (son.authority) {
                 tmp.push(son.id);
               }

+ 9 - 2
new_backstage/src/pages/system/role/index.vue

@@ -50,12 +50,16 @@
             </template>
             <el-table-column slot="operate" label="操作" width="190">
               <template slot-scope="scope">
-                <span class="o-span" @click="gotoEdit(scope.row)"
+                <template v-if="!scope.row.roleKey">
+                  <span class="o-span" @click="gotoEdit(scope.row)"
                   >权限设置</span
                 >
                 <span class="o-span" @click="openDilog(scope.row)">编辑</span>
                 <span class="o-span" @click="delSys(scope.row)">删除</span>
+                </template>
+                <template v-else>-</template>
               </template>
+
             </el-table-column>
           </vtable>
         </div>
@@ -145,12 +149,15 @@ export default {
       this.currentForm = item?item:{}
     },
     gtoUser(item){
-      this.$router.push({path:'/user/manage',query:{roleId:item.id}})
+      if (item.count) {
+        this.$router.push({path:'/user/manage',query:{roleId:item.id}})
+      }
     }
   },
   computed: {
     ...mapGetters({
       activeMenu: "activeMenu",
+      activeSub:"activeSub"
     }),
     data() {
       return raw[this.$route.params.type];

+ 1 - 1
new_backstage/src/pages/system/user/edit.vue

@@ -98,7 +98,7 @@ export default {
           isEnabled:Number(this.form.isEnabled)
         }
         saveSys(this.val,params,()=>{
-          this.$alert('编辑成功(默认密码123456)', '提示', {
+          this.$alert('编辑成功', '提示', {
               confirmButtonText: '确定',
               callback: () => {
                 this.backList()

+ 5 - 1
new_backstage/src/pages/system/user/index.vue

@@ -79,7 +79,7 @@
 <script>
 import { raw } from "./data";
 import { getSysList,delSys } from "@/configue/api";
-
+import { mapGetters } from "vuex";
 
 export default {
   data() {
@@ -157,6 +157,10 @@ export default {
     },
   },
   computed: {
+    ...mapGetters({
+      activeMenu: "activeMenu",
+      activeSub:"activeSub"
+    }),
     data() {
       return raw[this.$route.params.type];
     },

+ 0 - 15
web/public/index.html

@@ -8,24 +8,9 @@
     <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, minimal-ui">
     <meta name="format-detection" content="telephone=no">
     <link rel="icon" href="<%= BASE_URL %>favicon.png">
-    <link rel="stylesheet" href="<%= VUE_APP_STATIC_DIR %>/css/oldVer/main0.css"/>
-    <link rel="stylesheet" href="<%= VUE_APP_STATIC_DIR %>/css/main.css?v=2.25"/>
-    <link rel="stylesheet" href="<%= VUE_APP_STATIC_DIR %>/CAD/cad.css?v=2.25"/>
-    <script>
-        window.number = 'TEST'
-    </script>
     <title>中国人民武装警察部队新疆生产建设兵团总队史馆门户网站</title>
   </head>
   <body>
-    <script src="<%= VUE_APP_STATIC_DIR %>/js/lib/jquery-2.1.1.min.js" class="build keep"></script>
-    <script src="<%= VUE_APP_STATIC_DIR %>/js/lib/player-0.0.12.min.js" class="build keep"></script>
-    <script src="<%= VUE_APP_STATIC_DIR %>/js/Tween.js"></script>
-    <script src="<%= VUE_APP_STATIC_DIR %>/js/manage.js"></script>
-    <script src="<%= VUE_APP_STATIC_DIR %>/js/myShow.js"></script>
-    <script src="<%= VUE_APP_STATIC_DIR %>/js/overlay.js"></script>
-    <script src="<%= VUE_APP_STATIC_DIR %>/js/main_2020_show.js"></script>
-    <!-- <script src="<%= VUE_APP_STATIC_DIR %>/js/CAD/bundle.js"></script>
-    <script src="<%= VUE_APP_STATIC_DIR %>/js/CAD/loadCAD.js"></script> -->
     <div id="app"></div>
   </body>
 </html>

+ 36 - 0
web/public/scene.html

@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="renderer" content="webkit">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, minimal-ui">
+    <meta name="format-detection" content="telephone=no">
+    <link rel="icon" href="<%= BASE_URL %>favicon.png">
+    <link rel="stylesheet" href="<%= VUE_APP_STATIC_DIR %>/css/oldVer/main0.css"/>
+    <link rel="stylesheet" href="<%= VUE_APP_STATIC_DIR %>/css/main.css?v=2.25"/>
+    <link rel="stylesheet" href="<%= VUE_APP_STATIC_DIR %>/CAD/cad.css?v=2.25"/>
+    <script class="build keep">
+        window.number = 'TEST'
+        if (window.performance) {
+            window.navigationStart = window.performance.timing.navigationStart;
+        } else {
+            window.navigationStart = Date.now() + 300;
+        };
+    </script>
+    <title>中国人民武装警察部队新疆生产建设兵团总队史馆门户网站</title>
+  </head>
+  <body>
+    <script src="<%= VUE_APP_STATIC_DIR %>/js/lib/jquery-2.1.1.min.js" class="build keep"></script>
+    <script src="<%= VUE_APP_STATIC_DIR %>/js/lib/player-0.0.12.min.js" class="build keep"></script>
+    <script src="<%= VUE_APP_STATIC_DIR %>/js/Tween.js"></script>
+    <script src="<%= VUE_APP_STATIC_DIR %>/js/manage.js"></script>
+    <script src="<%= VUE_APP_STATIC_DIR %>/js/myShow.js"></script>
+    <script src="<%= VUE_APP_STATIC_DIR %>/js/overlay.js"></script>
+    <script src="<%= VUE_APP_STATIC_DIR %>/js/main_2020_show.js"></script>
+    <!-- <script src="<%= VUE_APP_STATIC_DIR %>/js/CAD/bundle.js"></script>
+    <script src="<%= VUE_APP_STATIC_DIR %>/js/CAD/loadCAD.js"></script> -->
+    <div id="app"></div>
+  </body>
+</html>

+ 0 - 1
web/public/static/css/main.css

@@ -251,7 +251,6 @@ a:focus {
 hr {
     margin-top: 20px;
     margin-bottom: 20px;
-    border-top: 1px solid #eee
 }
 
 .sr-only {

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 50 - 151
web/public/static/js/main_2020_show.js


+ 3 - 2
web/public/static/js/myShow.js

@@ -51,6 +51,7 @@ window.g_snapShotHeight = 140;
 
 window.settings = {
     overlay:{
-		width:1, height:0.5, depth:0.02
-  }
+      width:1, height:0.5, depth:0.02
+    },
+    dontExamHot:true
 }  

BIN
web/src/assets/images/btnlist/cpbg_huyangjin.png


BIN
web/src/assets/images/btnlist/datiwan_huyangjin.png


BIN
web/src/assets/images/btnlist/datiwan_yangtaojin.png


BIN
web/src/assets/images/btnlist/item_comment.png


BIN
web/src/assets/images/icon/logo.png


+ 95 - 1
web/src/assets/theme/theme.less

@@ -65,6 +65,26 @@
     }
   }
 
+  .lighttxtSameHover {
+    cursor: pointer;
+    .xshow {
+      display: none;
+    }
+    &:hover {
+      color: @color!important;
+      * {
+        color: @color!important;
+      }
+      .xhidden {
+        display: none;
+      }
+      .xshow {
+        display: inline-block;
+      }
+    }
+  }
+
+
   .primaryHover {
     cursor: pointer;
     .xshow {
@@ -364,6 +384,54 @@
     }
   }
 
+  @wh: 20px;
+  @fs: 16px;
+  .lightradio {
+    display: inline-block;
+    font-size: @fs;
+    position: relative;
+    cursor: pointer;
+    padding-left: @wh * 1.5;
+
+    &::before {
+      content: "";
+      display: inline-block;
+      position: absolute;
+      top: 50%;
+      left: 0px;
+      transform: translateY(-50%);
+      width: @wh;
+      height: @wh;
+      border: 1px solid #fff;
+      border-radius: 50%;
+    }
+    &:hover,
+    &.active {
+      color: @color!important;
+      &::before,
+      &::after {
+        content: "";
+        display: inline-block;
+        position: absolute;
+        top: 50%;
+        left: 0px;
+        transform: translateY(-50%);
+        width: @wh;
+        height: @wh;
+        border: 1px solid @color!important;
+        border-radius: 50%;
+        background: @color;
+      }
+      &::after {
+        width: @wh*0.5;
+        height: @wh*0.5;
+        left: @wh * 0.25;
+        background: @backcolor;
+      }
+    }
+  }
+
+
   @nwh: 18px;
   .normalradio {
     input[type="radio"] {
@@ -460,6 +528,12 @@
     cursor: pointer;
   }
 
+  .lightborderThemeStyle {
+    border: 1px solid @color;
+    cursor: pointer;
+
+  }
+
   @borderclr: #0194dd;
   @borderline: 1px;
 
@@ -544,6 +618,8 @@
     border: @backcolor 1px solid;
   }
 
+
+
   .btmLine {
     width: 100%;
     height: 4px;
@@ -552,6 +628,15 @@
     left: 0;
     bottom: 0;
   }
+
+  .lightbtmLine {
+    width: 100%;
+    height: 4px;
+    position: absolute;
+    background-color: @color;
+    left: 0;
+    bottom: 0;
+  }
   .sidebar {
     li {
       &:hover {
@@ -683,11 +768,20 @@
           }
           
           >span{
-            color: @color;
+            color: #fff;
             font-size: 20px;
             display: inline-block;
             margin-left: 20px;
           }
+
+          &.active{
+            >span{
+              color: @color;
+              font-size: 20px;
+              display: inline-block;
+              margin-left: 20px;
+            }
+          }
         }
       }
     }

+ 6 - 5
web/src/components/Paging.vue

@@ -30,13 +30,12 @@
       <span>到第</span>
       <input
         type="text"
-        :value="current"
-        @blur="ev => ev.target.value = current"
-        @keyup.enter="ev => current = Number(ev.target.value)"
+        v-model="inputval"
+        @keyup.enter="ev => current = Number(inputval)"
       >
       <span>页</span>
 
-      <span @click="ev => current = Number(ev.target.value)" class="comfirm">确定</span>
+      <span @click="ev => current = Number(inputval)" class="comfirm">确定</span>
     </div>
   </div>
 </template>
@@ -46,7 +45,8 @@ export default {
   props: ['paging','cls'],
   data() {
     return {
-      ...this.paging
+      ...this.paging,
+      inputval:''
     }
   },
   computed: {
@@ -113,6 +113,7 @@ export default {
       }
       this.$emit('changeCurrent', this.current)
     },
+   
     paging() {
         Object.keys(this.paging).forEach(k => this[k] = this.paging[k])
     },

+ 72 - 8
web/src/config/api.js

@@ -72,7 +72,7 @@ export function logout(cb) {
 export function getUserInfo(data,cb) {
   axios({
     method: "get",
-    url: `cms/web/user/detail/${data.id}`,
+    url: `cms/web/manage/user/detail/${data.id}`,
   }).then((res) => {
     cb(res);
   });
@@ -103,7 +103,7 @@ export function saveMsg(type,data, cb) {
   axios({
     method: "post",
     data: params,
-    url: `cms/web/${type}/save`,
+    url: `cms/web/manage/${type}/save`,
   }).then((res) => {
     cb(res);
   });
@@ -123,7 +123,7 @@ export function getDetailById(type,data, cb) {
 export function mournVisit(data, cb=()=>{}) {
   axios({
     method: "get",
-    url: `api/web/mourn/visit/${data.id}`,
+    url: `api/web/martyr/visit/${data.id}`,
   }).then((res) => {
     cb(res);
   });
@@ -149,7 +149,7 @@ export function getQuestionGroupList(data, cb) {
   axios({
     method: "post",
     data:params,
-    url: `cms/questionGroup/list`,
+    url: `cms/web/manage/questionGroup/list`,
   }).then((res) => {
     cb(res);
   });
@@ -160,7 +160,7 @@ export function getQuestionGroupList(data, cb) {
 export function getQuestionGroupDetail(data, cb) {
   axios({
     method: "get",
-    url: `cms/web/questionGroup/detail/${data.id}`,
+    url: `cms/web/manage/questionGroup/detail/${data.id}`,
   }).then((res) => {
     cb(res);
   });
@@ -176,7 +176,7 @@ export function submitAnswers(data, cb) {
   axios({
     method: "post",
     data: params,
-    url: `cms/web/questionUser/submit`,
+    url: `cms/web/manage/questionUser/submit`,
   }).then((res) => {
     cb(res);
   });
@@ -186,8 +186,72 @@ export function submitAnswers(data, cb) {
 export function getRanking(data, cb) {
   axios({
     method: "get",
-    url: `cms/web/questionUser/ranking/${data.id}`,
+    url: `cms/web/manage/questionUser/ranking/${data.id}`,
   }).then((res) => {
     cb(res);
   });
-}
+}
+
+
+//检测是否登录
+export function checkLogin(cb) {
+  axios({
+    method: "get",
+    url: `admin/checkLogin`,
+  }).then((res) => {
+    cb(res);
+  });
+}
+
+//检测是否可修改密码
+export function checkCanEditPsd(data,cb) {
+  axios({
+    method: "post",
+    data,
+    url: `api/web/retrieve/password`,
+  }).then((res) => {
+    cb(res);
+  });
+}
+
+//找回密码
+export function updatePwd(data,cb) {
+  axios({
+    method: "post",
+    data,
+    url: `api/web/updatePwd`,
+  }).then((res) => {
+    cb(res);
+  });
+}
+
+//修改密码
+export function updateSysPwd(data,cb) {
+  axios({
+    method: "post",
+    data,
+    url: `sys/user/updatePwd`,
+  }).then((res) => {
+    cb(res);
+  });
+}
+//获取点赞
+export function getStar(cb) {
+  axios({
+    method: "get",
+    url: `api/web/scene/getStar`,
+  }).then((res) => {
+    cb(res);
+  });
+}
+
+
+//点赞
+export function dianzan(cb) {
+  axios({
+    method: "get",
+    url: `api/web/scene/star`,
+  }).then((res) => {
+    cb(res);
+  });
+}

+ 2 - 2
web/src/config/route.js

@@ -15,9 +15,9 @@ const Detail = [
 const User = [
     { text: '注册', belong: '', link: '/register', name: 'register' },
     { text: '找回密码', belong: '', link: '/forget', name: 'forget' },
-    { text: '修改密码', belong: '', link: '/modify', name: 'modify' },
+    { text: '修改密码', belong: '', needlogin: true, link: '/modify', name: 'modify' },
     { text: '搜索页面', belong: '', link: '/search', name: 'search' },
-    { text: '个人设置', belong: '', link: '/userinfo', name: 'userinfo' }
+    { text: '个人设置', belong: '', needlogin: true, link: '/userinfo', name: 'userinfo' }
 ]
 
 export {

+ 1 - 1
web/src/main.js

@@ -1,7 +1,6 @@
 import Vue from 'vue'
 import App from './App.vue'
 import './mixins'
-import router from './router'
 import vuex from 'vuex'
 import VueChatScroll from "vue-chat-scroll";
 import 'viewerjs/dist/viewer.css'
@@ -18,6 +17,7 @@ Vue.use(Viewer,{
 Vue.use(VueChatScroll);
 Vue.use(vuex)
 
+let router = require('./router').default
 new Vue({
   router,
   store: require('./store').default,

+ 25 - 0
web/src/pages/index.js

@@ -0,0 +1,25 @@
+import Vue from 'vue'
+import App from './index.vue'
+import '@/mixins'
+import vuex from 'vuex'
+import VueChatScroll from "vue-chat-scroll";
+import 'viewerjs/dist/viewer.css'
+import Viewer from 'v-viewer'
+Vue.use(Viewer,{
+  defaultOptions: {
+    navbar:false,
+    button:false,
+    maxZoomRatio:2,
+    zIndex:1000000
+  }
+})
+
+Vue.use(VueChatScroll);
+Vue.use(vuex)
+
+let router = require('@/router').default
+new Vue({
+  router,
+  store: require('@/store').default,
+  render: h => h(App)
+}).$mount('#app')

+ 99 - 0
web/src/pages/index.vue

@@ -0,0 +1,99 @@
+<template>
+  <div id="app" :class="`theme${theme}`">
+    <layout v-if="canUse"/>
+    <div class="banbentips" v-else>
+      <div>浏览器版内核版本过低,无法正常浏览网页,建议使用Chrome(谷歌)浏览器,Firefox(火狐)浏览器(版本号80或以上),360安全浏览器(版本10或以上)</div>
+      <div>
+        <p v-html="tips[0]"></p>
+        <p v-html="tips[1]"></p>
+      </div>
+      <div>{{link}}</div>
+    </div>
+    <!-- <button @click="changeColor">改变颜色</button> -->
+  </div>
+</template>
+
+<script>
+import '@/assets/style/reset.less'
+import '@/assets/style/public.less'
+import '@/assets/theme/color.less'
+import layout from '@/views/layout/index.vue'
+import {mapState} from 'vuex'
+import broswer from '@/config/broswer'
+import whatBrowser from '@/config/core'
+
+export default {
+  components:{
+    layout
+  },
+  data(){
+    return {
+      broswer,
+      link: window.location.href,
+      tips:[],
+      canUse:false
+    }
+  },
+  methods:{
+    changeColor(){
+      document.getElementById('app').className = 'theme2'
+    }
+  },
+  // watch:{
+  //   '$route.name':{
+  //       deep:true,
+  //       handler:function (newVal) {
+  //         if (newVal != 'scene') {
+  //           if (window.player) {
+  //             window.player.sceneRenderer.suspend()
+  //             window.player.removeAllListeners()
+  //             window.player = ''
+  //           }
+  //         }
+  //       }
+  //   }
+  // },
+  mounted(){
+    this.tips = whatBrowser()
+    if(broswer.trident){
+      return this.canUse = false
+    }
+    // 火狐
+    else if(broswer.gecko){
+      let version = broswer.firefoxCore[1].split(".")[0]
+      if(Number(version)<80)
+      return this.canUse = false
+    }
+    // 谷歌
+     else if(broswer.webKit){
+      let version = broswer.chromeCore[1].split(".")[0]
+      if(Number(version)<69)
+      return this.canUse = false
+    }
+
+    this.canUse = true
+  },
+  computed:{
+    ...mapState({
+      theme: state => state.common.theme
+    })
+  }
+}
+</script>
+
+<style lang="less">
+#app {
+  text-align: center;
+  color: #2c3e50;
+  width: 100%;
+  height: 100%;
+}
+
+.banbentips{
+  color: #000;
+  width: 100%;
+  padding-top: 80px;
+  line-height: 2;
+}
+
+</style>

+ 23 - 0
web/src/pages/scene.js

@@ -0,0 +1,23 @@
+import Vue from 'vue'
+import App from './scene.vue'
+import '@/mixins'
+import vuex from 'vuex'
+import VueChatScroll from "vue-chat-scroll";
+import 'viewerjs/dist/viewer.css'
+import Viewer from 'v-viewer'
+Vue.use(Viewer,{
+  defaultOptions: {
+    navbar:false,
+    button:false,
+    maxZoomRatio:2,
+    zIndex:1000000
+  }
+})
+
+Vue.use(VueChatScroll);
+Vue.use(vuex)
+
+new Vue({
+  store: require('@/store').default,
+  render: h => h(App)
+}).$mount('#app')

+ 50 - 0
web/src/pages/scene.vue

@@ -0,0 +1,50 @@
+<template>
+  <div id="app" :class="`theme${theme}`">
+    <layout />
+  </div>
+</template>
+
+<script>
+import '@/assets/style/reset.less'
+import '@/assets/style/public.less'
+import '@/assets/theme/color.less'
+import layout from '@/views/scene/scene.vue'
+import {mapState} from 'vuex'
+
+export default {
+  components:{
+    layout
+  },
+  data(){
+    return {
+    }
+  },
+  methods:{
+   
+  },
+  mounted(){
+
+  },
+  computed:{
+    ...mapState({
+      theme: state => state.common.theme
+    })
+  }
+}
+</script>
+
+<style lang="less">
+#app {
+  text-align: center;
+  color: #2c3e50;
+  width: 100%;
+  height: 100%;
+}
+
+.banbentips{
+  color: #000;
+  width: 100%;
+  line-height: 2;
+}
+
+</style>

+ 21 - 1
web/src/router/index.js

@@ -1,6 +1,9 @@
 import Vue from 'vue'
 import VueRouter from 'vue-router'
 import { Menu,User,Detail } from '../config/route.js'
+
+import store from '@/store'
+
 Vue.use(VueRouter)
 const originalPush = VueRouter.prototype.push
 
@@ -37,7 +40,8 @@ User.forEach((item) => {
       name: item.name,
       path: `${item.link}`,
       meta: {
-          id: item.belong
+          id: item.belong,
+          needlogin: item.needlogin,
       },
       component: () => import(`../views/user/${item.name}.vue`)
   })
@@ -48,8 +52,24 @@ const router = new VueRouter({
 })
 
 router.beforeEach((to, from, next) => {
+  
+  let userInfo = store.state.common.userInfo || {}
+
+  if (to.meta.needlogin) {
+    if (userInfo.userName) {
+      window.scrollTo(0, 0)
+      next()
+    } else {
+      window.scrollTo(0, 0)
+      next({
+        path: '/'
+      })
+    }
+  }
+
   window.scrollTo(0, 0)
   next()
+
 })
 
 export default router

+ 2 - 2
web/src/views/home/Carousel.vue

@@ -4,7 +4,7 @@
       <img class="full" :src="data.img" alt="">
       <img class="real" :src="data.img" alt="">
     </div>
-      <sbutton @click.native="goto" class="enter" :name="'进入数字史馆'"/>
+    <sbutton @click.native="goto" class="enter" :name="'进入数字史馆'"/>
   </div>
 </template>
 
@@ -55,7 +55,7 @@ export default {
   height: 90px;
   color: #fff;
   line-height: 90px;
-  position: absolute!important;
+  position: fixed!important;
   bottom: 50px;
   cursor: pointer;
   z-index: 999;

+ 13 - 3
web/src/views/layout/header.vue

@@ -63,6 +63,7 @@
             <span>{{userInfo.nickName}}</span>
             <ul>
               <li class="pHover" @click="$router.push({path:'/userinfo'})">个人设置</li>
+              <li class="pHover" @click="$router.push({path:'/modify'})">修改密码</li>
               <li @click="logout" class="pHover">登出</li>
             </ul>
           </div>
@@ -166,14 +167,19 @@ export default {
       if (!userId||!token) return;
       getUserInfo({id:userId},res=>{
         this.$store.dispatch("setUserInfo", res.data);
+        this.$refs.ifr.contentWindow.postMessage({
+            source: "userInfo",
+            data:res.data,
+        },'*')
       })
     },
     submitLogout() {
       logout(()=>{
         window.localStorage.setItem("webtoken", "");
-          window.localStorage.setItem("webuserInfo", "");
-          window.localStorage.setItem("webuserId", "");
-          window.location.reload();
+        window.localStorage.setItem("webuserInfo", "");
+        window.localStorage.setItem("webuserId", "");
+        this.$store.dispatch("setUserInfo", {});
+        window.location.reload();
       })
     },
     logout() {
@@ -194,6 +200,10 @@ export default {
   mounted() {
     this.date = formatDate(new Date());
     this.getUserInfo();
+     this.$bus.$on("logout", (data) => {
+      this.showLogin = data;
+      this.submitLogout()
+    });
   },
 };
 </script>

+ 6 - 1
web/src/views/layout/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="bodycon">
+  <div class="bodycon" @keydown="handleKD">
     <mheader />
     <router-view class="route-view" :class="{canscroll:$route.name=='home'}"/>
     <maskCon @clickMask="closeLogin" v-if="showLogin">
@@ -49,6 +49,11 @@ export default {
     },
   },
   methods: {
+    handleKD(e){
+      if(this.$route.name!='scene'){
+        e.stopPropagation()
+      }
+    },
     closeLogin() {
       this.$bus.$emit("showLogin", false);
     },

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

@@ -0,0 +1,371 @@
+<template>
+  <div class="message-body">
+    <div class="message">
+        <div class="con">
+          <ul class="form">
+            <li>
+              <span>留言人:</span>
+              <div class="name">
+                <sradio @click.native="select = 'nickName'" :checked="select == 'nickName'" class="radio lightradio" :name="'使用昵称'"/>
+                <sradio @click.native="select = 'realName'" :checked="select == 'realName'" class="radio lightradio" :name="'使用真实姓名'"/>
+              </div>
+            </li>
+            <li>
+              <span>留言内容:</span>
+              <div class="input">
+                <textarea placeholder="请留下你的留言" maxlength='250' v-model="msg" rows="3" cols="80">
+                </textarea>
+                <span>{{msg.length}}/250</span>
+                <span class="loginwarn" v-if="!token" @click.stop="tologin"><img :src="require('@/assets/images/warn.png')" alt="">
+                请先登录后,再进行留言</span>
+              </div>
+              <div class="button dati_btn" @click="leaveMsg('','')">
+                <span class="active">提交</span>
+              </div>
+
+            </li>
+          </ul>
+        </div>
+        <div class="leaving">
+          <div class="title">
+            <span>全部留言
+              <i class="lightbtmLine"></i>
+            </span>
+          </div>
+          <ul class="content">
+            <li v-for="(item,i) in message" :key="i">
+              <div class="info">
+                <span class="primaryTxt">{{(item.isRealName?item.realName:item.nickName)||'匿名用户'}}</span>
+                <span>{{item.createTime}}</span>
+              </div>
+              <div class="body">
+                <span>{{item.content}}</span>
+                <div class="txtSameHovers">
+                  <img :src="require(`@/assets/images/btnlist/item_comment.png`)" alt="">
+                  <span @click="showComment(item,i)">评论</span>
+                </div>
+              </div>
+              <ul class="response-text" v-if="item.children">
+                <li v-for="(sub,idx) in item.children" :key="idx">
+                  <div>{{sub.content}}</div>
+                  <div>来自:{{sub.isRealName?sub.realName:sub.nickName}} 的评论 {{sub.createTime}}</div>
+                </li>
+              </ul>
+              <template v-if="item.showComment">
+                <div class="response input" >
+                  <textarea v-model="item.comment" rows="3" maxlength='250' cols="80" placeholder="请写下您的评论"></textarea>
+                  <span>{{item.comment.length}}/250</span>
+                </div>
+                <div class="subbutton button primarybtn" @click="leaveMsg(item,i)">提交</div>
+              </template>
+            </li>
+          </ul>
+        </div>
+        <div v-if="!loadAll" class="loadmore" @click="loadmore"><span class="lightborderThemeStyle">加载更多</span></div>
+      </div>
+  </div>
+</template>
+
+<script>
+import { getMsg,saveMsg } from "@/config/api";
+
+export default {
+  data() {
+    return {
+      msg:'',
+      message:[],
+      select: "nickName",
+      mtotal: 0,
+      mpageSize: 6,
+      mcurrentPage: 1,
+      loadAll:false
+    };
+  },
+  watch:{
+    mpageSize(){
+      this.getMessage()
+    }
+  },
+  mounted(){
+    this.getMessage()
+  },
+  methods:{
+    tologin(){
+      window.scrollTo(0,0)
+      this.$bus.$emit('showLogin',true)
+    },
+    loadmore(){
+      this.mpageSize += this.mpageSize
+    },
+    async leaveMsg(item='',i=''){
+      let tmp = (item ? item.comment : this.msg).trim()
+      if (!tmp) {
+        return alert('留言不能为空')
+      }
+      saveMsg('comment',{
+        content: tmp,
+        parentId: item.id||'',
+        isRealName: Number(this.select == 'realName')
+      },res=>{
+        if (res.code==0) {
+          this.msg = ''
+          alert('留言成功')
+          item && this.showComment(item,i)
+          this.getMessage()
+        }
+      })
+     
+    },
+    showComment(item,i){
+      item.showComment = !item.showComment
+      item.comment = ''
+      this.$set(this.message,i,item)
+    },
+    async getMessage(){
+      if (this.loadAll) return
+      getMsg({
+        pageNum: this.mcurrentPage,
+        pageSize: this.mpageSize,
+      },result=>{
+        result.data.list.forEach(item=>{
+          item.showComment = false
+          item.comment = ''
+        })
+        if (result.data.list.length==this.message.length) {
+          this.loadAll = true
+        }
+        this.message = result.data.list
+        this.mtotal= result.data.total
+      })
+      
+    }
+  }
+};
+</script>
+
+<style lang="less" scoped>
+.message-body {
+  max-width: 80%;
+  margin: 100px auto 0;
+  position: relative;
+  height: 80%;
+  z-index: 99;
+  .message{
+    height: 100%;
+    .con{
+      width: 100%;
+      .form{
+        text-align: left;
+        width: 100%;
+        >li{
+          margin-bottom: 30px;
+          display: flex;
+          width: 100%;
+          align-items: flex-start;
+          > span{
+            display: inline-block;
+            width: 100px;
+            flex-shrink: 0;
+            font-size: 20px;
+            margin-right: 10px;
+            text-align: right;
+          }
+          .name{
+            .radio{
+              margin-right: 50px;
+            }
+          }
+          .input{
+            flex: auto;
+            width: 100%;
+            position: relative;
+            font-size: 0;
+            >textarea{
+              width: 100%;
+              line-height: 2;
+              font-size: 16px;
+              color: #2d2d2d;
+            }
+            >span{
+              display: inline-block;
+              color: rgba(153, 153, 153, 1);
+              position: absolute;
+              font-size: 12px;
+              bottom: 5px;
+              right: 14px;
+            }
+            .loginwarn{
+              left: 50%;
+              right: auto;
+              transform: translateX(-50%);
+              background-color: rgba(51, 51, 51, 0.5);
+              color: #fff;
+              display: flex;
+              align-items: center;
+              bottom: 10px;
+              padding: 4px;
+              border-radius: 2px;
+              >img{
+                width: 20px;
+                margin-right: 4px;
+              }
+            }
+          }
+          .button{
+            flex-shrink: 0;
+            align-self: flex-end;
+            text-align: center;
+            border: none;
+            border-radius: 5px;
+            margin-left: 20px;
+            >span{
+              width: 100%;
+              padding: 0;
+              border-radius: 5px;
+              margin-left: 0;
+            }
+          }
+          &:last-of-type{
+            margin-bottom: 10px;
+          }
+        }
+      }
+      >div{
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        
+        .button{
+          position: relative;
+          width: 150px;
+          &:first-of-type{
+            margin-right: 50px;
+          }
+          >span{
+            position: absolute;
+            left: -220px;
+            top: 50%;
+            transform: translateY(-50%);
+            color: rgba(153, 153, 153, 1);
+            display: flex;
+            align-items: center;
+            >img{
+              width: 24px;
+              height: 24px;
+              margin-right: 8px;
+            }
+          }
+        }
+      }
+    }
+    .leaving{
+      height: 40%;
+
+      .title{
+        text-align: left;
+        font-size: 30px;
+        border-bottom: 1px solid #fff;
+        padding-bottom: 10px;
+        position: relative;
+        margin-bottom: 20px;
+        width: 98%;
+        span{
+          display: inline-block;
+          min-width: 118px;
+          font-size: 20px;
+          position: relative;
+          >i{
+            bottom: -16px;
+          }
+        }
+      }
+      .content{
+        color: #fff;
+        text-align: left;
+        padding-right: 20px;
+        overflow-y: auto;
+        height: 80%;
+        >li{
+          margin-bottom: 10px;
+          .info{
+            >span{
+              display: inline-block;
+              font-size: 20px;
+              margin-right: 10px;
+              &:not(:first-of-type){
+                font-size: 14px;
+              }
+            }
+          }
+          .body{
+            margin: 10px 0;
+            display: flex;
+            justify-content: space-between;
+            >span{
+              width: 90%;
+              word-break: break-all;
+              display: inline-block;
+              color: #fff;
+            }
+            .txtSameHovers{
+              color: #fff;
+              cursor: pointer;
+              img{
+                margin-right: 10px;
+                width: 16px;
+                position: relative;
+                top: -1px;
+              }
+            }
+          }
+          .response{
+            margin-top: 10px;
+            border: 1px #fff solid;
+            width: 100%;
+            position: relative;
+            font-size: 0;
+            >textarea{
+              line-height: 2;
+            }
+            >span{
+              display: inline-block;
+              color: #909399;
+              position: absolute;
+              font-size: 12px;
+              bottom: 5px;
+              right: 14px;
+            }
+          }
+          .response-text{
+            border: 1px rgba(153, 153, 153, 1) solid;
+            background-color: #F3F3F3;
+            padding: 10px 13px;
+            color: rgba(153, 153, 153, 1);
+            >li{
+              >div{
+                &:last-of-type{
+                  font-size: 14px;
+                  text-align: right;
+                  margin-top: 20px;
+                }
+              }
+            }
+          }
+          .subbutton{
+            display: inline-block;
+            text-align: center;
+            margin-top: 20px;
+          }
+        }
+      }
+    }
+    .loadmore{
+      margin-top: 70px;
+      .lightborderThemeStyle{
+          padding: 10px 30px;
+          border-radius: 4px;
+      }
+    }
+  }
+}
+</style>

+ 32 - 0
web/src/views/scene/components/comment/index.vue

@@ -0,0 +1,32 @@
+<template>
+  <div class="commnent">
+    <Message/>
+  </div>
+</template>
+
+<script>
+import Message from "./Message";
+
+export default {
+  components:{Message},
+  methods:{
+    
+  },
+  data(){
+    return {
+    }
+  },
+  mounted(){
+
+  }
+}
+</script>
+
+<style lang="less" scoped>
+.commnent{
+  width: 100%;
+  height: 100%;
+  color: #fff;
+}
+
+</style>

+ 3 - 2
web/src/views/scene/components/popup.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="cpcon">
+  <div class="cpcon"  @click.stop @keydown.stop>
     <div class="cpmask"></div>
     <div
       v-if="datistatus"
@@ -46,10 +46,11 @@
 
 <script>
 import question from "./question";
+import comment from "./comment";
 
 export default {
   props: ["cp"],
-  components: { question },
+  components: { question,comment },
   data() {
     return {
       datistatus: 'select',

+ 3 - 2
web/src/views/scene/components/question/datiing.vue

@@ -1,10 +1,11 @@
 <template>
-  <div class="datiing" v-if="currentTimu.question">
-    <p class="qtitle">第1/10题</p>
+  <div class="datiing" v-if="currentTimu.question" @click.stop>
+    <p class="qtitle">第{{currentIdx+1}}/{{tiku.answer.length}}题</p>
     <div class="dati">
       <p class="title">{{ currentTimu.question }}</p>
       <ul>
         <li
+          :class="{active:timuselect == item.val && !isSubmit}"
           v-for="(item, i) in currentTimu.answer"
           @click="timuselect = item.val"
           :key="i"

+ 1 - 0
web/src/views/scene/components/question/paiming.vue

@@ -87,6 +87,7 @@ export default {
             >div{
               position: relative;
               width: 100%;
+              min-width: 60px;
               >img{
                 position: absolute;
                 top: 50%;

+ 91 - 15
web/src/views/scene/gui/menu.vue

@@ -182,13 +182,32 @@
         </div>
 
         <ul class="btn-list">
-          <li @click="handleItem(item)" v-for="(item, i) in btnlist" :key="i">
+          <li @click.stop="handleItem(item)" v-for="(item, i) in btnlist" :key="i">
             <img
               :src="require(`@/assets/images/btnlist/${item.id}${btnlistActive==item.id?`_${theme}`:''}.png`)"
-              alt=""
+            />
+          </li>
+          <li @click="isBgm=!isBgm">
+            <img
+              :src="require(`@/assets/images/btnlist/bgm${isBgm?`_${theme}`:''}.png`)"
             />
           </li>
         </ul>
+
+         <ul class="btn-list">
+          <li class="like" @click="handleLike">
+            <img :src="require(`@/assets/images/btnlist/like.png`)"/>
+            <span>{{likeNum}} 点赞</span>
+            <transition name="likeAddAnimate">
+              <div class="good" v-show="isShowGood">
+                <div class="pic">
+                  <img :src="require(`@/assets/images/btnlist/like_${theme}.png`)" alt="" />
+                </div>
+                <div class="num">+1</div>
+              </div>
+            </transition>
+          </li>
+        </ul>
       </div>
     </div>
 
@@ -261,6 +280,8 @@
 
 <script>
 
+import { getStar,dianzan  } from "@/config/api";
+
 let menuli = [
   {
     id: "comment",
@@ -269,18 +290,6 @@ let menuli = [
   {
     id: "question",
     path: "",
-  },
-  {
-    id: "game",
-    path: "",
-  },
-  {
-    id: "like",
-    path: "",
-  },
-  {
-    id: "bgm",
-    path: "",
   }
 ];
 
@@ -370,7 +379,10 @@ export default {
       isGuide: true,
       conLi,
       showAutoList: false,
-      btnlistActive:this.itemctive
+      btnlistActive:this.itemctive,
+      isBgm:false,
+      isShowGood:false,
+      likeNum:0
     };
   },
   computed: {
@@ -381,13 +393,31 @@ export default {
   methods: {
     handleItem(item) {
       this.btnlistActive = item.id
+      console.log('调用了');
       this.$emit('btnactive',item.id)
     },
+    handleLike(){
+       if (this.isShowGood) return
+        this.isShowGood = true
+        dianzan(()=>{
+          this.isShowGood = true
+          setTimeout(() => {
+            this.isShowGood = false
+            this.likeNum++
+          }, 2500);
+        })
+    },
+    getStar(){
+      getStar(res=>{
+        this.likeNum = res.data
+      })
+    }
   },
   mounted(){
     this.$bus.$on('resetbtnactive',()=>{
       this.btnlistActive = ''
     })
+    this.getStar()
   }
 };
 </script>
@@ -438,6 +468,7 @@ export default {
   max-width: 0;
   border-radius: 25px;
   transition: all 0.3s ease;
+  display: flex;
   overflow: hidden;
 }
 
@@ -484,6 +515,16 @@ export default {
       height: 28px;
     }
   }
+  .like{
+    min-width: 150px;
+    width: auto;
+    >span{
+      font-size: 14px;
+      color: #fff;
+      display: inline-block;
+      margin-left: 10px;
+    }
+  }
 }
 
 .hoverCls {
@@ -574,4 +615,39 @@ export default {
     }
   }
 }
+
+
+.likeAddAnimate-enter-active,
+.likeAddAnimate-leave-active {
+  transition: all 2.8s ease;
+}
+.likeAddAnimate-enter,
+.likeAddAnimate-leave {
+  transform: translateY(0) scale(0);
+  opacity: 0;
+}
+.likeAddAnimate-enter-to,
+.likeAddAnimate-leave-to {
+  transform: translateY(-50px) scale(1.2);
+  opacity: 1;
+}
+.good {
+  position: absolute;
+  bottom: 10px;
+  right: 70px;
+  display: flex;
+  .pic {
+    width: 35px;
+    > img {
+      width: 100%;
+      height: 100%;
+    }
+  }
+  .num {
+    margin-top: 10px;
+    margin-left: 10px;
+    color: #fff;
+    text-shadow: 0 0 10px rgba(0, 0, 0, 1);
+  }
+}
 </style>

+ 13 - 177
web/src/views/scene/index.vue

@@ -1,197 +1,33 @@
 <template>
-  <div class="parent-body">
-    <!-- 热点 -->
-    <hot/>
-    <!-- 热点弹出框 -->
-    <popup/>
-    <!-- 加载初始页面 -->
-    <div id="gui-thumb"></div>
-    <!-- cad -->
-    <cad/>
-    <!-- 主容器 -->
-    <div id="player"></div>
-    <div id="gui-parent">
-        <!-- 进度条加载 -->
-        <gui-loading/>
-        <div id="gui" style="display: none;">
-
-            <!-- 退出VR模式按钮 -->
-            <div id="vrOff">
-                <img id="vrOffImg" src="images/vrOffImg.png" alt="">
-            </div>
-
-            <!-- 热点列表 -->
-            <hotspot-list/>
-
-            <!-- 标题 -->
-            <v-title/>
-
-            <!-- 底部菜单 -->
-            <v-menu @btnactive="handleActive"/>
-            
-            <!-- 导览 -->
-            <v-guide/>
-
-            <!-- logo -->
-            <div id="myCompany"
-                style="width:100%;position:absolute;bottom:20px;text-align:center;font-size:14px;font-family: '微软雅黑';font-weight:580;color: rgba(255, 255, 255, 0.8);">
-                四维时代提供技术支持
-            </div>
-        </div>
-
-        <!-- vr -->
-        <web-vr/>
-
-        <!-- loading -->
-        <div id="gui-spinner" style="display: none;">
-            <div class="gui-spinner-icon"></div>
-        </div>
-
-        <!-- guimsg -->
-        <guimsg/>
-
-        <!-- 错误提示 -->
-        <v-error/>
-
-        <vr-con/>
-        
-        <v-other/>
-        
-    </div>
-    <exhibition class="exhibition"/>
-
-      <Danmaku
-        class="danmaku"
-        :quotes="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')"
-      />
-      <vpopup @close="handlepopClose" :cp="cp" v-if="cp"/>
+  <div class="scene-body">
+    <iframe ref="ifr" src="scene.html" allowfullscreen="true" frameborder="0"></iframe>
   </div>
 </template>
 
 <script>
-import hot from './hot';
-import popup from './popup';
-import cad from './cad';
-import guiLoading from './gui/loading';
-import hotspotList from './gui/hotspotlist';
-import vTitle from './gui/title';
-import vMenu from './gui/menu';
-import vGuide from './gui/guide';
-import webVr from './gui/webvr';
-import guimsg from './gui/guimsg';
-import vError from './gui/error';
-import vrCon from './gui/vrcon';
-import vOther from './gui/other';
-import exhibition from '@/components/exhibition';
-
-import vpopup from './components/popup.vue'
-
-
 export default {
-  name: 'Home',
-  components: {
-      hot,
-      popup,
-      cad,
-      guiLoading,
-      hotspotList,
-      vTitle,
-      vMenu,
-      vGuide,
-      webVr,
-      guimsg,
-      vError,
-      vrCon,
-      vOther,
-      exhibition,
-      vpopup
-  },
   watch:{
-    '$route.query.route':function (newVal) {
-      this.page = newVal
-    }
-  },
-  mounted(){
-      this.$bus.$on('opendaolan',()=>{
-        this.showExhibition = true
-      })
-      this.starLoad()
-  },
-  methods:{
-    starLoad(){
-      window.loadMainJs()
-      window.loadMange()
-      window.loadScene()
-    },
-    handleClose(){
-      $('.cad').css('transform', 'translate(-150%,-50%)')
-      this.showExhibition=false
-    },
-    handlepopClose(){
-      this.cp = ''
-      this.$bus.$emit('resetbtnactive')
-    },
-    handleActive(data){
-      if (data=='question') {
-        this.cp = 'question'
-      }
-      console.log(data)
+    theme(newVal){
+      this.$refs.ifr.contentWindow.postMessage({
+          source: "changeTheme",
+          data:newVal,
+      },'*')
     }
-  },
-  beforeDestroy(){
-    window.hadLoad = true
-    if (window.player) {
-      window.player.sceneRenderer.suspend()
-      window.player = ''
-      $('.parent-body').remove()
-    }
-  },
-  data(){
-      return {
-        danmu:[
-          "很漂亮的线上展馆,支持!",
-          "足不出户就能浏览参观,太棒了!",
-          "期待能有机会到实体馆参观。",
-          "请问英模在第几展区?",
-          "向革命先烈们致敬。",
-          "展馆的信息介绍很详细,干货满满!",
-          "向人民解放军致敬"
-          ],
-        page: this.$route.query.route,
-        showExhibition: false,
-        cp:''
-      }
   }
 }
 </script>
 
 <style lang="less" scoped>
-
-.parent-body{
+.scene-body{
     width: 100%;
     height: calc(100vh - 100px);
     margin-top: 100px;
     padding-top: 0;
     position: relative;
     overflow: hidden;
+    >iframe{
+      width: 100%;
+      height: 100%;
+    }
 }
-
-.danmaku{
-  position: absolute;
-  bottom: 10px;
-  left: 34px;
-  z-index: 99;
-  width: 340px;
-}
-
-.exhibition{
-  position: absolute;
-  top: 50px;
-  right: 0;
-  z-index: 99;
-}
-
-</style>
+</style>

+ 245 - 0
web/src/views/scene/scene.vue

@@ -0,0 +1,245 @@
+<template>
+  <div class="parent-body">
+    <!-- 热点 -->
+    <hot/>
+    <!-- 热点弹出框 -->
+    <popup/>
+    <!-- 加载初始页面 -->
+    <div id="gui-thumb"></div>
+    <!-- cad -->
+    <cad/>
+    <!-- 主容器 -->
+    <div id="player"></div>
+    <div id="gui-parent">
+        <!-- 进度条加载 -->
+        <gui-loading/>
+        <div id="gui" style="display: none;">
+
+            <!-- 退出VR模式按钮 -->
+            <div id="vrOff">
+                <img id="vrOffImg" src="images/vrOffImg.png" alt="">
+            </div>
+
+            <!-- 热点列表 -->
+            <hotspot-list/>
+
+            <!-- 标题 -->
+            <v-title/>
+
+            <!-- 底部菜单 -->
+            <v-menu @btnactive="handleActive"/>
+            
+            <!-- 导览 -->
+            <v-guide/>
+
+            <!-- logo -->
+            <div id="myCompany"
+                style="width:100%;position:absolute;bottom:20px;text-align:center;font-size:14px;font-family: '微软雅黑';font-weight:580;color: rgba(255, 255, 255, 0.8);">
+                四维时代提供技术支持
+            </div>
+        </div>
+
+        <!-- vr -->
+        <web-vr/>
+
+        <!-- loading -->
+        <div id="gui-spinner" style="display: none;">
+            <div class="gui-spinner-icon"></div>
+        </div>
+
+        <!-- guimsg -->
+        <guimsg/>
+
+        <!-- 错误提示 -->
+        <v-error/>
+
+        <vr-con/>
+        
+        <v-other/>
+        
+    </div>
+    <exhibition class="exhibition"/>
+
+      <Danmaku
+        class="danmaku"
+        :quotes="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')"
+      />
+      <vpopup @close="handlepopClose" :cp="cp" v-if="cp"/>
+  </div>
+</template>
+
+<script>
+import hot from './hot';
+import popup from './popup';
+import cad from './cad';
+import guiLoading from './gui/loading';
+import hotspotList from './gui/hotspotlist';
+import vTitle from './gui/title';
+import vMenu from './gui/menu';
+import vGuide from './gui/guide';
+import webVr from './gui/webvr';
+import guimsg from './gui/guimsg';
+import vError from './gui/error';
+import vrCon from './gui/vrcon';
+import vOther from './gui/other';
+import exhibition from '@/components/exhibition';
+
+import vpopup from './components/popup.vue'
+
+import { checkLogin, getUserInfo  } from "@/config/api";
+
+export default {
+  name: 'Home',
+  components: {
+      hot,
+      popup,
+      cad,
+      guiLoading,
+      hotspotList,
+      vTitle,
+      vMenu,
+      vGuide,
+      webVr,
+      guimsg,
+      vError,
+      vrCon,
+      vOther,
+      exhibition,
+      vpopup
+  },
+  mounted(){
+     window.addEventListener('message',(res)=>{
+       if (Object.prototype.toString.call(res.data) == "[object Object]") {
+        if (res.data.source === "changeTheme") {
+          this.$store.dispatch("changeTheme", res.data.data);
+        }
+
+        if (res.data.source === "userInfo") {
+          console.log(res.data.data);
+          this.$store.dispatch("setUserInfo", res.data.data);
+        }
+
+        
+      }
+     })
+
+    this.$nextTick(() => {
+      if (!window.evt) {
+        window.evt = document.createEvent("HTMLEvents");
+        window.evt.initEvent("loadfinish", false, false);
+      }
+      window.addEventListener("loadfinish", ()=>{}, false);
+    });
+    
+    this.$bus.$on('opendaolan',()=>{
+      this.showExhibition = true
+    })
+    this.starLoad()
+    this.getUserInfo()
+  },
+  methods:{
+    getUserInfo() {
+      let userId = window.localStorage.getItem("webuserId");
+      let token = window.localStorage.getItem("webtoken");
+
+      if (!userId||!token) return;
+      getUserInfo({id:userId},res=>{
+        this.$store.dispatch("setUserInfo", res.data);
+        this.$refs.ifr.contentWindow.postMessage({
+            source: "userInfo",
+            data:res.data,
+        },'*')
+      })
+    },
+    starLoad(){
+      window.loadMainJs()
+      window.loadMange()
+      window.loadScene()
+    },
+    handleClose(){
+      $('.cad').css('transform', 'translate(-150%,-50%)')
+      this.showExhibition=false
+    },
+    handlepopClose(){
+      this.cp = ''
+      this.$bus.$emit('resetbtnactive')
+    },
+    handleActive(data){
+      if (data=='question') {
+        checkLogin(res=>{
+          if (res.data) {
+            this.cp = 'question'
+          }
+          else{
+            alert('请登录后操作')
+            this.$bus.$emit('resetbtnactive')
+          }
+        })
+      }
+      if (data=='comment') {
+        this.cp = 'comment'
+      }
+      console.log(data)
+    },
+    destroy() {
+      window.hadLoad = true;
+      if (window.player) {
+        window.player.sceneRenderer.suspend();
+        window.player = "";
+        $(".parent-body").remove();
+        $("#player").remove();
+        $(document).unbind('keydown')
+        $(document).off('keydown')
+      }
+    },
+  },
+  beforeDestroy(){
+    this.destroy();
+  },
+  data(){
+      return {
+        danmu:[
+          "很漂亮的线上展馆,支持!",
+          "足不出户就能浏览参观,太棒了!",
+          "期待能有机会到实体馆参观。",
+          "请问英模在第几展区?",
+          "向革命先烈们致敬。",
+          "展馆的信息介绍很详细,干货满满!",
+          "向人民解放军致敬"
+          ],
+        showExhibition: false,
+        cp:''
+      }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+
+.parent-body{
+    width: 100%;
+    height: 100%;
+    padding-top: 0;
+    position: relative;
+    overflow: hidden;
+}
+
+.danmaku{
+  position: absolute;
+  bottom: 10px;
+  left: 34px;
+  z-index: 99;
+  width: 340px;
+}
+
+.exhibition{
+  position: absolute;
+  top: 50px;
+  right: 0;
+  z-index: 99;
+}
+
+</style>

+ 6 - 2
web/src/views/spirit/index.vue

@@ -22,7 +22,7 @@
             <Search :placeholder="'请输入烈士姓名'" @search="getList" class="search deepSearch" />
           </div>
           <ul>
-            <li @click="gotomartyr(item)" v-for="(item, i) in data" :key="i">
+            <li class="txtHover" @click="gotomartyr(item)" v-for="(item, i) in data" :key="i">
               <img
                 :src="require('@/assets/images/xinjiang/lieshi_default.png')"
                 alt=""
@@ -32,7 +32,7 @@
                 :src="require(`@/assets/images/xinjiang/lieshi_active_${theme}.png`)"
                 alt=""
               />
-              <span class="txtHover">{{ item.realName }}</span>
+              <span :title="item.realName">{{ item.realName }}</span>
             </li>
           </ul>
         </div>
@@ -188,6 +188,10 @@ export default {
               text-align: center;
               color: #fff;
               position: absolute;
+              overflow: hidden;
+              text-overflow: ellipsis;
+              white-space: nowrap;
+              padding: 0 10px;
             }
           }
         }

+ 165 - 40
web/src/views/user/forget.vue

@@ -6,34 +6,62 @@
     }"
   >
     <div class="forget">
-      <p class="title primaryColor">找回密码</p>
-      <div class="form">
-        <ul v-for="(item, index) in forgetInfo" :key="index">
-          <li v-for="(sub, i) in item.arr" :key="i">
-            <span :class="{ require: sub.required }">{{ sub.label }}:</span>
-            <div class="input">
-              <input
-                :maxlength="sub.maxLength"
-                v-model="sub.val"
-                :placeholder="sub.validate"
-                @blur="handleBlur(sub)"
-                type="text"
-              />
-            </div>
-            <span class="requiretxt primaryColor">
-              <!-- {{ sub.showValidate && sub.required ? sub.validate : "" }} -->
-            </span>
-          </li>
-        </ul>
-      </div>
-      <div class="button primarybtn" @click="comfirm">下一步</div>
+      <template v-if="!code">
+        <p class="title primaryColor">找回密码</p>
+        <div class="form">
+          <ul v-for="(item, index) in forgetInfo" :key="index">
+            <li v-for="(sub, i) in item.arr" :key="i">
+              <span :class="{ require: sub.required }">{{ sub.label }}:</span>
+              <div class="input">
+                <input
+                  :maxlength="sub.maxLength"
+                  v-model="sub.val"
+                  type="text"
+                />
+              </div>
+              <span class="requiretxt primaryColor">
+                <!-- {{ sub.showValidate && sub.required ? sub.validate : "" }} -->
+              </span>
+            </li>
+          </ul>
+        </div>
+        <div class="button primarybtn" @click="comfirm">下一步</div>
+      </template>
+
+      <template v-else>
+        <p class="title primaryColor">修改密码</p>
+        <div class="form">
+          <ul v-for="(item, index) in modifyInfo" :key="index">
+            <li v-for="(sub, i) in item.arr" :key="i">
+              <span :class="{ require: sub.required }">{{ sub.label }}:</span>
+              <div class="input">
+                <input
+                  :maxlength="sub.maxLength"
+                  v-model="sub.val"
+                  :type="sub.type || 'text'"
+                />
+              </div>
+              <span class="requiretxt primaryColor">{{ sub.validate }}</span>
+            </li>
+          </ul>
+        </div>
+        <div class="button primarybtn" @click="modify">
+          确认
+          <span v-if="hadsuccess" @click.stop>
+            <img :src="require('@/assets/images/success.png')" alt="" />
+            修改成功</span
+          >
+        </div>
+      </template>
     </div>
   </div>
 </template>
 
 <script>
-// import { encodeStr } from '@/config/utils'
-// import { Base64 } from 'js-base64'
+import { encodeStr } from "@/config/utils";
+import { Base64 } from "js-base64";
+
+import { checkCanEditPsd, updatePwd } from "@/config/api";
 
 const forgetInfo = [
   {
@@ -65,7 +93,33 @@ export default {
   data() {
     return {
       forgetInfo,
-      gender: 1,
+      modifyInfo: [
+        {
+          group: "user",
+          arr: [
+            {
+              label: "登录密码",
+              key: "newPassword",
+              required: true,
+              val: "",
+              type: "password",
+              validate:
+                "密码长度为6-12位,区分字母大小写。登录密码可以由字母、数字、特殊字符组成。",
+            },
+            {
+              label: "密码确认",
+              key: "comfirmPassword",
+              val: "",
+              required: true,
+              type: "password",
+              validate: "请再次输入密码。",
+            },
+          ],
+        },
+      ],
+      code: "",
+      userName: "",
+      hadsuccess: false,
     };
   },
   methods: {
@@ -74,6 +128,9 @@ export default {
     },
     reset() {
       this.forgetInfo = forgetInfo;
+      this.modifyInfo = modifyInfo;
+      this.code = "";
+      this.userName = "";
     },
     async comfirm() {
       let params = {};
@@ -82,29 +139,78 @@ export default {
         for (let j = 0; j < item.length; j++) {
           let sub = item[j];
           params[sub["key"]] = sub["val"];
-          console.log(sub["key"], sub.showValidate && sub.required);
-          if (sub.showValidate && sub.required) {
+          if (!params[sub["key"]] && sub.required) {
             return alert("请补充信息");
           }
         }
       }
 
-      // params.password encodeStr(Base64.encode(this.password)),
-
-      let result = await this.$http({
-        method: "post",
-        data: params,
-        url: "/api/web/resetPassword",
+      checkCanEditPsd(params, (res) => {
+        if (res.data) {
+          this.code = res.data;
+          this.userName = params.userName;
+        } else {
+          alert("注册姓名与身份码不匹配,请重新输入");
+        }
       });
-      if (result.code === 0) {
-        alert("密码已重置为初始密码");
-        this.reset();
-        this.$router.push({ path: "/" });
-        setTimeout(() => {
-          window.scrollTo(0, 0);
-          this.$bus.$emit("showLogin", true);
-        }, 1000);
+    },
+    modify() {
+      let params = {};
+      for (let i = 0; i < this.modifyInfo.length; i++) {
+        let item = this.modifyInfo[i].arr;
+        for (let j = 0; j < item.length; j++) {
+          let sub = item[j];
+          params[sub["key"]] = sub["val"];
+          if (!params[sub["key"]] && sub.required) {
+            return alert("请补充信息");
+          }
+        }
+      }
+
+      if (
+        !(params.newPassword.length >= 6 && params.newPassword.length <= 12)
+      ) {
+        return alert("密码长度需为6-12位");
+      }
+
+      if (params["newPassword"] !== params["comfirmPassword"]) {
+        return alert("两次输入的密码不一致");
       }
+
+      updatePwd(
+        {
+          code: this.code,
+          newPassword: encodeStr(Base64.encode(params.newPassword)),
+          userName: this.userName,
+        },
+        () => {
+          this.modifyInfo = [
+            {
+              group: "user",
+              arr: [
+                {
+                  label: "登录密码",
+                  key: "newPassword",
+                  required: true,
+                  val: "",
+                  type: "password",
+                  validate:
+                    "密码长度为6-12位,区分字母大小写。登录密码可以由字母、数字、特殊字符组成。",
+                },
+                {
+                  label: "密码确认",
+                  key: "comfirmPassword",
+                  val: "",
+                  required: true,
+                  type: "password",
+                  validate: "请再次输入密码。",
+                },
+              ],
+            },
+          ];
+          this.hadsuccess = true;
+        }
+      );
     },
   },
 };
@@ -143,6 +249,7 @@ export default {
           margin-bottom: 20px;
           .input {
             border: #ebebeb 1px solid;
+            width: 320px;
           }
           > span {
             display: inline-block;
@@ -169,6 +276,24 @@ export default {
     .button {
       width: 280px;
       margin-top: 40px;
+      position: relative;
+      span {
+        position: absolute;
+        left: 280px;
+        min-width: 180px;
+        color: #000;
+        display: inline-block;
+        vertical-align: middle;
+        cursor: auto;
+        img {
+          width: 24px;
+          height: 24px;
+          position: relative;
+          top: -2px;
+          margin-right: 4px;
+          vertical-align: middle;
+        }
+      }
     }
   }
 }

+ 186 - 103
web/src/views/user/modify.vue

@@ -1,129 +1,212 @@
 <template>
-  <div class="modify">
-    <p class="title primaryColor">修改密码</p>
-    <div class="form">
-      <ul v-for="(item,index) in modifyInfo" :key="index">
-        <li v-for="(sub,i) in item.arr" :key="i">
-          <span :class="{'require':sub.required}">{{sub.label}}:</span>
-          <div class="input">
-            <input type="text">
-          </div>
-          <span class="requiretxt primaryColor">{{sub.validate}}</span>
-        </li>
-      </ul>
-    </div>
-    <div class="button primarybtn">确认
-      <span @click.stop>
-        <img :src="require('@/assets/images/success.png')" alt="">
-        修改成功</span>
+  <div
+    class="fcon"
+    :style="{
+      backgroundImage: `url(${require('@/assets/images/xinjiang/diwen.jpg')})`,
+    }"
+  >
+    <div class="forget">
+      <p class="title primaryColor">修改密码</p>
+      <div class="form">
+        <ul v-for="(item, index) in modifyInfo" :key="index">
+          <li v-for="(sub, i) in item.arr" :key="i">
+            <span :class="{ require: sub.required }">{{ sub.label }}:</span>
+            <div class="input">
+              <input
+                :maxlength="sub.maxLength"
+                v-model="sub.val"
+                :type="sub.type || 'text'"
+              />
+            </div>
+            <span class="requiretxt primaryColor">{{ sub.validate }}</span>
+          </li>
+        </ul>
+      </div>
+      <div class="button primarybtn" @click="modify">
+        确认
+        <span v-if="hadsuccess" @click.stop>
+          <img :src="require('@/assets/images/success.png')" alt="" />
+          修改成功</span
+        >
+      </div>
     </div>
   </div>
 </template>
 
 <script>
-const modifyInfo = [
- {
-   group:'user',
-   arr:[ {
-    label:'登录密码',
-    val:'userName',
-    required:true,
-    validate:'密码长度为6-12位,区分字母大小写。登录密码可以由字母、数字、特殊字符组成。'
-  },
+import { encodeStr } from "@/config/utils";
+import { Base64 } from "js-base64";
+
+import { updateSysPwd,logout } from "@/config/api";
+
+let modifyInfo = [
   {
-    label:'密码确认',
-    val:'userName',
-    required:true,
-    validate:'请再次输入密码。'
-  }]
- }
-]
+    group: "user",
+    arr: [
+      {
+        label: "登录密码",
+        key: "oldPassword",
+        required: true,
+        val: "",
+        type: "password",
+      },
+      {
+        label: "新密码",
+        key: "newPassword",
+        required: true,
+        val: "",
+        type: "password",
+        validate:
+          "密码长度为6-12位,区分字母大小写。登录密码可以由字母、数字、特殊字符组成。",
+      },
+      {
+        label: "密码确认",
+        key: "comfirmPassword",
+        val: "",
+        required: true,
+        type: "password",
+        validate: "请再次输入密码。",
+      },
+    ],
+  },
+];
 
 export default {
-  data(){
+  data() {
     return {
       modifyInfo,
-      gender:1
-    }
-  }
-}
+      code: "",
+      userName: "",
+      hadsuccess: false,
+    };
+  },
+  methods: {
+    handleBlur(item) {
+      item.showValidate = !item.val;
+    },
+    reset() {
+      this.modifyInfo = modifyInfo;
+    },
+  
+    modify() {
+      let params = {};
+      for (let i = 0; i < this.modifyInfo.length; i++) {
+        let item = this.modifyInfo[i].arr;
+        for (let j = 0; j < item.length; j++) {
+          let sub = item[j];
+          params[sub["key"]] = sub["val"];
+          if (!params[sub["key"]] && sub.required) {
+            return alert("请补充信息");
+          }
+        }
+      }
+
+      if (
+        !(params.newPassword.length >= 6 && params.newPassword.length <= 12)
+      ) {
+        return alert("密码长度需为6-12位");
+      }
+
+      if (params["newPassword"] !== params["comfirmPassword"]) {
+        return alert("两次输入的密码不一致");
+      }
+
+      updateSysPwd(
+        {
+          newPassword: encodeStr(Base64.encode(params.newPassword)),
+          oldPassword: encodeStr(Base64.encode(params.oldPassword)),
+          userName: this.userInfo.userName,
+        },
+        () => {
+          this.hadsuccess = true;
+          alert("修改成功,请重新登录");
+          this.$bus.$emit("logout")
+        }
+      );
+    },
+  },
+};
 </script>
 
 <style lang="less" scoped>
-.modify{
-  width: 1000px;
-  min-height: calc(100vh - 278px);
-  padding: 80px 0;
-  margin: 78px auto 0;
-  .title{
-    font-size: 30px;
-    font-weight: 700;
-    letter-spacing: 2px;
-  }
-  .sub{
-    color: #9e9e9e;
-    margin-top: 10px;
-  }
-  .form{
-    margin-top: 30px;
-    ul{
-      padding: 0 100px;
-      border-bottom: 1px solid #EBEBEB;
-      margin-bottom: 20px;
-      &:last-of-type{
-        border-bottom: none;
-      }
-      >li{
-        display: flex;
-        justify-content: space-between;
-        align-items: center;
+.fcon {
+  width: 100%;
+  .forget {
+    width: 1000px;
+    min-height: calc(100vh - 278px);
+    padding: 80px 0;
+    margin: 78px auto 0;
+    .title {
+      font-size: 30px;
+      font-weight: 700;
+      letter-spacing: 2px;
+    }
+    .sub {
+      color: #9e9e9e;
+      margin-top: 10px;
+    }
+    .form {
+      margin-top: 30px;
+      ul {
+        padding: 0 100px;
+        border-bottom: 1px solid #ebebeb;
         margin-bottom: 20px;
-        .input{
-          border: #EBEBEB 1px solid;
+        &:last-of-type {
+          border-bottom: none;
         }
-        >span{
-          display: inline-block;
-          flex: 1;
-          text-align: left;
-          margin:0 20px;
-          &:first-of-type{
-            text-align: right;
+        > li {
+          display: flex;
+          justify-content: space-between;
+          align-items: center;
+          margin-bottom: 20px;
+          .input {
+            border: #ebebeb 1px solid;
+            width: 320px;
           }
-        }
-        .require{
-          &::before{
-            content: '*';
-            color: #B9412E;
-            margin-right: 4px;
+          > span {
+            display: inline-block;
+            flex: 1;
+            text-align: left;
+            margin: 0 20px;
+            &:first-of-type {
+              text-align: right;
+            }
+          }
+          .require {
+            &::before {
+              content: "*";
+              color: #b9412e;
+              margin-right: 4px;
+            }
+          }
+          .requiretxt {
+            font-size: 12px;
           }
-        }
-        .requiretxt{
-          font-size: 12px;
         }
       }
     }
-  }
-  .button{
-    width: 280px;
-    margin-top: 40px;
-    position: relative;
-    span{
-      position: absolute;
-      left: 280px;
-      min-width: 180px;
-      color: #000;
-      display: inline-block;
-      vertical-align: middle;
-      cursor: auto;
-      img{
-        width: 24px;
-        height: 24px;
-        position: relative;
-        top: -2px;
-        margin-right: 4px;
+    .button {
+      width: 280px;
+      margin-top: 40px;
+      position: relative;
+      span {
+        position: absolute;
+        left: 280px;
+        min-width: 180px;
+        color: #000;
+        display: inline-block;
         vertical-align: middle;
+        cursor: auto;
+        img {
+          width: 24px;
+          height: 24px;
+          position: relative;
+          top: -2px;
+          margin-right: 4px;
+          vertical-align: middle;
+        }
       }
     }
   }
 }
-</style>
+</style>

+ 4 - 0
web/src/views/user/register.vue

@@ -163,6 +163,10 @@ export default {
         }
       }
 
+      if (!(params.password.length>=6 && params.password.length<=12)) {
+        return alert("密码长度需为6-12位");
+      }
+
       if (params.password !== params.verifyPassword) {
         return alert("两次密码不一致");
       }

+ 77 - 69
web/src/views/user/userinfo.vue

@@ -4,23 +4,26 @@
     <p class="title primaryColor">个人设置</p>
     <div class="form">
       <ul class="borderColor" v-for="(item,index) in registerInfo" :key="index">
+        <stitle :name="item.name" class="stitle"/>
+        <br/>
         <li v-for="(sub,i) in item.arr" :key="i">
           <span :class="{'require':sub.required}">{{sub.label}}:</span>
           <div class="normalradio" v-if="sub.type==='radio'">
-            <input 
-            id="man" type="radio" value="0" v-model="sub.val"/>
+            <input id="man" type="radio" value="0" v-model="sub.val"/>
             <label for="man">男</label>
             <input id="female" type="radio" value="1" v-model="sub.val" />
             <label for="female">女</label>
           </div>
           <div v-else class="input">
-            <input :maxlength="sub.maxLength" v-model="sub.val" @blur="handleBlur(sub)" :type="sub.type || 'text'" />
+            <input :disabled="sub.disable" :maxlength="sub.maxLength" v-model="editUserInfo[sub.key]" @blur="handleBlur(sub)" :type="sub.type || 'text'" />
+            <!-- <span v-if="sub.key=='password'" class="primaryColor">修改密码</span> -->
           </div>
-          <span class="requiretxt primaryColor">{{(sub.showValidate&&sub.required)?sub.validate:''}}</span>
         </li>
       </ul>
     </div>
-    <div class="button primarybtn" @click="comfirm">立即注册</div>
+    <div class="button" @click="$router.back()">取消</div>
+    <div class="button primarybtn" @click="comfirm">确认</div>
+
   </div>
  </div>
 </template>
@@ -30,40 +33,33 @@ const registerInfo = [
   {
     group: "user",
     arr: [
-      {
-        label: "真实姓名",
+       {
+        label: "身份码",
+        key: "userName",
+        maxLength: 40,
         val: "",
         showValidate: true,
-        key: "realName",
-        maxLength:20,
         required: true,
-        validate: "请使用真实姓名。",
+        disable:true,
+        validate: "请填写真实军人证件或身份证件号码。",
       },
       {
-        label: "昵称",
+        label: "真实姓名",
         val: "",
         maxLength:5,
         showValidate: true,
-        key: "nickName",
-        required: true,
-        validate: "昵称字数为1-5个字。",
-      },
-      {
-        label: "性别",
-        val: 0,
-        key: "sex",
-        type: "radio",
+        key: "realName",
+        disable:true,
         required: true,
-        validate: "",
+        validate: "请使用真实姓名。",
       },
       {
-        label: "身份码",
-        key: "userName",
-        maxLength: 40,
+        label: "联系电话",
+        key: "phone",
+        maxLength: 20,
         val: "",
         showValidate: true,
-        required: true,
-        validate: "请填写真实军人证件或身份证件号码。",
+        validate: "",
       },
       {
         label: "单位名称",
@@ -72,6 +68,7 @@ const registerInfo = [
         val: "",
         showValidate: true,
         required: true,
+        disable:true,
         validate: "请输入目前所在单位名称。",
       },
       {
@@ -83,52 +80,47 @@ const registerInfo = [
         validate: "",
       },
       {
-        label: "联系电话",
-        key: "phone",
-        maxLength: 20,
-        val: "",
-        showValidate: true,
+        label: "性别",
+        val: 0,
+        key: "sex",
+        type: "radio",
+        required: true,
         validate: "",
       },
     ],
+    name:'基本信息'
   },
   {
     group: "password",
     arr: [
       {
-        label: "登录密码",
-        val: "",
-        showValidate: true,
-        type: "password",
-        maxLength: 12,
-        key: "password",
-        required: true,
-        validate:
-          "密码长度为6-12位,区分字母大小写。登录密码可以由字母、数字、特殊字符组成。",
-      },
-      {
-        label: "密码确认",
+        label: "用户昵称",
         val: "",
+        maxLength:5,
         showValidate: true,
-        type: "password",
-        maxLength: 12,
-        key: "verifyPassword",
+        key: "nickName",
         required: true,
-        validate: "请重复填写密码。",
-      },
+        validate: "请使用真实姓名。",
+      }
     ],
+    name:'账户信息'
   },
 ];
 
 export default {
   data() {
     return {
-      registerInfo,
-      gender: 1,
+      registerInfo
     };
   },
+  computed:{
+    editUserInfo(){
+      return {...this.userInfo}
+    }
+  },
   mounted(){
         this.reset()
+        console.log(this.editUserInfo);
   },
   methods: {
     handleBlur(item) {
@@ -143,27 +135,26 @@ export default {
         let item = this.registerInfo[i].arr;
         for (let j = 0; j < item.length; j++) {
           let sub = item[j]
-          params[sub['key']] = sub['val']
-          console.log(sub['key'],sub.showValidate&&sub.required);
-          if(sub.showValidate&&sub.required) {
+          params[sub['key']] = this.editUserInfo[sub['key']]
+          console.log(sub['key'],params[sub['key']]);
+          if(!params[sub['key']]&&params[sub['key']]!==0&&sub.required) {
             return alert('请补充信息')
           }
         }
       }
-      
       let result = await this.$http({
         method: "post",
-        data: params,
-        url: "/api/web/register",
+        data: {
+          ...params,
+          id:this.userInfo.id
+        },
+        url: "cms/web/manage/save",
       });
       if (result.code === 0) {
-        alert('注册成功')
+        alert('修改成功')
         this.reset()
+        this.$store.dispatch("setUserInfo", {...this.userInfo,...this.editUserInfo});
         this.$router.push({path:'/'})
-        setTimeout(() => {
-          window.scrollTo(0,0)
-          this.$bus.$emit('showLogin',true)
-        }, 1000);
       }
       else{
         alert(result.msg)
@@ -176,8 +167,8 @@ export default {
 <style lang="less" scoped>
 .freg{
 .register {
-  width: 1000px;
-  margin: 78px auto;
+  width: 1300px;
+  margin: 40px auto 0;
   .title {
     font-size: 30px;
     font-weight: 700;
@@ -193,20 +184,36 @@ export default {
       padding: 0 100px;
       border-bottom: 1px solid #ebebeb;
       margin-bottom: 20px;
+      text-align: left;
       &:last-of-type {
         border-bottom: none;
       }
+      .stitle{
+        margin: 30px 0 40px;
+      }
       > li {
-        display: flex;
-        justify-content: space-between;
-        align-items: center;
+        display: inline-block;
         margin-bottom: 20px;
+        margin-right: 20px;
         .input {
           border: #ebebeb 1px solid;
+          position: relative;
+          >span{
+            position: absolute;
+            left: 100%;
+            display: inline-block;
+            min-width: 100px;
+            margin-left: 10px;
+            transform: translateY(-50%);
+            top: 50%;
+            font-size: 14px;
+            cursor: pointer;
+          }
         }
         .normalradio {
           min-width: 207px;
           text-align: left;
+          display: inline-block;
           >label{
             margin-right: 40px;
           }
@@ -215,7 +222,8 @@ export default {
           display: inline-block;
           flex: 1;
           text-align: left;
-          margin: 0 20px;
+          margin-right: 20px;
+          min-width: 84px;
           &:first-of-type {
             text-align: right;
           }
@@ -234,8 +242,8 @@ export default {
     }
   }
   .button {
-    width: 280px;
-    margin-top: 40px;
+    width: 180px;
+    margin: 40px 20px;
   }
 }
 }

+ 6 - 0
web/vue.config.js

@@ -1,7 +1,13 @@
 const fs = require('fs');
 const path = require('path');
 
+let pages = {
+  index: 'src/pages/index.js',
+  scene: 'src/pages/scene.js',
+}
+
 module.exports = {
+  pages: pages,
   publicPath: "./",
   css: {
     loaderOptions: {