Merge branch 'v1.8.0' of gitee.com:gongfuxiang/shopxo into v1.8.0

This commit is contained in:
devil_gong 2019-12-05 11:31:54 +08:00
commit c7e64ce3eb
10 changed files with 70 additions and 10 deletions

View File

@ -13,14 +13,16 @@
</picker> </picker>
</view> </view>
<view class="section fl br-r"> <view class="section fl br-r">
<picker name="city" onChange="select_city" value="{{city_value}}" range="{{city_list}}" range-key="name"> <picker a:if="{{(province_id || null) != null}}" name="city" onChange="select_city" value="{{city_value}}" range="{{city_list}}" range-key="name">
<view class="name {{(city_value == null) ? 'cr-888' : '' }}">{{city_list[city_value].name || default_city}}</view> <view class="name {{(city_value == null) ? 'cr-888' : '' }}">{{city_list[city_value].name || default_city}}</view>
</picker> </picker>
<text a:else class="cr-888" onTap="region_select_error_event" data-value="请先选择省份">请先选择省份</text>
</view> </view>
<view class="section fl"> <view class="section fl">
<picker name="county" onChange="select_county" value="{{county_value}}" range="{{county_list}}" range-key="name"> <picker a:if="{{(city_id || null) != null}}" name="county" onChange="select_county" value="{{county_value}}" range="{{county_list}}" range-key="name">
<view class="name {{(county_value == null) ? 'cr-888' : '' }}">{{county_list[county_value].name || default_county}}</view> <view class="name {{(county_value == null) ? 'cr-888' : '' }}">{{county_list[county_value].name || default_county}}</view>
</picker> </picker>
<text a:else class="cr-888" onTap="region_select_error_event" data-value="请先选择城市">请先选择城市</text>
</view> </view>
</view> </view>
<!-- end地区选择 --> <!-- end地区选择 -->

View File

@ -270,6 +270,7 @@ Page({
return value; return value;
}, },
// 数据提交
form_submit(e) { form_submit(e) {
var self = this, var self = this,
data = self.data; data = self.data;
@ -323,5 +324,14 @@ Page({
} }
}); });
} }
},
// 省市区未按照顺序选择提示
region_select_error_event(e) {
var value = e.currentTarget.dataset.value || null;
if(value != null)
{
app.showToast(value);
}
} }
}); });

View File

@ -261,6 +261,7 @@ Page({
return value; return value;
}, },
// 数据提交
form_submit(e) { form_submit(e) {
var self = this, var self = this,
data = self.data; data = self.data;
@ -307,5 +308,14 @@ Page({
} }
}); });
} }
},
// 省市区未按照顺序选择提示
region_select_error_event(e) {
var value = e.currentTarget.dataset.value || null;
if(value != null)
{
app.showToast(value);
}
} }
}); });

View File

@ -13,14 +13,16 @@
</picker> </picker>
</view> </view>
<view class="section fl br-r"> <view class="section fl br-r">
<picker name="city" bindchange="select_city" value="{{city_value}}" range="{{city_list}}" range-key="name"> <picker s-if="(province_id || null) != null" name="city" bindchange="select_city" value="{{city_value}}" range="{{city_list}}" range-key="name">
<view class="name {{(city_value == null) ? 'cr-888' : '' }}">{{city_list[city_value].name || default_city}}</view> <view class="name {{(city_value == null) ? 'cr-888' : '' }}">{{city_list[city_value].name || default_city}}</view>
</picker> </picker>
<text s-else class="cr-888" bindtap="region_select_error_event" data-value="请先选择省份">请先选择省份</text>
</view> </view>
<view class="section fl"> <view class="section fl">
<picker name="county" bindchange="select_county" value="{{county_value}}" range="{{county_list}}" range-key="name"> <picker s-if="(city_id || null) != null" name="county" bindchange="select_county" value="{{county_value}}" range="{{county_list}}" range-key="name">
<view class="name {{(county_value == null) ? 'cr-888' : '' }}">{{county_list[county_value].name || default_county}}</view> <view class="name {{(county_value == null) ? 'cr-888' : '' }}">{{county_list[county_value].name || default_county}}</view>
</picker> </picker>
<text s-else class="cr-888" bindtap="region_select_error_event" data-value="请先选择城市">请先选择城市</text>
</view> </view>
</view> </view>
<!-- end地区选择 --> <!-- end地区选择 -->

View File

@ -262,6 +262,7 @@ Page({
return value; return value;
}, },
// 数据提交
form_submit(e) { form_submit(e) {
var self = this, var self = this,
data = self.data; data = self.data;
@ -315,5 +316,14 @@ Page({
} }
}); });
} }
},
// 省市区未按照顺序选择提示
region_select_error_event(e) {
var value = e.currentTarget.dataset.value || null;
if(value != null)
{
app.showToast(value);
}
} }
}); });

View File

@ -13,14 +13,16 @@
</picker> </picker>
</view> </view>
<view class="section fl br-r"> <view class="section fl br-r">
<picker name="city" bindchange="select_city" value="{{city_value}}" range="{{city_list}}" range-key="name"> <picker qq:if="{{(province_id || null) != null}}" name="city" bindchange="select_city" value="{{city_value}}" range="{{city_list}}" range-key="name">
<view class="name {{(city_value == null) ? 'cr-888' : '' }}">{{city_list[city_value].name || default_city}}</view> <view class="name {{(city_value == null) ? 'cr-888' : '' }}">{{city_list[city_value].name || default_city}}</view>
</picker> </picker>
<text qq:else class="cr-888" bindtap="region_select_error_event" data-value="请先选择省份"></text>
</view> </view>
<view class="section fl"> <view class="section fl">
<picker name="county" bindchange="select_county" value="{{county_value}}" range="{{county_list}}" range-key="name"> <picker qq:if="{{(city_id || null) != null}}" name="county" bindchange="select_county" value="{{county_value}}" range="{{county_list}}" range-key="name">
<view class="name {{(county_value == null) ? 'cr-888' : '' }}">{{county_list[county_value].name || default_county}}</view> <view class="name {{(county_value == null) ? 'cr-888' : '' }}">{{county_list[county_value].name || default_county}}</view>
</picker> </picker>
<text qq:else class="cr-888" bindtap="region_select_error_event" data-value="请先选择城市"></text>
</view> </view>
</view> </view>
<!-- end地区选择 --> <!-- end地区选择 -->

View File

@ -262,6 +262,7 @@ Page({
return value; return value;
}, },
// 数据提交
form_submit(e) { form_submit(e) {
var self = this, var self = this,
data = self.data; data = self.data;
@ -315,5 +316,14 @@ Page({
} }
}); });
} }
},
// 省市区未按照顺序选择提示
region_select_error_event(e) {
var value = e.currentTarget.dataset.value || null;
if(value != null)
{
app.showToast(value);
}
} }
}); });

View File

@ -13,14 +13,16 @@
</picker> </picker>
</view> </view>
<view class="section fl br-r"> <view class="section fl br-r">
<picker name="city" bindchange="select_city" value="{{city_value}}" range="{{city_list}}" range-key="name"> <picker tt:if="{{(province_id || null) != null}}" name="city" bindchange="select_city" value="{{city_value}}" range="{{city_list}}" range-key="name">
<view class="name {{(city_value == null) ? 'cr-888' : '' }}">{{city_list[city_value].name || default_city}}</view> <view class="name {{(city_value == null) ? 'cr-888' : '' }}">{{city_list[city_value].name || default_city}}</view>
</picker> </picker>
<text tt:else class="cr-888" bindtap="region_select_error_event" data-value="请先选择省份">请先选择省份</text>
</view> </view>
<view class="section fl"> <view class="section fl">
<picker name="county" bindchange="select_county" value="{{county_value}}" range="{{county_list}}" range-key="name"> <picker tt:if="{{(city_id || null) != null}}" name="county" bindchange="select_county" value="{{county_value}}" range="{{county_list}}" range-key="name">
<view class="name {{(county_value == null) ? 'cr-888' : '' }}">{{county_list[county_value].name || default_county}}</view> <view class="name {{(county_value == null) ? 'cr-888' : '' }}">{{county_list[county_value].name || default_county}}</view>
</picker> </picker>
<text tt:else class="cr-888" bindtap="region_select_error_event" data-value="请先选择城市">请先选择城市</text>
</view> </view>
</view> </view>
<!-- end地区选择 --> <!-- end地区选择 -->

View File

@ -262,6 +262,7 @@ Page({
return value; return value;
}, },
// 数据提交
form_submit(e) { form_submit(e) {
var self = this, var self = this,
data = self.data; data = self.data;
@ -315,5 +316,14 @@ Page({
} }
}); });
} }
},
// 省市区未按照顺序选择提示
region_select_error_event(e) {
var value = e.currentTarget.dataset.value || null;
if(value != null)
{
app.showToast(value);
}
} }
}); });

View File

@ -13,14 +13,16 @@
</picker> </picker>
</view> </view>
<view class="section fl br-r"> <view class="section fl br-r">
<picker name="city" bindchange="select_city" value="{{city_value}}" range="{{city_list}}" range-key="name"> <picker wx:if="{{(province_id || null) != null}}" name="city" bindchange="select_city" value="{{city_value}}" range="{{city_list}}" range-key="name">
<view class="name {{(city_value == null) ? 'cr-888' : '' }}">{{city_list[city_value].name || default_city}}</view> <view class="name {{(city_value == null) ? 'cr-888' : '' }}">{{city_list[city_value].name || default_city}}</view>
</picker> </picker>
<text wx:else class="cr-888" bindtap="region_select_error_event" data-value="请先选择省份">请先选择省份</text>
</view> </view>
<view class="section fl"> <view class="section fl">
<picker name="county" bindchange="select_county" value="{{county_value}}" range="{{county_list}}" range-key="name"> <picker wx:if="{{(city_id || null) != null}}" name="county" bindchange="select_county" value="{{county_value}}" range="{{county_list}}" range-key="name">
<view class="name {{(county_value == null) ? 'cr-888' : '' }}">{{county_list[county_value].name || default_county}}</view> <view class="name {{(county_value == null) ? 'cr-888' : '' }}">{{county_list[county_value].name || default_county}}</view>
</picker> </picker>
<text wx:else class="cr-888" bindtap="region_select_error_event" data-value="请先选择城市">请先选择城市</text>
</view> </view>
</view> </view>
<!-- end地区选择 --> <!-- end地区选择 -->