Merge branch 'dev' into test
This commit is contained in:
@@ -225,7 +225,7 @@ export default {
|
||||
this.upload_exceeded_list.push(i === 0 ? 1 : i + 1);
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: `第${[...new Set(this.upload_exceeded_list)].join(',')}张图片超出限制${this.upload_max}MB,已过滤`,
|
||||
content: `图片超出限制${this.upload_max}MB,已过滤`,
|
||||
showCancel: false,
|
||||
confirmText: '确认',
|
||||
success(res) {
|
||||
|
||||
@@ -46,31 +46,33 @@ Vue.prototype.$validator = function (rule) {
|
||||
// cookie.clearAll();
|
||||
// cookie.set(CACHE_KEY, 1);
|
||||
// }
|
||||
//强制转为几位小数,不足的补0
|
||||
var forceToDecimal = function changeToDecimal(x, len, ignore = false) {
|
||||
var f_x = parseFloat(x);
|
||||
// 强制转为几位小数,不足的补0
|
||||
const forceToDecimal = function changeToDecimal(value, len = 1) {
|
||||
const f_x = parseFloat(value)
|
||||
if (isNaN(f_x)) {
|
||||
return 0;
|
||||
return 0
|
||||
}
|
||||
var f = Math.round(f_x * 100) / 100;
|
||||
if (ignore) {
|
||||
f = Math.floor(f_x * 100) / 100;
|
||||
}
|
||||
var s = f.toString();
|
||||
var rs = s.indexOf('.');
|
||||
let s = f_x.toString()
|
||||
let rs = s.indexOf('.')
|
||||
if (rs < 0) {
|
||||
rs = s.length;
|
||||
s += '.';
|
||||
rs = s.length
|
||||
s += '.'
|
||||
}
|
||||
while (s.length <= rs + len) {
|
||||
s += '0';
|
||||
s += '0'
|
||||
}
|
||||
return s;
|
||||
const tempArr = s.split('.')
|
||||
const decimalArr = tempArr[1].split('')
|
||||
let res = tempArr[0] + '.'
|
||||
for (let i = 0; i < len; i++) {
|
||||
res += decimalArr[i]
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
//强制转为2位小数,不足的补0
|
||||
var force2Decimal = function change2Decimal(x, ignore = false) {
|
||||
return forceToDecimal(x, 2, false);
|
||||
// 强制转为2位小数,不足的补0
|
||||
const force2Decimal = function change2Decimal(value) {
|
||||
return forceToDecimal(value, 2)
|
||||
}
|
||||
|
||||
Vue.prototype.$force2Decimal = force2Decimal
|
||||
|
||||
@@ -757,8 +757,8 @@ export default {
|
||||
_this.isLike = data.zanVo !== null
|
||||
_this.isFavorite = data.hasFavorite
|
||||
_this.favoriteCount = data.favoriteCount
|
||||
_this.inn.latitude = _this.inn.latitude ? parseFloat(_this.inn.latitude) : 24.993587
|
||||
_this.inn.longitude = _this.inn.longitude ? parseFloat(_this.inn.longitude) : 102.779656
|
||||
_this.inn.latitude = _this.inn.latitude > 0 ? _this.inn.latitude : 24.993587
|
||||
_this.inn.longitude = _this.inn.longitude > 0 ? _this.inn.longitude : 102.779656
|
||||
// fix bug#1107
|
||||
if (!_this.isLoad) {
|
||||
// 该店铺无商品则不显示“精选商品”
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// 景点门票
|
||||
import {getProducts} from "@/api/store";
|
||||
|
||||
export default {
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// 尖货推荐
|
||||
import {getSharpList, sharpBannar} from "@/api/goods";
|
||||
|
||||
export default {
|
||||
|
||||
Reference in New Issue
Block a user