mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
37 lines
641 B
JavaScript
37 lines
641 B
JavaScript
import Page from '../../common/page';
|
|
import Toast from '../../dist/toast/toast';
|
|
|
|
Page({
|
|
data: {
|
|
areaList: {},
|
|
loading: true,
|
|
value: 330302
|
|
},
|
|
|
|
onShow() {
|
|
wx.request({
|
|
url: 'https://cashier.youzan.com/wsctrade/uic/address/getAllRegion.json',
|
|
success: response => {
|
|
this.setData({
|
|
loading: false,
|
|
areaList: response.data.data
|
|
});
|
|
}
|
|
});
|
|
},
|
|
|
|
onChange(event) {
|
|
const { values } = event.detail;
|
|
|
|
Toast(values.map(item => item.name).join('-'));
|
|
},
|
|
|
|
onConfirm(event) {
|
|
console.log(event);
|
|
},
|
|
|
|
onCancel(event) {
|
|
console.log(event);
|
|
}
|
|
});
|