Authored by yyq

Merge branch 'develop' of git.yoho.cn:fe/yoho-brand-shop into develop

... ... @@ -4,12 +4,21 @@ Component({
properties: {
item: {
type: Object,
value: {}
value: {},
observer: '_itemChange'
}
},
data: {
showMarketPrice: false
},
methods: {
goDetail: function () {
router.go('productDetail', {productSkn: this.properties.item.skn});
},
_itemChange: function (item) {
this.setData({
showMarketPrice: +item.marketPrice > 0 && +item.marketPrice > +item.salesPrice
});
}
}
});
... ...
... ... @@ -4,8 +4,9 @@
<view class="item-detail">
<text class="item-title">{{item.productName}}</text>
<view class="item-price">
<text class="price1" style="color:{{item.showOriginPrice ? '#d0021b' : '#444444'}}">¥{{helper.round(item.salePriceStr)}}</text>
<text class="price2" wx:if="{{item.showOriginPrice}}">¥{{helper.round(item.originPriceStr)}}</text>
<view class="price price1 {{showMarketPrice ? 'before-market-price' : ''}}">
¥{{helper.round(item.salesPrice)}}</view>
<view class="price price2" wx:if="{{showMarketPrice}}">¥{{helper.round(item.marketPrice)}}</view>
</view>
</view>
</view>
... ...
... ... @@ -17,11 +17,19 @@
color: #444;
width: 322rpx;
max-width: 322rpx;
letter-spacing: 0.28px;
letter-spacing: 0.28rpx;
}
.item-price .price {
display: inline-block;
}
.price1.before-market-price {
color: #d0021b!important;
}
.product-item .item-price .price2 {
color: #444;
color: #b0b0b0;
margin-left: 10rpx;
text-decoration: line-through;
}
... ...
... ... @@ -73,7 +73,8 @@ Page({
if (res.code === 200) {
const keyAdapter = {
skn: 'product_skn',
salePriceStr: 'sales_price',
salesPrice: 'sales_price',
marketPrice: 'market_price',
productName: 'product_name',
defaultImages: 'default_images'
};
... ...
... ... @@ -122,6 +122,7 @@ Page({
limit: 50
};
wx.showLoading({title: '加载中'});
orderModel.getOrders(params)
.then(res => {
if (res.code === 200) {
... ... @@ -133,7 +134,10 @@ Page({
ordersList: orders,
showEmptyContainer: res.data.order_list == 0
});
wx.hideLoading();
}
}).catch(() => {
wx.hideLoading();
});
},
loadRefundReason() {
... ...
... ... @@ -117,7 +117,8 @@ Page({
if (res.code === 200) {
const keyAdapter = {
skn: 'product_skn',
salePriceStr: 'sales_price',
salesPrice: 'sales_price',
marketPrice: 'market_price',
productName: 'product_name',
defaultImages: 'default_images'
};
... ...
... ... @@ -174,7 +174,8 @@ Page({
if (res.code === 200) {
const keyAdapter = {
skn: 'product_skn',
salePriceStr: 'sales_price',
salesPrice: 'sales_price',
marketPrice: 'market_price',
productName: 'product_name',
defaultImages: 'default_images'
};
... ... @@ -202,7 +203,8 @@ Page({
if (res.code === 200) {
const keyAdapter = {
skn: 'product_skn',
salePriceStr: 'sales_price',
salesPrice: 'sales_price',
marketPrice: 'market_price',
productName: 'product_name',
defaultImages: 'default_images'
};
... ...
... ... @@ -70,7 +70,8 @@ Page({
if (res.code === 200) {
const keyAdapter = {
skn: 'product_skn',
salePriceStr: 'sales_price',
salesPrice: 'sales_price',
marketPrice: 'market_price',
productName: 'product_name',
defaultImages: 'default_images'
};
... ...
... ... @@ -100,7 +100,8 @@ Page({
if (res.code === 200) {
const keyAdapter = {
skn: 'product_skn',
salePriceStr: 'sales_price',
salesPrice: 'sales_price',
marketPrice: 'market_price',
productName: 'product_name',
defaultImages: 'default_images'
};
... ...
... ... @@ -97,7 +97,8 @@ Page({
if (res.code === 200) {
const keyAdapter = {
skn: 'product_skn',
salePriceStr: 'sales_price',
salesPrice: 'sales_price',
marketPrice: 'market_price',
productName: 'product_name',
defaultImages: 'default_images'
};
... ...