Commit b4e17a23 authored by wang's avatar wang

从数据库读取环境

parent 63a17aa9
This diff is collapsed.
...@@ -65,7 +65,7 @@ for i in range(100): ...@@ -65,7 +65,7 @@ for i in range(100):
headers.update(r) headers.update(r)
print(f'{(time.time() - t1) *1000:.3f}ms',len(headers['X-1ItxWO9i-a'.lower()])) print(f'{(time.time() - t1) *1000:.3f}ms',len(headers['X-1ItxWO9i-a'.lower()]))
print(headers['user-agent']) print(selectId, headers['user-agent'])
url = "https://jbrest.jetblue.com/lfs-rwb/outboundLFS" url = "https://jbrest.jetblue.com/lfs-rwb/outboundLFS"
data = { data = {
"tripType": "oneWay", "tripType": "oneWay",
......
This diff is collapsed.
...@@ -233,6 +233,9 @@ exports.install = (globalObject, globalNames) => { ...@@ -233,6 +233,9 @@ exports.install = (globalObject, globalNames) => {
} }
get featurePolicy() { get featurePolicy() {
if (window.ENV.featurepolicy.features === null && window.ENV.featurepolicy.allowedfeatures === null){
return undefined;
}
class FeaturePolicy{ class FeaturePolicy{
constructor(props) { constructor(props) {
......
...@@ -162,7 +162,7 @@ exports.install = (globalObject, globalNames) => { ...@@ -162,7 +162,7 @@ exports.install = (globalObject, globalNames) => {
} }
get appCodeName() { get appCodeName() {
return window.ENV.navigatorparams.appcodename return window.ENV.navigatorparams.appcodename || 'Mozilla'
const esValue = this !== null && this !== undefined ? this : globalObject; const esValue = this !== null && this !== undefined ? this : globalObject;
......
...@@ -2309,7 +2309,11 @@ class TextMetrics { ...@@ -2309,7 +2309,11 @@ class TextMetrics {
// this._TextMetrics = context.measureText(text) // this._TextMetrics = context.measureText(text)
try { try {
metrics = window.ENV.fontsres metrics = window.ENV.fontsres
if (metrics[this._font]){
this._TextMetrics = metrics[this._font][this._text] this._TextMetrics = metrics[this._font][this._text]
}else{
this._TextMetrics = metrics[this._font.replace('serif', 'sans-serif')][this._text]
}
} catch (e) { } catch (e) {
console.log('_TextMetrics', this._text, this._font) console.log('_TextMetrics', this._text, this._font)
this._TextMetrics = { this._TextMetrics = {
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment