Browse Source

强提醒功能添加,配置修改

asd26269546 2 years ago
parent
commit
530877d630
3 changed files with 29 additions and 13 deletions
  1. 10 3
      public/index.html
  2. 9 6
      src/components/notice.vue
  3. 10 4
      src/views/main.vue

+ 10 - 3
public/index.html

@@ -3,9 +3,16 @@
   <head>
     <meta charset="utf-8">
     <!-- <meta http-equiv="X-UA-Compatible" content="IE=edge"> -->
-    <meta name="viewport" content="width=device-width,initial-scale=1.0">
-    <!-- <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"> -->
-    <!-- <meta http-equiv="Content-Security-Policy">  -->
+
+    <!-- 测试meta配置 -->
+    <!-- <meta name="viewport" content="width=device-width,initial-scale=1.0"> -->
+
+
+    <!-- 正式meta配置 -->
+    <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+    <meta http-equiv="Content-Security-Policy"> 
+
+    
     <link rel="icon" href="<%= BASE_URL %>bts.ico">
     <!-- <title><%= htmlWebpackPlugin.options.title %></title> -->
     <title>ByteSailing 管理系统</title>

+ 9 - 6
src/components/notice.vue

@@ -8,13 +8,13 @@
             <div class="title">
                 {{ data.length == 0 ? '暂无数据' :  data[indexCopy].title}}
             </div>
-            <div class="text-content" v-if="data.length > 0">
-                {{ data[indexCopy].conetnt}}
+            <div class="text-content" v-if="data.length > 0" style="margin-top:10px">
+                {{ data[indexCopy].content}}
             </div>
             <span slot="footer" class="dialog-footer">
-                <el-button size="small" :disabled="data.length < 2">上一条</el-button>
-                <el-button size="small" :disabled="data.length == indexCopy">下一条</el-button>
-                <el-button type="primary" size="small" :disabled="data.length == 0">确认已读</el-button>
+                <el-button size="small" @click="indexCopy--" :disabled="data.length < 2 || indexCopy == 0">上一条</el-button>
+                <el-button size="small" @click="indexCopy++" :disabled="data.length == indexCopy + 1">下一条</el-button>
+                <el-button type="primary" size="small" :disabled="data.length == 0" @click="confirm">确认已读</el-button>
                 <span class="more" @click="more">查看更多 &gt;</span>
             </span>
         </el-dialog>
@@ -46,7 +46,10 @@ export default {
     },
     methods:{
         more(){
-
+            this.$emit("more", this.data[this.indexCopy])
+        },
+        confirm(){
+            this.$emit("confirm", this.data[this.indexCopy])
         },
         handleClose(){
             this.$emit("input", false)

+ 10 - 4
src/views/main.vue

@@ -1,7 +1,7 @@
 <template>
   <div id="main" class="main">
 	<header-bar></header-bar>
-	<notice :data="[{title:'123',content:'434'}]" v-model="open"></notice>
+	<notice @more="more" @confirm="confirm" :data="[{title:'11',content:'11'},{title:'22',content:'22'},{title:'33',content:'33'},{title:'44',content:'44'}]" v-model="open"></notice>
 	<!-- <el-table
 		:data="tableData"
 		style="width: 100%;margin;top:200px"
@@ -115,8 +115,8 @@ registerMicroApps([
 	{
 		name: 'fjhxCloudVue',
 		entry: isServe ?  
-			'http://192.168.1.198:1777' :  'http://36.134.91.96:10002',
-		//entry: (process.env.NODE_ENV === "development") ?  'https://wdly.bytesail.cn:10002' : 'https://wdly.bytesail.cn:10002',
+			'http://192.168.1.198:1777' :  'https://wdly.bytesail.cn:10002',
+		//entry: (process.env.NODE_ENV === "development") ?  'https://wdly.bytesail.cn:10002' : 'https://wdly.bytesail.cn:10002 http://36.134.91.96:10002',
 		container: '#appContainer',
 		activeRule: '/main/fjhxCloudVue',
 		props:{
@@ -154,7 +154,7 @@ export default {
 			input1: null,
 			tableData:[],
 			bankList:[],
-			open:true,
+			open:false,
 		}
 	},
 	computed: {
@@ -163,6 +163,12 @@ export default {
 		},
 	},
 	methods: {
+		more(){
+			console.log('更多')
+		},
+		confirm(_obj){
+			console.log(_obj)
+		},
 		renderHeader(h, para, item) {
 		return h('div', {
 				attrs: {