添加视频号和直播回放教程配置

This commit is contained in:
wangyu 2026-03-31 18:00:29 +08:00
parent ccd0fec720
commit a88b186b28
4 changed files with 48 additions and 2 deletions

View File

@ -41,6 +41,12 @@ export class ConfigEntity {
@Expose({ name: 'client.course.zbhfplay' })
wxPlaybackCourse: string = ""; //直播回放教程
@Expose({ name: 'client.course.sphtext' })
wxVideoCourseText: Array<string> = []; //视频号教程文本
@Expose({ name: 'client.course.zbhftext' })
wxPlaybackCourseText: Array<string> = []; //直播回放教程文本
@Expose({ name: 'client.playback.join.type' })
wxPlaybackJoinType: string = ""; //直播加群方式

View File

@ -72,6 +72,8 @@ class UserConfigManager {
this.saveTakeMaterialCourse(config.config.takeMaterialCourse);
this.saveWxVideoCourse(config.config.wxVideoCourse);
this.savePlaybackCourse(config.config.wxPlaybackCourse);
this.saveWxVideoCourseText(config.config.wxVideoCourseText);
this.savePlaybackCourseText(config.config.wxPlaybackCourseText);
this.saveWxPlaybackJoinType(config.config.wxPlaybackJoinType);
this.saveWxVideoConfig(config.config.wxVideoConfig);
this.saveWxVideoServiceEnable(config.config.wxVideoServiceEnable);
@ -287,6 +289,44 @@ class UserConfigManager {
return PrefUtils.getString('playback_course');
}
/**
* 视频号教程文本
* @param url
*/
saveWxVideoCourseText(array: Array<string>) {
if (ArrayUtil.isNotEmpty(array)) {
PrefUtils.put('wx_video_course_text', JSON.stringify(array));
}
}
getWxVideoCourseText(): string {
const str = PrefUtils.getString('wx_video_course_text');
if (StrUtil.isNotEmpty(str)) {
let array = JSON.parse(str) as Array<string>;
return array.join("\n")
}
return "";
}
/**
* 直播回放教程文本
* @param url
*/
savePlaybackCourseText(array: Array<string>) {
if (ArrayUtil.isNotEmpty(array)) {
PrefUtils.put('playback_course_text', JSON.stringify(array));
}
}
getPlaybackCourseText(): string {
const str = PrefUtils.getString('playback_course_text');
if (StrUtil.isNotEmpty(str)) {
let array = JSON.parse(str) as Array<string>;
return array.join("\n")
}
return "";
}
/**
* 直播回放加群方式
* @param type

View File

@ -132,7 +132,7 @@ export struct WxImageMaterialPage {
Column() {
Text('操作步骤:').fontColor($r('app.color.color_212226')).fontSize(14)
Text(this.isPlayback ? $r('app.string.wx_playback_course') : $r('app.string.wx_video_course'))
Text(this.isPlayback ? ConfigManager.getPlaybackCourseText() : ConfigManager.getWxVideoCourseText())
.fontColor('#4D4F57')
.fontSize(12)
.lineHeight(20)

View File

@ -131,7 +131,7 @@ export struct WxVideoMaterialPage {
Column() {
Text('操作步骤:').fontColor($r('app.color.color_212226')).fontSize(14).fontWeight(FontWeight.Medium)
Text(this.isPlayback ? $r('app.string.wx_playback_course') : $r('app.string.wx_video_course'))
Text(this.isPlayback ? ConfigManager.getPlaybackCourseText() : ConfigManager.getWxVideoCourseText())
.fontColor('#4D4F57')
.fontSize(12)
.lineHeight(20)