|
@@ -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) {
|
|
@@ -368,6 +364,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 = {
|