Browse Source

更改

remove_uniapp
w-R 3 years ago
parent
commit
57897e9a08
  1. 65
      lib/home/home_view/featured_acticvity.dart
  2. 6
      lib/main_page.dart
  3. 2
      lib/retrofit/min_api.dart
  4. 3
      lib/retrofit/retrofit_api.dart
  5. 6
      lib/view_widget/update_dialog.dart
  6. 2
      pubspec.yaml

65
lib/home/home_view/featured_acticvity.dart

@ -197,38 +197,43 @@ class _FeaturedActivity extends State<FeaturedActivity> {
], ],
), ),
), ),
Container( Row(
width: 48.w, children: [
margin: EdgeInsets.only(left: 8, bottom: 8), Container(
padding: EdgeInsets.symmetric( // width: 52.w,
vertical: 4.h, margin: EdgeInsets.only(left: 8, bottom: 8),
horizontal: 8.w, padding: EdgeInsets.symmetric(
), vertical: 4.h,
decoration: BoxDecoration( horizontal: 8.w,
color: Color(0xFF32A060),
borderRadius: BorderRadius.circular(20),
),
alignment: Alignment.center,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
"了解",
style: TextStyle(
fontSize: 10.sp,
fontWeight: MyFontWeight.medium,
color: Colors.white,
),
), ),
Icon( decoration: BoxDecoration(
Icons.keyboard_arrow_right, color: Color(0xFF32A060),
color: Colors.white, borderRadius: BorderRadius.circular(20),
size: 12,
), ),
], alignment: Alignment.center,
), child: Row(
), mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
"了解",
style: TextStyle(
fontSize: 10.sp,
fontWeight: MyFontWeight.medium,
color: Colors.white,
),
),
Icon(
Icons.keyboard_arrow_right,
color: Colors.white,
size: 12,
),
],
),
),
Spacer()
],
)
], ],
)); ));
} }

6
lib/main_page.dart

@ -337,10 +337,10 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
PackageInfo packageInfo = await PackageInfo.fromPlatform(); PackageInfo packageInfo = await PackageInfo.fromPlatform();
BaseData<AppUpdate> baseData = await apiService.appVersion().catchError((onError) {}); BaseData<AppUpdate> baseData = await apiService.appVersion().catchError((onError) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
baseData.data.appLastVersion = "1.0.5"; // baseData.data.appLastVersion = "1.0.95";
baseData.data.appLastVersionUp = "1.0.1"; // baseData.data.appLastVersionUp = "1.0.95";
if(AppUtils.versionCompare(packageInfo.version,baseData.data?.appLastVersion) if(AppUtils.versionCompare(packageInfo.version,baseData.data?.appLastVersion)
&& AppUtils.versionCompare(value.getString("appLastVersion")??"1.0.0",baseData.data?.appLastVersion)){ && AppUtils.versionCompare(value.getString("appLastVersion"),baseData.data?.appLastVersion)){
showDialog( showDialog(
context: context, context: context,
barrierDismissible: false, barrierDismissible: false,

2
lib/retrofit/min_api.dart

@ -32,7 +32,7 @@ part 'min_api.g.dart';
// const base_url = "http://192.168.10.37:8765/app/"; // const base_url = "http://192.168.10.37:8765/app/";
const localBaseUrl = "http://192.168.10.236:8766/app/";/// const localBaseUrl = "http://192.168.10.236:8765/app/";///
const serviceBaseUrl = "https://pos.api.lotus-wallet.com/app/";///线 const serviceBaseUrl = "https://pos.api.lotus-wallet.com/app/";///线

3
lib/retrofit/retrofit_api.dart

@ -170,8 +170,7 @@ abstract class ApiService {
@Part(name: "file") File data, @Part(name: "folderId") int folderId,bool isVideo); @Part(name: "file") File data, @Part(name: "folderId") int folderId,bool isVideo);
/// ///
@GET( @GET("https://restapi.amap.com/v3/place/around?key=542b46afa8e4b88fe1eb3c4d0ba0872f&location={lat},{lng}&keywords={keywords}&offset={size}&page={page}&extensions=all")
"https://restapi.amap.com/v3/place/around?key=542b46afa8e4b88fe1eb3c4d0ba0872f&location={lat},{lng}&keywords={keywords}&offset={size}&page={page}&extensions=all")
Future<dynamic> searchPoi(@Path("lat") String lat, @Path("lng") String lng, Future<dynamic> searchPoi(@Path("lat") String lat, @Path("lng") String lng,
@Path("keywords") String keywords, int size, int page); @Path("keywords") String keywords, int size, int page);

6
lib/view_widget/update_dialog.dart

@ -102,9 +102,7 @@ class _UpdateDialog extends State<UpdateDialog> {
Expanded( Expanded(
child: InkWell( child: InkWell(
onTap: () { onTap: () {
(Theme.of(context).platform == TargetPlatform.android) ? updateApp();
androidUpdate():Bridge.toAppStore().then((value) {
});
// Navigator.of(context).pop(); // Navigator.of(context).pop();
}, },
child: Container( child: Container(
@ -139,7 +137,7 @@ class _UpdateDialog extends State<UpdateDialog> {
Navigator.of(context).pop(); Navigator.of(context).pop();
} }
androidUpdate() async { updateApp() async {
String url = Platform.isIOS ? "itms-apps://itunes.apple.com/app/id1575124838":"http://application.lotus-wallet.com/huixaing?release_id=627cadff23389f2fe6d57cb1"; String url = Platform.isIOS ? "itms-apps://itunes.apple.com/app/id1575124838":"http://application.lotus-wallet.com/huixaing?release_id=627cadff23389f2fe6d57cb1";
if (await canLaunch(url)) { if (await canLaunch(url)) {
await launch(url); await launch(url);

2
pubspec.yaml

@ -3,7 +3,7 @@ description: 一心回乡.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.1+2 version: 1.0.94+3
environment: environment:
sdk: ">=2.7.0 <3.0.0" sdk: ">=2.7.0 <3.0.0"

Loading…
Cancel
Save