12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- <template>
- <view class="shop-list">
- <view class="item" v-for="item in list" :key="item.shopVo.shopId" @click="jump('/detail/shopDetail/shopDetail',item)">
- <view class="info">
- <view class="shop-name">
- {{item.shopVo.shopName}}
- </view>
- <view class="address">
- {{item.district}} {{(item.shopVo.distance/1000).toFixed(2)}} km
- </view>
- </view>
- <image class="icon" src="../../static/shop-desc.png" mode=""></image>
- </view>
-
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- list: []
- }
- },
- methods: {
- jump(url,item) {
- uni.setStorageSync('shopInfo',JSON.stringify(item))
- uni.navigateTo({
- url
- })
- },
-
- },
- onLoad() {
- this.list = JSON.parse(uni.getStorageSync('shopList'))
- }
- }
- </script>
- <style lang="scss" scoped>
- .shop-list{
- background: #F9F9F9;
- min-height: 100vh;
- padding: 20rpx 24rpx;
- .item{
- padding: 24rpx;
- background: #fff;
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin-bottom: 20rpx;
- .info{
- .shop-name{
- font-size: 28rpx;
- color: #222222;
- }
- .address{
- font-size: 24rpx;
- color: #AAAAAA;
- margin-top: 16rpx;
- }
- }
- .icon{
- width: 48rpx;
- height: 48rpx;
- transform: rotate(-90deg);
- }
- }
- }
- </style>
|