Authored by 黄敬囿

Merge branch 'develop' of http://git.yoho.cn/mobile/tt-yoho-app into develop

... ... @@ -44,7 +44,8 @@ App({
return true;
},
getUid: function() {
let uid = '500031152';//this.globalData.userInfo.uid;
let uid = this.globalData.userInfo.uid;
// let uid = '500031152';
// let uid = '9728165';//线上
// if (!uid || uid === 0) {
... ...
import router from '../../../router/index.js'
Component({
properties: {
data: {
... ... @@ -8,8 +10,9 @@ Component({
},
methods: {
groupItemTapped: function(event) {
this.triggerEvent('jumpByRule', event);
productItemTapped: function(event) {
let skn = event.currentTarget.dataset.skn;
router.go('goodsDetail',{productSkn:skn})
}
}
})
\ No newline at end of file
... ...
... ... @@ -4,7 +4,7 @@
tt:for-item="item">
<view class="group-product-item"
bindtap="productItemTapped"
data-skn="{{item.productSkn}}"
data-skn="{{item.product_skn}}"
data-activity_id="{{item.activityId}}">
<image src="{{item.default_images}}" class="group-product-image"
... ...
<!-- 无效商品cell -->
<view class="commonProductCellContainer">
<block tt:for="{{data.invalidGoodsList}}" tt:key="item">
<block tt:for="{{data.invalidGoodsList}}" tt:key="{{index}}" tt:for-item="item">
<view class="poolGoodCellContainer">
<view tt:if="{{index > 0}}" class='cellLine'>
</view>
... ...
<view class="pollGoodContainer" bindtap='{{data.isEditing ? "" : "shoppingCartProductItemAction"}}' data-identifier="navtoProductDetailPage" data-item='{{data.goodsItem}}' data-type="{{data.goodsItem}}" bindtouchend="moveEnd" bindtouchstart="moveStart" animation="{{data.tempSku == data.goodsItem.unique_identifier ? data.deleteAnimation : ''}}" >
<image tt:if="{{(data.goodsItem.goods_type != 'gift') && (!data.goodsItem.batch_no && !data.goodsItem.bundle_activity_id)}}" src="{{data.goodsItem.bSelected ? '../../../images/gwc_choose@2x.png' : '../../../images/gwc_n@2x.png'}}" class="selectBtn" catchtap="shoppingCartProductItemAction" data-identifier="selectSingleGoodsAction" data-type="{{data.goodsItem}}"></image>
<image src="{{data.goodsItem.goods_images}}" class="goodsImage">
<image tt:if="{{data.goodsItem.bLackStorage}}" class='gift-tag-image' src='../../../images/kcbz-lab@2x.png'/>
<image tt:elif="{{data.goodsItem.goods_type == 'gift'}}" class='gift-tag-image' src='../../../images/zp-lab@2x.png'/>
... ...
... ... @@ -18,6 +18,14 @@
margin-left: 30rpx;
margin-top: 20rpx;
}
.gift-tag-image {
width: 150rpx;
height: 24rpx;
position: absolute;
bottom: 0;
}
.goodsInfoContainer {
direction: flex;
flex-direction: column;
... ... @@ -239,4 +247,4 @@
text-align: center;
color: white;
padding: 0 10rpx;
}
\ No newline at end of file
}
... ...
... ... @@ -2,7 +2,7 @@
<view class="commonProductCellContainer">
<block tt:if="{{data.item.promotion_list.length}}">
<view class="promotionViewContainer">
<block tt:for="{{item.promotion_list}}" tt:for-item="promotionItem" tt:for-index="promotionIndex" tt:key="promotion">
<block tt:for="{{data.item.promotion_list}}" tt:for-item="promotionItem" tt:for-index="promotionIndex" tt:key="{{promotionIndex}}">
<view class="promotionCell" data-promotion-item="{{promotionItem}}" bindtap="shoppingCartProductAction" data-identifier="navToPromotionPage" tt:if="{{promotionIndex == 0 || data.item.isPromotionExpanded}}">
<view class='promotionTitleContainer'>
<view class='viewCenterStyle'>
... ... @@ -29,8 +29,8 @@
</view>
</block>
<block tt:if="{{data.item.sub_pool.length}}">
<block tt:for="{{data.item.sub_pool}}" tt:for-item="subPoolItem" tt:for-index="subPoolIndex" tt:key="subPool">
<block tt:for="{{subPoolItem.promotion_list}}" tt:for-item="subPromotionItem" tt:for-index="subPromotionIndex" tt:key="subPromotion">
<block tt:for="{{data.item.sub_pool}}" tt:for-item="subPoolItem" tt:for-index="subPoolIndex" tt:key="{{subPoolIndex}}">
<block tt:for="{{subPoolItem.promotion_list}}" tt:for-item="subPromotionItem" tt:for-index="subPromotionIndex" tt:key="{{subPromotionIndex}}">
<view class='cellLine' tt:if="{{subPoolIndex > 0}}">
</view>
<view class="subPromotionCell" data-promotion-item="{{subPromotionItem}}" bindtap="shoppingCartProductAction" data-identifier="navToPromotionPage" tt:if="{{subPromotionIndex == 0 || subPromotionItem.isPromotionExpanded}}">
... ... @@ -48,7 +48,7 @@
</view>
</view>
</block>
<block tt:for="{{subPoolItem.goods_list}}" tt:for-item="subPoolGoodsItem" tt:for-index="subPoolGoodsIndex" tt:key="subPoolGoods">
<block tt:for="{{subPoolItem.goods_list}}" tt:for-item="subPoolGoodsItem" tt:key="{{index}}">
<view class="cellLine" tt:if="{{subPoolIndex > 0 || (subPoolItem.promotion_list.length > 0)}}">
</view>
... ... @@ -90,9 +90,9 @@
</view>
</block>
<block tt:if="{{data.item.goods_list.length}}">
<block tt:for="{{data.item.goods_list}}" tt:for-item="goodsItem" tt:for-index="goodsIndex" tt:key="goodsitem">
<block tt:for="{{data.item.goods_list}}" tt:for-item="goodsItem" tt:key="{{index}}">
<view class='cellLine' tt:if="{{goodsIndex> 0}}">
<view class='cellLine' tt:if="{{index> 0}}">
</view>
<view class="poolGoodCellContainer">
<shoppingCartOneProductCell data="{{{goodsItem, isEditing:data.isEditing, deleteAnimation:data.deleteAnimation, tempSku:data.tempSku}}}" bindshoppingCartProductAction="shoppingCartProductAction" bindmoveStart="onMoveStart" bindmoveEnd="onMoveEnd"></shoppingCartOneProductCell>
... ...
... ... @@ -114,13 +114,6 @@
flex-direction: column;
}
.gift-tag-image {
width: 150rpx;
height: 24rpx;
position: absolute;
bottom: 0;
}
.infoContainer {
z-index: 5;
transition: left 0.2s ease-in-out;
... ...
... ... @@ -8,7 +8,7 @@
.promotionHeader{
width: 100%;
height: 13.5px;
font-family: PingFang-SC;
font-family: PingFang SC;
font-size: 14px;
color: #444444;
margin-left: 15px;
... ... @@ -22,3 +22,13 @@
margin-bottom: 8px;
margin-left: 15px;
}
.sepLineStyle {
width: 100%;
height: 2rpx;
margin-left: 0;
z-index: 999;
transform: scaleY(0.5);
background-color: #e0e0e0;
}
... ...
... ... @@ -448,8 +448,10 @@ Page({
},
jumpByRuleEvent(event) {
console.log(event.detail);
let url = event.detail.currentTarget.dataset.jump_rule;
console.log(event.detail);
console.log(url);
router.goUrl(url);
},
... ...
... ... @@ -102,11 +102,11 @@
</block>
<block tt:elif="{{item.template_name=='newProductListFloor'}}">
<home-hor-product-list data="{{item.data}}" bindjumpByRule="jumpByRuleEvent"></home-hor-product-list>
<home-hor-product-list data="{{item.data}}"></home-hor-product-list>
</block>
<block tt:elif="{{item.template_name=='popularListFloor'}}">
<home-hor-product-list data="{{item.data}}" bindjumpByRule="jumpByRuleEvent"></home-hor-product-list>
<home-hor-product-list data="{{item.data}}"></home-hor-product-list>
</block>
</block>
... ...
... ... @@ -469,7 +469,6 @@ Page({
shopping_key: '',
uid: app && app.getUid(),
};
// console.log(param);
api.post({data:param})
.then(json => {
this.setData({
... ...
... ... @@ -14,16 +14,16 @@
<scroll-view scroll-y="{{enableScroll}}" class="contentContainer" style="position: absolute;top:{{scrollerViewTop}}px;height:{{scrollerViewHeight}}px" enable-back-to-top="true">
<!--商品池 -->
<view tt:if="{{curShoppingCartData.goods_pool_list.length}}" class="goodsPoolListContainer">
<block wx:for="{{curShoppingCartData.goods_pool_list}}" tt:key="goodsPoolItem" tt:for-item="item">
<block tt:for="{{curShoppingCartData.goods_pool_list}}" tt:key="{{index}}" tt:for-item="item">
<shoppingCartProductCell data="{{{item, index,isEditing,deleteAnimation,tempSku}}}" bindshoppingCartProductAction="onShoppingCartProductAction" bindmoveStart="moveStart" bindmoveEnd="moveEnd"></shoppingCartProductCell>
</block>
</view>
<!-- 商品列表 -->
<block class="" wx:if="{{curShoppingCartData.goods_list.length}}">
<block wx:for="{{curShoppingCartData.goods_list}}" wx:for-item="goodsItem" wx:for-index="goodsIndex" wx:key="goodsitem">
<block class="" tt:if="{{curShoppingCartData.goods_list.length}}">
<block tt:for="{{curShoppingCartData.goods_list}}" tt:for-item="goodsItem" tt:for-index="goodsIndex" tt:key="{{goodsIndex}}">
<view class="poolGoodCellContainer">
<view class="cellLine" wx:if="{{goodsIndex > 0}}"></view>
<view class="cellLine" tt:if="{{goodsIndex > 0}}"></view>
<shoppingCartOneProductCell data="{{{goodsItem,isEditing,deleteAnimation,tempSku}}}" bindshoppingCartProductAction="onShoppingCartProductAction" bindmoveStart="moveStart" bindmoveEnd="moveEnd"></shoppingCartOneProductCell>
</view>
</block>
... ... @@ -31,22 +31,22 @@
</block>
<!--加价购 & 赠品 -->
<block wx:if="{{curShoppingCartData.gGiftAndPriceGiftList.length}}">
<block tt:if="{{curShoppingCartData.gGiftAndPriceGiftList.length}}">
<shoppingCartGiftOrPriceCell data="{{{giftList:curShoppingCartData.gGiftAndPriceGiftList}}}" bindnavToGiftPage="navToGiftPage"></shoppingCartGiftOrPriceCell>
</block>
<!--无效商品 -->
<block wx:if="{{curShoppingCartData.invalidGoodsList.length}}">
<block tt:if="{{curShoppingCartData.invalidGoodsList.length}}">
<shoppingCartInvalidProductCell data="{{{invalidGoodsList:curShoppingCartData.invalidGoodsList,isEditing,deleteAnimation,tempSku}}}"></shoppingCartInvalidProductCell>
</block>
<!-- 已参与活动 -->
<block wx:if="{{curShoppingCartData.promotion_info.length}}">
<block tt:if="{{curShoppingCartData.promotion_info.length}}">
<shoppingCartPromotionCell data="{{{promotionList:curShoppingCartData.promotion_info}}}"></shoppingCartPromotionCell>
</block>
<!-- 总计价格 -->
<block wx:if="{{curShoppingCartData.shopping_cart_data}}">
<block tt:if="{{curShoppingCartData.shopping_cart_data}}">
<text class="totalCost">{{curShoppingCartData.shopping_cart_data.promotion_formula}}</text>
<view class="bottonGray"></view>
</block>
... ...
... ... @@ -136,7 +136,7 @@
width: 100%;
}
.totalCost{
width: 258.5px;
/* width: 258.5px; */
font-family: PingFang SC;
font-size: 13px;
line-height: 16px;
... ... @@ -148,6 +148,7 @@
-webkit-line-clamp:2;
-webkit-box-orient:vertical;
margin-left: 15px;
margin-right: 15px;
margin-top: 10px;
margin-bottom: 10px;
}
... ...