From 9372785a36468b9b7e8a5fa357c69c6660cc42de Mon Sep 17 00:00:00 2001 From: ZhangQ <12903047+zq-kexin@user.noreply.gitee.com> Date: Tue, 9 Sep 2025 07:08:33 +0000 Subject: [PATCH 1/3] =?UTF-8?q?=E5=BC=82=E5=B8=B8=E6=8D=95=E8=8E=B7?= =?UTF-8?q?=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ZhangQ <12903047+zq-kexin@user.noreply.gitee.com> --- .../phone/src/main/ets/entryability/EntryAbility.ets | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/products/phone/src/main/ets/entryability/EntryAbility.ets b/products/phone/src/main/ets/entryability/EntryAbility.ets index c65dc56..7cdbeb3 100755 --- a/products/phone/src/main/ets/entryability/EntryAbility.ets +++ b/products/phone/src/main/ets/entryability/EntryAbility.ets @@ -61,7 +61,14 @@ export default class EntryAbility extends UIAbility { } private updateBreakpoint(windowWidth: number): void { - let windowWidthVp = windowWidth / display.getDefaultDisplaySync().densityPixels; + let windowWidthVp = 0; + try { + windowWidthVp = windowWidth / display.getDefaultDisplaySync().densityPixels; + } catch (error) { + let err = error as BusinessError; + hilog.error(0x0000, 'EntryAbility', `getDefaultDisplaySync failed. code=${err.code}, message=${err.message}`); + return; + } let curBp: string = ''; if (windowWidthVp < BreakpointConstants.BREAKPOINT_SCOPE[2]) { curBp = BreakpointConstants.BREAKPOINT_SM; -- Gitee From 4a6874f2629be95336455c53c52e9208ca119cdd Mon Sep 17 00:00:00 2001 From: ZhangQ <12903047+zq-kexin@user.noreply.gitee.com> Date: Thu, 11 Sep 2025 03:22:07 +0000 Subject: [PATCH 2/3] =?UTF-8?q?AI=E6=A3=80=E6=B5=8B=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ZhangQ <12903047+zq-kexin@user.noreply.gitee.com> --- features/home/src/main/ets/pages/ConversationList.ets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/home/src/main/ets/pages/ConversationList.ets b/features/home/src/main/ets/pages/ConversationList.ets index 89d4b1b..4ff5fdd 100755 --- a/features/home/src/main/ets/pages/ConversationList.ets +++ b/features/home/src/main/ets/pages/ConversationList.ets @@ -39,7 +39,7 @@ export struct ConversationList { ListItem() { ConversationItem(item) .onClick(() => { - if (this.pageInfo.size() > 1) { + if (this.pageInfo && this.pageInfo.size() > 1) { this.pageInfo.pop(); } this.pageInfo.pushPath({ name: 'ConversationDetail' }); -- Gitee From 0d77c0919759cc28e58d6d90d01b6331159e622a Mon Sep 17 00:00:00 2001 From: ZhangQ <12903047+zq-kexin@user.noreply.gitee.com> Date: Tue, 23 Sep 2025 09:26:36 +0000 Subject: [PATCH 3/3] =?UTF-8?q?=E5=BC=82=E5=B8=B8=E6=8D=95=E8=8E=B7?= =?UTF-8?q?=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ZhangQ <12903047+zq-kexin@user.noreply.gitee.com> --- build-profile.json5 | 3 ++- features/home/oh-package.json5 | 4 ++-- features/home/src/main/ets/pages/ContactsDetail.ets | 2 +- features/home/src/main/ets/pages/ContactsList.ets | 2 +- .../home/src/main/ets/pages/ConversationDetail.ets | 2 +- .../home/src/main/ets/pages/ConversationList.ets | 2 +- features/home/src/main/ets/pages/Index.ets | 5 ++--- .../src/main/ets/viewmodel/BottomTabViewModel.ets | 2 +- .../src/main/ets/viewmodel/ConversationViewModel.ets | 2 +- .../src/main/ets/views/Contacts/ContactsItem.ets | 6 +++--- .../views/Conversation/ConversationDetailBottom.ets | 4 ++-- .../views/Conversation/ConversationDetailItem.ets | 8 ++++---- .../views/Conversation/ConversationDetailNone.ets | 2 +- .../Conversation/ConversationDetailTopSearch.ets | 2 +- .../main/ets/views/Conversation/ConversationItem.ets | 2 +- features/home/src/main/ets/views/HomeTab.ets | 3 +-- features/home/src/main/ets/views/MessageBubble.ets | 12 ++++++------ .../home/src/main/ets/views/common/HomeTopSearch.ets | 2 +- .../home/src/main/resources/base/element/string.json | 4 ++++ .../src/main/resources/zh_CN/element/string.json | 4 ++++ features/socialCircle/oh-package.json5 | 2 +- features/socialCircle/src/main/ets/pages/Index.ets | 3 +-- products/phone/oh-package.json5 | 4 ++-- .../phone/src/main/ets/entryability/EntryAbility.ets | 2 +- products/phone/src/main/ets/pages/Index.ets | 4 ++-- 25 files changed, 47 insertions(+), 41 deletions(-) diff --git a/build-profile.json5 b/build-profile.json5 index 2a19c0e..40e5b86 100755 --- a/build-profile.json5 +++ b/build-profile.json5 @@ -5,7 +5,8 @@ { "name": "default", "signingConfig": "default", - "compatibleSdkVersion": "5.0.0(12)", + "compatibleSdkVersion": "5.0.5(17)", + "targetSdkVersion": "5.0.5(17)", "runtimeOS": "HarmonyOS" } ], diff --git a/features/home/oh-package.json5 b/features/home/oh-package.json5 index c225b1c..99e4b50 100755 --- a/features/home/oh-package.json5 +++ b/features/home/oh-package.json5 @@ -8,7 +8,7 @@ "version": "1.0.0", "dynamicDependencies": {}, "dependencies": { - "@ohos/base": "file:../../common/base", - "@ohos/socialcircle": "file:../socialCircle" + "base": "file:../../common/base", + "socialCircle": "file:../socialCircle" } } diff --git a/features/home/src/main/ets/pages/ContactsDetail.ets b/features/home/src/main/ets/pages/ContactsDetail.ets index abcf3fb..f1bf0da 100755 --- a/features/home/src/main/ets/pages/ContactsDetail.ets +++ b/features/home/src/main/ets/pages/ContactsDetail.ets @@ -12,7 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { Adaptive, BaseConstants, BreakpointConstants, StandardIcon } from '@ohos/base'; +import { Adaptive, BaseConstants, BreakpointConstants, StandardIcon } from 'base'; import { HomeConstants } from '../constants/HomeConstants'; import { SocialCirclePictures } from '../viewmodel/SocialCircleViewModel'; import { deviceInfo } from '@kit.BasicServicesKit'; diff --git a/features/home/src/main/ets/pages/ContactsList.ets b/features/home/src/main/ets/pages/ContactsList.ets index 44ea583..0188cb2 100755 --- a/features/home/src/main/ets/pages/ContactsList.ets +++ b/features/home/src/main/ets/pages/ContactsList.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import { Adaptive, BaseConstants, BreakpointConstants } from '@ohos/base'; +import { Adaptive, BaseConstants, BreakpointConstants } from 'base'; import { Alphabets, ContactsListData, ContactsDataInterface } from '../viewmodel/ConstactsViewModel'; import { ContactsItem } from '../views/Contacts/ContactsItem'; import { HomeConstants } from '../constants/HomeConstants'; diff --git a/features/home/src/main/ets/pages/ConversationDetail.ets b/features/home/src/main/ets/pages/ConversationDetail.ets index 46c31ca..eda9ee3 100755 --- a/features/home/src/main/ets/pages/ConversationDetail.ets +++ b/features/home/src/main/ets/pages/ConversationDetail.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import { Adaptive, BaseConstants, BreakpointConstants } from '@ohos/base'; +import { Adaptive, BaseConstants, BreakpointConstants } from 'base'; import { ConversationDetailBottom } from '../views/Conversation/ConversationDetailBottom'; import ConversationDetailItem from '../views/Conversation/ConversationDetailItem'; import { ConversationDetailTopSearch } from '../views/Conversation/ConversationDetailTopSearch'; diff --git a/features/home/src/main/ets/pages/ConversationList.ets b/features/home/src/main/ets/pages/ConversationList.ets index 4ff5fdd..73aac46 100755 --- a/features/home/src/main/ets/pages/ConversationList.ets +++ b/features/home/src/main/ets/pages/ConversationList.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import { Adaptive, BaseConstants, BreakpointConstants } from '@ohos/base'; +import { Adaptive } from 'base'; import { ConversationDataInterface, ConversationListData } from '../viewmodel/ConversationViewModel'; import { ConversationItem } from '../views/Conversation/ConversationItem'; import { HomeTopSearch } from '../views/common/HomeTopSearch'; diff --git a/features/home/src/main/ets/pages/Index.ets b/features/home/src/main/ets/pages/Index.ets index 5d70cb2..8e2e63f 100755 --- a/features/home/src/main/ets/pages/Index.ets +++ b/features/home/src/main/ets/pages/Index.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import { Adaptive, BaseConstants, BreakpointConstants, CurrentFeature, CurrentPage } from '@ohos/base'; +import { Adaptive, BaseConstants, BreakpointConstants, CurrentFeature, CurrentPage } from 'base'; import ConversationDetailNone from '../views/Conversation/ConversationDetailNone'; import { ContactsDetail } from './ContactsDetail'; import { ContactsList } from './ContactsList'; @@ -21,10 +21,9 @@ import { ConversationDetail } from './ConversationDetail'; import { ConversationList } from './ConversationList'; import { HomeConstants } from '../constants/HomeConstants'; import { HomeTab } from '../views/HomeTab'; -import { SocialCircle } from '@ohos/SocialCircle'; +import { SocialCircle } from 'socialCircle'; import { deviceInfo } from '@kit.BasicServicesKit'; -@Entry @Component export struct Index { @StorageProp('currentBreakpoint') @Watch('watchCurrentBreakpoint') currentBreakpoint: string = 'sm'; diff --git a/features/home/src/main/ets/viewmodel/BottomTabViewModel.ets b/features/home/src/main/ets/viewmodel/BottomTabViewModel.ets index f415b66..4e58e48 100755 --- a/features/home/src/main/ets/viewmodel/BottomTabViewModel.ets +++ b/features/home/src/main/ets/viewmodel/BottomTabViewModel.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import { TabInfoModel } from '@ohos/base'; +import { TabInfoModel } from 'base'; const ButtonInfo: TabInfoModel[] = [ { diff --git a/features/home/src/main/ets/viewmodel/ConversationViewModel.ets b/features/home/src/main/ets/viewmodel/ConversationViewModel.ets index 730aacf..e67a316 100755 --- a/features/home/src/main/ets/viewmodel/ConversationViewModel.ets +++ b/features/home/src/main/ets/viewmodel/ConversationViewModel.ets @@ -16,7 +16,7 @@ import { Want, common } from '@kit.AbilityKit'; import { BusinessError } from '@kit.BasicServicesKit'; import { hilog } from '@kit.PerformanceAnalysisKit'; -import { Logger } from '@ohos/base'; +import { Logger } from 'base'; interface ConversationDataInterface { name: Resource diff --git a/features/home/src/main/ets/views/Contacts/ContactsItem.ets b/features/home/src/main/ets/views/Contacts/ContactsItem.ets index de3b104..daa40aa 100755 --- a/features/home/src/main/ets/views/Contacts/ContactsItem.ets +++ b/features/home/src/main/ets/views/Contacts/ContactsItem.ets @@ -13,13 +13,13 @@ * limitations under the License. */ -import { BaseConstants, BreakpointConstants } from '@ohos/base'; +import { BaseConstants, BreakpointConstants } from 'base'; @Component export struct ContactsItem { @StorageProp('currentBreakpoint') currentBreakpoint: string = BreakpointConstants.BREAKPOINT_SM; - private name?: Resource; - private icon?: Resource; + name?: Resource; + icon?: Resource; build() { Flex({ alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) { diff --git a/features/home/src/main/ets/views/Conversation/ConversationDetailBottom.ets b/features/home/src/main/ets/views/Conversation/ConversationDetailBottom.ets index 0ba5dc1..29dab73 100755 --- a/features/home/src/main/ets/views/Conversation/ConversationDetailBottom.ets +++ b/features/home/src/main/ets/views/Conversation/ConversationDetailBottom.ets @@ -13,8 +13,8 @@ * limitations under the License. */ -import { BaseConstants } from '@ohos/base/src/main/ets/constants/BaseConstants'; -import { StandardIcon } from '@ohos/base/src/main/ets/views/image/StandardIcon'; +import { BaseConstants } from 'base/src/main/ets/constants/BaseConstants'; +import { StandardIcon } from 'base/src/main/ets/views/image/StandardIcon'; import { HomeConstants } from '../../constants/HomeConstants'; @Component diff --git a/features/home/src/main/ets/views/Conversation/ConversationDetailItem.ets b/features/home/src/main/ets/views/Conversation/ConversationDetailItem.ets index 2bb697a..d46f2f0 100755 --- a/features/home/src/main/ets/views/Conversation/ConversationDetailItem.ets +++ b/features/home/src/main/ets/views/Conversation/ConversationDetailItem.ets @@ -20,10 +20,10 @@ import { MessageBubble } from '../MessageBubble'; export default struct ConversationDetailItem { @Link currentFeatureIndex: number; @Link receivedName: string; - private isReceived: boolean = !HomeConstants.IS_RECEIVED; - private content: ResourceStr = ''; - private isAppletMsg?: boolean; - private isDocumentMsg?: boolean; + isReceived: boolean = !HomeConstants.IS_RECEIVED; + content: ResourceStr = ''; + isAppletMsg?: boolean; + isDocumentMsg?: boolean; build() { Flex({ justifyContent: FlexAlign.End, alignItems: ItemAlign.End }) { diff --git a/features/home/src/main/ets/views/Conversation/ConversationDetailNone.ets b/features/home/src/main/ets/views/Conversation/ConversationDetailNone.ets index 975034b..f8c0bec 100755 --- a/features/home/src/main/ets/views/Conversation/ConversationDetailNone.ets +++ b/features/home/src/main/ets/views/Conversation/ConversationDetailNone.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import { BaseConstants } from '@ohos/base/src/main/ets/constants/BaseConstants'; +import { BaseConstants } from 'base/src/main/ets/constants/BaseConstants'; import { deviceInfo } from '@kit.BasicServicesKit'; @Component diff --git a/features/home/src/main/ets/views/Conversation/ConversationDetailTopSearch.ets b/features/home/src/main/ets/views/Conversation/ConversationDetailTopSearch.ets index ad3d72a..a971d28 100755 --- a/features/home/src/main/ets/views/Conversation/ConversationDetailTopSearch.ets +++ b/features/home/src/main/ets/views/Conversation/ConversationDetailTopSearch.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import { BaseConstants, BreakpointConstants, StandardIcon } from '@ohos/base'; +import { BaseConstants, BreakpointConstants, StandardIcon } from 'base'; import { HomeConstants } from '../../constants/HomeConstants'; import { deviceInfo } from '@kit.BasicServicesKit'; diff --git a/features/home/src/main/ets/views/Conversation/ConversationItem.ets b/features/home/src/main/ets/views/Conversation/ConversationItem.ets index 8ecb543..38a3fef 100755 --- a/features/home/src/main/ets/views/Conversation/ConversationItem.ets +++ b/features/home/src/main/ets/views/Conversation/ConversationItem.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import { BaseConstants, BreakpointConstants } from '@ohos/base'; +import { BaseConstants, BreakpointConstants } from 'base'; import { HomeConstants } from '../../constants/HomeConstants'; @Component diff --git a/features/home/src/main/ets/views/HomeTab.ets b/features/home/src/main/ets/views/HomeTab.ets index 2a94b77..869bd30 100755 --- a/features/home/src/main/ets/views/HomeTab.ets +++ b/features/home/src/main/ets/views/HomeTab.ets @@ -13,9 +13,8 @@ * limitations under the License. */ -import { BaseConstants, BreakpointConstants } from '@ohos/base'; +import { BaseConstants, BreakpointConstants, TabInfoModel } from 'base'; import { ButtonInfo } from '../viewmodel/BottomTabViewModel'; -import { TabInfoModel } from '@ohos/base'; import { HomeConstants } from '../constants/HomeConstants'; @Component diff --git a/features/home/src/main/ets/views/MessageBubble.ets b/features/home/src/main/ets/views/MessageBubble.ets index 5e4c77d..65f6aa7 100755 --- a/features/home/src/main/ets/views/MessageBubble.ets +++ b/features/home/src/main/ets/views/MessageBubble.ets @@ -13,19 +13,19 @@ * limitations under the License. */ -import { BaseConstants, BreakpointConstants, IntroduceText, NormalText } from '@ohos/base' +import { BaseConstants, BreakpointConstants, IntroduceText, NormalText } from 'base' import { HomeConstants } from '../constants/HomeConstants'; -import { ConversationDataInterface, ConversationListData } from '../viewmodel/ConversationViewModel'; +import { ConversationListData } from '../viewmodel/ConversationViewModel'; @Component export struct MessageBubble { @StorageProp('currentBreakpoint') currentBreakpoint: string = BreakpointConstants.BREAKPOINT_SM; @Link receivedName: Resource; @Link currentFeatureIndex: number; - private isReceived: boolean = !HomeConstants.IS_RECEIVED; - private content: ResourceStr = ""; - private isAppletMsg?: boolean; - private isDocumentMsg?: boolean; + isReceived: boolean = !HomeConstants.IS_RECEIVED; + content: ResourceStr = ""; + isAppletMsg?: boolean; + isDocumentMsg?: boolean; avatar1: Resource = $r('app.media.avatar1'); avatar2: Resource = $r('app.media.avatar7'); diff --git a/features/home/src/main/ets/views/common/HomeTopSearch.ets b/features/home/src/main/ets/views/common/HomeTopSearch.ets index 9f7f829..2fe1d65 100755 --- a/features/home/src/main/ets/views/common/HomeTopSearch.ets +++ b/features/home/src/main/ets/views/common/HomeTopSearch.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import { BaseConstants, BreakpointConstants, StandardIcon } from '@ohos/base'; +import { BaseConstants, BreakpointConstants, StandardIcon } from 'base'; import { HomeConstants } from '../../constants/HomeConstants'; import { deviceInfo } from '@kit.BasicServicesKit'; diff --git a/features/home/src/main/resources/base/element/string.json b/features/home/src/main/resources/base/element/string.json index ff3f96e..6779a26 100755 --- a/features/home/src/main/resources/base/element/string.json +++ b/features/home/src/main/resources/base/element/string.json @@ -172,6 +172,10 @@ "name": "sport_club", "value": "运动俱乐部" }, + { + "name": "FF_take_tea", + "value": "芬芬邀请你喝奶茶" + }, { "name": "happy_thing", "value": "哈哈,今天有什么喜事说来听听" diff --git a/features/home/src/main/resources/zh_CN/element/string.json b/features/home/src/main/resources/zh_CN/element/string.json index 0351e1c..74ad5ff 100644 --- a/features/home/src/main/resources/zh_CN/element/string.json +++ b/features/home/src/main/resources/zh_CN/element/string.json @@ -172,6 +172,10 @@ "name": "sport_club", "value": "运动俱乐部" }, + { + "name": "FF_take_tea", + "value": "芬芬邀请你喝奶茶" + }, { "name": "happy_thing", "value": "哈哈,今天有什么喜事说来听听" diff --git a/features/socialCircle/oh-package.json5 b/features/socialCircle/oh-package.json5 index 1f9349c..ba8f6ff 100755 --- a/features/socialCircle/oh-package.json5 +++ b/features/socialCircle/oh-package.json5 @@ -8,6 +8,6 @@ "version": "1.0.0", "dynamicDependencies": {}, "dependencies": { - "@ohos/base": "file:../../common/base" + "base": "file:../../common/base" } } diff --git a/features/socialCircle/src/main/ets/pages/Index.ets b/features/socialCircle/src/main/ets/pages/Index.ets index d09626b..8475576 100755 --- a/features/socialCircle/src/main/ets/pages/Index.ets +++ b/features/socialCircle/src/main/ets/pages/Index.ets @@ -13,12 +13,11 @@ * limitations under the License. */ -import { BreakpointConstants, BaseConstants } from '@ohos/base'; +import { BreakpointConstants, BaseConstants } from 'base'; import getSocialCircleList, { PictureConstants } from '../constants/PictureConstants'; import { PictureArrayInterface, PictureInterface } from '../viewmodel/CommonViewModel'; import { deviceInfo } from '@kit.BasicServicesKit'; -@Entry @Component export struct SocialCircle { @StorageLink('currentBreakpoint') currentBreakpoint: string = BreakpointConstants.BREAKPOINT_SM; diff --git a/products/phone/oh-package.json5 b/products/phone/oh-package.json5 index 9a65aaf..1f824db 100755 --- a/products/phone/oh-package.json5 +++ b/products/phone/oh-package.json5 @@ -8,7 +8,7 @@ "version": "1.0.0", "dynamicDependencies": {}, "dependencies": { - "@ohos/base": "file:../../common/base", - "@ohos/home": "file:../../features/home" + "base": "file:../../common/base", + "home": "file:../../features/home" } } diff --git a/products/phone/src/main/ets/entryability/EntryAbility.ets b/products/phone/src/main/ets/entryability/EntryAbility.ets index 7cdbeb3..818263a 100755 --- a/products/phone/src/main/ets/entryability/EntryAbility.ets +++ b/products/phone/src/main/ets/entryability/EntryAbility.ets @@ -17,7 +17,7 @@ import { UIAbility } from '@kit.AbilityKit'; import { hilog } from '@kit.PerformanceAnalysisKit'; import { display, KeyboardAvoidMode, window } from '@kit.ArkUI'; import { BusinessError } from '@kit.BasicServicesKit'; -import { BaseConstants, BreakpointConstants } from '@ohos/base/Index'; +import { BaseConstants, BreakpointConstants } from 'base/Index'; import { deviceInfo } from '@kit.BasicServicesKit'; export default class EntryAbility extends UIAbility { diff --git a/products/phone/src/main/ets/pages/Index.ets b/products/phone/src/main/ets/pages/Index.ets index bc56001..4c735f9 100755 --- a/products/phone/src/main/ets/pages/Index.ets +++ b/products/phone/src/main/ets/pages/Index.ets @@ -13,8 +13,8 @@ * limitations under the License. */ -import { Home } from '@ohos/home'; -import { BaseConstants, BreakpointConstants } from '@ohos/base'; +import { Home } from 'home'; +import { BaseConstants, BreakpointConstants } from 'base'; @Entry @Component -- Gitee