Compare commits
No commits in common. "61a28b9150da82298ad0c64d95be5e76c3ba1866" and "643d464d19c97b1ee4ec468beee5575c9d92190b" have entirely different histories.
61a28b9150
...
643d464d19
@ -12,7 +12,6 @@ export class BasicConstant {
|
|||||||
// static readonly urlImage = "https://dev-doc.igandan.com/app/"
|
// static readonly urlImage = "https://dev-doc.igandan.com/app/"
|
||||||
// static readonly urlExpert = "https://dev-app.igandan.com/app/expert/"
|
// static readonly urlExpert = "https://dev-app.igandan.com/app/expert/"
|
||||||
// static readonly wxUrl = "https://dev-wx.igandan.com/";
|
// static readonly wxUrl = "https://dev-wx.igandan.com/";
|
||||||
// static readonly polvId = "11";//保利威视学员id
|
|
||||||
|
|
||||||
//正式环境
|
//正式环境
|
||||||
static readonly urlExpertAPI = "https://app.igandan.com/app/expertAPI/";
|
static readonly urlExpertAPI = "https://app.igandan.com/app/expertAPI/";
|
||||||
@ -21,7 +20,6 @@ export class BasicConstant {
|
|||||||
static readonly urlImage = "http://doc.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 getStartpage=BasicConstant.urlExpertApp + "startpage";
|
static readonly getStartpage=BasicConstant.urlExpertApp + "startpage";
|
||||||
@ -45,7 +43,6 @@ export class BasicConstant {
|
|||||||
static readonly gethonorDetail = BasicConstant.urlExpertAPI+'gethonorDetail';
|
static readonly gethonorDetail = BasicConstant.urlExpertAPI+'gethonorDetail';
|
||||||
static readonly updatePwd = BasicConstant.urlExpertAPI+'updatePwd'
|
static readonly updatePwd = BasicConstant.urlExpertAPI+'updatePwd'
|
||||||
static readonly read = BasicConstant.urlExpert+'read'//视频阅读数
|
static readonly read = BasicConstant.urlExpert+'read'//视频阅读数
|
||||||
static readonly POLVID ='PolvId'//保利观众id
|
|
||||||
|
|
||||||
static readonly province=['全国','北京市','天津市','河北省','山西省'
|
static readonly province=['全国','北京市','天津市','河北省','山西省'
|
||||||
,'内蒙古自治区','辽宁省','吉林省','黑龙江省','上海市','江苏省','浙江省'
|
,'内蒙古自治区','辽宁省','吉林省','黑龙江省','上海市','江苏省','浙江省'
|
||||||
|
|||||||
@ -9,7 +9,7 @@ export struct VideoSelected{
|
|||||||
|
|
||||||
Column() {
|
Column() {
|
||||||
HdNav({ title: this.params.title, showRightIcon: false, showLeftIcon: true })
|
HdNav({ title: this.params.title, showRightIcon: false, showLeftIcon: true })
|
||||||
ListCompVideoSelect({type_uuid:this.params.uuid}).backgroundColor(Color.White).layoutWeight(1)
|
ListCompVideoSelect({type_uuid:this.params.uuid}).backgroundColor(Color.White).height('100%')
|
||||||
}.width('100%')
|
}.width('100%')
|
||||||
.height('100%').backgroundColor($r('app.color.top_bg'))
|
.height('100%').backgroundColor($r('app.color.top_bg'))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,7 +10,6 @@ import {
|
|||||||
} from '@polyvharmony/media-player-sdk';
|
} from '@polyvharmony/media-player-sdk';
|
||||||
import {PLVMediaDownloadSetting} from '@polyvharmony/media-player-sdk-addon-cache-down';
|
import {PLVMediaDownloadSetting} from '@polyvharmony/media-player-sdk-addon-cache-down';
|
||||||
|
|
||||||
|
|
||||||
const mockAuthentication: PLVVodMainAccountAuthentication = {
|
const mockAuthentication: PLVVodMainAccountAuthentication = {
|
||||||
userId: "cfb7a69a75",
|
userId: "cfb7a69a75",
|
||||||
secretKey: "4KtJhl9EqU"
|
secretKey: "4KtJhl9EqU"
|
||||||
@ -21,8 +20,8 @@ const mockAuthentication: PLVVodMainAccountAuthentication = {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
const mockViewerParam: PLVViewerParam = {
|
const mockViewerParam: PLVViewerParam = {
|
||||||
viewerId:'',
|
viewerId: "123",
|
||||||
viewerName: ""
|
viewerName: "123"
|
||||||
}
|
}
|
||||||
|
|
||||||
export class PLVMockMediaResourceData {
|
export class PLVMockMediaResourceData {
|
||||||
@ -55,9 +54,9 @@ export class PLVMockMediaResourceData {
|
|||||||
return this.mediaResources
|
return this.mediaResources
|
||||||
}
|
}
|
||||||
|
|
||||||
public setupMediaResourcesFromLocal(vid:string,param:PLVViewerParam):Promise<PLVMediaResource[]> {
|
public setupMediaResourcesFromLocal(vid:string):Promise<PLVMediaResource[]> {
|
||||||
return this.mediaResources = Promise.resolve([
|
return this.mediaResources = Promise.resolve([
|
||||||
vod(vid,param)
|
vod(vid)
|
||||||
// vod("e97dbe3e648aefc2eb6f68b96db9db6c_e"),
|
// vod("e97dbe3e648aefc2eb6f68b96db9db6c_e"),
|
||||||
// vod("e97dbe3e6401ea8f76617bafe32f57e9_e"),
|
// vod("e97dbe3e6401ea8f76617bafe32f57e9_e"),
|
||||||
// vod("e97dbe3e64ed6e0aac558e43787df1b4_e"),
|
// vod("e97dbe3e64ed6e0aac558e43787df1b4_e"),
|
||||||
@ -88,22 +87,21 @@ export class PLVMockMediaResourceData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private setupMediaResourcesFromServer() {
|
private setupMediaResourcesFromServer() {
|
||||||
// this.mediaResources = PLVGeneralApiManager.getVodVideoList(mockAuthentication, 1, 20)
|
this.mediaResources = PLVGeneralApiManager.getVodVideoList(mockAuthentication, 1, 20)
|
||||||
// .then(result => {
|
.then(result => {
|
||||||
// return result.data!.map(video => vod(video!.vid!))
|
return result.data!.map(video => vod(video!.vid!))
|
||||||
// })
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function vod(videoId: string,param:PLVViewerParam): PLVVodMediaResource {
|
function vod(videoId: string): PLVVodMediaResource {
|
||||||
// 默认下载路径
|
// 默认下载路径
|
||||||
const defaultDownloadRoot = PLVMediaDownloadSetting.defaultSetting(PLVMediaPlayerAppContext.getInstance().appContext!).downloadRootDirectory
|
const defaultDownloadRoot = PLVMediaDownloadSetting.defaultSetting(PLVMediaPlayerAppContext.getInstance().appContext!).downloadRootDirectory
|
||||||
return {
|
return {
|
||||||
videoId: videoId,
|
videoId: videoId,
|
||||||
authentication: mockAuthentication,
|
authentication: mockAuthentication,
|
||||||
viewerParam:param,
|
viewerParam: mockViewerParam,
|
||||||
// viewerParam: mockViewerParam,
|
|
||||||
scene: "vod",
|
scene: "vod",
|
||||||
localVideoSearchPaths: [defaultDownloadRoot]
|
localVideoSearchPaths: [defaultDownloadRoot]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { runCatching, seconds ,PLVViewerParam} from '@polyvharmony/media-player-sdk';
|
import { runCatching, seconds } from '@polyvharmony/media-player-sdk';
|
||||||
import { BasicConstant,authStore,preferenceStore } from '@itcast/basic'
|
import { BasicConstant } from '@itcast/basic'
|
||||||
import { promptAction, router } from '@kit.ArkUI';
|
import { promptAction, router } from '@kit.ArkUI';
|
||||||
import { PLVMockMediaResourceData } from '../polyv/PLVMockMediaResourceData'
|
import { PLVMockMediaResourceData } from '../polyv/PLVMockMediaResourceData'
|
||||||
import {
|
import {
|
||||||
@ -9,15 +9,10 @@ import HashMap from '@ohos.util.HashMap';
|
|||||||
import { hdHttp, HdResponse ,logger} from '@itcast/basic/Index'
|
import { hdHttp, HdResponse ,logger} from '@itcast/basic/Index'
|
||||||
import { BusinessError } from '@kit.BasicServicesKit';
|
import { BusinessError } from '@kit.BasicServicesKit';
|
||||||
import { VideoDetailModel } from '../model/VideoDetailModel'
|
import { VideoDetailModel } from '../model/VideoDetailModel'
|
||||||
const mockViewerParam: PLVViewerParam = {
|
|
||||||
viewerId:preferenceStore.getItemString(BasicConstant.POLVID),
|
|
||||||
viewerName: authStore.getUser().realName
|
|
||||||
}
|
|
||||||
class VideoTools {
|
class VideoTools {
|
||||||
hashMap: HashMap<string, string> = new HashMap();
|
hashMap: HashMap<string, string> = new HashMap();
|
||||||
getVideoDetail(video_uuid:string)
|
getVideoDetail(video_uuid:string)
|
||||||
{
|
{
|
||||||
|
|
||||||
this.hashMap.clear();
|
this.hashMap.clear();
|
||||||
this.hashMap.set('video_uuid', video_uuid)
|
this.hashMap.set('video_uuid', video_uuid)
|
||||||
hdHttp.httpReq<string>(BasicConstant.videoDetail,this.hashMap).then(async (res: HdResponse<string>) => {
|
hdHttp.httpReq<string>(BasicConstant.videoDetail,this.hashMap).then(async (res: HdResponse<string>) => {
|
||||||
@ -66,7 +61,7 @@ class VideoTools {
|
|||||||
|
|
||||||
async goPLVMediaPlayerSingleVideoPage(vid:string,video_uuid:string)
|
async goPLVMediaPlayerSingleVideoPage(vid:string,video_uuid:string)
|
||||||
{
|
{
|
||||||
const mediaResourcesResult = await runCatching(PLVMockMediaResourceData.getInstance().setupMediaResourcesFromLocal(vid,mockViewerParam))
|
const mediaResourcesResult = await runCatching(PLVMockMediaResourceData.getInstance().setupMediaResourcesFromLocal(vid))
|
||||||
if (mediaResourcesResult.success === false) {
|
if (mediaResourcesResult.success === false) {
|
||||||
promptAction.showToast({
|
promptAction.showToast({
|
||||||
message: `'视频数据初始化失败': ${mediaResourcesResult.error}`,
|
message: `'视频数据初始化失败': ${mediaResourcesResult.error}`,
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { VideoPage,VideoGandan } from 'home'
|
|||||||
import { MyHomePage } from 'mypage'
|
import { MyHomePage } from 'mypage'
|
||||||
import { TabBarCompModel } from '../../models/TabBarCompModel'
|
import { TabBarCompModel } from '../../models/TabBarCompModel'
|
||||||
import { TabBarItems } from '../../contants/TabBarItems'
|
import { TabBarItems } from '../../contants/TabBarItems'
|
||||||
import { BasicConstant,AESEncryptionDecryption,authStore,preferenceStore } from '@itcast/basic'
|
import { BasicConstant } from '@itcast/basic'
|
||||||
import mediaquery from '@ohos.mediaquery';
|
import mediaquery from '@ohos.mediaquery';
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@ -17,20 +17,11 @@ export struct TabBarComp {
|
|||||||
@Provide
|
@Provide
|
||||||
toTop:boolean=false;
|
toTop:boolean=false;
|
||||||
aboutToAppear() {
|
aboutToAppear() {
|
||||||
this.getPolyid()
|
|
||||||
this.listenerScreen.on('change', (mediaQueryResult) => {
|
this.listenerScreen.on('change', (mediaQueryResult) => {
|
||||||
this.isLandscape = mediaQueryResult.matches
|
this.isLandscape = mediaQueryResult.matches
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
async getPolyid()
|
|
||||||
{
|
|
||||||
let mobile =authStore.getUser().mobile
|
|
||||||
let mobile_encryption = mobile +BasicConstant.polvId;
|
|
||||||
let signs =await AESEncryptionDecryption.aesEncrypt(mobile_encryption,"deoep09_klodLdAo")
|
|
||||||
preferenceStore.setItemString(BasicConstant.POLVID,signs)
|
|
||||||
}
|
|
||||||
|
|
||||||
@Builder
|
@Builder
|
||||||
TabBarBuilder(item: TabBarCompModel, index: number) {
|
TabBarBuilder(item: TabBarCompModel, index: number) {
|
||||||
Column({ space: BasicConstant.SPACE_SM }) {
|
Column({ space: BasicConstant.SPACE_SM }) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user