gxd-uni-library-editx 1.0.8-beta150 → 1.0.8-beta151
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
uiIcon: null, //金额显示icon
|
|
130
130
|
uiPrice: null, //金额
|
|
131
131
|
show: false,
|
|
132
|
-
fixedNum:
|
|
132
|
+
fixedNum: null
|
|
133
133
|
}
|
|
134
134
|
},
|
|
135
135
|
watch:{
|
|
@@ -153,8 +153,6 @@
|
|
|
153
153
|
brandIncon = this.brandInfo['unit_icon'];
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
-
|
|
157
|
-
|
|
158
156
|
//保留几位小数
|
|
159
157
|
if ((this.brandInfo && this.brandInfo['unit_float'])) {
|
|
160
158
|
let unit_float = this.brandInfo['unit_float'];
|
|
@@ -162,8 +160,9 @@
|
|
|
162
160
|
unit_float = Number(unit_float);
|
|
163
161
|
}
|
|
164
162
|
unit_float = parseInt(unit_float);
|
|
165
|
-
|
|
163
|
+
unit_float = 3;
|
|
166
164
|
if (unit_float < 0) unit_float = 0;
|
|
165
|
+
if (unit_float > 2) unit_float = null;
|
|
167
166
|
this.fixedNum = unit_float;
|
|
168
167
|
}
|
|
169
168
|
|
|
@@ -204,7 +203,11 @@
|
|
|
204
203
|
if(this.$xdUniHelper.checkVarType(price) === 'string') {
|
|
205
204
|
price = Number(price);
|
|
206
205
|
}
|
|
207
|
-
|
|
206
|
+
|
|
207
|
+
this.uiPrice = this.$xdUniHelper.divisionFloatNumber(price, 100);
|
|
208
|
+
if(this.fixedNum !== null) {
|
|
209
|
+
this.uiPrice = this.uiPrice.toFixed(this.fixedNum);
|
|
210
|
+
}
|
|
208
211
|
}
|
|
209
212
|
this.show = true;
|
|
210
213
|
}
|
package/src/utils/xd.base.js
CHANGED
|
@@ -598,6 +598,27 @@ export function isWechat() {
|
|
|
598
598
|
return false
|
|
599
599
|
}
|
|
600
600
|
|
|
601
|
+
//#ifdef H5
|
|
602
|
+
export function isPlatform(){
|
|
603
|
+
const ua = navigator.userAgent
|
|
604
|
+
const isWindowsPhone = /(?:Windows Phone)/.test(ua)
|
|
605
|
+
const isSymbian = /(?:SymbianOS)/.test(ua) || isWindowsPhone
|
|
606
|
+
const isAndroid = /(?:Android)/.test(ua)
|
|
607
|
+
const isFireFox = /(?:Firefox)/.test(ua)
|
|
608
|
+
const isChrome = /(?:Chrome|CriOS)/.test(ua)
|
|
609
|
+
const isTablet = /(?:iPad|PlayBook)/.test(ua) || (isAndroid && !/(?:Mobile)/.test(ua)) || (isFireFox && /(?:Tablet)/.test(ua))
|
|
610
|
+
const isPhone = /(?:iPhone)/.test(ua) && !isTablet
|
|
611
|
+
const isPc = !isPhone && !isAndroid && !isSymbian
|
|
612
|
+
return {
|
|
613
|
+
isTablet,
|
|
614
|
+
isPhone,
|
|
615
|
+
isAndroid,
|
|
616
|
+
isPc,
|
|
617
|
+
isChrome
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
// #endif
|
|
621
|
+
|
|
601
622
|
/**
|
|
602
623
|
* @description 跳转到商品详情
|
|
603
624
|
* @param $vm {Vue} 当前vue实例
|
package/src/utils/xd.common.js
CHANGED
|
@@ -176,7 +176,8 @@ export function xdGetPesponseParams(request, response) {
|
|
|
176
176
|
headers: headers,
|
|
177
177
|
params: filterParamsMgInfo(baseCloneDeep(request.request['data'])),
|
|
178
178
|
responsData: responsDataStr,
|
|
179
|
-
startTime: request.startTime
|
|
179
|
+
startTime: request.startTime,
|
|
180
|
+
startTimeLocal: request.startTimeLocal
|
|
180
181
|
};
|
|
181
182
|
}
|
|
182
183
|
|
package/src/utils/xdh5log.js
CHANGED
|
@@ -5,6 +5,7 @@ import Vue from 'vue';
|
|
|
5
5
|
let logInstance = null;
|
|
6
6
|
import cookie from "@/common/cookie";
|
|
7
7
|
|
|
8
|
+
|
|
8
9
|
/**
|
|
9
10
|
* @description 过滤上报url
|
|
10
11
|
* @returns {Function[]}
|
|
@@ -146,6 +147,17 @@ class Logs {
|
|
|
146
147
|
else __bl.custom({data: params, c1: eventName})
|
|
147
148
|
}
|
|
148
149
|
|
|
150
|
+
setProject(pos, params){
|
|
151
|
+
if (cookie.get('jfb_' + pos)) return;
|
|
152
|
+
this.setARMSInfo({
|
|
153
|
+
pos: `${pos}`,
|
|
154
|
+
time: new Date().getTime(),
|
|
155
|
+
date: new Date().toLocaleString(),
|
|
156
|
+
...params
|
|
157
|
+
}, 'project_init');
|
|
158
|
+
cookie.set('jfb_' + pos, true);
|
|
159
|
+
}
|
|
160
|
+
|
|
149
161
|
getARMS(){
|
|
150
162
|
return __bl;
|
|
151
163
|
}
|