Browse Source

type设置

chao 3 years ago
parent
commit
87e5216435

+ 3 - 2
src/views/sys/login/index.vue

@@ -101,7 +101,7 @@ export default {
   created() {
     // window.addEventListener('storage', this.afterQRScan)
     this.loginForm.username = localStorage.getItem('username')
-    this.loginForm.username = localStorage.getItem('password')
+    this.loginForm.password = localStorage.getItem('password')
   },
   mounted() {
     if (this.loginForm.username === '') {
@@ -136,7 +136,8 @@ export default {
             .dispatch('user/login', this.loginForm)
             .then(() => {
               this.$router.push({
-                path: this.redirect || '/',
+                // path: this.redirect || '/',
+                path: '/profile/index',
                 query: this.otherQuery
               })
               this.loading = false

+ 1 - 1
src/views/wechat/components/articleForm.vue

@@ -82,7 +82,6 @@ export default {
     }
   },
   created() {
-    this.article.type = this.type
     this.getFormData()
   },
   methods: {
@@ -105,6 +104,7 @@ export default {
         this.isEdit = false
         this.article = Object.assign({}, defaultArticle)
       }
+      this.article.type = this.type
     },
     resetForm(formName) {
       this.$refs[formName].resetFields()

+ 1 - 2
src/views/wechat/components/replyForm.vue

@@ -105,7 +105,6 @@ export default {
     }
   },
   created() {
-    this.reply.type = this.type
     this.textQuery.type = this.type
     this.getFormData()
     this.getTextData()
@@ -118,7 +117,6 @@ export default {
       this.$router.go(-1)
     },
     getFormData() {
-      this.reply.type = this.type
       if (this.$route.query.id) {
         this.reply.id = this.$route.query.id
         this.isEdit = true
@@ -134,6 +132,7 @@ export default {
         this.isEdit = false
         this.reply = Object.assign({}, defaultReply)
       }
+      this.reply.type = this.type
     },
     getTextData() {
       fetchTextList(this.textQuery).then(response => {

+ 1 - 1
src/views/wechat/components/textForm.vue

@@ -50,7 +50,6 @@ export default {
     }
   },
   created() {
-    this.text.type = this.type
     this.getFormData()
   },
   methods: {
@@ -73,6 +72,7 @@ export default {
         this.isEdit = false
         this.text = Object.assign({}, defaultText)
       }
+      this.text.type = this.type
     },
     resetForm(formName) {
       this.$refs[formName].resetFields()