本文針對(duì)多商戶2.2.1版本部分代碼優(yōu)化,包含:
(1)商品詳情頁(yè)不顯示熱賣排行入口;
(2)購(gòu)物車下拉刷新一下全選中一下全不選中;
(3)蘋果app登錄頁(yè)面不顯示其他方式登錄問題修復(fù)方法;
(4)商品詳情頁(yè)不顯示店鋪類型;
(5)移動(dòng)端購(gòu)物車頁(yè)面不顯示統(tǒng)計(jì)欄問題。
1.普通商品詳情頁(yè)面不顯示榜單排行問題
具體表現(xiàn)為,下圖所示,圈住的部分不顯示:
修改方法:
文件路徑: /pages/goods_details/index.vue
在getGoodsDetails方法中加入下面圈住的代碼:
代碼:that.$set(that.storeInfo, 'top_pid', res.data.top_pid);
that.$set(that.storeInfo, 'top_num', res.data.top_num);
that.$set(that.storeInfo, 'top_name', res.data.top_name);
2.蘋果app登錄頁(yè)面不顯示其他方式登錄問題
文件路徑:/pages/users/login.index
把這里的判斷改為上圖圈住的代碼
代碼:v-if="appleShow || wechat_phone_switch == 1"
3.多商戶移動(dòng)端購(gòu)物車下拉刷新,刷新一下全選中,再刷新又全部不選中的問題,修改方法:
文件路徑: /pages/order_addcart/order_addcart.vue
isAllSelect的值改為true
onShow方法里的isAllSelect的值也改為true
刪掉getCartList方法中的this.checkboxAllChange()方法,加上this.cartAllCheck('cartCheck')
4. 商品詳情頁(yè)不顯示店鋪類型修改;
修改后端代碼:a=pp\common\repositories\store\product\ProductRepository.php ,增加以下部分就可以,然后重啟swoole
->with(['type_name'])
5. 移動(dòng)端購(gòu)物車頁(yè)面不顯示統(tǒng)計(jì)欄問題修改:
文件路徑:/pages/order_addcart/order_addcart.vue
代碼: .shoppingCart .footer {
z-index: 9;
width: 100%;
height: 96rpx;
background-color: #fafafa;
position: fixed;
padding: 0 30rpx;
box-sizing: border-box;
border-top: 1px solid #eee;
/*#ifndef MP*/
bottom: 98rpx;
/*#endif*/
/*#ifdef MP*/
bottom: 0;
/*#endif*/
}
.shoppingCart .footer.on {
/*#ifdef MP*/
bottom: 98rpx;
bottom: calc(98rpx + constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
bottom: calc(98rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
/*#endif*/
}