|
@@ -102,9 +102,10 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
- // if (option.type == 'select') {
|
|
|
- // this.isSelect = true
|
|
|
- // }
|
|
|
+ if (option.type == 'select') {
|
|
|
+ this.isSelect = true
|
|
|
+ }
|
|
|
+ console.log(option && option)
|
|
|
this.setScrollHeight()
|
|
|
// console.log(this.addressList)
|
|
|
this.initAddressList()
|
|
@@ -131,32 +132,36 @@ export default {
|
|
|
},
|
|
|
// 初始化地址列表
|
|
|
initAddressList() {
|
|
|
- // this.$api.getComStorage('orderUserInfo').then(resolve => {})
|
|
|
- // this.userId = resolve.userId
|
|
|
- // 设置默认地址 测试使用
|
|
|
- this.userId = '13914'
|
|
|
- let params = { pageNum: this.pageNum, pageSize: this.pageSize, userId: this.userId }
|
|
|
- this.UserService.QueryAddressList(params)
|
|
|
- .then(response => {
|
|
|
- console.log(response)
|
|
|
- if (response.data.list == '') {
|
|
|
- this.isEmpty = true
|
|
|
- } else {
|
|
|
- this.isEmpty = false
|
|
|
- let results = []
|
|
|
- results = response.data.list
|
|
|
- this.addressList = this.addressList.concat(results)
|
|
|
- this.pageNum = response.data.pageNum + 1
|
|
|
- if (response.data.hasNextPage) {
|
|
|
- this.isLoadMore = false
|
|
|
+ this.$api.getComStorage('clubInfo').then(resolve => {
|
|
|
+ this.userId = resolve.userId
|
|
|
+ // 设置默认地址 测试使用
|
|
|
+ // const clubInfo = uni.getStorageSync('clubInfo')
|
|
|
+ // this.userId = clubInfo.userId
|
|
|
+ // this.userId = '13914'
|
|
|
+ console.log(this.userId)
|
|
|
+ let params = { pageNum: this.pageNum, pageSize: this.pageSize, userId: this.userId }
|
|
|
+ this.UserService.QueryAddressList(params)
|
|
|
+ .then(response => {
|
|
|
+ console.log(response)
|
|
|
+ if (response.data.list == '') {
|
|
|
+ this.isEmpty = true
|
|
|
} else {
|
|
|
- this.isLoadMore = true
|
|
|
+ this.isEmpty = false
|
|
|
+ let results = []
|
|
|
+ results = response.data.list
|
|
|
+ this.addressList = this.addressList.concat(results)
|
|
|
+ this.pageNum = response.data.pageNum + 1
|
|
|
+ if (response.data.hasNextPage) {
|
|
|
+ this.isLoadMore = false
|
|
|
+ } else {
|
|
|
+ this.isLoadMore = true
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(error => {
|
|
|
- this.$util.msg(error.msg, 2000)
|
|
|
- })
|
|
|
+ })
|
|
|
+ .catch(error => {
|
|
|
+ this.$util.msg(error.msg, 2000)
|
|
|
+ })
|
|
|
+ })
|
|
|
},
|
|
|
//选择地址
|
|
|
checkAddress(item) {
|