Commit b4db08ce by 张立顺

fix 套餐bug

1 parent 77ecf4f9
......@@ -139,8 +139,12 @@ Component({
if (selectList.length) {
selectList.forEach(c => {
if (!c.count) c.count = 1
c.multipleSpecificationsGoods.goods.price =
c.multipleSpecificationsGoods.goods.sellPrice || 0
let price = c.multipleSpecificationsGoods.goods.sellPrice || 0
// 会员权益
if (this.data.sceneType == '0') {
price = Math.round(price * 100)
}
c.multipleSpecificationsGoods.goods.price = price
if (chooseGoodsList.length > 0) {
chooseGoodsList.map(x => {
if (x.goodsFlag == 2 && x.multipleSpecificationsGoods) {
......
......@@ -12,7 +12,7 @@ var divideByHundred = function (str) {
if (isNaN(floatVal)) {
return 0
}
floatVal = Math.round(str * 100) / 10000
floatVal = Math.round(str) / 100
var strVal = floatVal.toString()
var searchVal = strVal.indexOf('.')
if (searchVal < 0) {
......
......@@ -1377,7 +1377,7 @@ Page({
if (isNaN(floatVal)) {
return 0
}
floatVal = Math.round(str * 100) / 10000
floatVal = Math.round(str) / 100
let strVal = floatVal.toString()
let searchVal = strVal.indexOf('.')
if (searchVal < 0) {
......@@ -1395,7 +1395,7 @@ Page({
if (isNaN(floatVal)) {
return 0
}
floatVal = Math.round(str * 10000) / 100
floatVal = Math.round(str * 100)
let strVal = floatVal.toString()
let searchVal = strVal.indexOf('.')
if (searchVal < 0) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!