From 10f6ea6244a581198239cc8f97d756ebe9a01fd2 Mon Sep 17 00:00:00 2001 From: w-R <953969641@qq.com> Date: Tue, 22 Feb 2022 09:47:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=B8=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/retrofit/min_api.dart | 8 ++++---- lib/retrofit/min_api.g.dart | 2 +- lib/retrofit/retrofit_api.dart | 8 ++++---- lib/retrofit/retrofit_api.g.dart | 2 +- lib/view_widget/new_coupon_widget.dart | 6 +++--- lib/view_widget/receive_success.dart | 2 +- lib/web/web_turntable_activity.dart | 10 +++++++++- 7 files changed, 23 insertions(+), 15 deletions(-) diff --git a/lib/retrofit/min_api.dart b/lib/retrofit/min_api.dart index 84461685..d27c7d0b 100644 --- a/lib/retrofit/min_api.dart +++ b/lib/retrofit/min_api.dart @@ -28,12 +28,12 @@ part 'min_api.g.dart'; // const base_url = "http://user.prod.kunqi.lotus-wallet.com/app/"; ///222 // const baseUrl = "http://user.prod.kunqi.lotus-wallet.com/app/"; ///222 -const base_url = "http://192.168.10.236:8765/app/";///费韬 -const baseUrl = "http://192.168.10.236:8765/app/";///费韬 +// const base_url = "http://192.168.10.236:8765/app/";///费韬 +// const baseUrl = "http://192.168.10.236:8765/app/";///费韬 -// const base_url = "http://192.168.10.88:8765/app/";///詹云久 -// const baseUrl = "http://192.168.10.88:8765/app/";///詹云久 +const base_url = "http://192.168.10.88:8765/app/";///詹云久 +const baseUrl = "http://192.168.10.88:8765/app/";///詹云久 // const base_url = "http://192.168.10.37:8766/app/"; diff --git a/lib/retrofit/min_api.g.dart b/lib/retrofit/min_api.g.dart index 1c1cc751..856ae6e1 100644 --- a/lib/retrofit/min_api.g.dart +++ b/lib/retrofit/min_api.g.dart @@ -9,7 +9,7 @@ part of 'min_api.dart'; class _MinApiService implements MinApiService { _MinApiService(this._dio, {this.baseUrl}) { ArgumentError.checkNotNull(_dio, '_dio'); - baseUrl ??= 'http://192.168.10.236:8765/app/'; + baseUrl ??= 'http://192.168.10.88:8765/app/'; } final Dio _dio; diff --git a/lib/retrofit/retrofit_api.dart b/lib/retrofit/retrofit_api.dart index 55730ee0..7206d070 100644 --- a/lib/retrofit/retrofit_api.dart +++ b/lib/retrofit/retrofit_api.dart @@ -62,15 +62,15 @@ part 'retrofit_api.g.dart'; // const base_url = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222 // const baseUrl = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222 -const base_url = "http://192.168.10.236:8766/app/"; ///费韬 -const baseUrl = "http://192.168.10.236:8766/app/"; ///费韬 +// const base_url = "http://192.168.10.236:8766/app/"; ///费韬 +// const baseUrl = "http://192.168.10.236:8766/app/"; ///费韬 // const base_url = "http://192.168.10.37:8766/app/"; // const baseUrl = "http://192.168.10.37:8766/app/"; -// const base_url = "http://192.168.10.88:8766/app/";///詹云久 -// const baseUrl = "http://192.168.10.88:8766/app/";///詹云久 +const base_url = "http://192.168.10.88:8766/app/";///詹云久 +const baseUrl = "http://192.168.10.88:8766/app/";///詹云久 @RestApi(baseUrl: baseUrl) abstract class ApiService { diff --git a/lib/retrofit/retrofit_api.g.dart b/lib/retrofit/retrofit_api.g.dart index ad727613..aac9c038 100644 --- a/lib/retrofit/retrofit_api.g.dart +++ b/lib/retrofit/retrofit_api.g.dart @@ -9,7 +9,7 @@ part of 'retrofit_api.dart'; class _ApiService implements ApiService { _ApiService(this._dio, {this.baseUrl}) { ArgumentError.checkNotNull(_dio, '_dio'); - baseUrl ??= 'http://192.168.10.236:8766/app/'; + baseUrl ??= 'http://192.168.10.88:8766/app/'; } final Dio _dio; diff --git a/lib/view_widget/new_coupon_widget.dart b/lib/view_widget/new_coupon_widget.dart index 0b6a5371..afc6e94c 100644 --- a/lib/view_widget/new_coupon_widget.dart +++ b/lib/view_widget/new_coupon_widget.dart @@ -28,7 +28,7 @@ class NewCouponWidget extends StatelessWidget { // } return Container( - height: (coupon != null && coupon.isEx) ? 156.h : 145.h, + height: (coupon != null && coupon.isEx) ? 168.h : 151.h, width: double.infinity, margin: EdgeInsets.fromLTRB(14.w, 6.h, 14.w, 6.h), decoration: BoxDecoration( @@ -155,7 +155,7 @@ class NewCouponWidget extends StatelessWidget { Expanded( flex: (coupon != null && coupon.isEx) ? 56 : 42, child: Container( - margin: EdgeInsets.symmetric(horizontal: 23.w, vertical: 8.h), + margin: EdgeInsets.symmetric(horizontal: 23.w, vertical: 7.h), child: Column( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ @@ -197,7 +197,7 @@ class NewCouponWidget extends StatelessWidget { (coupon.useStartTime == null && coupon.useEndTime == null) ? S.of(context).quantian - : "${coupon.useStartTime.replaceAll("-", ".").split(" ")[0]} - ${coupon.useEndTime.replaceAll("-", ".").split(" ")[0]}", + : "${coupon.useStartTime} - ${coupon.useEndTime}", style: TextStyle( color: Color(0xFF353535), fontSize: 10.sp, diff --git a/lib/view_widget/receive_success.dart b/lib/view_widget/receive_success.dart index 90cd3fcf..81d600b9 100644 --- a/lib/view_widget/receive_success.dart +++ b/lib/view_widget/receive_success.dart @@ -25,7 +25,7 @@ class ReceiveSuccess extends StatelessWidget { color: Colors.white, borderRadius: BorderRadius.circular(8),), width: 218.w, - height: 210.h, + height: 250.h, child: Column( children: [ Padding( diff --git a/lib/web/web_turntable_activity.dart b/lib/web/web_turntable_activity.dart index a0441bc7..edc642d8 100644 --- a/lib/web/web_turntable_activity.dart +++ b/lib/web/web_turntable_activity.dart @@ -1,9 +1,12 @@ import 'dart:io'; import 'dart:ui'; +import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; +import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; +import 'package:shared_preferences/shared_preferences.dart'; import 'package:webview_flutter/webview_flutter.dart'; import 'package:flutter/cupertino.dart'; @@ -21,11 +24,16 @@ class WebTurntableActivity extends StatefulWidget { class _WebTurntableActivity extends State with WidgetsBindingObserver { final ScrollController scrollController = ScrollController(); + String token; @override void initState() { super.initState(); WidgetsBinding.instance.addObserver(this); + + SharedPreferences.getInstance().then((value) => { + token = value.getString('token'), + }); if (Platform.isAndroid) WebView.platform = SurfaceAndroidWebView(); } @@ -57,7 +65,7 @@ class _WebTurntableActivity extends State with WidgetsBind alignment: Alignment.center, child: WebView( - initialUrl: "http://192.168.10.90:5500/lottery.html", + initialUrl: "http://192.168.10.90:5500/lottery.html?token=${token}", javascriptMode: JavascriptMode.unrestricted, )), );