Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
wangliang_wd
2024-06-13 15:49:11 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
854f50f60acc53a4901f982d009a7b434b8b3660
854f50f6
1 parent
75beee71
feat:优化代码
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
47 additions
and
6 deletions
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/HomePageBottomFollowComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/OtherHomePageBottomFollowComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/CardView.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/EditUserInfoPage.ets
sight_harmony/features/wdComponent/src/main/ets/model/EditInfoModel.ets
sight_harmony/features/wdComponent/src/main/ets/viewmodel/EditInfoViewModel.ets
sight_harmony/features/wdLogin/src/main/ets/pages/login/LoginPage.ets
sight_harmony/features/wdLogin/src/main/module.json5
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/HomePageBottomFollowComponent.ets
View file @
854f50f
...
...
@@ -116,7 +116,6 @@ export struct HomePageBottomFollowComponent {
this.curPageNum = 1;
this.hasMore = true
this.isGetRequest = false
this.data_follow.clear()
if (!this.isLoading){
this.getNewPageData()
...
...
@@ -201,6 +200,7 @@ export struct HomePageBottomFollowComponent {
let object = new FollowListDetailRequestItem(-1, 20, this.curPageNum)
MinePageDatasModel.getMineFollowListData(object, getContext(this)).then((value) => {
if (this.curPageNum === 1) this.data_follow.clear()
if (!this.data_follow || value.list.length == 0) {
this.hasMore = false
} else {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/OtherHomePageBottomFollowComponent.ets
View file @
854f50f
...
...
@@ -77,7 +77,6 @@ export struct OtherHomePageBottomFollowComponent{
this.curPageNum = 1;
this.hasMore = true
this.isGetRequest = false
this.data_follow.clear()
if (!this.isLoading){
this.getNewPageData()
...
...
@@ -164,6 +163,9 @@ export struct OtherHomePageBottomFollowComponent{
let object = new UserFollowListRequestItem(Number(this.curUserId),20,this.curPageNum,"1")
MinePageDatasModel.getOtherUserFollowListData(object,getContext(this)).then((value)=>{
if (this.curPageNum === 1) this.data_follow.clear()
if (!this.data_follow || value.list.length == 0){
this.hasMore = false
}else{
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/CardView.ets
View file @
854f50f
...
...
@@ -430,7 +430,7 @@ export struct PaperSingleColumn999CardView {
build() {
Column() {
Text(this.item?.newsTitle)
.fontColor('#222222')
.fontColor(
this.isRead ? 0x848484 :
'#222222')
.fontSize(16)
.fontWeight(FontWeight.Medium)
.alignSelf(ItemAlign.Start)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/EditUserInfoPage.ets
View file @
854f50f
...
...
@@ -57,7 +57,8 @@ struct EditUserInfoPage {
sexDialogController: CustomDialogController = new CustomDialogController({
builder: EditUserSexCustomDialog({
confirmCallback:(index)=>{
this.currentUserInfo.userExtend.sex = index;
///1男 2女
this.currentUserInfo.userExtend.sex = index == 0?2:1;
this.currentUserInfo.editDataType = WDEditDataModelType.WDEditDataModelType_sex
this.updateEditModel()
}
...
...
sight_harmony/features/wdComponent/src/main/ets/model/EditInfoModel.ets
View file @
854f50f
...
...
@@ -40,7 +40,7 @@ export class EditInfoModel{
//生日
birthday:string = ''
//性别
sex:number =
1
0
sex:number = 0
airec:number = 0
...
...
sight_harmony/features/wdComponent/src/main/ets/viewmodel/EditInfoViewModel.ets
View file @
854f50f
...
...
@@ -41,7 +41,7 @@ class EditInfoViewModel {
new EditListInfo('简介',item&&item.userExtend.introduction?item.userExtend.introduction:'待完善'),
new EditListInfo('地区',item&&item.userExtend.address?item.userExtend.address:'待完善'),
new EditListInfo('生日',item&&item.userExtend.birthday?item.userExtend.birthday:'待完善'),
new EditListInfo('性别',item?(item.userExtend.sex ===
1
0?'待完善':(item.userExtend.sex === 1?'男':'女')):'待完善'),]
new EditListInfo('性别',item?(item.userExtend.sex === 0?'待完善':(item.userExtend.sex === 1?'男':'女')):'待完善'),]
return this.editListData
}
...
...
sight_harmony/features/wdLogin/src/main/ets/pages/login/LoginPage.ets
View file @
854f50f
...
...
@@ -8,6 +8,9 @@ import { WDRouterRule } from 'wdRouter/src/main/ets/router/WDRouterRule';
import { Params } from '../../../../../../../commons/wdRouter/oh_modules/wdBean/src/main/ets/bean/content/Params'
import {InterestsHobbiesModel} from '../../../../../../../products/phone/src/main/ets/pages/viewModel/InterestsHobbiesModel'
import { TrackingPageBrowse, TrackConstants, TrackingButton, ParamType, Tracking } from 'wdTracking/Index'
import { window } from '@kit.ArkUI';
import { BusinessError } from '@kit.BasicServicesKit';
import { common } from '@kit.AbilityKit'
@Extend(Row)
function otherStyle() {
...
...
@@ -45,6 +48,7 @@ struct LoginPage {
lastTime: number = 0
@State codeStateSuccess:boolean=false
@State toastText:string = ""
@State isPrivacyMode: boolean = true;
dialogToast: CustomDialogController = new CustomDialogController({
builder: CustomToast({
msg: this.toastText,
...
...
@@ -84,6 +88,29 @@ struct LoginPage {
this.currentChanged()
}
disableScreenCapture(){
let windowClass: window.Window|undefined = undefined;
let context = getContext(this) as common.UIAbilityContext
try {
window.getLastWindow(context, (err, data) => {
if (err.code) {
return
}
windowClass = data
windowClass.setWindowPrivacyMode(this.isPrivacyMode, (err: BusinessError) => {
const errCode: number = err.code;
if (errCode) {
console.error('Failed to set the window to privacy mode. Cause:' + JSON.stringify(err));
return;
}
console.info('Succeeded in setting the window to privacy mode.');
});
})
} catch (exception) {
console.error('Failed to set the window to privacy mode. Cause:' + JSON.stringify(exception));
}
}
aboutToDisappear(): void {
this.breakpointSystem.unregister();
}
...
...
@@ -91,6 +118,8 @@ struct LoginPage {
onPageShow() {
Logger.debug(TAG, "onPageShow:" + this.isCodeSend + " ")
this.pageShowTime = DateTimeUtils.getTimeStamp()
this.isPrivacyMode = true
this.disableScreenCapture()
}
onPageHide(): void {
...
...
@@ -103,6 +132,8 @@ struct LoginPage {
}else{
TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.Login_Page,TrackConstants.PageName.Login_Page,duration)
}
this.isPrivacyMode = false
this.disableScreenCapture()
}
build() {
...
...
@@ -637,3 +668,5 @@ function trackTypeClick(typeValue: number,pageId: string){
Tracking.event("login_type_click", params)
}
...
...
sight_harmony/features/wdLogin/src/main/module.json5
View file @
854f50f
...
...
@@ -8,6 +8,11 @@
//
"tablet"
,
//
"2in1"
],
"requestPermissions"
:
[
{
"name"
:
"ohos.permission.PRIVACY_WINDOW"
}
],
"compressNativeLibs"
:
true
,
"deliveryWithInstall"
:
true
,
"pages"
:
"$profile:main_pages"
...
...
Please
register
or
login
to post a comment