|
|
@@ -52,19 +52,21 @@
|
|
|
<!-- <view class="sales-info">
|
|
|
<text class="delivery-time">48小时发</text>
|
|
|
</view> -->
|
|
|
- <!-- 2 是报价类型,专门为报价类型使用 -->
|
|
|
- <text v-if="message.goodsInfo.goodsPriceType == 2" class="goods-price">¥{{ message.goodsInfo.goodsPrice }}</text>
|
|
|
+ <!-- 2 是报价类型,专门为报价类型使用 -->
|
|
|
+ <text v-if="message.goodsInfo.goodsPriceType == 2" class="goods-price">¥{{ parseFloat(message.goodsInfo.goodsPrice).toFixed(2) }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
+
|
|
|
<view class="goods-footer">
|
|
|
</view>
|
|
|
+
|
|
|
<view v-if="message.goodsInfo.goodsPriceType == 2" class="action-buttons">
|
|
|
<button class="action-btn spec-btn" @click="toBuy(message.goodsInfo)">查看商品</button>
|
|
|
<button class="action-btn buy-btn" @click="toBuy(message.goodsInfo)">去购买</button>
|
|
|
</view>
|
|
|
- <view v-else>
|
|
|
+ <view v-else class="action-buttons">
|
|
|
<button class="action-btn spec-btn" @click="toGoodsDetail(message.goodsInfo)">查看商品</button>
|
|
|
- <text>报价 {{ message.goodsInfo.goodsInfo.price }}</text>
|
|
|
+ <button v-if="message.goodsInfo.goodsPriceType == 1" class="action-btn buy-btn" @click="toBuy(message.goodsInfo)">去购买</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="message-time align-right">{{ message.time }}</view>
|
|
|
@@ -98,7 +100,7 @@
|
|
|
<view class="sales-info">
|
|
|
<!-- <text class="delivery-time">48小时发</text> -->
|
|
|
</view>
|
|
|
- <text v-if="message.goodsInfo.goodsPriceType == 1" class="goods-price">¥{{ message.goodsInfo.goodsPrice }}</text>
|
|
|
+ <text v-if="message.goodsInfo.goodsPriceType == 1" class="goods-price">¥{{ parseFloat(message.goodsInfo.goodsPrice).toFixed(2) }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="goods-footer">
|
|
|
@@ -132,7 +134,7 @@
|
|
|
<image class="goods-image" :src="currentGoodsInfo.goodsImg" mode="aspectFill" />
|
|
|
<view class="goods-details">
|
|
|
<text class="goods-name">{{ currentGoodsInfo.goodsName }}</text>
|
|
|
- <text v-if="currentGoodsInfo.goodsPriceType == 1" class="goods-price">¥{{ currentGoodsInfo.goodsPrice }}</text>
|
|
|
+ <text v-if="currentGoodsInfo.goodsPriceType == 1" class="goods-price">¥{{ parseFloat(currentGoodsInfo.goodsPrice).toFixed(2) }}</text>
|
|
|
</view>
|
|
|
<view class="goods-actions">
|
|
|
<view class="close-icon" @click="closeGoodsCard">
|
|
|
@@ -1091,7 +1093,7 @@ export default {
|
|
|
if (res.code == 1) {
|
|
|
if (res.data.price != -1) {
|
|
|
parsed.goodsPriceType = 2; // 报价类型
|
|
|
- parsed.goodsPrice = res.data.price;
|
|
|
+ parsed.goodsPrice = parseFloat(res.data.price).toFixed(2);
|
|
|
}
|
|
|
}
|
|
|
}).catch(err => {
|
|
|
@@ -1146,7 +1148,7 @@ export default {
|
|
|
const categoryId = parseInt(goodsInfo.categoryId);
|
|
|
const hdId = parseInt(goodsInfo.hdId);
|
|
|
const account = parseInt(goodsInfo.account);
|
|
|
- const price = parseFloat(goodsInfo.goodsPrice);
|
|
|
+ const price = parseFloat(goodsInfo.goodsPrice).toFixed(2);
|
|
|
const priceType = goodsInfo.goodsPriceType;
|
|
|
if (isNaN(goodsId) || isNaN(categoryId) || isNaN(hdId) || isNaN(account) || isNaN(price)) {
|
|
|
this.$msg("商品数据异常");
|