修复代客下单商品不展示问题
This commit is contained in:
parent
e0c008732e
commit
2840bf3b94
|
|
@ -1,6 +1,8 @@
|
|||
<template>
|
||||
<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>
|
||||
<view>
|
||||
|
|
@ -76,9 +76,9 @@
|
|||
</view>
|
||||
<view class="item-container">
|
||||
<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)"
|
||||
:index="goodsIndex" :data="goodsItem"></goods-item>
|
||||
:index="goodsIndex" :data="goodsItem"></list-goods-item>
|
||||
|
||||
</view>
|
||||
<!-- <template v-if="item.name==='附加费'">
|
||||
|
|
@ -100,11 +100,11 @@
|
|||
<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-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)"
|
||||
@add="searchGoodsUpdate(goodsItem,goodsIndex,true)"
|
||||
@reduce="searchGoodsUpdate(goodsItem,goodsIndex,false)" :index="goodsItem.goodsIndex"
|
||||
:data="goodsItem"></goods-item>
|
||||
:data="goodsItem"></list-goods-item>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -143,7 +143,7 @@
|
|||
import util from './util.js';
|
||||
import color from '@/commons/color.js';
|
||||
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 {
|
||||
onLoad,
|
||||
|
|
@ -166,6 +166,7 @@
|
|||
import {
|
||||
getNowCart
|
||||
} from '@/pagesCreateOrder/util.js'
|
||||
import storageManage from '@/commons/utils/storageManage.js'
|
||||
import {
|
||||
$returnUseType
|
||||
} from './util.js'
|
||||
|
|
@ -286,6 +287,7 @@
|
|||
return v.foods.length
|
||||
})
|
||||
data.tabbar = tabbar
|
||||
storageManage.cacheGoods(data.tabbar)
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -300,7 +302,8 @@
|
|||
//获取商品列表
|
||||
function getGoods(par = {
|
||||
page: 0,
|
||||
size: 300
|
||||
size: 300,
|
||||
showLoading:data.tabbar.length<=0?true:false
|
||||
}) {
|
||||
return Api.getGoodsLists(par)
|
||||
}
|
||||
|
|
@ -1001,7 +1004,7 @@
|
|||
return;
|
||||
}
|
||||
}
|
||||
}, 10)
|
||||
}, 100)
|
||||
}
|
||||
|
||||
function watchChooseuser() {
|
||||
|
|
@ -1086,6 +1089,7 @@
|
|||
// go.back()
|
||||
// }, 1500)
|
||||
// }
|
||||
data.tabbar=storageManage.cacheGoods()
|
||||
init()
|
||||
})
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue