feat(miniapp): 实现热点资讯文章详情页面
- 新增 ArticleParam 类用于传递文章参数- 修改 MiniAppManager 类,增加 startWeb 方法支持打开网页 - 更新 ArticleDetailView 页面,集成 JSSdkClsManager 用于处理 JavaScript调用 - 修改 HomeView 页面,增加文章详情跳转功能 - 优化 XWebview 页面,支持加载 HTML 内容
这个提交包含在:
父节点
e7adec064c
当前提交
6779ed2e4f
@ -159,7 +159,7 @@ export struct XWebview {
|
|||||||
.visibility(this.progress > 95 || this.progress == 0 ? Visibility.None : Visibility.Visible)
|
.visibility(this.progress > 95 || this.progress == 0 ? Visibility.None : Visibility.Visible)
|
||||||
.width('100%')
|
.width('100%')
|
||||||
|
|
||||||
Web({ src: this.url ?? 'www.example.com', controller: this.controller })
|
Web({ src: this.url ?? '', controller: this.controller })
|
||||||
.javaScriptAccess(true)
|
.javaScriptAccess(true)
|
||||||
.javaScriptProxy({
|
.javaScriptProxy({
|
||||||
object: XWebManager.objs.get(this._uuidToHtml),
|
object: XWebManager.objs.get(this._uuidToHtml),
|
||||||
@ -249,9 +249,7 @@ export struct XWebview {
|
|||||||
}
|
}
|
||||||
if (this.content) {
|
if (this.content) {
|
||||||
try {
|
try {
|
||||||
this.controller.loadData(this.content,
|
this.controller.loadData(this.content, 'text/html', 'UTF-8', " ", " ")
|
||||||
"text/html",
|
|
||||||
"UTF-8", '', '')
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
ToolsHelper.showAlertDialog({
|
ToolsHelper.showAlertDialog({
|
||||||
title: '警告',
|
title: '警告',
|
||||||
|
|||||||
正在加载...
在新工单中引用
屏蔽一个用户