提交 a2e54f37 authored 作者: 岳维路's avatar 岳维路

合并分支 'test' 到 'sim'

webview 内 http 请求不做限制 查看合并请求 kiwitap/zijing-app!20
......@@ -24,6 +24,10 @@ class _AdDetailPageState extends State<AdDetailPage> {
url: WebUri.uri(Uri.parse(widget.adModel.url??''))
// Uri.parse(widget.adModel.url??''),
),
initialSettings:InAppWebViewSettings(
// http的请求也不做限制
mixedContentMode:MixedContentMode.MIXED_CONTENT_ALWAYS_ALLOW
),
)
);
}
......
......@@ -24,6 +24,10 @@ class _AnswerPageState extends State<AnswerPage> {
// url: Uri.parse(widget.params['url']??''),
url: WebUri.uri(Uri.parse(widget.params['url']??''))
),
initialSettings:InAppWebViewSettings(
// http的请求也不做限制
mixedContentMode:MixedContentMode.MIXED_CONTENT_ALWAYS_ALLOW
),
onLoadStop: (controller, url) {
String str = '$kServerUrl,${widget.params['book_id']},${widget.params['chapter_id']},${widget.params['token']},${widget.params['position']}';
Console.log('知识测评--------传给前端的参数--------------------------------$str');
......
......@@ -23,6 +23,10 @@ class _ScaleImagePageState extends State<ScaleImagePage> {
initialUrlRequest: URLRequest(
url: WebUri.uri(Uri.parse(kScaleImage))
),
initialSettings:InAppWebViewSettings(
// http的请求也不做限制
mixedContentMode:MixedContentMode.MIXED_CONTENT_ALWAYS_ALLOW
),
onLoadStop: (controller, url) {
String jsonStr = jsonEncode(widget.params);
controller.evaluateJavascript(source: 'callbackInFlutterComponent($jsonStr)');
......
......@@ -24,6 +24,10 @@ class _UserWrongDesPageState extends State<UserWrongDesPage> {
// url: Uri.parse(kUserWrongDes),
url: WebUri.uri(Uri.parse(kUserWrongDes))
),
initialSettings:InAppWebViewSettings(
// http的请求也不做限制
mixedContentMode:MixedContentMode.MIXED_CONTENT_ALWAYS_ALLOW
),
onLoadStop: (controller, url) {
String str = '$kServerUrl,${widget.model.bookId},${UserStore.to.token}';
Console.log('传给前端的参数--------------------------------$str');
......
......@@ -2,9 +2,9 @@ part of utils;
// 服务器地址
// const String kServerUrl = 'http://192.168.11.88:81';
const String kServerUrl = 'http://8.141.148.247:7421';
// const String kServerUrl = 'https://ebook-app.ezijing.com';
// const String kServerUrl = 'http://1507.superge.cn:81';
// const String kServerUrl = 'http://8.141.148.247:7421';
const String kServerUrl = 'http://1507.superge.cn:81';
const String kHtmlBaseServer = 'http://150.158.138.40:9200';
const String kLocalToken = 'local_token';
const String kLocalAccessToken = 'local_access_token';
const String kLocalAccount = 'local_account';
......@@ -19,20 +19,18 @@ const String kUserPriAgreement = '/html/agreement/pri_agreement.html';
const String kUserRechargeAgreement = '/html/agreement/rec_agreement.html';
// 错题详情页 html
const String kUserWrongDes = '$kServerUrl/html/app/evaluating_wrong.html';
const String kUserWrongDes = '$kHtmlBaseServer/evaluating_wrong.html';
// 阅读页 html
const String kReadTestUnderLineBook = 'http://150.158.138.40:9200/read-unline.html';
const String kReadBook = '$kServerUrl/html/app/read.html';
const String kReadTestUnderLineBook = '$kHtmlBaseServer/read-unline.html';
const String kReadBook = '$kHtmlBaseServer/read.html';
// 答题页
const String kAnswer = '$kServerUrl/html/app/evaluating.html';
const String kAnswer = '$kHtmlBaseServer/evaluating.html';
// 答题结果页
const String kAnswerResult = '$kServerUrl/html/app/evaluating_result.html';
const String kAnswerResult = '$kHtmlBaseServer/evaluating_result.html';
// 画廊 扩展阅读
const String kReadInfo = '$kServerUrl/html/app/read_info.html';
const String kReadInfo = '$kHtmlBaseServer/read_info.html';
// 阅读页 图片预览
const String kScaleImage = '$kServerUrl/html/app/read_img.html';
const String kScaleImage = '$kHtmlBaseServer/read_img.html';
abstract class C {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论