remove pageModule

Signed-off-by: zhaogan <zhaogan2@huawei.com>
This commit is contained in:
zhaogan 2024-03-30 14:51:20 +08:00
parent ffb760d92f
commit dfff91b6db
6 changed files with 0 additions and 41 deletions

View File

@ -90,7 +90,6 @@ struct ProxyData : public Parcelable {
struct RouterItem : public Parcelable {
std::string name;
std::string pageModule;
std::string pageSourceFile;
std::string buildFunction;
std::map<std::string, std::string> data;

View File

@ -84,7 +84,6 @@ const std::string HAP_MODULE_INFO_FILE_CONTEXT_MENU = "fileContextMenu";
const std::string HAP_MODULE_INFO_ROUTER_MAP = "routerMap";
const std::string HAP_MODULE_INFO_ROUTER_ARRAY = "routerArray";
const std::string ROUTER_ITEM_KEY_NAME = "name";
const std::string ROUTER_ITEM_KEY_PAGE_MODULE = "pageModule";
const std::string ROUTER_ITEM_KEY_PAGE_SOURCE_FILE = "pageSourceFile";
const std::string ROUTER_ITEM_KEY_BUILD_FUNCTION = "buildFunction";
const std::string ROUTER_ITEM_KEY_DATA = "data";
@ -303,7 +302,6 @@ void from_json(const nlohmann::json &jsonObject, ProxyData &proxyData)
bool RouterItem::ReadFromParcel(Parcel &parcel)
{
name = Str16ToStr8(parcel.ReadString16());
pageModule = Str16ToStr8(parcel.ReadString16());
pageSourceFile = Str16ToStr8(parcel.ReadString16());
buildFunction = Str16ToStr8(parcel.ReadString16());
@ -335,7 +333,6 @@ RouterItem *RouterItem::Unmarshalling(Parcel &parcel)
bool RouterItem::Marshalling(Parcel &parcel) const
{
WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String16, parcel, Str8ToStr16(name));
WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String16, parcel, Str8ToStr16(pageModule));
WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String16, parcel, Str8ToStr16(pageSourceFile));
WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String16, parcel, Str8ToStr16(buildFunction));
@ -354,7 +351,6 @@ void to_json(nlohmann::json &jsonObject, const RouterItem &routerItem)
{
jsonObject = nlohmann::json {
{ROUTER_ITEM_KEY_NAME, routerItem.name},
{ROUTER_ITEM_KEY_PAGE_MODULE, routerItem.pageModule},
{ROUTER_ITEM_KEY_PAGE_SOURCE_FILE, routerItem.pageSourceFile},
{ROUTER_ITEM_KEY_BUILD_FUNCTION, routerItem.buildFunction},
{ROUTER_ITEM_KEY_DATA, routerItem.data},
@ -376,14 +372,6 @@ void from_json(const nlohmann::json &jsonObject, RouterItem &routerItem)
true,
parseResult,
ArrayType::NOT_ARRAY);
GetValueIfFindKey<std::string>(jsonObject,
jsonObjectEnd,
ROUTER_ITEM_KEY_PAGE_MODULE,
routerItem.pageModule,
JsonType::STRING,
false,
parseResult,
ArrayType::NOT_ARRAY);
GetValueIfFindKey<std::string>(jsonObject,
jsonObjectEnd,
ROUTER_ITEM_KEY_PAGE_SOURCE_FILE,

View File

@ -64,7 +64,6 @@ constexpr const char* STATE = "state";
constexpr const char* DEBUG = "debug";
constexpr const char* EXTENSION_ABILITY_TYPE_NAME = "extensionAbilityTypeName";
constexpr const char* ROUTER_MAP = "routerMap";
constexpr const char* PAGE_MODULE = "pageModule";
constexpr const char* PAGE_SOURCE_FILE = "pageSourceFile";
constexpr const char* BUILD_FUNCTION = "buildFunction";
constexpr const char* DATA = "data";
@ -1573,11 +1572,6 @@ void CommonFunc::ConvertRouterItem(napi_env env, const RouterItem &routerItem, n
env, routerItem.name.c_str(), NAPI_AUTO_LENGTH, &nName));
NAPI_CALL_RETURN_VOID(env, napi_set_named_property(env, value, NAME, nName));
napi_value nPageModule;
NAPI_CALL_RETURN_VOID(env, napi_create_string_utf8(
env, routerItem.pageModule.c_str(), NAPI_AUTO_LENGTH, &nPageModule));
NAPI_CALL_RETURN_VOID(env, napi_set_named_property(env, value, PAGE_MODULE, nPageModule));
napi_value nPageSourceFile;
NAPI_CALL_RETURN_VOID(env, napi_create_string_utf8(
env, routerItem.pageSourceFile.c_str(), NAPI_AUTO_LENGTH, &nPageSourceFile));

View File

@ -82,7 +82,6 @@ RouterItem BmsBundleNavigationTest::GenerateRouterItem0()
{
RouterItem item;
item.name = "DynamicPage1";
item.pageModule = "entry";
item.pageSourceFile = "entry/src/index";
item.buildFunction = "myBuildFunction1";
item.ohmurl = "ohmurlTest&com.example.test&entry&entry/resources/base/profile&1.2.1";
@ -95,7 +94,6 @@ RouterItem BmsBundleNavigationTest::GenerateRouterItem1()
{
RouterItem item;
item.name = "DynamicPage1";
item.pageModule = "feature";
item.pageSourceFile = "feature/src/index";
item.buildFunction = "myBuildFunction1";
item.ohmurl = "ohmurlTest&com.example.test&feature&feature/resources/base/profile&1.2.1";
@ -108,7 +106,6 @@ RouterItem BmsBundleNavigationTest::GenerateRouterItem2()
{
RouterItem item;
item.name = "DynamicPage1";
item.pageModule = "library";
item.pageSourceFile = "library/src/index";
item.buildFunction = "myBuildFunction1";
item.ohmurl = "ohmurlTest&com.example.test&library&library/resources/base/profile&1.2.1";
@ -121,7 +118,6 @@ RouterItem BmsBundleNavigationTest::GenerateRouterItem3()
{
RouterItem item;
item.name = "DynamicPage1";
item.pageModule = "entry";
item.pageSourceFile = "entry/src/index";
item.buildFunction = "myBuildFunction1";
item.ohmurl = "ohmurlTest&com.example.test&entry&entry/resources/base/profile&1.2.2";
@ -134,7 +130,6 @@ RouterItem BmsBundleNavigationTest::GenerateRouterItem4()
{
RouterItem item;
item.name = "DynamicPage1";
item.pageModule = "entry";
item.pageSourceFile = "entry/src/index";
item.buildFunction = "myBuildFunction1";
item.ohmurl = "ohmurlTest&com.example.test&entry&entry/resources/base/profile&1.2.1";
@ -147,7 +142,6 @@ RouterItem BmsBundleNavigationTest::GenerateRouterItem5()
{
RouterItem item;
item.name = "DynamicPage1";
item.pageModule = "entry";
item.pageSourceFile = "entry/src/index";
item.buildFunction = "myBuildFunction1";
item.ohmurl = "ohmurlTest";
@ -160,7 +154,6 @@ RouterItem BmsBundleNavigationTest::GenerateRouterItem6()
{
RouterItem item;
item.name = "DynamicPage1";
item.pageModule = "feature";
item.pageSourceFile = "feature/src/index";
item.buildFunction = "myBuildFunction1";
item.ohmurl = "ohmurlTest";
@ -173,7 +166,6 @@ RouterItem BmsBundleNavigationTest::GenerateRouterItem7()
{
RouterItem item;
item.name = "DynamicPage1";
item.pageModule = "entry";
item.pageSourceFile = "entry/src/index";
item.buildFunction = "myBuildFunction1";
item.ohmurl = "ohmurlTestROUTER_ITEM_TEST_SIZE3";
@ -186,7 +178,6 @@ RouterItem BmsBundleNavigationTest::GenerateRouterItem8()
{
RouterItem item;
item.name = "DynamicPage1";
item.pageModule = "library";
item.pageSourceFile = "library/src/index";
item.buildFunction = "myBuildFunction1";
item.ohmurl = "ohmurlTest";
@ -199,7 +190,6 @@ RouterItem BmsBundleNavigationTest::GenerateRouterItem9()
{
RouterItem item;
item.name = "DynamicPage2";
item.pageModule = "entry";
item.pageSourceFile = "entry/src/index";
item.buildFunction = "myBuildFunction1";
item.ohmurl = "ohmurlTest&com.example.test&entry&entry/resources/base/profile&1.2.1ohmurlTest";
@ -212,7 +202,6 @@ RouterItem BmsBundleNavigationTest::GenerateRouterItem10()
{
RouterItem item;
item.name = "DynamicPage3";
item.pageModule = "feature";
item.pageSourceFile = "feature/src/index";
item.buildFunction = "myBuildFunction1";
item.ohmurl = "ohmurlTest";
@ -225,7 +214,6 @@ RouterItem BmsBundleNavigationTest::GenerateRouterItem11()
{
RouterItem item;
item.name = "DynamicPage4";
item.pageModule = "entry";
item.pageSourceFile = "entry/src/index";
item.buildFunction = "myBuildFunction1";
item.ohmurl = "ohmurlTest";

View File

@ -2,13 +2,11 @@
"routerMap": [
{
"name": "DynamicPage1",
"pageModule": "entry",
"pageSourceFile": "entry/src/index",
"buildFunction": "myFunction"
},
{
"name": "DynamicPage2",
"pageModule": "entry",
"pageSourceFile": "entry/src/index",
"buildFunction": "myBuilder",
"data": {

View File

@ -752,16 +752,12 @@ HWTEST_F(ActsBmsKitSystemTest, GetBundleInfo_1000, Function | MediumTest | Level
ASSERT_FALSE(bundleInfo.hapModuleInfos.empty());
ASSERT_EQ(bundleInfo.hapModuleInfos[PERMS_INDEX_ZERO].routerArray.size(), PERMS_INDEX_TWO);
EXPECT_EQ(bundleInfo.hapModuleInfos[PERMS_INDEX_ZERO].routerArray[PERMS_INDEX_ZERO].name, ROUTER_INDEX_ZERO_URL);
EXPECT_EQ(bundleInfo.hapModuleInfos[PERMS_INDEX_ZERO].routerArray[PERMS_INDEX_ZERO].pageModule,
ROUTER_INDEX_ZERO_MDOULE_NAME);
EXPECT_EQ(bundleInfo.hapModuleInfos[PERMS_INDEX_ZERO].routerArray[PERMS_INDEX_ZERO].pageSourceFile,
ROUTER_INDEX_ZERO_PATH);
EXPECT_EQ(bundleInfo.hapModuleInfos[PERMS_INDEX_ZERO].routerArray[PERMS_INDEX_ZERO].buildFunction,
ROUTER_INDEX_ZERO_BUILD_FUNCTION);
EXPECT_EQ(bundleInfo.hapModuleInfos[PERMS_INDEX_ZERO].routerArray[PERMS_INDEX_ONE].name, ROUTER_INDEX_ONE_URL);
EXPECT_EQ(bundleInfo.hapModuleInfos[PERMS_INDEX_ZERO].routerArray[PERMS_INDEX_ONE].pageModule,
ROUTER_INDEX_ZERO_MDOULE_NAME);
EXPECT_EQ(bundleInfo.hapModuleInfos[PERMS_INDEX_ZERO].routerArray[PERMS_INDEX_ONE].pageSourceFile,
ROUTER_INDEX_ZERO_PATH);
EXPECT_EQ(bundleInfo.hapModuleInfos[PERMS_INDEX_ZERO].routerArray[PERMS_INDEX_ONE].buildFunction,
@ -1315,16 +1311,12 @@ HWTEST_F(ActsBmsKitSystemTest, GetBundleInfoV9_0024, Function | MediumTest | Lev
ASSERT_FALSE(bundleInfo.hapModuleInfos.empty());
ASSERT_EQ(bundleInfo.hapModuleInfos[PERMS_INDEX_ZERO].routerArray.size(), PERMS_INDEX_TWO);
EXPECT_EQ(bundleInfo.hapModuleInfos[PERMS_INDEX_ZERO].routerArray[PERMS_INDEX_ZERO].name, ROUTER_INDEX_ZERO_URL);
EXPECT_EQ(bundleInfo.hapModuleInfos[PERMS_INDEX_ZERO].routerArray[PERMS_INDEX_ZERO].pageModule,
ROUTER_INDEX_ZERO_MDOULE_NAME);
EXPECT_EQ(bundleInfo.hapModuleInfos[PERMS_INDEX_ZERO].routerArray[PERMS_INDEX_ZERO].pageSourceFile,
ROUTER_INDEX_ZERO_PATH);
EXPECT_EQ(bundleInfo.hapModuleInfos[PERMS_INDEX_ZERO].routerArray[PERMS_INDEX_ZERO].buildFunction,
ROUTER_INDEX_ZERO_BUILD_FUNCTION);
EXPECT_EQ(bundleInfo.hapModuleInfos[PERMS_INDEX_ZERO].routerArray[PERMS_INDEX_ONE].name, ROUTER_INDEX_ONE_URL);
EXPECT_EQ(bundleInfo.hapModuleInfos[PERMS_INDEX_ZERO].routerArray[PERMS_INDEX_ONE].pageModule,
ROUTER_INDEX_ZERO_MDOULE_NAME);
EXPECT_EQ(bundleInfo.hapModuleInfos[PERMS_INDEX_ZERO].routerArray[PERMS_INDEX_ONE].pageSourceFile,
ROUTER_INDEX_ZERO_PATH);
EXPECT_EQ(bundleInfo.hapModuleInfos[PERMS_INDEX_ZERO].routerArray[PERMS_INDEX_ONE].buildFunction,