Commit adbaad12 by 陈超

T

parent 93c8975f
...@@ -151,7 +151,8 @@ ...@@ -151,7 +151,8 @@
address: "{$address['address']}", address: "{$address['address']}",
showPicker: false, showPicker: false,
loading: false, loading: false,
columns: [] columns: [],
selected: []
} }
}, },
created:function(){ created:function(){
...@@ -173,6 +174,10 @@ ...@@ -173,6 +174,10 @@
onArea: function() { onArea: function() {
let that = this let that = this
that.showPicker = true that.showPicker = true
if(that.selected.length == 0) {
that.loading = true
that.getCity(that.columns[0].id)
}
}, },
onAreaConfirm: function(r, values) { onAreaConfirm: function(r, values) {
...@@ -181,18 +186,18 @@ ...@@ -181,18 +186,18 @@
}, },
onAreaChange: function(r, values) { onAreaChange: function(r, values) {
console.log(values)
}, },
saveAddress: function() { saveAddress: function() {
}, },
//Helper //Helper
getCity: function() { getCity: function(id) {
$.ajax({ $.ajax({
type:'POST', type:'POST',
url:"{:U('home/User/getAreaList')}", url:"{:U('home/User/getAreaList')}",
data:{id:id}, data: id,
dataType:'json', dataType:'json',
success:function(res){ success:function(res){
console.log(res) console.log(res)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment