Merge branch 'master' of https://gitee.com/weishaoyang/star_lock
This commit is contained in:
commit
35d35c545d
@ -59,6 +59,8 @@ PODS:
|
|||||||
- Toast (4.0.0)
|
- Toast (4.0.0)
|
||||||
- url_launcher_ios (0.0.1):
|
- url_launcher_ios (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
|
- webview_flutter_wkwebview (0.0.1):
|
||||||
|
- Flutter
|
||||||
|
|
||||||
DEPENDENCIES:
|
DEPENDENCIES:
|
||||||
- aj_captcha_flutter (from `.symlinks/plugins/aj_captcha_flutter/ios`)
|
- aj_captcha_flutter (from `.symlinks/plugins/aj_captcha_flutter/ios`)
|
||||||
@ -79,6 +81,7 @@ DEPENDENCIES:
|
|||||||
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
|
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
|
||||||
- sqflite (from `.symlinks/plugins/sqflite/ios`)
|
- sqflite (from `.symlinks/plugins/sqflite/ios`)
|
||||||
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
|
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
|
||||||
|
- webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`)
|
||||||
|
|
||||||
SPEC REPOS:
|
SPEC REPOS:
|
||||||
trunk:
|
trunk:
|
||||||
@ -128,6 +131,8 @@ EXTERNAL SOURCES:
|
|||||||
:path: ".symlinks/plugins/sqflite/ios"
|
:path: ".symlinks/plugins/sqflite/ios"
|
||||||
url_launcher_ios:
|
url_launcher_ios:
|
||||||
:path: ".symlinks/plugins/url_launcher_ios/ios"
|
:path: ".symlinks/plugins/url_launcher_ios/ios"
|
||||||
|
webview_flutter_wkwebview:
|
||||||
|
:path: ".symlinks/plugins/webview_flutter_wkwebview/ios"
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
aj_captcha_flutter: dd7af1aa064bdd621ae335b819bab07309c3c023
|
aj_captcha_flutter: dd7af1aa064bdd621ae335b819bab07309c3c023
|
||||||
@ -156,6 +161,7 @@ SPEC CHECKSUMS:
|
|||||||
SwiftProtobuf: 40bd808372cb8706108f22d28f8ab4a6b9bc6989
|
SwiftProtobuf: 40bd808372cb8706108f22d28f8ab4a6b9bc6989
|
||||||
Toast: 91b396c56ee72a5790816f40d3a94dd357abc196
|
Toast: 91b396c56ee72a5790816f40d3a94dd357abc196
|
||||||
url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4
|
url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4
|
||||||
|
webview_flutter_wkwebview: 2e2d318f21a5e036e2c3f26171342e95908bd60a
|
||||||
|
|
||||||
PODFILE CHECKSUM: 99f32fc524867f7069762a97e548b5edf4ebf43f
|
PODFILE CHECKSUM: 99f32fc524867f7069762a97e548b5edf4ebf43f
|
||||||
|
|
||||||
|
|||||||
@ -72,6 +72,8 @@
|
|||||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||||
</array>
|
</array>
|
||||||
|
<key>io.flutter.embedded_views_preview</key>
|
||||||
|
<true/>
|
||||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||||
<false/>
|
<false/>
|
||||||
</dict>
|
</dict>
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/ma
|
|||||||
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupList_page.dart';
|
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupList_page.dart';
|
||||||
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendReceiver/massSendReceiver_page.dart';
|
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendReceiver/massSendReceiver_page.dart';
|
||||||
import 'package:star_lock/main/lockDetail/lockDetail/lockDetail_main_page.dart';
|
import 'package:star_lock/main/lockDetail/lockDetail/lockDetail_main_page.dart';
|
||||||
|
import 'package:star_lock/mine/about/webviewShow_page.dart';
|
||||||
import 'package:star_lock/mine/mine/safeVerify/safeVerify_page.dart';
|
import 'package:star_lock/mine/mine/safeVerify/safeVerify_page.dart';
|
||||||
import 'package:star_lock/mine/minePersonInfo/minePersonInfoEmail/mineBindPhoneOrEmail_page.dart';
|
import 'package:star_lock/mine/minePersonInfo/minePersonInfoEmail/mineBindPhoneOrEmail_page.dart';
|
||||||
import 'package:star_lock/mine/minePersonInfo/minePersonInfoViewSafetyProblem/minePersonInfoViewSafetyProblem_page.dart';
|
import 'package:star_lock/mine/minePersonInfo/minePersonInfoViewSafetyProblem/minePersonInfoViewSafetyProblem_page.dart';
|
||||||
@ -329,6 +330,7 @@ abstract class Routers {
|
|||||||
static const expireLockChangeDatePage =
|
static const expireLockChangeDatePage =
|
||||||
'/expireLockChangeDatePage'; //即将到期列表有效期修改
|
'/expireLockChangeDatePage'; //即将到期列表有效期修改
|
||||||
static const safeVerifyPage = '/safeVerifyPage'; //删除账号安全验证
|
static const safeVerifyPage = '/safeVerifyPage'; //删除账号安全验证
|
||||||
|
static const webviewShowPage = '/webviewShowPage'; //网页
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract class AppRouters {
|
abstract class AppRouters {
|
||||||
@ -820,6 +822,7 @@ abstract class AppRouters {
|
|||||||
GetPage(name: Routers.safeVerifyPage, page: () => const SafeVerifyPage()),
|
GetPage(name: Routers.safeVerifyPage, page: () => const SafeVerifyPage()),
|
||||||
GetPage(
|
GetPage(
|
||||||
name: Routers.minePersonInfoViewSafetyProblemPage,
|
name: Routers.minePersonInfoViewSafetyProblemPage,
|
||||||
page: () => const MinePersonInfoViewSafetyProblemPage())
|
page: () => const MinePersonInfoViewSafetyProblemPage()),
|
||||||
|
GetPage(name: Routers.webviewShowPage, page: () => const WebviewShowPage()),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,12 +1,22 @@
|
|||||||
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/appRouters.dart';
|
||||||
|
|
||||||
import '../../app_settings/app_colors.dart';
|
import '../../app_settings/app_colors.dart';
|
||||||
import '../../tools/commonItem.dart';
|
import '../../tools/commonItem.dart';
|
||||||
import '../../tools/titleAppBar.dart';
|
import '../../tools/titleAppBar.dart';
|
||||||
import '../../translations/trans_lib.dart';
|
import '../../translations/trans_lib.dart';
|
||||||
|
|
||||||
|
// 网页的宏定义网址
|
||||||
|
class XSWebviewURLMacro {
|
||||||
|
static const baseWebURL = 'http://192.168.56.101:8099'; //baseURL
|
||||||
|
static const userAgreementURL =
|
||||||
|
'$baseWebURL/page/detail?pageId=1&lang=cn'; //1用户协议
|
||||||
|
static const privacyPolicyURL =
|
||||||
|
'$baseWebURL/page/detail?pageId=2&lang=cn'; //2隐私政策
|
||||||
|
}
|
||||||
|
|
||||||
class AbountPage extends StatefulWidget {
|
class AbountPage extends StatefulWidget {
|
||||||
const AbountPage({Key? key}) : super(key: key);
|
const AbountPage({Key? key}) : super(key: key);
|
||||||
|
|
||||||
@ -66,7 +76,13 @@ class _AbountPageState extends State<AbountPage> {
|
|||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveLine: false,
|
isHaveLine: false,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {}),
|
action: () {
|
||||||
|
Navigator.pushNamed(context, Routers.webviewShowPage,
|
||||||
|
arguments: {
|
||||||
|
"url": XSWebviewURLMacro.userAgreementURL,
|
||||||
|
"title": '用户协议'
|
||||||
|
});
|
||||||
|
}),
|
||||||
Divider(
|
Divider(
|
||||||
height: 1,
|
height: 1,
|
||||||
color: AppColors.greyLineColor,
|
color: AppColors.greyLineColor,
|
||||||
@ -78,7 +94,13 @@ class _AbountPageState extends State<AbountPage> {
|
|||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveLine: false,
|
isHaveLine: false,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {}),
|
action: () {
|
||||||
|
Navigator.pushNamed(context, Routers.webviewShowPage,
|
||||||
|
arguments: {
|
||||||
|
"url": XSWebviewURLMacro.privacyPolicyURL,
|
||||||
|
"title": '隐私政策'
|
||||||
|
});
|
||||||
|
}),
|
||||||
Divider(
|
Divider(
|
||||||
height: 1,
|
height: 1,
|
||||||
color: AppColors.greyLineColor,
|
color: AppColors.greyLineColor,
|
||||||
|
|||||||
56
star_lock/lib/mine/about/webviewShow_page.dart
Normal file
56
star_lock/lib/mine/about/webviewShow_page.dart
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:star_lock/app_settings/app_colors.dart';
|
||||||
|
import 'package:star_lock/tools/titleAppBar.dart';
|
||||||
|
import 'package:webview_flutter/webview_flutter.dart';
|
||||||
|
|
||||||
|
class WebviewShowPage extends StatefulWidget {
|
||||||
|
const WebviewShowPage({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<WebviewShowPage> createState() => _WebviewShowPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _WebviewShowPageState extends State<WebviewShowPage> {
|
||||||
|
late WebViewController _webViewController;
|
||||||
|
String _webURL = '';
|
||||||
|
String _webTitle = '';
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
|
||||||
|
_webViewController = WebViewController()
|
||||||
|
..setJavaScriptMode(JavaScriptMode.unrestricted);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
dynamic obj = ModalRoute.of(context)?.settings.arguments;
|
||||||
|
if (obj != null && (obj["url"] != null)) {
|
||||||
|
_webURL = obj["url"];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (obj != null && (obj["title"] != null)) {
|
||||||
|
_webTitle = obj["title"];
|
||||||
|
}
|
||||||
|
|
||||||
|
_webViewController.loadRequest(Uri.parse(_webURL));
|
||||||
|
return Scaffold(
|
||||||
|
resizeToAvoidBottomInset: false,
|
||||||
|
backgroundColor: const Color(0xFFFFFFFF),
|
||||||
|
appBar: TitleAppBar(
|
||||||
|
barTitle: getWebTitle(),
|
||||||
|
haveBack: true,
|
||||||
|
backgroundColor: AppColors.mainColor,
|
||||||
|
),
|
||||||
|
body: WebViewWidget(controller: _webViewController));
|
||||||
|
}
|
||||||
|
|
||||||
|
String getWebTitle() {
|
||||||
|
String webTitleStr = _webTitle;
|
||||||
|
_webViewController.getTitle().then((result) {
|
||||||
|
webTitleStr = result!;
|
||||||
|
});
|
||||||
|
return webTitleStr;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,7 +1,6 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:get/get_utils/get_utils.dart';
|
|
||||||
import 'package:star_lock/appRouters.dart';
|
import 'package:star_lock/appRouters.dart';
|
||||||
import 'package:star_lock/mine/minePersonInfo/minePersonInfoSetSafetyProblem/minePersonInfoSetSafetyProblem_state.dart';
|
import 'package:star_lock/mine/minePersonInfo/minePersonInfoSetSafetyProblem/minePersonInfoSetSafetyProblem_state.dart';
|
||||||
import 'package:star_lock/tools/toast.dart';
|
import 'package:star_lock/tools/toast.dart';
|
||||||
|
|||||||
@ -4,6 +4,7 @@ abstract class Api {
|
|||||||
// final String baseUrl = "http://wenlin.lock.star-lock.cn/api"; //曾工
|
// final String baseUrl = "http://wenlin.lock.star-lock.cn/api"; //曾工
|
||||||
final String baseUrl = "http://192.168.56.101:8099/api"; //曾工本地
|
final String baseUrl = "http://192.168.56.101:8099/api"; //曾工本地
|
||||||
// final String baseUrl = "http://192.168.1.14:8099/api"; //葛工开发环境地址
|
// final String baseUrl = "http://192.168.1.14:8099/api"; //葛工开发环境地址
|
||||||
|
final String baseWebURL = 'http://192.168.56.101:8099'; //关于网页网址前缀
|
||||||
|
|
||||||
// 登录注册
|
// 登录注册
|
||||||
final String getVerificationCodeUrl = '/user/sendValidationCode';
|
final String getVerificationCodeUrl = '/user/sendValidationCode';
|
||||||
|
|||||||
@ -110,6 +110,8 @@ dependencies:
|
|||||||
|
|
||||||
#网络图片缓存
|
#网络图片缓存
|
||||||
cached_network_image: ^3.2.0
|
cached_network_image: ^3.2.0
|
||||||
|
webview_flutter: ^4.2.3
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user