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