| | |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | | </u-form-item> |
| | | <u-form-item label="申请位置" prop="location" borderBottom ref="location" required> |
| | | <u-input v-model="info.location" border="none" placeholder="请输入" placeholderClass="f-28 c-99" |
| | | inputAlign="right"></u-input> |
| | | <!-- <u-input v-model="info.location" disabled disabledColor="#ffffff" border="none" placeholder="请选择地址" placeholderClass="f-28 c-99" |
| | | inputAlign="right"> |
| | | <template slot="suffix"> |
| | | <button class="location-btn c-main f-24" @click="getLocation()">获取地址</button> |
| | | </template> |
| | | </u-input> --> |
| | | <view class="address-row flex"> |
| | | <view class="address-content f-28" v-if="info.location"> |
| | | {{info.location}} |
| | | </view> |
| | | <view class="address-content f-28 c-99" v-if="!info.location"> |
| | | 请选择位置 |
| | | </view> |
| | | <view class="location-btn c-main f-24" @click="getLocation()"> |
| | | 获取地址 |
| | | </view> |
| | | </view> |
| | | |
| | | </u-form-item> |
| | | </view> |
| | | |
| | |
| | | let userInfo = uni.getStorageSync("userInfo"); |
| | | this.$set(this.info, "houseCode", siteInfo.id); |
| | | this.$set(this.info, "districtName", siteInfo.name); |
| | | this.$set(this.info,"checkUserName",userInfo.real_name); |
| | | this.$set(this.info,"checkTelephone",userInfo.phone); |
| | | this.$set(this.info, "checkUserId", userInfo.user_id); |
| | | }, |
| | | |
| | |
| | | }, |
| | | |
| | | methods: { |
| | | |
| | | getLocation(){ |
| | | uni.chooseLocation({ |
| | | success:(res)=>{ |
| | | this.$set(this.info,"location",res.address); |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | |
| | | formatter(type, value) { |
| | | if (type === 'year') { |
| | |
| | | color: #fff; |
| | | margin-top: 50rpx; |
| | | } |
| | | .address-row{ |
| | | flex:1; |
| | | justify-content: flex-end; |
| | | align-items:center; |
| | | } |
| | | .address-content{ |
| | | width:calc(100% - 116rpx - 20rpx); |
| | | margin-right:20rpx; |
| | | text-align: right; |
| | | } |
| | | .location-btn{ |
| | | width:116rpx; |
| | | height:46rpx; |
| | | line-height: 46rpx; |
| | | border-radius: 4rpx; |
| | | border:1px solid currentColor; |
| | | padding:0; |
| | | background-color: #fff; |
| | | text-align: center; |
| | | } |
| | | </style> |