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 Page from '../../common/page';
|
||||||
|
import AreaList from './area';
|
||||||
|
|
||||||
Page({
|
Page({
|
||||||
data: {
|
data: {
|
||||||
@ -8,15 +9,12 @@ Page({
|
|||||||
},
|
},
|
||||||
|
|
||||||
onShow() {
|
onShow() {
|
||||||
wx.request({
|
setTimeout(() => {
|
||||||
url: 'https://cashier.youzan.com/pay/wsctrade/order/buy/getAllRegion.json',
|
this.setData({
|
||||||
success: response => {
|
loading: false,
|
||||||
this.setData({
|
areaList: AreaList
|
||||||
loading: false,
|
});
|
||||||
areaList: response.data.data
|
}, 1500);
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onChange(event) {
|
onChange(event) {
|
||||||
|
@ -70,7 +70,7 @@ VantComponent({
|
|||||||
const index = pickerValue.findIndex((item, index) => item !== value[index]);
|
const index = pickerValue.findIndex((item, index) => item !== value[index]);
|
||||||
const values = displayColumns[index];
|
const values = displayColumns[index];
|
||||||
|
|
||||||
if (!value[index] || !values[value[index]]) {
|
if (index < 0 || value[index] < 0 || !values[value[index]]) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user