Bladeren bron

贷款-代码优化

panyong 4 jaren geleden
bovenliggende
commit
cf3470b852

+ 8 - 6
htmldev/loan/src/views/loan/apply/index.vue

@@ -151,6 +151,8 @@
       }
       }
     },
     },
     async mounted () {
     async mounted () {
+      this.funGetChinaArea()
+      this.funGetProductDetail()
       await this.$nextTick()
       await this.$nextTick()
       const textarea = this.$refs.myTextarea
       const textarea = this.$refs.myTextarea
       if (textarea) {
       if (textarea) {
@@ -175,15 +177,15 @@
           orderDistrict: '',
           orderDistrict: '',
           orderAddress: ''
           orderAddress: ''
         }
         }
+        this.numCount = 60
         this.arrErrorList = []
         this.arrErrorList = []
         this.showPicker = false
         this.showPicker = false
-        this.columns = []
-        this.productInfo = {}
-        this.funGetChinaArea()
-        this.funGetProductDetail()
+        this.timer = null
+      } else {
+        if (this.timer) {
+          clearInterval(this.timer)
+        }
       }
       }
-      this.numCount = 60
-      clearInterval(this.timer)
       this.$route.meta.isUseCache = false
       this.$route.meta.isUseCache = false
     },
     },
     methods: {
     methods: {

+ 5 - 8
htmldev/loan/src/views/loan/coupon/index.vue

@@ -51,6 +51,10 @@
         numPositionY: 0
         numPositionY: 0
       }
       }
     },
     },
+    async mounted () {
+      await this.$nextTick()
+      this.$refreshTitle('优惠券')
+    },
     activated () {
     activated () {
       if (!this.$route.meta.isUseCache) {
       if (!this.$route.meta.isUseCache) {
         this.pager = {
         this.pager = {
@@ -73,10 +77,6 @@
       }
       }
       this.$route.meta.isUseCache = false
       this.$route.meta.isUseCache = false
     },
     },
-    async mounted () {
-      await this.$nextTick()
-      this.$refreshTitle('优惠券')
-    },
     methods: {
     methods: {
       funFetch () {
       funFetch () {
         const vm = this
         const vm = this
@@ -124,9 +124,6 @@
           Toast('出错啦')
           Toast('出错啦')
           vm.numFetchStatus = 3
           vm.numFetchStatus = 3
         })
         })
-      },
-      funJumpDetail (item) {
-        this.$router.push({ path: '/loan/detail/' + item.id })
       }
       }
     },
     },
     beforeDestroy () {
     beforeDestroy () {
@@ -138,7 +135,7 @@
       if (['loanMine'].includes(to.name)) {
       if (['loanMine'].includes(to.name)) {
         // from.meta.isUseCache = true
         // from.meta.isUseCache = true
       }
       }
-      this.numPositionY = this.scroll ? this.scroll.y : 0
+      // this.numPositionY = this.scroll ? this.scroll.y : 0
       next()
       next()
     }
     }
   }
   }

+ 7 - 25
htmldev/loan/src/views/loan/register/index.vue

@@ -186,6 +186,7 @@
       }
       }
     },
     },
     async mounted () {
     async mounted () {
+      this.funGetChinaArea()
       await this.$nextTick()
       await this.$nextTick()
       const textarea = this.$refs.myTextarea
       const textarea = this.$refs.myTextarea
       this.$refreshTitle('注册')
       this.$refreshTitle('注册')
@@ -213,27 +214,8 @@
           orderRoom: '' // 房号
           orderRoom: '' // 房号
         }
         }
         this.arrErrorList = []
         this.arrErrorList = []
-        this.showPicker0 = false
-        this.columnsOfCity = []
-        this.showPicker1 = false
-        this.columnsOfCommunity = [
-          {
-            values: ['东海水景城'],
-            defaultIndex: 0
-          }
-        ]
-        this.showPicker2 = false
-        this.columnsOfBuildingy = [
-          {
-            values: BUILDING(),
-            defaultIndex: 0
-          },
-          {
-            values: ROOM(),
-            defaultIndex: 0
-          }
-        ]
-        this.strCapture = STRCAPTURE
+        this.numCount = 60
+        this.timer = null
         this.numPositionY = 0
         this.numPositionY = 0
         this.$nextTick(() => {
         this.$nextTick(() => {
           if (!this.scroll) {
           if (!this.scroll) {
@@ -247,7 +229,6 @@
           }
           }
         })
         })
         this.funInit()
         this.funInit()
-        this.funGetChinaArea()
       } else {
       } else {
         this.$nextTick(() => {
         this.$nextTick(() => {
           if (this.scroll) {
           if (this.scroll) {
@@ -255,9 +236,10 @@
             this.scroll.scrollTo(0, this.numPositionY)
             this.scroll.scrollTo(0, this.numPositionY)
           }
           }
         })
         })
+        if (this.timer) {
+          clearInterval(this.timer)
+        }
       }
       }
-      this.numCount = 60
-      clearInterval(this.timer)
       this.$route.meta.isUseCache = false
       this.$route.meta.isUseCache = false
     },
     },
     methods: {
     methods: {
@@ -367,7 +349,7 @@
         getUserInfo().then(res => {
         getUserInfo().then(res => {
           const { status } = res
           const { status } = res
           if (status) {
           if (status) {
-            // this.$router.replace({ path: '/loan/mine' })
+            this.$router.replace({ path: '/loan/mine' })
           }
           }
         }).catch((err) => {
         }).catch((err) => {
           Toast(err)
           Toast(err)