[환경전환] local에서 확인하기 위하여 appinfo 파일 추가 및 commonActions 수정
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import Spotlight from "@enact/spotlight";
|
||||
|
||||
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 { types } from "./actionTypes";
|
||||
|
||||
@@ -86,7 +88,8 @@ export const getSystemSettings = () => (dispatch, getState) => {
|
||||
export const getHttpHeaderForServiceRequest =
|
||||
(onComplete) => (dispatch, getState) => {
|
||||
console.log("getHttpHeaderForServiceRequest ");
|
||||
const { serverType, ricCodeSetting } = getState().localSettings;
|
||||
const { serverType, ricCodeSetting, languageSetting } =
|
||||
getState().localSettings;
|
||||
lunaSend.getHttpHeaderForServiceRequest({
|
||||
onSuccess: (res) => {
|
||||
console.log("getHttpHeaderForServiceRequest", res);
|
||||
@@ -114,9 +117,23 @@ export const getHttpHeaderForServiceRequest =
|
||||
window.PalmSystem.identifier &&
|
||||
process.env.REACT_APP_MODE !== "DEBUG"
|
||||
) {
|
||||
convertedRes["app_id"] = window.PalmSystem.identifier ?? appinfo.id;
|
||||
if (ricCodeSetting === "aic") {
|
||||
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 {
|
||||
convertedRes["app_id"] = appinfo.id;
|
||||
if (ricCodeSetting === "aic") {
|
||||
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
|
||||
convertedRes["app_ver"] = "1.0.0"; //appinfo.version;
|
||||
@@ -131,33 +148,40 @@ export const getHttpHeaderForServiceRequest =
|
||||
convertedRes["dvc_auth"] = res["X-Authentication"];
|
||||
//todo: for test
|
||||
if (serverType !== "system") {
|
||||
if(ricCodeSetting === 'eic'){
|
||||
convertedRes["cntry_cd"] = "GB";
|
||||
convertedRes['X-Device-Country'] = "GB";
|
||||
res["HOST"] = "GB.nextlgsdp.com";
|
||||
if (ricCodeSetting === "eic") {
|
||||
if (languageSetting === "GB") {
|
||||
convertedRes["cntry_cd"] = "GB";
|
||||
convertedRes["X-Device-Country"] = "GB";
|
||||
res["HOST"] = "GB.nextlgsdp.com";
|
||||
}
|
||||
if (languageSetting === "DE") {
|
||||
convertedRes["cntry_cd"] = "DE";
|
||||
convertedRes["X-Device-Country"] = "DE";
|
||||
res["HOST"] = "DE.nextlgsdp.com";
|
||||
}
|
||||
}
|
||||
if(ricCodeSetting === 'aic'){
|
||||
if (ricCodeSetting === "aic") {
|
||||
convertedRes["cntry_cd"] = "US";
|
||||
convertedRes['X-Device-Country'] = "US";
|
||||
convertedRes["X-Device-Country"] = "US";
|
||||
res["HOST"] = "US.nextlgsdp.com";
|
||||
}
|
||||
if(ricCodeSetting === 'ruc'){
|
||||
if (ricCodeSetting === "ruc") {
|
||||
convertedRes["cntry_cd"] = "RU";
|
||||
convertedRes['X-Device-Country'] = "RU";
|
||||
convertedRes["X-Device-Country"] = "RU";
|
||||
res["HOST"] = "RU.nextlgsdp.com";
|
||||
}
|
||||
}
|
||||
//language Code
|
||||
if(convertedRes["cntry_cd"] === "US"){
|
||||
if (convertedRes["cntry_cd"] === "US") {
|
||||
convertedRes["lang_cd"] = "en-US";
|
||||
}
|
||||
if(convertedRes["cntry_cd"] === "DE"){
|
||||
if (convertedRes["cntry_cd"] === "DE") {
|
||||
convertedRes["lang_cd"] = "de-DE";
|
||||
}
|
||||
if(convertedRes["cntry_cd"] === "GB"){
|
||||
if (convertedRes["cntry_cd"] === "GB") {
|
||||
convertedRes["lang_cd"] = "en-GB";
|
||||
}
|
||||
if(convertedRes["cntry_cd"] === "RU"){
|
||||
if (convertedRes["cntry_cd"] === "RU") {
|
||||
convertedRes["lang_cd"] = "ru-RU";
|
||||
}
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
{
|
||||
"id": "com.lgshop.app",
|
||||
"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
|
||||
"id": "com.lgshop.app",
|
||||
"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
|
||||
}
|
||||
|
||||
14
com.twin.app.shoptime/webos-meta/appinfo35.json
Normal file
14
com.twin.app.shoptime/webos-meta/appinfo35.json
Normal 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
|
||||
}
|
||||
14
com.twin.app.shoptime/webos-meta/appinfo79.json
Normal file
14
com.twin.app.shoptime/webos-meta/appinfo79.json
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user