Commit b4db08ce by 张立顺

fix 套餐bug

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