新增高级功能权益内容详情页面
This commit is contained in:
parent
6d186ec0a4
commit
6cea9b3a38
@ -12,6 +12,8 @@ class XSConstantMacro {
|
||||
'$baseWebURL/app/thirdPartyInformationSharingList'; //第三方信息共享清单
|
||||
static String appPermissionDescURL =
|
||||
'$baseWebURL/app/applicationPermissionDescription'; //应用权限说明
|
||||
static String vipServiceDetailURL =
|
||||
'$baseWebURL/value-added/vip-intro'; //增值服务特权详情页
|
||||
|
||||
// 钥匙类型 keyType 1-永久 2-限期 3-单次 4-循环
|
||||
static int keyTypeLong = 1;
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import 'package:star_lock/mine/about/webviewShow_state.dart';
|
||||
import 'package:webview_flutter/webview_flutter.dart';
|
||||
|
||||
import '../../tools/baseGetXController.dart';
|
||||
|
||||
@ -8,6 +9,25 @@ class WebviewShowLogic extends BaseGetXController {
|
||||
@override
|
||||
Future<void> onReady() async {
|
||||
super.onReady();
|
||||
|
||||
state.webViewController.setNavigationDelegate(
|
||||
NavigationDelegate(
|
||||
onProgress: (int progress) {
|
||||
// Update loading bar.
|
||||
state.webProgress.value = progress / 100;
|
||||
},
|
||||
onPageStarted: (String url) {
|
||||
state.webProgress.value = 0.0;
|
||||
},
|
||||
onPageFinished: (String url) {
|
||||
state.webProgress.value = 1.0;
|
||||
},
|
||||
onWebResourceError: (WebResourceError error) {},
|
||||
onNavigationRequest: (NavigationRequest request) async {
|
||||
return NavigationDecision.navigate;
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@ -38,7 +38,22 @@ class _WebviewShowPageState extends State<WebviewShowPage> {
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor,
|
||||
),
|
||||
body: WebViewWidget(controller: state.webViewController));
|
||||
body: Obx(() => Column(
|
||||
children: <Widget>[
|
||||
Container(
|
||||
padding: EdgeInsets.only(bottom: 10.w),
|
||||
child: LinearProgressIndicator(
|
||||
value: state.webProgress.value,
|
||||
backgroundColor: Colors.grey,
|
||||
valueColor:
|
||||
AlwaysStoppedAnimation<Color>(AppColors.mainColor),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: WebViewWidget(controller: state.webViewController),
|
||||
),
|
||||
],
|
||||
)));
|
||||
}
|
||||
|
||||
Widget xhjView() {
|
||||
|
||||
@ -6,6 +6,7 @@ class WebviewShowState {
|
||||
..setJavaScriptMode(JavaScriptMode.unrestricted);
|
||||
var webURL = '';
|
||||
var webTitle = '';
|
||||
var webProgress = 0.0.obs;
|
||||
|
||||
WebviewShowState() {
|
||||
Map map = Get.arguments;
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart';
|
||||
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesHighFunction/valueAddedServicesHighFunction_logic.dart';
|
||||
|
||||
import '../../../appRouters.dart';
|
||||
@ -151,7 +152,12 @@ class _ValueAddedServicesHighFunctionPageState
|
||||
height: 10.h,
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {},
|
||||
onTap: () {
|
||||
Navigator.pushNamed(context, Routers.webviewShowPage, arguments: {
|
||||
"url": XSConstantMacro.vipServiceDetailURL,
|
||||
"title": '权益内容'.tr
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(left: 20.w, right: 20.w),
|
||||
decoration: BoxDecoration(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user