换ubuntu #30

Manually merged
asd merged 1 commits from zhengjei into master 2019-12-23 14:16:19 +08:00
485 changed files with 12277 additions and 12196 deletions

View File

@ -10,8 +10,13 @@ Page({
no: 0,
userid:"",
show: false,
arealist:[],
area:["请选择","请选择","请选择"]
arealist1:[],
arealist2:[],
arealist3:[],
area:["请选择","请选择","请选择"],
tagDis:[false,true,true],
active:0,
addressCity:"北京市 北京市 北京市"
},
/**
@ -23,17 +28,18 @@ Page({
urldata:{
parent_id:0
},
}).then((res)=>{
console.log(res)
// console.log(res)
this.setData({
arealist:res.data.result
arealist1:res.data.result
})
console.log(this.data.arealist)
})
},
bindPickerChange(e) {
console.log(e)
// console.log(e)
},
showPopup() {
this.setData({ show: true });
@ -43,7 +49,7 @@ Page({
this.setData({ show: false });
},
onMyEvent(e) {
console.log(e)
// console.log(e)
for (let i = 0; i < 8; i++) {
if (i == e.currentTarget.dataset.no) {
this.data.canshu[i] = e.detail
@ -51,10 +57,10 @@ Page({
}
console.log(this.data.canshu)
// console.log(this.data.canshu)
},
choose(e){
console.log(e.currentTarget.dataset.id,e.currentTarget.dataset.name,e.currentTarget.dataset)
choose1(e){
// console.log(e.currentTarget.dataset.id,e.currentTarget.dataset.name,e.currentTarget.dataset)
let type=parseInt(e.currentTarget.dataset.type)
request({
url: "User/getArea",
@ -62,24 +68,99 @@ Page({
parent_id:e.currentTarget.dataset.id
},
}).then((res)=>{
console.log(res)
if(res.data.result.length){
// console.log(res)
this.setData({
arealist1:res.data.result
arealist2:res.data.result,
active:1
})
// this.data.area[type]=e.currentTarget.dataset.name
console.log(this.data.area,123)
}
this.setData({
tagDis:[false,false,true]
})
// console.log(this.data.area,123)
this.data.area[0]=e.currentTarget.dataset.name
// for(let i in this.data.area){
// if(i==type){
// this.data.area[i]=e.currentTarget.dataset.name
// }
// }
this.data.area[0]=e.currentTarget.dataset.name
this.setData({
area:this.data.area
})
console.log(this.data.area,this.data.arealist)
// console.log(this.data.area,this.data.arealist)
})
},
choose2(e){
// console.log(e.currentTarget.dataset.id,e.currentTarget.dataset.name,e.currentTarget.dataset)
let type=parseInt(e.currentTarget.dataset.type)
request({
url: "User/getArea",
urldata:{
parent_id:e.currentTarget.dataset.id
},
}).then((res)=>{
this.setData({
arealist3:res.data.result,
active:2,
tagDis:[false,false,false]
})
// this.data.area[type]=e.currentTarget.dataset.name
// console.log(this.data.area,123)
this.data.area[1]=e.currentTarget.dataset.name
// for(let i in this.data.area){
// if(i==type){
// this.data.area[i]=e.currentTarget.dataset.name
// }
// }
this.setData({
area:this.data.area
})
// console.log(this.data.area,this.data.arealist)
console.log(this.data.arealist3+"001",this.data.active+"002",this.data.tagDis+"003")
})
},
choose3(e){
// console.log(e.currentTarget.dataset.id,e.currentTarget.dataset.name,e.currentTarget.dataset)
let type=parseInt(e.currentTarget.dataset.type)
request({
url: "User/getArea",
urldata:{
parent_id:e.currentTarget.dataset.id
},
}).then((res)=>{
// console.log(res)
this.setData({
arealist1:res.data.result,
tagDis:[false,false,false],
active:1
})
// this.data.area[type]=e.currentTarget.dataset.name
// console.log(this.data.area,123)
this.data.area[2]=e.currentTarget.dataset.name
// for(let i in this.data.area){
// if(i==type){
// this.data.area[i]=e.currentTarget.dataset.name
// }
// }}
console.log(93)
this.setData({
area:this.data.area,
show: false,
addressCity:this.data.area[0]+this.data.area[1]+this.data.area[2]
})
console.log(this.data.active,94)
// console.log(this.data.area,this.data.arealist)
})
},
save() {
@ -89,7 +170,7 @@ Page({
request({
url: "User/validateOpenid",
}).then((res)=>{
console.log(res,1452)
// console.log(res,1452)
this.setData({
userid:res.data.data.user_id
})
@ -113,7 +194,7 @@ Page({
zipcode: "271103",
}
}).then((res)=>{
console.log(res)
// console.log(res)
})
})

View File

@ -8,27 +8,27 @@
<shuru left="城市信息" right="北京市 北京市 东城区" ifarrow="{{true}}" data-no="3"></shuru>
</picker> -->
<view bindtap="showPopup">
<shuru left="城市信息" right="北京市 北京市 东城区" ifarrow="{{true}}" data-no="3"></shuru>
<shuru left="城市信息" right="{{addressCity}}" ifarrow="{{true}}" data-no="3"></shuru>
</view>
<van-popup show="{{ show }}" position="bottom" bind:close="onClose" >
<van-tabs class="tab" swipe-threshold="5">
<van-tab title="{{area[0]}}">
<van-tabs class="tab" swipe-threshold="5" active="{{active}}">
<van-tab title="{{area[0]}}" disabled="{{tagDis[0]}}">
<view class="choose">
<view class="item" wx:for="{{arealist}}" bindtap="choose" data-type="0" data-id="{{item.id}}" data-name="{{item.name}}">
<view class="item" wx:for="{{arealist1}}" bindtap="choose1" data-type="0" data-id="{{item.id}}" data-name="{{item.name}}">
{{item.name}}
</view>
</view>
</van-tab>
<van-tab title="{{area[1]}}">
<van-tab title="{{area[1]}}" disabled="{{tagDis[1]}}" bingtap="choose2">
<view class="choose">
<view class="item" wx:for="{{arealist1}}" data-type="1" data-id="{{item.id}}" data-name="{{item.name}}">
<view class="item" wx:for="{{arealist2}}" bindtap="choose2" data-type="1" data-id="{{item.id}}" data-name="{{item.name}}">
{{item.name}}
</view>
</view>
</van-tab>
<van-tab title="{{area[2]}}">
<van-tab title="{{area[2]}}" disabled="{{tagDis[2]}}">
<view class="choose">
<view class="item" wx:for="{{arealist2}}" data-type="2" data-id="{{item.id}}" data-name="{{item.name}}">
<view class="item" wx:for="{{arealist3}}" bindtap="choose3" data-type="2" data-id="{{item.id}}" data-name="{{item.name}}">
{{item.name}}
</view>
</view>