Merge branch 'master' of https://gitea.igandanyiyuan.com/gdxz/harmony
This commit is contained in:
commit
7e3a597e92
@ -102,6 +102,7 @@ export struct PositionSelectedSheet {
|
|||||||
range:this.officeNameArr,
|
range:this.officeNameArr,
|
||||||
selected:this.selectedIndex
|
selected:this.selectedIndex
|
||||||
})
|
})
|
||||||
|
.width('100%')
|
||||||
.canLoop(false)
|
.canLoop(false)
|
||||||
.selectedTextStyle({
|
.selectedTextStyle({
|
||||||
color: '#007AFF',
|
color: '#007AFF',
|
||||||
|
|||||||
@ -18,7 +18,7 @@ export class BasicConstant {
|
|||||||
static readonly urlExpertAPI = "https://app.igandan.com/app/expertAPI/";
|
static readonly urlExpertAPI = "https://app.igandan.com/app/expertAPI/";
|
||||||
static readonly urlExpertApp = "http://app.igandan.com/app/expertApp/"
|
static readonly urlExpertApp = "http://app.igandan.com/app/expertApp/"
|
||||||
static readonly urlHtml = "http://doc.igandan.com/app/"
|
static readonly urlHtml = "http://doc.igandan.com/app/"
|
||||||
static readonly urlImage = "http://app.igandan.com/app/"
|
static readonly urlImage = "http://doc.igandan.com/app/"
|
||||||
static readonly urlExpert = "http://app.igandan.com/app/expert/"
|
static readonly urlExpert = "http://app.igandan.com/app/expert/"
|
||||||
static readonly wxUrl = "https://wx.igandan.com/";// 微信服务器地址
|
static readonly wxUrl = "https://wx.igandan.com/";// 微信服务器地址
|
||||||
static readonly polvId = "21";//保利威视学员id
|
static readonly polvId = "21";//保利威视学员id
|
||||||
@ -55,5 +55,7 @@ export class BasicConstant {
|
|||||||
|
|
||||||
//通知事件ID
|
//通知事件ID
|
||||||
static readonly notification_back_refreshData = 250529;//返回上页通知刷新数据
|
static readonly notification_back_refreshData = 250529;//返回上页通知刷新数据
|
||||||
|
//首页tabContent切换事件通知
|
||||||
|
static readonly notification_home_tab_change = 25060413;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -12,6 +12,7 @@ import {
|
|||||||
import { runCatching, seconds } from '@polyvharmony/media-player-sdk';
|
import { runCatching, seconds } from '@polyvharmony/media-player-sdk';
|
||||||
import { it } from '@ohos/hypium';
|
import { it } from '@ohos/hypium';
|
||||||
import { videoTools } from '../polyv/VideoUtil'
|
import { videoTools } from '../polyv/VideoUtil'
|
||||||
|
import { getDisplayWindowWidth } from 'media-player-common'
|
||||||
@Component
|
@Component
|
||||||
export struct SwiperComp {
|
export struct SwiperComp {
|
||||||
@State
|
@State
|
||||||
@ -49,7 +50,7 @@ export struct SwiperComp {
|
|||||||
Image(BasicConstant.urlHtml + item.imgpath)
|
Image(BasicConstant.urlHtml + item.imgpath)
|
||||||
.objectFit(ImageFit.Fill)// 图片填充模式
|
.objectFit(ImageFit.Fill)// 图片填充模式
|
||||||
.width('100%')
|
.width('100%')
|
||||||
.height(150)
|
.height(getDisplayWindowWidth().vp / 16 * 9)
|
||||||
Text(item.name)
|
Text(item.name)
|
||||||
.maxLines(1)
|
.maxLines(1)
|
||||||
.height(30)
|
.height(30)
|
||||||
|
|||||||
@ -3,6 +3,7 @@ import router from '@ohos.router';
|
|||||||
import { BasicConstant, HdNav } from '@itcast/basic'
|
import { BasicConstant, HdNav } from '@itcast/basic'
|
||||||
import { SwiperComp } from '../components/SwiperComp'
|
import { SwiperComp } from '../components/SwiperComp'
|
||||||
import { emitter } from '@kit.BasicServicesKit';
|
import { emitter } from '@kit.BasicServicesKit';
|
||||||
|
import { getDisplayWindowWidth } from 'media-player-common'
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
export struct VideoGandan {
|
export struct VideoGandan {
|
||||||
@ -15,7 +16,7 @@ export struct VideoGandan {
|
|||||||
params:{'pageName':'视频'}
|
params:{'pageName':'视频'}
|
||||||
})
|
})
|
||||||
}})
|
}})
|
||||||
SwiperComp().height(150)
|
SwiperComp().height(getDisplayWindowWidth().vp / 16 * 9)
|
||||||
SecondaryLink().layoutWeight(1)
|
SecondaryLink().layoutWeight(1)
|
||||||
|
|
||||||
}.width('100%')
|
}.width('100%')
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { hdHttp, HdResponse,BasicConstant,ExpertData, authStore,RequestDefaultModel } from '@itcast/basic'
|
import { hdHttp, HdResponse,BasicConstant,ExpertData, authStore,RequestDefaultModel } from '@itcast/basic'
|
||||||
import { BusinessError } from '@kit.BasicServicesKit';
|
import { BusinessError, emitter } from '@kit.BasicServicesKit';
|
||||||
import { HeroPopWindow } from '@itcast/basic/src/main/ets/Views/HeroPopWindow'
|
import { HeroPopWindow } from '@itcast/basic/src/main/ets/Views/HeroPopWindow'
|
||||||
import HashMap from '@ohos.util.HashMap'
|
import HashMap from '@ohos.util.HashMap'
|
||||||
import { router } from '@kit.ArkUI'
|
import { router } from '@kit.ArkUI'
|
||||||
@ -49,6 +49,16 @@ export struct HeaderView {
|
|||||||
aboutToAppear(): void {
|
aboutToAppear(): void {
|
||||||
this.uploadUserDataAction();
|
this.uploadUserDataAction();
|
||||||
this.uploadBackImgAction();
|
this.uploadBackImgAction();
|
||||||
|
emitter.on({ eventId: BasicConstant.notification_home_tab_change }, (eventData: emitter.EventData) => {
|
||||||
|
if (eventData.data?.changeIndex === 2) {
|
||||||
|
this.uploadUserDataAction();
|
||||||
|
this.uploadBackImgAction();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
aboutToDisappear(): void {
|
||||||
|
emitter.off(BasicConstant.notification_home_tab_change)
|
||||||
}
|
}
|
||||||
|
|
||||||
uploadUserDataAction() {
|
uploadUserDataAction() {
|
||||||
@ -61,6 +71,7 @@ export struct HeaderView {
|
|||||||
let json:callBackData = JSON.parse(res+'') as callBackData;
|
let json:callBackData = JSON.parse(res+'') as callBackData;
|
||||||
if(json.code == 1 && json.expert && typeof json.expert === 'object') {
|
if(json.code == 1 && json.expert && typeof json.expert === 'object') {
|
||||||
authStore.updateUser(json.expert)
|
authStore.updateUser(json.expert)
|
||||||
|
this.photoPath = BasicConstant.urlImage+json.expert.photo;
|
||||||
console.log('用户信息成功:', authStore.getUser().intro);
|
console.log('用户信息成功:', authStore.getUser().intro);
|
||||||
} else {
|
} else {
|
||||||
console.error('用户信息失败:'+json.message)
|
console.error('用户信息失败:'+json.message)
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { TabBarComp } from '../pages/Tabbar/TabBarComp';
|
import { TabBarComp } from '../pages/Tabbar/TabBarComp';
|
||||||
import { themeManager } from '@itcast/basic';
|
import { BasicConstant, themeManager } from '@itcast/basic';
|
||||||
import { emitter } from '@kit.BasicServicesKit';
|
import { emitter } from '@kit.BasicServicesKit';
|
||||||
import { common } from '@kit.AbilityKit';
|
import { common } from '@kit.AbilityKit';
|
||||||
import { promptAction } from '@kit.ArkUI';
|
import { promptAction } from '@kit.ArkUI';
|
||||||
@ -28,6 +28,7 @@ struct Home {
|
|||||||
console.log('--onPageShow--');
|
console.log('--onPageShow--');
|
||||||
emitter.emit('notification_status_changed')
|
emitter.emit('notification_status_changed')
|
||||||
this.onChangeIndex()
|
this.onChangeIndex()
|
||||||
|
// emitter.emit({eventId:BasicConstant.notification_home_tab_change},{data:{'changeIndex':this.activeIndex}})
|
||||||
}
|
}
|
||||||
|
|
||||||
onPageHide(): void {
|
onPageHide(): void {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user