|
@@ -29,6 +29,13 @@
|
|
|
<view class="title">区域</view>
|
|
|
<input placeholder="请输入区域" data-val="region" @input="bindInput"></input>
|
|
|
</view>
|
|
|
+ <view class="cu-form-group">
|
|
|
+ <view class="title"> <text class="text-red text-bold padding-right-xs">*</text> 工作地点</view>
|
|
|
+ <view style="flex: 1; font-size: 30rpx; color: #AAAAAA; line-height: 100rpx;">
|
|
|
+ <input placeholder="详细地址" disabled :value="address" v-if="address"></input>
|
|
|
+ <button class="cu-btn bg-blue margin-tb-sm lg" style="width: 100%;" @tap="gpsmap()">地图选位置</button>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
<view class="padding flex flex-direction bg-white">
|
|
|
<button class="cu-btn bg-blue margin-tb-sm lg" @tap="submit">立即提交</button>
|
|
|
</view>
|
|
@@ -43,11 +50,14 @@
|
|
|
data() {
|
|
|
return {
|
|
|
isRotate: false,
|
|
|
+ address: '',
|
|
|
userinfo: {},
|
|
|
forminfo: {
|
|
|
title: '',
|
|
|
mobile: '',
|
|
|
region: '',
|
|
|
+ latitude: 0,
|
|
|
+ longitude: 0,
|
|
|
},
|
|
|
agentArray: [],
|
|
|
agentIndex: 0,
|
|
@@ -120,6 +130,16 @@
|
|
|
RegionChange(e) {
|
|
|
this.region = e.detail.value
|
|
|
},
|
|
|
+ //打开地图
|
|
|
+ gpsmap:function(){
|
|
|
+ uni.chooseLocation({
|
|
|
+ success: function (res) {
|
|
|
+ _this.address=res.address;
|
|
|
+ _this.forminfo.latitude=res.latitude;
|
|
|
+ _this.forminfo.longitude=res.longitude;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
submit() {
|
|
|
if (_this.isRotate) {
|
|
|
return false;
|
|
@@ -127,7 +147,7 @@
|
|
|
_this.isRotate = true;
|
|
|
|
|
|
let data = _this.forminfo;
|
|
|
- let validate = {"title":"姓名","mobile":"手机号","region":"区域"};
|
|
|
+ let validate = {"title":"姓名","mobile":"手机号","region":"区域","latitude":"请点击地图选择位置"};
|
|
|
for (var i in validate) {
|
|
|
if (data[i] == "") {
|
|
|
uni.showModal({
|