地址识别按钮层级处理

master
gongfuxiang 2022-04-21 18:31:37 +08:00
parent 2f8ebb47da
commit ac2e7bc55c
2 changed files with 13 additions and 6 deletions

View File

@ -42,8 +42,11 @@
.auto-discern {
bottom: 20rpx;
right: 20rpx;
z-index: 2;
}
.auto-discern button {
line-height: inherit;
padding: 5rpx 20rpx;
padding: 5rpx 20rpx !important;
}
/*

View File

@ -57,7 +57,9 @@
<!-- 智能识别 -->
<view v-if="is_user_address_discern == 1" class="form-gorup pr br-main-pair">
<textarea @input="address_discern_value_event" class="margin-0" placeholder="粘贴整段地址,自动拆分姓名、电话及地址" placeholder-class="cr-grey" />
<button type="default" size="mini" class="auto-discern round pa bg-main-pair cr-white br-main-pair" @tap="address_discern_submit_event"></button>
<cover-view class="auto-discern pa">
<button type="default" size="mini" class="round bg-main-pair cr-white br-main-pair" @tap="address_discern_submit_event"></button>
</cover-view>
</view>
<!-- 身份证信息 -->
@ -465,7 +467,7 @@
//
if(result != null && this.is_user_address_location_discern == 1) {
this.address_discern_handle(result.address, 0, 1);
this.address_discern_handle(result, 0, 1);
}
},
@ -581,13 +583,15 @@
}
//
this.address_discern_handle(this.address_discern_value, 1, 0);
this.address_discern_handle({address: this.address_discern_value}, 1, 0);
},
//
// data
// is_user 0, 1
// type 0 , 1
address_discern_handle(address, is_user = 0, type = 0) {
address_discern_handle(data, is_user = 0, type = 0) {
data['is_user'] = is_user;
uni.showLoading({
title: "处理中...",
mask: true
@ -595,7 +599,7 @@
uni.request({
url: app.globalData.get_request_url("address", "index", "intellectstools"),
method: "POST",
data: {address: address, is_user: is_user},
data: data,
dataType: "json",
success: res => {
uni.hideLoading();