提交 f197e47e authored 作者: yueweilu's avatar yueweilu

各种协议

上级 d9e8fda5
...@@ -210,13 +210,13 @@ class _LoginPageState extends State<LoginPage> { ...@@ -210,13 +210,13 @@ class _LoginPageState extends State<LoginPage> {
GestureDetector( GestureDetector(
child: Text('《用户协议》',style: TextStyle(color: Colours.cBlue,fontSize:14.w,height: 1.4)), child: Text('《用户协议》',style: TextStyle(color: Colours.cBlue,fontSize:14.w,height: 1.4)),
onTap: (){ onTap: (){
context.pushNamed(Routes.terms); context.pushNamed(Routes.terms,queryParameters: {'url':'$kServerUrl$kUserAgreement'});
}, },
), ),
GestureDetector( GestureDetector(
child: Text('《隐私政策》',style: TextStyle(color: Colours.cBlue,fontSize:14.w,height: 1.4)), child: Text('《隐私政策》',style: TextStyle(color: Colours.cBlue,fontSize:14.w,height: 1.4)),
onTap: (){ onTap: (){
context.pushNamed(Routes.terms); context.pushNamed(Routes.terms,queryParameters: {'url':'$kServerUrl$kUserPriAgreement'});
}, },
), ),
], ],
......
...@@ -58,7 +58,7 @@ class _AboutPageState extends State<AboutPage> { ...@@ -58,7 +58,7 @@ class _AboutPageState extends State<AboutPage> {
GestureDetector( GestureDetector(
child: Text('《用户协议》',textAlign: TextAlign.right,style: TextStyle(fontSize: 10.w,color: Color(0xFF2A82D9)),), child: Text('《用户协议》',textAlign: TextAlign.right,style: TextStyle(fontSize: 10.w,color: Color(0xFF2A82D9)),),
onTap: (){ onTap: (){
context.pushNamed(Routes.terms); context.pushNamed(Routes.terms,queryParameters: {'url':'$kServerUrl$kUserAgreement'});
}, },
), ),
Gaps.vGaps15, Gaps.vGaps15,
...@@ -67,7 +67,7 @@ class _AboutPageState extends State<AboutPage> { ...@@ -67,7 +67,7 @@ class _AboutPageState extends State<AboutPage> {
GestureDetector( GestureDetector(
child: Text('《隐私协议》',textAlign: TextAlign.left,style: TextStyle(fontSize: 10.w,color: Color(0xFF2A82D9))), child: Text('《隐私协议》',textAlign: TextAlign.left,style: TextStyle(fontSize: 10.w,color: Color(0xFF2A82D9))),
onTap:(){ onTap:(){
context.pushNamed(Routes.terms); context.pushNamed(Routes.terms,queryParameters: {'url':'$kServerUrl$kUserPriAgreement'});
} , } ,
) )
], ],
......
...@@ -70,7 +70,7 @@ class _CoinRechargePageState extends State<CoinRechargePage> with AutomaticKeepA ...@@ -70,7 +70,7 @@ class _CoinRechargePageState extends State<CoinRechargePage> with AutomaticKeepA
Gaps.vGaps15, Gaps.vGaps15,
GestureDetector( GestureDetector(
onTap: (){ onTap: (){
context.pushNamed(Routes.terms); context.pushNamed(Routes.terms,queryParameters: {'url':'$kServerUrl$kUserRechargeAgreement'});
}, },
child: RichText(text: TextSpan( child: RichText(text: TextSpan(
children: [ children: [
......
...@@ -3,7 +3,11 @@ part of user_terms; ...@@ -3,7 +3,11 @@ part of user_terms;
class TermsPage extends StatelessWidget { class TermsPage extends StatelessWidget {
const TermsPage({Key? key}) : super(key: key); final String url ;
const TermsPage({
Key? key,
required this.url
}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
...@@ -13,7 +17,7 @@ class TermsPage extends StatelessWidget { ...@@ -13,7 +17,7 @@ class TermsPage extends StatelessWidget {
), ),
body: InAppWebView( body: InAppWebView(
initialUrlRequest: URLRequest( initialUrlRequest: URLRequest(
url: Uri.parse('https://www.baidu.com/'), url: Uri.parse(url),
), ),
) )
); );
......
...@@ -223,7 +223,9 @@ abstract class Routes { ...@@ -223,7 +223,9 @@ abstract class Routes {
pageBuilder: (context, state) =>CupertinoPage( pageBuilder: (context, state) =>CupertinoPage(
name: state.uri.toString(), name: state.uri.toString(),
key: state.pageKey, key: state.pageKey,
child: const TermsPage() child: TermsPage(
url: state.uri.queryParameters['url'].toString(),
)
) )
), ),
GoRoute( GoRoute(
......
...@@ -13,7 +13,9 @@ const String kSearchHistory = 'search_history'; ...@@ -13,7 +13,9 @@ const String kSearchHistory = 'search_history';
const String kFailOrder = 'failOrder'; const String kFailOrder = 'failOrder';
const String kNoteTable = 'members_book_notes'; const String kNoteTable = 'members_book_notes';
const String kReadTable = 'read_history'; const String kReadTable = 'read_history';
const String kUserAgreement = '/html/agreement/ser_agreement.html';
const String kUserPriAgreement = '/html/agreement/pri_agreement.html';
const String kUserRechargeAgreement = '/html/agreement/rec_agreement.html';
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论