修复代客下单商品不展示问题
This commit is contained in:
parent
e0c008732e
commit
2840bf3b94
|
|
@ -1,6 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="u-relative u-flex item">
|
<view class="u-relative u-flex item">
|
||||||
<image lazy-load class="img" :src="data.coverImg" mode="aspectFill" :style="computedImgStyle()"></image>
|
|
||||||
|
<up-image :src="data.coverImg" mode="aspectFill" :width="img.width" :height="img.height"></up-image>
|
||||||
|
<!-- <image lazy-load class="img" :src="data.coverImg" mode="aspectFill" :style="computedImgStyle()"></image> -->
|
||||||
<view class="info u-flex u-row-between u-col-top u-flex-col" @tap="emitEvent('add')">
|
<view class="info u-flex u-row-between u-col-top u-flex-col" @tap="emitEvent('add')">
|
||||||
<view>
|
<view>
|
||||||
<view>
|
<view>
|
||||||
|
|
@ -76,9 +76,9 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="item-container">
|
<view class="item-container">
|
||||||
<view class="thumb-box" v-for="(goodsItem, goodsIndex) in item.foods" :key="goodsIndex">
|
<view class="thumb-box" v-for="(goodsItem, goodsIndex) in item.foods" :key="goodsIndex">
|
||||||
<goods-item @chooseGuige="chooseGuige($event,index)"
|
<list-goods-item @chooseGuige="chooseGuige($event,index)"
|
||||||
@add="goodsUpdate($event,index,true)" @reduce="goodsUpdate($event,index,false)"
|
@add="goodsUpdate($event,index,true)" @reduce="goodsUpdate($event,index,false)"
|
||||||
:index="goodsIndex" :data="goodsItem"></goods-item>
|
:index="goodsIndex" :data="goodsItem"></list-goods-item>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<!-- <template v-if="item.name==='附加费'">
|
<!-- <template v-if="item.name==='附加费'">
|
||||||
|
|
@ -100,11 +100,11 @@
|
||||||
<view class="u-font-28 color-666 ">搜索</view>
|
<view class="u-font-28 color-666 ">搜索</view>
|
||||||
<view class="u-flex u-m-t-20 u-flex-wrap u-row-between">
|
<view class="u-flex u-m-t-20 u-flex-wrap u-row-between">
|
||||||
<view class="u-m-b-30" v-for="(goodsItem, goodsIndex) in searchResult" :key="goodsIndex">
|
<view class="u-m-b-30" v-for="(goodsItem, goodsIndex) in searchResult" :key="goodsIndex">
|
||||||
<goods-item :img="{width:'330rpx',height:'330rpx'}"
|
<list-goods-item :img="{width:'330rpx',height:'330rpx'}"
|
||||||
@chooseGuige="chooseGuige(goodsItem.goodsIndex,goodsItem.index)"
|
@chooseGuige="chooseGuige(goodsItem.goodsIndex,goodsItem.index)"
|
||||||
@add="searchGoodsUpdate(goodsItem,goodsIndex,true)"
|
@add="searchGoodsUpdate(goodsItem,goodsIndex,true)"
|
||||||
@reduce="searchGoodsUpdate(goodsItem,goodsIndex,false)" :index="goodsItem.goodsIndex"
|
@reduce="searchGoodsUpdate(goodsItem,goodsIndex,false)" :index="goodsItem.goodsIndex"
|
||||||
:data="goodsItem"></goods-item>
|
:data="goodsItem"></list-goods-item>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -143,7 +143,7 @@
|
||||||
import util from './util.js';
|
import util from './util.js';
|
||||||
import color from '@/commons/color.js';
|
import color from '@/commons/color.js';
|
||||||
import guigeModel from './components/guige'
|
import guigeModel from './components/guige'
|
||||||
import goodsItem from './components/goods-item'
|
import listGoodsItem from './components/list-goods-item.vue'
|
||||||
import mySurcharge from './components/surcharge'
|
import mySurcharge from './components/surcharge'
|
||||||
import {
|
import {
|
||||||
onLoad,
|
onLoad,
|
||||||
|
|
@ -166,6 +166,7 @@
|
||||||
import {
|
import {
|
||||||
getNowCart
|
getNowCart
|
||||||
} from '@/pagesCreateOrder/util.js'
|
} from '@/pagesCreateOrder/util.js'
|
||||||
|
import storageManage from '@/commons/utils/storageManage.js'
|
||||||
import {
|
import {
|
||||||
$returnUseType
|
$returnUseType
|
||||||
} from './util.js'
|
} from './util.js'
|
||||||
|
|
@ -286,6 +287,7 @@
|
||||||
return v.foods.length
|
return v.foods.length
|
||||||
})
|
})
|
||||||
data.tabbar = tabbar
|
data.tabbar = tabbar
|
||||||
|
storageManage.cacheGoods(data.tabbar)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -300,7 +302,8 @@
|
||||||
//获取商品列表
|
//获取商品列表
|
||||||
function getGoods(par = {
|
function getGoods(par = {
|
||||||
page: 0,
|
page: 0,
|
||||||
size: 300
|
size: 300,
|
||||||
|
showLoading:data.tabbar.length<=0?true:false
|
||||||
}) {
|
}) {
|
||||||
return Api.getGoodsLists(par)
|
return Api.getGoodsLists(par)
|
||||||
}
|
}
|
||||||
|
|
@ -1001,7 +1004,7 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 10)
|
}, 100)
|
||||||
}
|
}
|
||||||
|
|
||||||
function watchChooseuser() {
|
function watchChooseuser() {
|
||||||
|
|
@ -1086,6 +1089,7 @@
|
||||||
// go.back()
|
// go.back()
|
||||||
// }, 1500)
|
// }, 1500)
|
||||||
// }
|
// }
|
||||||
|
data.tabbar=storageManage.cacheGoods()
|
||||||
init()
|
init()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue