[환경전환] local에서 확인하기 위하여 appinfo 파일 추가 및 commonActions 수정

This commit is contained in:
jangheon Pyo
2024-06-21 17:53:37 +09:00
parent aca2ee97b0
commit ba6d7bda6b
4 changed files with 79 additions and 27 deletions

View File

@@ -1,6 +1,8 @@
import Spotlight from "@enact/spotlight"; import Spotlight from "@enact/spotlight";
import appinfo from "../../webos-meta/appinfo.json"; import appinfo from "../../webos-meta/appinfo.json";
import appinfo35 from "../../webos-meta/appinfo35.json";
import appinfo79 from "../../webos-meta/appinfo79.json";
import * as lunaSend from "../lunaSend"; import * as lunaSend from "../lunaSend";
import { types } from "./actionTypes"; import { types } from "./actionTypes";
@@ -86,7 +88,8 @@ export const getSystemSettings = () => (dispatch, getState) => {
export const getHttpHeaderForServiceRequest = export const getHttpHeaderForServiceRequest =
(onComplete) => (dispatch, getState) => { (onComplete) => (dispatch, getState) => {
console.log("getHttpHeaderForServiceRequest "); console.log("getHttpHeaderForServiceRequest ");
const { serverType, ricCodeSetting } = getState().localSettings; const { serverType, ricCodeSetting, languageSetting } =
getState().localSettings;
lunaSend.getHttpHeaderForServiceRequest({ lunaSend.getHttpHeaderForServiceRequest({
onSuccess: (res) => { onSuccess: (res) => {
console.log("getHttpHeaderForServiceRequest", res); console.log("getHttpHeaderForServiceRequest", res);
@@ -114,9 +117,23 @@ export const getHttpHeaderForServiceRequest =
window.PalmSystem.identifier && window.PalmSystem.identifier &&
process.env.REACT_APP_MODE !== "DEBUG" process.env.REACT_APP_MODE !== "DEBUG"
) { ) {
if (ricCodeSetting === "aic") {
convertedRes["app_id"] = window.PalmSystem.identifier ?? appinfo.id; convertedRes["app_id"] = window.PalmSystem.identifier ?? appinfo.id;
} else if (ricCodeSetting === "eic") {
convertedRes["app_id"] =
window.PalmSystem.identifier ?? appinfo35.id;
} else if (ricCodeSetting === "ruc") {
convertedRes["app_id"] =
window.PalmSystem.identifier ?? appinfo79.id;
}
} else { } else {
if (ricCodeSetting === "aic") {
convertedRes["app_id"] = appinfo.id; convertedRes["app_id"] = appinfo.id;
} else if (ricCodeSetting === "eic") {
convertedRes["app_id"] = appinfo35.id;
} else if (ricCodeSetting === "ruc") {
convertedRes["app_id"] = appinfo79.id;
}
} }
//todo temp //todo temp
convertedRes["app_ver"] = "1.0.0"; //appinfo.version; convertedRes["app_ver"] = "1.0.0"; //appinfo.version;
@@ -131,33 +148,40 @@ export const getHttpHeaderForServiceRequest =
convertedRes["dvc_auth"] = res["X-Authentication"]; convertedRes["dvc_auth"] = res["X-Authentication"];
//todo: for test //todo: for test
if (serverType !== "system") { if (serverType !== "system") {
if(ricCodeSetting === 'eic'){ if (ricCodeSetting === "eic") {
if (languageSetting === "GB") {
convertedRes["cntry_cd"] = "GB"; convertedRes["cntry_cd"] = "GB";
convertedRes['X-Device-Country'] = "GB"; convertedRes["X-Device-Country"] = "GB";
res["HOST"] = "GB.nextlgsdp.com"; res["HOST"] = "GB.nextlgsdp.com";
} }
if(ricCodeSetting === 'aic'){ if (languageSetting === "DE") {
convertedRes["cntry_cd"] = "DE";
convertedRes["X-Device-Country"] = "DE";
res["HOST"] = "DE.nextlgsdp.com";
}
}
if (ricCodeSetting === "aic") {
convertedRes["cntry_cd"] = "US"; convertedRes["cntry_cd"] = "US";
convertedRes['X-Device-Country'] = "US"; convertedRes["X-Device-Country"] = "US";
res["HOST"] = "US.nextlgsdp.com"; res["HOST"] = "US.nextlgsdp.com";
} }
if(ricCodeSetting === 'ruc'){ if (ricCodeSetting === "ruc") {
convertedRes["cntry_cd"] = "RU"; convertedRes["cntry_cd"] = "RU";
convertedRes['X-Device-Country'] = "RU"; convertedRes["X-Device-Country"] = "RU";
res["HOST"] = "RU.nextlgsdp.com"; res["HOST"] = "RU.nextlgsdp.com";
} }
} }
//language Code //language Code
if(convertedRes["cntry_cd"] === "US"){ if (convertedRes["cntry_cd"] === "US") {
convertedRes["lang_cd"] = "en-US"; convertedRes["lang_cd"] = "en-US";
} }
if(convertedRes["cntry_cd"] === "DE"){ if (convertedRes["cntry_cd"] === "DE") {
convertedRes["lang_cd"] = "de-DE"; convertedRes["lang_cd"] = "de-DE";
} }
if(convertedRes["cntry_cd"] === "GB"){ if (convertedRes["cntry_cd"] === "GB") {
convertedRes["lang_cd"] = "en-GB"; convertedRes["lang_cd"] = "en-GB";
} }
if(convertedRes["cntry_cd"] === "RU"){ if (convertedRes["cntry_cd"] === "RU") {
convertedRes["lang_cd"] = "ru-RU"; convertedRes["lang_cd"] = "ru-RU";
} }

View File

@@ -0,0 +1,14 @@
{
"id": "com.lgshop.app35",
"version": "2.0.0",
"vendor": "T-Win",
"type": "web",
"main": "index.html",
"title": "Shop Time",
"icon": "icon.png",
"miniicon": "icon-mini.png",
"largeIcon": "icon-large.png",
"iconColor": "#ffffff",
"disableBackHistoryAPI": true,
"uiRevision": 2
}

View File

@@ -0,0 +1,14 @@
{
"id": "com.lgshop.app79",
"version": "2.0.0",
"vendor": "T-Win",
"type": "web",
"main": "index.html",
"title": "Shop Time",
"icon": "icon.png",
"miniicon": "icon-mini.png",
"largeIcon": "icon-large.png",
"iconColor": "#ffffff",
"disableBackHistoryAPI": true,
"uiRevision": 2
}