细节优化

master
gongfuxiang 2021-12-01 22:35:16 +08:00
parent 1f006c1b6c
commit f7529a3dd0
3 changed files with 16 additions and 12 deletions

View File

@ -105,7 +105,7 @@
is_first: 0,
system: system,
x: 12,
y: height - 180
y: height - 190
});
},
methods: {

View File

@ -22,18 +22,18 @@
<view class="select-address oh">
<view class="section fl">
<picker name="province" @change="select_province_event" :value="province_value" :range="province_list" range-key="name">
<view :class="'name ' + ((province_value == null) ? 'cr-grey' : 'cr-base' )">{{province_list[province_value].name || default_province}}</view>
<view :class="'name ' + ((province_value == null) ? 'cr-grey' : 'cr-base' )">{{((province_list[city_value] || null) == null) ? default_province : province_list[city_value]['name']}}</view>
</picker>
</view>
<view class="section fl">
<picker v-if="(province_id || null) != null" name="city" @change="select_city_event" :value="city_value" :range="city_list" range-key="name">
<view :class="'name ' + ((city_value == null) ? 'cr-grey' : 'cr-base' )">{{city_list[city_value].name || default_city}}</view>
<view :class="'name ' + ((city_value == null) ? 'cr-grey' : 'cr-base' )">{{((city_list[city_value] || null) == null) ? default_city : city_list[city_value]['name']}}</view>
</picker>
<text v-else class="cr-grey" @tap="region_select_error_event" data-value="">请先选择省份</text>
</view>
<view class="section fl">
<picker v-if="(city_id || null) != null" name="county" @change="select_county_event" :value="county_value" :range="county_list" range-key="name">
<view :class="'name ' + ((county_value == null) ? 'cr-grey' : 'cr-base' )">{{county_list[county_value].name || default_county}}</view>
<view :class="'name ' + ((county_value == null) ? 'cr-grey' : 'cr-base' )">{{((county_list[city_value] || null) == null) ? default_county : county_list[city_value]['name']}}</view>
</picker>
<text v-else class="cr-grey" @tap="region_select_error_event" data-value="">请先选择城市</text>
</view>
@ -103,7 +103,7 @@
data_list_loding_status: 1,
data_list_loding_msg: '',
editor_path_type: '',
address_data: null,
address_data: {},
province_list: [],
city_list: [],
county_list: [],
@ -210,7 +210,7 @@
idcard_back: ads_data == null ? '' : ads_data.idcard_back || ''
};
self.setData({
address_data: ads_data,
address_data: ads_data || {},
idcard_images_data: idcard_images,
editor_path_type: data.editor_path_type || ''
});

View File

@ -39,9 +39,16 @@
</view>
<!-- 底部操作 -->
<view class="submit-list bottom-fixed padding-main">
<button class="bg-main br-main cr-white round text-size dis-inline-block fl" type="default" hover-class="none" @tap="address_add_event"></button>
<button class="bg-main-pair br-main-pair cr-white round text-size dis-inline-block fr" type="default" hover-class="none" @tap="choose_system_address_event"></button>
<view class="bottom-fixed padding-main">
<!-- #ifdef MP -->
<view class="submit-list">
<button class="bg-main br-main cr-white round text-size dis-inline-block fl" type="default" hover-class="none" @tap="address_add_event"></button>
<button class="bg-main-pair br-main-pair cr-white round text-size dis-inline-block fr" type="default" hover-class="none" @tap="choose_system_address_event"></button>
</view>
<!-- #endif -->
<!-- #ifdef H5 || APP -->
<button class="bg-main br-main cr-white round text-size wh-auto" type="default" hover-class="none" @tap="address_add_event"></button>
<!-- #endif -->
</view>
</view>
</template>
@ -301,9 +308,7 @@
//
choose_system_address_event(e) {
console.log(e);
if(e == 1) {
console.log(0);
uni.chooseAddress({
success(res) {
var data = {
@ -344,7 +349,6 @@
}
});
} else {
console.log(1);
app.globalData.auth_check(this, 'choose_system_address_event', 'scope.address');
}
},