Commit b4e17a23 authored by wang's avatar wang

从数据库读取环境

parent 63a17aa9
This diff is collapsed.
......@@ -65,7 +65,7 @@ for i in range(100):
headers.update(r)
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"
data = {
"tripType": "oneWay",
......
This diff is collapsed.
......@@ -233,6 +233,9 @@ exports.install = (globalObject, globalNames) => {
}
get featurePolicy() {
if (window.ENV.featurepolicy.features === null && window.ENV.featurepolicy.allowedfeatures === null){
return undefined;
}
class FeaturePolicy{
constructor(props) {
......
......@@ -162,7 +162,7 @@ exports.install = (globalObject, globalNames) => {
}
get appCodeName() {
return window.ENV.navigatorparams.appcodename
return window.ENV.navigatorparams.appcodename || 'Mozilla'
const esValue = this !== null && this !== undefined ? this : globalObject;
......
......@@ -2309,7 +2309,11 @@ class TextMetrics {
// this._TextMetrics = context.measureText(text)
try {
metrics = window.ENV.fontsres
if (metrics[this._font]){
this._TextMetrics = metrics[this._font][this._text]
}else{
this._TextMetrics = metrics[this._font.replace('serif', 'sans-serif')][this._text]
}
} catch (e) {
console.log('_TextMetrics', this._text, this._font)
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