|
|
@@ -178,7 +178,7 @@ export default {
|
|
|
},
|
|
|
filters: {
|
|
|
currency: function (num) {
|
|
|
- if (typeof num === 'number') {
|
|
|
+ if (typeof num === 'number' && num > 0) {
|
|
|
if (num <= 0.000001) {
|
|
|
num = 0.000001
|
|
|
} else {
|
|
|
@@ -216,7 +216,7 @@ export default {
|
|
|
},
|
|
|
calculate () {
|
|
|
this.fragment.total = this.fragment.price * this.fragment.num
|
|
|
- return Math.ceil(this.fragment.total * Math.pow(10, 2)) / Math.pow(10, 2)
|
|
|
+ return Math.ceil(this.fragment.total * Math.pow(10, 6)) / Math.pow(10, 6)
|
|
|
},
|
|
|
user () {
|
|
|
return this.$store.state.option.user
|