mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
parent
bd4b73a12e
commit
69db8e9d19
3780
example/pages/area/area.js
Normal file
3780
example/pages/area/area.js
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,5 @@
|
||||
import Page from '../../common/page';
|
||||
import AreaList from './area';
|
||||
|
||||
Page({
|
||||
data: {
|
||||
@ -8,15 +9,12 @@ Page({
|
||||
},
|
||||
|
||||
onShow() {
|
||||
wx.request({
|
||||
url: 'https://cashier.youzan.com/pay/wsctrade/order/buy/getAllRegion.json',
|
||||
success: response => {
|
||||
this.setData({
|
||||
loading: false,
|
||||
areaList: response.data.data
|
||||
});
|
||||
}
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.setData({
|
||||
loading: false,
|
||||
areaList: AreaList
|
||||
});
|
||||
}, 1500);
|
||||
},
|
||||
|
||||
onChange(event) {
|
||||
|
@ -70,7 +70,7 @@ VantComponent({
|
||||
const index = pickerValue.findIndex((item, index) => item !== value[index]);
|
||||
const values = displayColumns[index];
|
||||
|
||||
if (!value[index] || !values[value[index]]) {
|
||||
if (index < 0 || value[index] < 0 || !values[value[index]]) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user