游梦婷 2 years ago
parent 9188e7411a
commit 1dbc0c1249
  1. 15
      pages/classify/goods-list/goods-list.vue
  2. 10
      pages/tabBar/classify/classify.vue

@ -145,8 +145,6 @@
import noMore from '@/pages/classify/no-more/no-more.vue' import noMore from '@/pages/classify/no-more/no-more.vue'
import wybPopup from '@/components/wyb-popup/wyb-popup.vue' import wybPopup from '@/components/wyb-popup/wyb-popup.vue'
import cartChoose from '@/pages/classify/cart-choose/cart-choose.vue' import cartChoose from '@/pages/classify/cart-choose/cart-choose.vue'
// import dataList from '@/components/dataList/dataList.vue'
// import uniNumberBox from '@/uni_modules/uni-number-box/components/uni-number-box/uni-number-box.vue'
import { findGoodsSkuByGoodsId,getShoppingCartList } from '@/Utils/physicalObject.js' import { findGoodsSkuByGoodsId,getShoppingCartList } from '@/Utils/physicalObject.js'
import uniBadge from '@/components/uni-badge/components/uni-badge/uni-badge.vue' import uniBadge from '@/components/uni-badge/components/uni-badge/uni-badge.vue'
const app = getApp(); const app = getApp();
@ -198,9 +196,7 @@
this.refreshCartNum(); this.refreshCartNum();
}, },
mounted(){
console.log("挂载了")
},
props: { props: {
propData: { propData: {
type: Array, type: Array,
@ -281,15 +277,6 @@
getShoppingCartList().then( res=>{ getShoppingCartList().then( res=>{
if (res.return_code == '000000') { if (res.return_code == '000000') {
this.cartNum = res.return_data.length; this.cartNum = res.return_data.length;
// uni.setStorage({
// key:'cartNum', //
// data:res.return_data.length, //
// success(){
// console.log('')
// console.log(app.globalData.cartNum,"this.cartNum")
// }
// })
}else{ }else{
uni.showToast({ uni.showToast({
title: res.return_msg, title: res.return_msg,

@ -55,7 +55,7 @@
</view> </view>
</view> </view>
<view class="goods-right-ms"> <view class="goods-right-ms">
<goodsList :propData="goodsListData" :pageData="pageData" :selectObject="selectObject" @loadData="loadData" @switchCategory="switchCategory" :paddBottom="0" ></goodsList> <goodsList v-if="hackReset" :propData="goodsListData" :pageData="pageData" :selectObject="selectObject" @loadData="loadData" @switchCategory="switchCategory" :paddBottom="0" ></goodsList>
</view> </view>
</view> </view>
@ -117,7 +117,7 @@
sortOrder:0,//12 sortOrder:0,//12
// cartNum:app.globalData.cartNum, // cartNum:app.globalData.cartNum,
hackReset:false,//
@ -130,6 +130,12 @@
}, },
onShow(){ onShow(){
this.hackReset = false;
this.$nextTick(() => {
this.hackReset = true;
})
}, },
methods:{ methods:{

Loading…
Cancel
Save