Commit ad761b73 by 李伟康

提交

1 parent 89999e80
...@@ -184,7 +184,8 @@ Page({ ...@@ -184,7 +184,8 @@ Page({
goodsName: goodsInfo.goodsName, goodsName: goodsInfo.goodsName,
retailPrice: goodsInfo.retailPrice, retailPrice: goodsInfo.retailPrice,
stock: goodsInfo.goodsStock, stock: goodsInfo.goodsStock,
id: goodsInfo.id id: goodsInfo.id,
unit: goodsInfo.unit
} }
if (activeSku) { if (activeSku) {
let list = isActivity ? goodsInfo.specificationExtraList : goodsInfo.specificationDetailList let list = isActivity ? goodsInfo.specificationExtraList : goodsInfo.specificationDetailList
......
...@@ -91,7 +91,12 @@ ...@@ -91,7 +91,12 @@
{{goodsInfo.skuPrice}} {{goodsInfo.skuPrice}}
<text class="unit up">起</text> <text class="unit up">起</text>
</block> </block>
<block wx:else>{{goodsInfo.retailPrice}}</block> <block wx:else>
{{goodsInfo.retailPrice}}
<block wx:if="{{goodsInfo.unit}}">
<text class="unit">{{goodsInfo.unit}}</text>
</block>
</block>
</view> </view>
<view class="old">¥{{goodsInfo.originalPrice}}</view> <view class="old">¥{{goodsInfo.originalPrice}}</view>
</view> </view>
......
...@@ -27,6 +27,7 @@ Page({ ...@@ -27,6 +27,7 @@ Page({
goodsList, goodsList,
goodsInfo goodsInfo
} = options } = options
if (goodsList.unit && goodsList.unit == '万') goodsList.retailPrice = goodsList.retailPrice * 10000
this.setData({ this.setData({
merchantName: goodsList.merchantName, merchantName: goodsList.merchantName,
goodsInfo: goodsInfo, goodsInfo: goodsInfo,
......
{ {
"navigationBarTitleText": "确认订单" "navigationBarTitleText": "确认订单",
"usingComponents": {
"stepper": "../shoppingCart/components/Stepper/Stepper"
}
} }
\ No newline at end of file \ No newline at end of file
...@@ -22,19 +22,19 @@ Component({ ...@@ -22,19 +22,19 @@ Component({
n.goodsStatistics.saleAmount = n.activityInfo.saleAmount n.goodsStatistics.saleAmount = n.activityInfo.saleAmount
if (n.activityInfo.specificationExtraList && n.activityInfo.specificationExtraList.length) { if (n.activityInfo.specificationExtraList && n.activityInfo.specificationExtraList.length) {
n.retailPrice = n.activityInfo.specificationExtraList[0].retailPrice n.retailPrice = n.activityInfo.specificationExtraList[0].retailPrice
n.up = true v.up = true
} }
} else { } else {
if (n.originalPrice) n.originalPrice = centsToyuan(n.originalPrice) if (n.originalPrice) n.originalPrice = centsToyuan(n.originalPrice)
if (n.specificationDetailList && n.specificationDetailList.length) { if (n.specificationDetailList && n.specificationDetailList.length) {
n.retailPrice = n.specificationDetailList[0].retailPrice n.retailPrice = n.specificationDetailList[0].retailPrice
n.up = true v.up = true
} }
} }
n.retailPrice = Number(centsToyuan(n.retailPrice)).toFixed(2) n.retailPrice = Number(centsToyuan(n.retailPrice)).toFixed(2)
if (n.retailPrice > 9999) { if (n.retailPrice > 9999) {
n.retailPrice = Number(n.retailPrice / 10000).toFixed(2) n.retailPrice = Number(n.retailPrice / 10000).toFixed(2)
n.unit = '万' v.unit = '万'
} }
} }
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!