Browse Source

Merge branch 'master' into my_loan

panyong 4 years ago
parent
commit
4b9ca644b2

+ 4 - 2
htmldev/loan/src/views/loan/apply/index.vue

@@ -69,7 +69,7 @@
       </li>
       <li>
         <label>
-          <span v-for="(str, index) in '需求金额:'" :key="index">{{ str }}</span>
+          <span v-for="(str, index) in '需求金额(元):'" :key="index">{{ str }}</span>
         </label>
         <div class="value-wrap amount-wrap">
           <input :class="{'opacity-0': postData.orderPrice * 1 > 0}" type="tel" placeholder="请输入需求金额" v-myBlur
@@ -143,7 +143,7 @@
     computed: {
       amount: {
         get () {
-          return this.postData.orderPrice ? this.postData.orderPrice * 1 : ''
+          return this.postData.orderPrice * 1 ? this.postData.orderPrice : 0
         },
         set (value) {
           this.postData.orderPrice = value
@@ -235,6 +235,7 @@
         this.postData.code = code.length > 4 ? code.slice(0, 4) : code
       },
       funCutDown () {
+        clearInterval(this.timer)
         this.timer = setInterval(() => {
           if (this.numCount === 0) {
             clearInterval(this.timer)
@@ -312,6 +313,7 @@
           orderProductId: this.orderProductId,
           ...this.postData
         }
+        console.log(postData)
         delete postData.capture
         if (!this.verifyData()) {
           Toast({

+ 5 - 0
htmldev/loan/src/views/loan/register/api/index.js

@@ -1,5 +1,10 @@
 import request from '@/api/request'
 
+export const getCommunity = () => request({
+  method: 'GET',
+  url: '/home/user/address'
+})
+
 export const register = (postData) => request({
   method: 'POST',
   url: '/home/user/create',

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

@@ -132,7 +132,7 @@
   import BScroll from 'better-scroll'
   import { Picker, Popup, Toast } from 'vant'
   import { getChinaArea, sendSMS } from '../../../api/common'
-  import { register } from './api'
+  import { getCommunity, register } from './api'
   import { getUserInfo } from '../mine/api'
 
   const STRCAPTURE = process.env.API_DOMAIN + '/api/captcha'
@@ -162,12 +162,7 @@
         showPicker0: false,
         columnsOfCity: [],
         showPicker1: false,
-        columnsOfCommunity: [
-          {
-            values: ['东海水景城'],
-            defaultIndex: 0
-          }
-        ],
+        columnsOfCommunity: [],
         showPicker2: false,
         columnsOfBuildingy: [
           {
@@ -228,6 +223,7 @@
           }
         })
         this.funInit()
+        this.fetchCommunity()
       } else {
         this.$nextTick(() => {
           if (this.scroll) {
@@ -369,6 +365,21 @@
           Toast(err)
         })
       },
+      fetchCommunity () {
+        getCommunity().then(res => {
+          const { status, data } = res
+          if (status) {
+            this.columnsOfCommunity = [
+              {
+                values: data.map(item => item.addressName),
+                defaultIndex: 0
+              }
+            ]
+          }
+        }).catch((err) => {
+          Toast(err)
+        })
+      },
       funSubmit () {
         const { orderUserName, orderUserPhone, code, orderUserProvince, orderUserCity, orderUserDistrict, orderCommunity, orderBuilding, orderRoom } = this.postData
         const postData = {

+ 1 - 0
htmldev/loan/src/views/partner/join/index.vue

@@ -202,6 +202,7 @@
         this.postData.inviteCode = inviteCode.length > 4 ? inviteCode.slice(0, 4) : inviteCode
       },
       funCutDown () {
+        clearInterval(this.timer)
         this.timer = setInterval(() => {
           if (this.numCount === 0) {
             clearInterval(this.timer)

+ 1 - 0
htmldev/loan/src/views/partner/login/index.vue

@@ -66,6 +66,7 @@
         this.postData.code = code.length > 4 ? code.slice(0, 4) : code
       },
       funCutDown () {
+        clearInterval(this.timer)
         this.timer = setInterval(() => {
           if (this.numCount === 0) {
             clearInterval(this.timer)