提交 6337d8e4 authored 作者: liupengfei's avatar liupengfei

图书详情页,图书折扣计算精度丢失

上级 311189d1
......@@ -13,7 +13,7 @@ module.exports = {
proxyTable: {
'/api': {
// target: 'http://192.168.2.234:8096',//后端接口地址
target: 'http://122.14.50.6:8096',//后端接口地址
target: 'http://122.14.50.6:8096',//后端接口地址
changeOrigin: true,//是否允许跨越
pathRewrite: {
'^/api': '',//重写,
......@@ -46,7 +46,7 @@ module.exports = {
},
build: {
// Template for index.html
index: path.resolve(__dirname, '../dist/index.html'),
......
......@@ -88,9 +88,9 @@
<div class="spyy03">
<span>售价:<i class="z-s-e"><b>¥{{temp.pbook.salePrice}}</b>
<template v-if="temp.pbook.discount&&temp.pbook.salePrice!=temp.pbook.price">
{{temp.pbook.discount * 10}}折)
{{Math.round((temp.pbook.discount * 10)*1000)/1000}}折)
</template>
</i></span>
</i></span><s></s>
<span><del>定价:¥{{temp.pbook.price}}</del></span>
</div>
......@@ -122,7 +122,7 @@
<div class="dxzshul">
<img src="@/assets/images/sdve.jpg" @click="sdve"/>
<img src="@/assets/images/cscc.jpg" @click="cscc"/>
</div>
</div>
</div>
<button class="hsed" v-if="bookNum==null" @click.prevent="addCar">加入购物车</button>
<button class="hsed" v-if="bookNum!=null" :disabled="bookNum<1 || purchaseNum>bookNum" @click.prevent="addCar">加入购物车</button>
......@@ -478,7 +478,7 @@
getBulletinContApi({name:'购物须知',num:1}).then(res=>{
if( res.data.code == 0 ){
res.data.code===0?this.instructions=res.data.data[0]:null;
if( res.data.data[0].content == "" ){
if( res.data.data[0].content == "" ){
this.shopNull = false
}
......@@ -973,7 +973,7 @@
line-height:28px;
float:left;
overflow:hidden;
text-overflow:ellipsis;
text-overflow:ellipsis;
white-space: nowrap;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论