@@ -25,8 +25,6 @@ | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<!-- 当item.expand为true且商户数量不大于三个时 --> | <!-- 当item.expand为true且商户数量不大于三个时 --> | ||||
<view class="shop" tt:if="{{item.expand}}"> | <view class="shop" tt:if="{{item.expand}}"> | ||||
<view class='posi' tt:for="{{item.merchantVoList}}" tt:for-index="itemIndex" tt:key="{{itemIndex}}"> | <view class='posi' tt:for="{{item.merchantVoList}}" tt:for-index="itemIndex" tt:key="{{itemIndex}}"> | ||||
@@ -49,8 +49,8 @@ Page({ | |||||
bindPickerChange(e) { | bindPickerChange(e) { | ||||
const index = e.detail.value | const index = e.detail.value | ||||
const mallTenantId = this.data.shopList[index].tenantId | const mallTenantId = this.data.shopList[index].tenantId | ||||
tt.setStorageSync('mallTenantId', mallTenantId) | |||||
tt.setStorageSync('mallIndex', index) | |||||
// tt.setStorageSync('mallTenantId', mallTenantId) | |||||
// tt.setStorageSync('mallIndex', index) | |||||
this.setData({ | this.setData({ | ||||
index: index, | index: index, | ||||
mallTenantId: mallTenantId, | mallTenantId: mallTenantId, | ||||
@@ -138,9 +138,11 @@ Page({ | |||||
}).then(res => { | }).then(res => { | ||||
this.setData({ | this.setData({ | ||||
shopList: res.data, | shopList: res.data, | ||||
mallTenantId: tt.getStorageSync('mallTenantId') || res.data[0].tenantId | |||||
// tt.getStorageSync('mallTenantId') || | |||||
mallTenantId: res.data[0].tenantId | |||||
}); | }); | ||||
console.log(this.data.shopList, 'list'); | console.log(this.data.shopList, 'list'); | ||||
}).catch(err => { | }).catch(err => { | ||||
console.log(err, 'err'); | console.log(err, 'err'); | ||||
}) | }) | ||||
@@ -19,7 +19,7 @@ | |||||
<view class="picker_item"> | <view class="picker_item"> | ||||
{{shopList[index].name}} | {{shopList[index].name}} | ||||
</view> | </view> | ||||
<image class="img" src="/assets/itemImg/chevron.png"></image> | |||||
<image class="img" src="/assets/itemImg/filter.png"></image> | |||||
</view> | </view> | ||||
</picker> | </picker> | ||||
</view> | </view> | ||||
@@ -34,7 +34,7 @@ | |||||
.picker { | .picker { | ||||
margin-top: 25rpx; | margin-top: 25rpx; | ||||
padding: 25rpx 45rpx; | |||||
padding: 17rpx 45rpx; | |||||
margin-bottom: 15rpx; | margin-bottom: 15rpx; | ||||
background-color: #fff; | background-color: #fff; | ||||
} | } | ||||
@@ -44,8 +44,12 @@ | |||||
justify-content: space-between; | justify-content: space-between; | ||||
} | } | ||||
.picker .inside .picker_item { | |||||
font-size: 35rpx; | |||||
} | |||||
.picker .inside .img { | .picker .inside .img { | ||||
width: 20rpx; | |||||
width: 40rpx; | |||||
height: 40rpx; | height: 40rpx; | ||||
} | } | ||||
@@ -79,8 +79,8 @@ Page({ | |||||
bindPickerChange(e) { | bindPickerChange(e) { | ||||
const index = e.detail.value | const index = e.detail.value | ||||
const mallTenantId = this.data.shopList[index].tenantId | const mallTenantId = this.data.shopList[index].tenantId | ||||
tt.setStorageSync('mallTenantId', mallTenantId) | |||||
tt.setStorageSync('mallIndex', index) | |||||
// tt.setStorageSync('mallTenantId', mallTenantId) | |||||
// tt.setStorageSync('mallIndex', index) | |||||
this.setData({ | this.setData({ | ||||
index: index, | index: index, | ||||
mallTenantId: mallTenantId, | mallTenantId: mallTenantId, | ||||
@@ -101,7 +101,8 @@ Page({ | |||||
// current_scroll: e.id | // current_scroll: e.id | ||||
// }); | // }); | ||||
this.setData({ | this.setData({ | ||||
index: tt.getStorageSync('mallIndex') || 0, | |||||
// tt.getStorageSync('mallIndex') || | |||||
index: 0, | |||||
}) | }) | ||||
}, | }, | ||||
onShow() { | onShow() { | ||||
@@ -19,7 +19,7 @@ | |||||
<view class="picker_item"> | <view class="picker_item"> | ||||
{{shopList[index].name}} | {{shopList[index].name}} | ||||
</view> | </view> | ||||
<image class="img" src="/assets/itemImg/chevron.png"></image> | |||||
<image class="img" src="/assets/itemImg/filter.png"></image> | |||||
</view> | </view> | ||||
</picker> | </picker> | ||||
</view> | </view> | ||||
@@ -42,7 +42,7 @@ | |||||
.picker { | .picker { | ||||
margin-top: 120rpx; | margin-top: 120rpx; | ||||
padding: 25rpx 45rpx; | |||||
padding: 17rpx 45rpx; | |||||
margin-bottom: 28rpx; | margin-bottom: 28rpx; | ||||
background-color: #fff; | background-color: #fff; | ||||
} | } | ||||
@@ -52,8 +52,12 @@ | |||||
justify-content: space-between; | justify-content: space-between; | ||||
} | } | ||||
.picker .inside .picker_item { | |||||
font-size: 35rpx; | |||||
} | |||||
.picker .inside .img { | .picker .inside .img { | ||||
width: 20rpx; | |||||
width: 40rpx; | |||||
height: 40rpx; | height: 40rpx; | ||||
} | } | ||||