|
@@ -2,10 +2,6 @@
|
|
|
<view class="app-content">
|
|
<view class="app-content">
|
|
|
<form @submit="formSubmit">
|
|
<form @submit="formSubmit">
|
|
|
<view class="module-com input-line-wrap">
|
|
<view class="module-com input-line-wrap">
|
|
|
- <tui-list-cell class="line-cell" :hover="false">
|
|
|
|
|
- <view class="tui-title">名称</view>
|
|
|
|
|
- <input v-model="form.name" placeholder-class="phcolor" class="tui-input" name="name" placeholder="请输入名称" maxlength="50" type="text" />
|
|
|
|
|
- </tui-list-cell>
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="openAddres">
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="openAddres">
|
|
|
<view class="tui-title">城市</view>
|
|
<view class="tui-title">城市</view>
|
|
|
<view class="tui-input" v-if="form.province || form.city">{{ form.province + '-' + form.city }}</view>
|
|
<view class="tui-input" v-if="form.province || form.city">{{ form.province + '-' + form.city }}</view>
|
|
@@ -34,7 +30,7 @@
|
|
|
<!-- 省市联动 -->
|
|
<!-- 省市联动 -->
|
|
|
<simple-address ref="simpleAddress" :pickerValueDefault="cityPickerValueDefault" @onConfirm="onCityConfirm"></simple-address>
|
|
<simple-address ref="simpleAddress" :pickerValueDefault="cityPickerValueDefault" @onConfirm="onCityConfirm"></simple-address>
|
|
|
<!-- 选择地区 -->
|
|
<!-- 选择地区 -->
|
|
|
- <app-area-sel :show.sync="showRegion" :city="form.city" @change="changeAreaFn" />
|
|
|
|
|
|
|
+ <app-area-sel :show.sync="showRegion" :city="form.city" @change="changeAreaFn" :isFocus="false" />
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
@@ -44,7 +40,7 @@ import AppAreaSel from '@/components/app-area-sel'
|
|
|
const form = require('@/utils/formValidation.js')
|
|
const form = require('@/utils/formValidation.js')
|
|
|
import {currentInfo,updateInfo} from "@/api/user"
|
|
import {currentInfo,updateInfo} from "@/api/user"
|
|
|
export default {
|
|
export default {
|
|
|
- name: 'modify',
|
|
|
|
|
|
|
+ name: 'address',
|
|
|
components: {
|
|
components: {
|
|
|
TuiListCell,
|
|
TuiListCell,
|
|
|
SimpleAddress,
|
|
SimpleAddress,
|
|
@@ -53,7 +49,6 @@ export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
form: {
|
|
form: {
|
|
|
- name: '',
|
|
|
|
|
province: '',
|
|
province: '',
|
|
|
city: '',
|
|
city: '',
|
|
|
address: '',
|
|
address: '',
|
|
@@ -70,8 +65,7 @@ export default {
|
|
|
hasMap:0 // 是否具备定位功能 0不具备 1具备
|
|
hasMap:0 // 是否具备定位功能 0不具备 1具备
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- onLoad(options) {
|
|
|
|
|
- this.hasMap = options.hasMap || 0
|
|
|
|
|
|
|
+ onLoad() {
|
|
|
this.getUserInfo()
|
|
this.getUserInfo()
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
@@ -89,6 +83,7 @@ export default {
|
|
|
})
|
|
})
|
|
|
this.region.lat = data.lat
|
|
this.region.lat = data.lat
|
|
|
this.region.long = data.long
|
|
this.region.long = data.long
|
|
|
|
|
+ this.hasMap = res.data.info.hasMap||0
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
selectRegion() {
|
|
selectRegion() {
|
|
@@ -133,11 +128,6 @@ export default {
|
|
|
},
|
|
},
|
|
|
formSubmit(e) {
|
|
formSubmit(e) {
|
|
|
let rules = [
|
|
let rules = [
|
|
|
- {
|
|
|
|
|
- name: 'name',
|
|
|
|
|
- rule: ['required'],
|
|
|
|
|
- msg: ['请输入名称']
|
|
|
|
|
- },
|
|
|
|
|
{
|
|
{
|
|
|
name: 'province',
|
|
name: 'province',
|
|
|
rule: ['required'],
|
|
rule: ['required'],
|
|
@@ -174,6 +164,32 @@ export default {
|
|
|
.module-com {
|
|
.module-com {
|
|
|
margin-bottom: 20upx;
|
|
margin-bottom: 20upx;
|
|
|
background-color: #fff;
|
|
background-color: #fff;
|
|
|
|
|
+ // 参考edit.vue的样式,增加文字和input高度
|
|
|
|
|
+ .line-cell {
|
|
|
|
|
+ .tui-title {
|
|
|
|
|
+ width: 210upx;
|
|
|
|
|
+ color: $fontColor2;
|
|
|
|
|
+ line-height: 80upx;
|
|
|
|
|
+ font-size: 30upx;
|
|
|
|
|
+ }
|
|
|
|
|
+ .tui-input {
|
|
|
|
|
+ width: calc(100% - 210upx);
|
|
|
|
|
+ font-size: 30upx;
|
|
|
|
|
+ min-height: 80upx;
|
|
|
|
|
+ padding: 20upx;
|
|
|
|
|
+ }
|
|
|
|
|
+ .tui-placeholder {
|
|
|
|
|
+ color: #ccc;
|
|
|
|
|
+ font-size: 30upx;
|
|
|
|
|
+ min-height: 80upx;
|
|
|
|
|
+ padding: 20upx;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ }
|
|
|
|
|
+ .phcolor {
|
|
|
|
|
+ color: #ccc;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
.member-wrap {
|
|
.member-wrap {
|
|
|
.member-det {
|
|
.member-det {
|
|
|
font-size: 24upx;
|
|
font-size: 24upx;
|