|
|
@@ -33,7 +33,7 @@
|
|
|
</view>
|
|
|
<view class="attr line1" v-if="item.sku">属性: {{ item.sku }}</view>
|
|
|
<view v-if="mallType === 0" class="money font-color">
|
|
|
- ¥{{ (Math.ceil(Number(item.storePrice) * 10) / 10).toFixed(2) }}
|
|
|
+ ¥{{ ceilPrice(item.storePrice) }}
|
|
|
</view>
|
|
|
<view v-else class="money font-color">
|
|
|
贝币:{{ Number(item.storePrice).toFixed(2) }}
|
|
|
@@ -118,6 +118,13 @@ function jumpCon(id) {
|
|
|
const toMerchant = (merchantId) => {
|
|
|
uni.navigateTo({ url:"/pages/merchantCenters/merchant?merchantId="+merchantId });
|
|
|
}
|
|
|
+const ceilPrice = (price) => {
|
|
|
+ const num = Number(price);
|
|
|
+ if (isNaN(num)) return "0.00";
|
|
|
+ // 先四舍五入到2位小数修复精度
|
|
|
+ const fixedNum = Math.round(num * 100) / 100;
|
|
|
+ return (Math.ceil(fixedNum * 10) / 10).toFixed(2);
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|