Browse Source

券更改

ff_new
w-R 3 years ago
parent
commit
10f6ea6244
  1. 8
      lib/retrofit/min_api.dart
  2. 2
      lib/retrofit/min_api.g.dart
  3. 8
      lib/retrofit/retrofit_api.dart
  4. 2
      lib/retrofit/retrofit_api.g.dart
  5. 6
      lib/view_widget/new_coupon_widget.dart
  6. 2
      lib/view_widget/receive_success.dart
  7. 10
      lib/web/web_turntable_activity.dart

8
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 base_url = "http://user.prod.kunqi.lotus-wallet.com/app/"; ///222
// const baseUrl = "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 base_url = "http://192.168.10.236:8765/app/";///
const baseUrl = "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 base_url = "http://192.168.10.88:8765/app/";///
// const baseUrl = "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/"; // const base_url = "http://192.168.10.37:8766/app/";

2
lib/retrofit/min_api.g.dart

@ -9,7 +9,7 @@ part of 'min_api.dart';
class _MinApiService implements MinApiService { class _MinApiService implements MinApiService {
_MinApiService(this._dio, {this.baseUrl}) { _MinApiService(this._dio, {this.baseUrl}) {
ArgumentError.checkNotNull(_dio, '_dio'); ArgumentError.checkNotNull(_dio, '_dio');
baseUrl ??= 'http://192.168.10.236:8765/app/'; baseUrl ??= 'http://192.168.10.88:8765/app/';
} }
final Dio _dio; final Dio _dio;

8
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 base_url = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222
// const baseUrl = "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 base_url = "http://192.168.10.236:8766/app/"; ///
const baseUrl = "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 base_url = "http://192.168.10.37:8766/app/";
// const baseUrl = "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 base_url = "http://192.168.10.88:8766/app/";///
// const baseUrl = "http://192.168.10.88:8766/app/";/// const baseUrl = "http://192.168.10.88:8766/app/";///
@RestApi(baseUrl: baseUrl) @RestApi(baseUrl: baseUrl)
abstract class ApiService { abstract class ApiService {

2
lib/retrofit/retrofit_api.g.dart

@ -9,7 +9,7 @@ part of 'retrofit_api.dart';
class _ApiService implements ApiService { class _ApiService implements ApiService {
_ApiService(this._dio, {this.baseUrl}) { _ApiService(this._dio, {this.baseUrl}) {
ArgumentError.checkNotNull(_dio, '_dio'); ArgumentError.checkNotNull(_dio, '_dio');
baseUrl ??= 'http://192.168.10.236:8766/app/'; baseUrl ??= 'http://192.168.10.88:8766/app/';
} }
final Dio _dio; final Dio _dio;

6
lib/view_widget/new_coupon_widget.dart

@ -28,7 +28,7 @@ class NewCouponWidget extends StatelessWidget {
// } // }
return Container( return Container(
height: (coupon != null && coupon.isEx) ? 156.h : 145.h, height: (coupon != null && coupon.isEx) ? 168.h : 151.h,
width: double.infinity, width: double.infinity,
margin: EdgeInsets.fromLTRB(14.w, 6.h, 14.w, 6.h), margin: EdgeInsets.fromLTRB(14.w, 6.h, 14.w, 6.h),
decoration: BoxDecoration( decoration: BoxDecoration(
@ -155,7 +155,7 @@ class NewCouponWidget extends StatelessWidget {
Expanded( Expanded(
flex: (coupon != null && coupon.isEx) ? 56 : 42, flex: (coupon != null && coupon.isEx) ? 56 : 42,
child: Container( child: Container(
margin: EdgeInsets.symmetric(horizontal: 23.w, vertical: 8.h), margin: EdgeInsets.symmetric(horizontal: 23.w, vertical: 7.h),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [ children: [
@ -197,7 +197,7 @@ class NewCouponWidget extends StatelessWidget {
(coupon.useStartTime == null && (coupon.useStartTime == null &&
coupon.useEndTime == null) coupon.useEndTime == null)
? S.of(context).quantian ? S.of(context).quantian
: "${coupon.useStartTime.replaceAll("-", ".").split(" ")[0]} - ${coupon.useEndTime.replaceAll("-", ".").split(" ")[0]}", : "${coupon.useStartTime} - ${coupon.useEndTime}",
style: TextStyle( style: TextStyle(
color: Color(0xFF353535), color: Color(0xFF353535),
fontSize: 10.sp, fontSize: 10.sp,

2
lib/view_widget/receive_success.dart

@ -25,7 +25,7 @@ class ReceiveSuccess extends StatelessWidget {
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.circular(8),), borderRadius: BorderRadius.circular(8),),
width: 218.w, width: 218.w,
height: 210.h, height: 250.h,
child: Column( child: Column(
children: [ children: [
Padding( Padding(

10
lib/web/web_turntable_activity.dart

@ -1,9 +1,12 @@
import 'dart:io'; import 'dart:io';
import 'dart:ui'; import 'dart:ui';
import 'package:dio/dio.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart'; import 'package:flutter/rendering.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/view_widget/my_appbar.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:webview_flutter/webview_flutter.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -21,11 +24,16 @@ class WebTurntableActivity extends StatefulWidget {
class _WebTurntableActivity extends State<WebTurntableActivity> with WidgetsBindingObserver { class _WebTurntableActivity extends State<WebTurntableActivity> with WidgetsBindingObserver {
final ScrollController scrollController = ScrollController(); final ScrollController scrollController = ScrollController();
String token;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
WidgetsBinding.instance.addObserver(this); WidgetsBinding.instance.addObserver(this);
SharedPreferences.getInstance().then((value) => {
token = value.getString('token'),
});
if (Platform.isAndroid) WebView.platform = SurfaceAndroidWebView(); if (Platform.isAndroid) WebView.platform = SurfaceAndroidWebView();
} }
@ -57,7 +65,7 @@ class _WebTurntableActivity extends State<WebTurntableActivity> with WidgetsBind
alignment: Alignment.center, alignment: Alignment.center,
child: child:
WebView( WebView(
initialUrl: "http://192.168.10.90:5500/lottery.html", initialUrl: "http://192.168.10.90:5500/lottery.html?token=${token}",
javascriptMode: JavascriptMode.unrestricted, javascriptMode: JavascriptMode.unrestricted,
)), )),
); );

Loading…
Cancel
Save