yuanyiming 2 年 前
コミット
cc57d5b451
2 ファイル変更31 行追加34 行削除
  1. 22 22
      src/api/userApi.js
  2. 9 12
      src/views/messageNotification.vue

+ 22 - 22
src/api/userApi.js

@@ -11,28 +11,28 @@ axios.defaults.headers.post["Content-Type"]=
 
 
 
 
 // 请求拦截
 // 请求拦截
-axios.interceptors.request.use(
-    (config)=>{
-        let token = sessionStorage.getItem('assess_token') || ''; //获取token
-        // console.log(token);
-        if(token !=''){
-            config.headers={
-                // 'assess_token':token,
-                'Authorization':token,
-                "Content-type":"application/x-www-from-urlencoded"
-            };
-            console.log(config.headers);
-        }
-        // console.log(config);
-        // config.data=qs.stringify(config.data)  //序列化post参数
-        // console.log(config.data);
-        return config;
-    },
-    (error)=>{
-        console.log("错误的传参");
-        return Promise.reject(error)
-    }
-)
+// axios.interceptors.request.use(
+//     (config)=>{
+//         let token = sessionStorage.getItem('assess_token') || ''; //获取token
+//         // console.log(token);
+//         if(token !=''){
+//             config.headers={
+//                 // 'assess_token':token,
+//                 'Authorization':token,
+//                 "Content-type":"application/x-www-from-urlencoded"
+//             };
+//             console.log(config.headers);
+//         }
+//         // console.log(config);
+//         // config.data=qs.stringify(config.data)  //序列化post参数
+//         // console.log(config.data);
+//         return config;
+//     },
+//     (error)=>{
+//         console.log("错误的传参");
+//         return Promise.reject(error)
+//     }
+// )
 
 
 // 响应拦截
 // 响应拦截
 axios.interceptors.response.use(
 axios.interceptors.response.use(

+ 9 - 12
src/views/messageNotification.vue

@@ -186,18 +186,15 @@
         },
         },
         init(){
         init(){
           //重置
           //重置
-          
-          console.log(this.textarea)
-          console.log(this.input)
-          if(this.textarea==''||this.input=='')return;
-          const date = new Date();
+          // if(this.textarea==''||this.input=='')return;
+          // const date = new Date();
 
 
-          let data = {
-            projectName:this.input,
-            date:`${date.getFullYear()}-${date.getMonth()+1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}`,
-            founder:"覃罡彤",
-          }
-          this.tableData.push(data);
+          // let data = {
+          //   projectName:this.input,
+          //   date:`${date.getFullYear()}-${date.getMonth()+1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}`,
+          //   founder:"覃罡彤",
+          // }
+          // this.tableData.push(data);
           this.dialogVisible=false;
           this.dialogVisible=false;
           this.dialogVisible1=false;
           this.dialogVisible1=false;
           this.dialogVisible2=false;
           this.dialogVisible2=false;
@@ -216,7 +213,7 @@
                 .post(this.$store.state.api+"/CreateNewNotification",param)
                 .post(this.$store.state.api+"/CreateNewNotification",param)
                 .then(res=>{
                 .then(res=>{
                     console.log(res);
                     console.log(res);
-                    // this.init()
+                    this.init()
                 },err=>{
                 },err=>{
                   console.log(err);
                   console.log(err);
                 })
                 })