diff --git a/fair_online/fair_online_service/fairDir/empty/project/empty_project/android/app/build.gradle b/fair_online/fair_online_service/fairDir/empty/project/empty_project/android/app/build.gradle index 39fa0eec..bc9d5921 100644 --- a/fair_online/fair_online_service/fairDir/empty/project/empty_project/android/app/build.gradle +++ b/fair_online/fair_online_service/fairDir/empty/project/empty_project/android/app/build.gradle @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 31 + compileSdkVersion 33 compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 @@ -45,7 +45,7 @@ android { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.example.empty_project" minSdkVersion 20 - targetSdkVersion 31 + targetSdkVersion 33 versionCode flutterVersionCode.toInteger() versionName flutterVersionName } diff --git a/fair_online/fair_online_service/fairDir/empty/project/empty_project/android/build.gradle b/fair_online/fair_online_service/fairDir/empty/project/empty_project/android/build.gradle index 09fbd640..cc7cf52f 100644 --- a/fair_online/fair_online_service/fairDir/empty/project/empty_project/android/build.gradle +++ b/fair_online/fair_online_service/fairDir/empty/project/empty_project/android/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.8.10' repositories { google() mavenCentral() diff --git a/fair_online/fair_online_service/fairDir/empty/project/empty_project/android/gradle/wrapper/gradle-wrapper.properties b/fair_online/fair_online_service/fairDir/empty/project/empty_project/android/gradle/wrapper/gradle-wrapper.properties index bc6a58af..039eda99 100644 --- a/fair_online/fair_online_service/fairDir/empty/project/empty_project/android/gradle/wrapper/gradle-wrapper.properties +++ b/fair_online/fair_online_service/fairDir/empty/project/empty_project/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip diff --git a/fair_online/fair_online_service/fairDir/empty/project/empty_project/assets/fair/fair_patch.zip b/fair_online/fair_online_service/fairDir/empty/project/empty_project/assets/fair/fair_patch.zip index 0ed9cae4..bee4aab9 100644 Binary files a/fair_online/fair_online_service/fairDir/empty/project/empty_project/assets/fair/fair_patch.zip and b/fair_online/fair_online_service/fairDir/empty/project/empty_project/assets/fair/fair_patch.zip differ diff --git a/fair_online/fair_online_service/fairDir/empty/project/empty_project/assets/fair/lib_page_hotel_listview_hotel_listview_template.fair.js b/fair_online/fair_online_service/fairDir/empty/project/empty_project/assets/fair/lib_page_hotel_listview_hotel_listview_template.fair.js index 04e5f37c..3c6e7d02 100644 --- a/fair_online/fair_online_service/fairDir/empty/project/empty_project/assets/fair/lib_page_hotel_listview_hotel_listview_template.fair.js +++ b/fair_online/fair_online_service/fairDir/empty/project/empty_project/assets/fair/lib_page_hotel_listview_hotel_listview_template.fair.js @@ -1 +1 @@ -GLOBAL['#FairKey#']=(function(__initProps__){const __global__=this;return runCallback(function(__mod__){with(__mod__.imports){function HotelModel(){const inner=HotelModel.__inner__;if(this==__global__){return new HotelModel({__args__:arguments});}else{const args=arguments.length>0?arguments[0].__args__||arguments:[];inner.apply(this,args);HotelModel.prototype.ctor.apply(this,args);return this;}}HotelModel.__inner__=function inner(){this.imagePath='';this.titleTxt='';this.subTxt='';this.dist='';this.reviews='';this.perNight='';};HotelModel.prototype={};HotelModel.prototype.ctor=function(){Object.prototype.ctor.call(this);};function _HotelListViewState(){const inner=_HotelListViewState.__inner__;if(this==__global__){return new _HotelListViewState({__args__:arguments});}else{const args=arguments.length>0?arguments[0].__args__||arguments:[];inner.apply(this,args);_HotelListViewState.prototype.ctor.apply(this,args);return this;}}_HotelListViewState.__inner__=function inner(){this._listData=[];this._page=0;};_HotelListViewState.prototype={onLoad:function onLoad(){const __thiz__=this;with(__thiz__){requestData();}},onUnload:function onUnload(){const __thiz__=this;with(__thiz__){}},requestData:function requestData(){const __thiz__=this;with(__thiz__){_page++;FairNet().request(convertObjectLiteralToSetOrMap({['pageName']:'#FairKey#',['method']:'GET',['url']:'https://wos2.58cdn.com.cn/DeFazYxWvDti/frsupload/3be6c61070d3b48c8165af5d18464c0e_hotel_list_data.json',['data']:convertObjectLiteralToSetOrMap({['page']:_page,}),['success']:function dummy(resp){if(resp==null){return null;}let data=resp.__op_idx__('data');data.forEach(function dummy(item){let dataItem=HotelModel();dataItem.imagePath=item.imagePath;dataItem.titleTxt=item.titleTxt;dataItem.subTxt=item.subTxt;dataItem.dist=item.dist+' km';dataItem.reviews=item.reviews+' reviews';dataItem.perNight=item.perNight+'';_listData.add(dataItem);});setState('#FairKey#',function dummy(){});},}));}},isDataEmpty:function isDataEmpty(){const __thiz__=this;with(__thiz__){return _listData.isEmpty;}},};_HotelListViewState.prototype.ctor=function(){Object.prototype.ctor.call(this);};;return _HotelListViewState();}},[]);})(convertObjectLiteralToSetOrMap(JSON.parse('#FairProps#'))); \ No newline at end of file +GLOBAL['#FairKey#']=(function(__initProps__){const __global__=this;defineModule(1,function(__mod__){with(__mod__.imports){}},[]);return runCallback(function(__mod__){with(__mod__.imports){function HotelModel(){const inner=HotelModel.__inner__;if(this==__global__){return new HotelModel({__args__:arguments});}else{const args=arguments.length>0?arguments[0].__args__||arguments:[];inner.apply(this,args);HotelModel.prototype.ctor.apply(this,args);return this;}}HotelModel.__inner__=function inner(){this.imagePath='';this.titleTxt='';this.subTxt='';this.dist='';this.reviews='';this.perNight='';};HotelModel.prototype={};HotelModel.prototype.ctor=function(){};function _HotelListViewState(){const inner=_HotelListViewState.__inner__;if(this==__global__){return new _HotelListViewState({__args__:arguments});}else{const args=arguments.length>0?arguments[0].__args__||arguments:[];inner.apply(this,args);_HotelListViewState.prototype.ctor.apply(this,args);return this;}}_HotelListViewState.__inner__=function inner(){this._listData=[];this._page=0;};_HotelListViewState.prototype={initState:function initState(){const __thiz__=this;with(__thiz__){onLoad();}},onLoad:function onLoad(){const __thiz__=this;with(__thiz__){requestData();}},onUnload:function onUnload(){const __thiz__=this;with(__thiz__){}},requestData:function requestData(){const __thiz__=this;with(__thiz__){_page++;FairNet().requestData(convertObjectLiteralToSetOrMap({['pageName']:'#FairKey#',['method']:'GET',['url']:'https://wos2.58cdn.com.cn/DeFazYxWvDti/frsupload/3be6c61070d3b48c8165af5d18464c0e_hotel_list_data.json',['data']:convertObjectLiteralToSetOrMap({['page']:_page,}),['success']:function dummy(resp){if(resp==null){return null;}let data=resp.__op_idx__('data');data.forEach(function dummy(item){let dataItem=HotelModel();try{dataItem.imagePath=item.imagePath;dataItem.titleTxt=item.titleTxt;dataItem.subTxt=item.subTxt;dataItem.dist=item.dist+' km';dataItem.reviews=item.reviews+' reviews';dataItem.perNight=item.perNight+'';}catch(e){dataItem.imagePath=item.__op_idx__('imagePath');dataItem.titleTxt=item.__op_idx__('titleTxt');dataItem.subTxt=item.__op_idx__('subTxt');dataItem.dist=`${item['dist']} km`;dataItem.reviews=`${item['reviews']} reviews`;dataItem.perNight=`${item['perNight']}`;}_listData.add(dataItem);});setState('#FairKey#',function dummy(){});},}));}},isDataEmpty:function isDataEmpty(){const __thiz__=this;with(__thiz__){return _listData.isEmpty;}},};_HotelListViewState.prototype.ctor=function(){};;return _HotelListViewState();}},[1]);})(convertObjectLiteralToSetOrMap(JSON.parse('#FairProps#'))); \ No newline at end of file diff --git a/fair_online/fair_online_service/fairDir/empty/project/empty_project/assets/fair/lib_page_hotel_listview_hotel_listview_template.fair.json b/fair_online/fair_online_service/fairDir/empty/project/empty_project/assets/fair/lib_page_hotel_listview_hotel_listview_template.fair.json index 09f684e9..83375e98 100644 --- a/fair_online/fair_online_service/fairDir/empty/project/empty_project/assets/fair/lib_page_hotel_listview_hotel_listview_template.fair.json +++ b/fair_online/fair_online_service/fairDir/empty/project/empty_project/assets/fair/lib_page_hotel_listview_hotel_listview_template.fair.json @@ -377,6 +377,11 @@ } } } + }, + "functionParameters": { + "pa": [ + "item" + ] } } } @@ -388,5 +393,6 @@ } } }, - "methodMap": {} + "methodMap": {}, + "digest": "3b90f4c1dbc6ea9c863a2774299d93f2" } \ No newline at end of file diff --git a/fair_online/fair_online_service/fairDir/empty/project/empty_project/assets/fair/lib_page_hotel_listview_hotel_listview_template.fair.metadata b/fair_online/fair_online_service/fairDir/empty/project/empty_project/assets/fair/lib_page_hotel_listview_hotel_listview_template.fair.metadata index 529b40bc..031ddc22 100644 --- a/fair_online/fair_online_service/fairDir/empty/project/empty_project/assets/fair/lib_page_hotel_listview_hotel_listview_template.fair.metadata +++ b/fair_online/fair_online_service/fairDir/empty/project/empty_project/assets/fair/lib_page_hotel_listview_hotel_listview_template.fair.metadata @@ -1,6 +1,6 @@ -# Generated by Fair on 2022-12-02 14:16:24.620246. +# Generated by Fair on 2023-09-18 15:47:53.940271. source: empty_project|lib/page/hotel_listview/hotel_listview_template.dart -md5: 5d4c50d5061d6964a481368fa30273d7 +md5: 4028170fdfe87caf31512bae868d8528 json: empty_project|build/fair/lib_page_hotel_listview_hotel_listview_template.fair.json -date: 2022-12-02 14:16:24.620472 +date: 2023-09-18 15:47:53.940525 diff --git a/fair_online/fair_online_service/fairDir/empty/project/empty_project/assets/plugin/fair_net_plugin.js b/fair_online/fair_online_service/fairDir/empty/project/empty_project/assets/plugin/fair_net_plugin.js index 06186fac..9b76fed9 100644 --- a/fair_online/fair_online_service/fairDir/empty/project/empty_project/assets/plugin/fair_net_plugin.js +++ b/fair_online/fair_online_service/fairDir/empty/project/empty_project/assets/plugin/fair_net_plugin.js @@ -5,12 +5,12 @@ let callBackId = 0; let FairNet = function () { return { - request: function (resp) { + requestData: function (resp) { let respMap = {}; respMap = mapOrSetToObject(resp); let id = 'FairNet$' + (++callBackId); let requestParameter = {}; - requestParameter['className'] = "FairNet#request"; + requestParameter['className'] = "FairNet#requestData"; callBack[id] = [respMap['complete'], respMap['error'], respMap['success']]; respMap['callId'] = id; requestParameter['funcName'] = 'invokePlugin'; diff --git a/fair_online/fair_online_service/fairDir/empty/project/empty_project/lib/page/hotel_listview/hotel_listview_template.dart b/fair_online/fair_online_service/fairDir/empty/project/empty_project/lib/page/hotel_listview/hotel_listview_template.dart index c4f77636..c0a16b53 100644 --- a/fair_online/fair_online_service/fairDir/empty/project/empty_project/lib/page/hotel_listview/hotel_listview_template.dart +++ b/fair_online/fair_online_service/fairDir/empty/project/empty_project/lib/page/hotel_listview/hotel_listview_template.dart @@ -31,7 +31,7 @@ class _HotelListViewState extends State { void requestData() { _page++; - FairNet().request({ + FairNet().requestData({ 'pageName': '#FairKey#', 'method': 'GET', 'url': @@ -74,17 +74,17 @@ class _HotelListViewState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: Text('ListView.builder模版'), + title: const Text('ListView.builder模版'), ), - backgroundColor: Color(0xFFFEFEFE), + backgroundColor: const Color(0xFFFEFEFE), body: Sugar.ifEqualBool(isDataEmpty(), - trueValue: Center( + trueValue: () => const Center( child: Text( '加载中...', ), ), - falseValue: Container( - color: Color(0xFFFFFFFF), + falseValue: () => Container( + color: const Color(0xFFFFFFFF), child: ListView( children: Sugar.map(_listData, builder: (HotelModel item) { return Padding( @@ -104,7 +104,7 @@ class _HotelListViewState extends State { fit: BoxFit.cover), ), Container( - color: Color(0xFFFFFFFF), + color: const Color(0xFFFFFFFF), child: Row( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: diff --git a/fair_online/fair_online_service/fairDir/empty/project/empty_project/lib/plugins/net/fair_net_plugin.dart b/fair_online/fair_online_service/fairDir/empty/project/empty_project/lib/plugins/net/fair_net_plugin.dart index 8f932d75..52419c59 100644 --- a/fair_online/fair_online_service/fairDir/empty/project/empty_project/lib/plugins/net/fair_net_plugin.dart +++ b/fair_online/fair_online_service/fairDir/empty/project/empty_project/lib/plugins/net/fair_net_plugin.dart @@ -13,7 +13,7 @@ class FairNet extends IFairPlugin { return _fairNet; } - Future request(dynamic map) async { + Future requestData(dynamic map) async { if (map == null) { return; } @@ -98,7 +98,7 @@ class FairNet extends IFairPlugin { @override Map getRegisterMethods() { var functions = {}; - functions.putIfAbsent('request', () => request); + functions.putIfAbsent('requestData', () => requestData); return functions; } diff --git a/fair_online/fair_online_service/fairDir/empty/project/empty_project/lib/src/generated.fair.dart b/fair_online/fair_online_service/fairDir/empty/project/empty_project/lib/src/generated.fair.dart index 0956c495..941f7537 100644 --- a/fair_online/fair_online_service/fairDir/empty/project/empty_project/lib/src/generated.fair.dart +++ b/fair_online/fair_online_service/fairDir/empty/project/empty_project/lib/src/generated.fair.dart @@ -1,5 +1,30 @@ -// Generated by Fair on 2022-12-02 14:16:24.485470. -// ignore_for_file: implementation_imports, unused_import, depend_on_referenced_packages, unused_shown_name, duplicate_import, always_specify_types +// GENERATED CODE - DO NOT MODIFY MANUALLY +// ************************************************************************** +// But you can define a new GeneratedModule as following: +// class MyAppGeneratedModule extends AppGeneratedModule { +// @override +// Map components() { +// return { +// ...super.components(), +// // add your cases here. +// }; +// } +// +// /// true means it's a widget. +// @override +// Map mapping() { +// return { +// ...super.mapping(), +// // remember add your cases here too. +// }; +// } +// } +// ************************************************************************** +// Auto generated by https://github.com/wuba/Fair +// ************************************************************************** +// +// ignore_for_file: implementation_imports, unused_import, depend_on_referenced_packages, unused_shown_name, duplicate_import, always_specify_types, unnecessary_import + import 'package:flutter_staggered_grid_view/src/widgets/staggered_grid.dart'; import 'package:flutter_staggered_grid_view/src/widgets/masonry_grid_view.dart'; import 'package:flutter/material.dart'; diff --git a/fair_online/fair_online_service/fairDir/empty/project/empty_project/pubspec.yaml b/fair_online/fair_online_service/fairDir/empty/project/empty_project/pubspec.yaml index 5112026c..e12e6fe7 100644 --- a/fair_online/fair_online_service/fairDir/empty/project/empty_project/pubspec.yaml +++ b/fair_online/fair_online_service/fairDir/empty/project/empty_project/pubspec.yaml @@ -52,11 +52,16 @@ dev_dependencies: flutter_lints: ^1.0.0 fair_compiler: path: ../../../fair/compiler - build_runner: ^2.0.0 + build_runner: ^2.1.2 dependency_overrides: fair_version: path: ../../../fair/flutter_version/flutter_3_3_0 + collection: 1.17.0 + permission_handler: ^10.2.0 + analyzer: 5.6.0 + dart_style: 2.2.5 + dio: 4.0.6 # For information on the generic Dart part of this file, see the diff --git a/fair_online/fair_online_service/fairDir/template/page/detail_page/detail_page.dart b/fair_online/fair_online_service/fairDir/template/page/detail_page/detail_page.dart index 2e1e1476..1b1dbeaa 100644 --- a/fair_online/fair_online_service/fairDir/template/page/detail_page/detail_page.dart +++ b/fair_online/fair_online_service/fairDir/template/page/detail_page/detail_page.dart @@ -28,7 +28,7 @@ class _@@PageName@@State extends State<@@PageName@@> { void onUnload() {} void requestData() { - FairNet().request({ + FairNet().requestData({ 'pageName': '#FairKey#', 'method': 'GET', 'url': diff --git a/fair_online/fair_online_service/fairDir/template/page/gridview/gridview.dart b/fair_online/fair_online_service/fairDir/template/page/gridview/gridview.dart index 74b18e1c..1688f192 100644 --- a/fair_online/fair_online_service/fairDir/template/page/gridview/gridview.dart +++ b/fair_online/fair_online_service/fairDir/template/page/gridview/gridview.dart @@ -29,7 +29,7 @@ class _@@PageName@@State extends State<@@PageName@@> { void requestData() { _page++; - FairNet().request({ + FairNet().requestData({ 'pageName': '#FairKey#', 'method': 'GET', 'url': @@ -69,12 +69,12 @@ class _@@PageName@@State extends State<@@PageName@@> { child: Icon(Icons.add), ), body: Sugar.ifEqualBool(isDataEmpty(), - trueValue: Center( + trueValue: () => Center( child: Text( '加载中...', ), ), - falseValue: GridView.count( + falseValue: () => GridView.count( crossAxisCount: 2, mainAxisSpacing: 10, crossAxisSpacing: 10, diff --git a/fair_online/fair_online_service/fairDir/template/page/hotel_listview/hotel_listview.dart b/fair_online/fair_online_service/fairDir/template/page/hotel_listview/hotel_listview.dart index 6d5904a2..6aca5802 100644 --- a/fair_online/fair_online_service/fairDir/template/page/hotel_listview/hotel_listview.dart +++ b/fair_online/fair_online_service/fairDir/template/page/hotel_listview/hotel_listview.dart @@ -31,7 +31,7 @@ class _@@PageName@@State extends State<@@PageName@@> { void requestData() { _page++; - FairNet().request({ + FairNet().requestData({ 'pageName': '#FairKey#', 'method': 'GET', 'url': @@ -78,12 +78,12 @@ class _@@PageName@@State extends State<@@PageName@@> { ), backgroundColor: Color(0xFFFEFEFE), body: Sugar.ifEqualBool(isDataEmpty(), - trueValue: Center( + trueValue: () => Center( child: Text( '加载中...', ), ), - falseValue: Container( + falseValue: () => Container( color: Color(0xFFFFFFFF), child: ListView( children: Sugar.map(_listData, builder: (HotelModel item) { diff --git a/fair_online/fair_online_service/fairDir/template/page/list_card/list_card.dart b/fair_online/fair_online_service/fairDir/template/page/list_card/list_card.dart index 4825089d..9ac3225d 100644 --- a/fair_online/fair_online_service/fairDir/template/page/list_card/list_card.dart +++ b/fair_online/fair_online_service/fairDir/template/page/list_card/list_card.dart @@ -31,7 +31,7 @@ class _@@PageName@@State extends State<@@PageName@@> { void requestData() { _page++; - FairNet().request({ + FairNet().requestData({ 'pageName': '#FairKey#', 'method': 'GET', 'url': @@ -150,12 +150,12 @@ class _@@PageName@@State extends State<@@PageName@@> { color: Colors.white, child: Sugar.ifEqualBool( isDataEmpty(), - trueValue: Center( + trueValue: () => Center( child: Text( '加载中...', ), ), - falseValue: Sugar.listBuilder( + falseValue: () => Sugar.listBuilder( itemCount: dataLength(), itemBuilder: (context, index) { return Container( diff --git a/fair_online/fair_online_service/fairDir/template/page/list_page/list_page.dart b/fair_online/fair_online_service/fairDir/template/page/list_page/list_page.dart index e85c18ba..8910e8ea 100644 --- a/fair_online/fair_online_service/fairDir/template/page/list_page/list_page.dart +++ b/fair_online/fair_online_service/fairDir/template/page/list_page/list_page.dart @@ -31,7 +31,7 @@ class _@@PageName@@State extends State<@@PageName@@> { void requestData() { _page++; - FairNet().request({ + FairNet().requestData({ 'pageName': '#FairKey#', 'method': 'GET', 'url': @@ -127,12 +127,12 @@ class _@@PageName@@State extends State<@@PageName@@> { body: Container( color: Colors.white, child: Sugar.ifEqualBool(isDataEmpty(), - trueValue: Center( + trueValue: () => Center( child: Text( '加载中...', ), ), - falseValue: Sugar.listBuilder( + falseValue: () => Sugar.listBuilder( itemCount: dataLength(), itemBuilder: (context, index) { return SizedBox( diff --git a/fair_online/fair_online_service/fairDir/template/page/pageview/pageview.dart b/fair_online/fair_online_service/fairDir/template/page/pageview/pageview.dart index b9f3be76..f33146b5 100644 --- a/fair_online/fair_online_service/fairDir/template/page/pageview/pageview.dart +++ b/fair_online/fair_online_service/fairDir/template/page/pageview/pageview.dart @@ -29,7 +29,7 @@ class _@@PageName@@State extends State<@@PageName@@> { void requestData() { _page++; - FairNet().request({ + FairNet().requestData({ 'pageName': '#FairKey#', 'method': 'GET', 'url': @@ -75,12 +75,12 @@ class _@@PageName@@State extends State<@@PageName@@> { title: Text('PageView模版'), ), body: Sugar.ifEqualBool(isDataEmpty(), - trueValue: Center( + trueValue: () => Center( child: Text( '加载中...', ), ), - falseValue: PageView.custom( + falseValue: () => PageView.custom( childrenDelegate: Sugar.sliverChildBuilderDelegate( builder: (context, index) { return Column( diff --git a/fair_online/fair_online_service/fairDir/template/page/scrollview/scrollview.dart b/fair_online/fair_online_service/fairDir/template/page/scrollview/scrollview.dart index 12f4d50c..06aafc7a 100644 --- a/fair_online/fair_online_service/fairDir/template/page/scrollview/scrollview.dart +++ b/fair_online/fair_online_service/fairDir/template/page/scrollview/scrollview.dart @@ -31,7 +31,7 @@ class _@@PageName@@State extends State<@@PageName@@> { void requestData() { _page++; - FairNet().request({ + FairNet().requestData({ 'pageName': '#FairKey#', 'method': 'GET', 'url': @@ -69,12 +69,12 @@ class _@@PageName@@State extends State<@@PageName@@> { return Scaffold( body: Sugar.ifEqualBool( isDataEmpty(), - trueValue: Center( + trueValue: () => Center( child: Text( '加载中...', ), ), - falseValue: CustomScrollView( + falseValue: () => CustomScrollView( slivers: [ SliverAppBar( title: Text('CustomScrollView模版'), diff --git a/fair_online/fair_online_service/fairDir/template/page/staggered_view/staggered_view.dart b/fair_online/fair_online_service/fairDir/template/page/staggered_view/staggered_view.dart index 99b7734d..9adc2773 100644 --- a/fair_online/fair_online_service/fairDir/template/page/staggered_view/staggered_view.dart +++ b/fair_online/fair_online_service/fairDir/template/page/staggered_view/staggered_view.dart @@ -30,7 +30,7 @@ class _@@PageName@@State extends State<@@PageName@@> { void requestData() { _page++; - FairNet().request({ + FairNet().requestData({ 'pageName': '#FairKey#', 'method': 'GET', 'url': @@ -71,12 +71,12 @@ class _@@PageName@@State extends State<@@PageName@@> { ), body: Sugar.ifEqualBool( isDataEmpty(), - trueValue: Center( + trueValue: () => Center( child: Text( '加载中...', ), ), - falseValue: StaggeredGrid.count( + falseValue: () => StaggeredGrid.count( crossAxisCount: 2, mainAxisSpacing: 10, crossAxisSpacing: 5, diff --git a/fair_online/fair_online_service/fairDir/template/page/tabbar_page/tabbar_page.dart b/fair_online/fair_online_service/fairDir/template/page/tabbar_page/tabbar_page.dart index 0eb94d14..334210c8 100644 --- a/fair_online/fair_online_service/fairDir/template/page/tabbar_page/tabbar_page.dart +++ b/fair_online/fair_online_service/fairDir/template/page/tabbar_page/tabbar_page.dart @@ -33,7 +33,7 @@ class _@@PageName@@State extends State<@@PageName@@> { void requestData() { _page++; - FairNet().request({ + FairNet().requestData({ 'pageName': '#FairKey#', 'method': 'GET', 'url': @@ -100,12 +100,12 @@ class _@@PageName@@State extends State<@@PageName@@> { ), ), body: Sugar.ifEqualBool(isDataEmpty(), - trueValue: Center( + trueValue: () => Center( child: Text( '加载中...', ), ), - falseValue: TabBarView( + falseValue: () => TabBarView( children: [ _allTabList(), _getList(), diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/android/app/build.gradle b/fair_online/fair_online_service/fairDir/template/project/fair_samples/android/app/build.gradle index 04801673..74f88710 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/android/app/build.gradle +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/android/app/build.gradle @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 31 + compileSdkVersion 33 compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 @@ -45,7 +45,7 @@ android { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.example.fair_samples" minSdkVersion 20 - targetSdkVersion 31 + targetSdkVersion 33 versionCode flutterVersionCode.toInteger() versionName flutterVersionName } diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/android/build.gradle b/fair_online/fair_online_service/fairDir/template/project/fair_samples/android/build.gradle index 09fbd640..cc7cf52f 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/android/build.gradle +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/android/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.8.10' repositories { google() mavenCentral() diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/android/gradle/wrapper/gradle-wrapper.properties b/fair_online/fair_online_service/fairDir/template/project/fair_samples/android/gradle/wrapper/gradle-wrapper.properties index bc6a58af..039eda99 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/android/gradle/wrapper/gradle-wrapper.properties +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/fair_patch.zip b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/fair_patch.zip index 939a19b6..1a19bc6f 100644 Binary files a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/fair_patch.zip and b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/fair_patch.zip differ diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_code_component_HotelListViewItem.fair.json b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_code_component_HotelListViewItem.fair.json index 09ca4a34..8b54365a 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_code_component_HotelListViewItem.fair.json +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_code_component_HotelListViewItem.fair.json @@ -328,5 +328,6 @@ } } }, - "methodMap": {} + "methodMap": {}, + "digest": "9e5bea242426df27096f2d3948dd7bbe" } \ No newline at end of file diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_code_component_HotelListViewItem.fair.metadata b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_code_component_HotelListViewItem.fair.metadata index 2422637d..8554bfbe 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_code_component_HotelListViewItem.fair.metadata +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_code_component_HotelListViewItem.fair.metadata @@ -1,6 +1,6 @@ -# Generated by Fair on 2022-12-26 17:01:20.743234. +# Generated by Fair on 2023-09-18 15:19:43.205022. source: fair_samples|lib/code/component/HotelListViewItem.dart -md5: 11cbe6963b9764f4f26657bc4300e20f +md5: 29c7c585370197fa253544365fafbe90 json: fair_samples|build/fair/lib_code_component_HotelListViewItem.fair.json -date: 2022-12-26 17:01:20.743379 +date: 2023-09-18 15:19:43.205180 diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_code_component_ListCard.fair.json b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_code_component_ListCard.fair.json index 4529d1ff..5ed2ece2 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_code_component_ListCard.fair.json +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_code_component_ListCard.fair.json @@ -273,5 +273,6 @@ } } }, - "methodMap": {} + "methodMap": {}, + "digest": "56c9ceb7623a3288a3a793e5c8592300" } \ No newline at end of file diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_code_component_ListCard.fair.metadata b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_code_component_ListCard.fair.metadata index f48da8cd..e93bc013 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_code_component_ListCard.fair.metadata +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_code_component_ListCard.fair.metadata @@ -1,6 +1,6 @@ -# Generated by Fair on 2022-12-26 17:01:20.766674. +# Generated by Fair on 2023-09-18 15:19:43.141450. source: fair_samples|lib/code/component/ListCard.dart -md5: 21a0ab84d7c63a09bbfe15f0bf371569 +md5: f8c5462107209473b25ff13ec59a92fb json: fair_samples|build/fair/lib_code_component_ListCard.fair.json -date: 2022-12-26 17:01:20.766772 +date: 2023-09-18 15:19:43.141577 diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_appbar_appbar_template.fair.json b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_appbar_appbar_template.fair.json index 9a24fa85..7e05a1d0 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_appbar_appbar_template.fair.json +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_appbar_appbar_template.fair.json @@ -22,5 +22,6 @@ } } }, - "methodMap": {} + "methodMap": {}, + "digest": "87be77e1bf8a2dc5abe9ac7e9ed3d779" } \ No newline at end of file diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_appbar_appbar_template.fair.metadata b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_appbar_appbar_template.fair.metadata index 102bf1e6..1625890e 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_appbar_appbar_template.fair.metadata +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_appbar_appbar_template.fair.metadata @@ -1,6 +1,6 @@ -# Generated by Fair on 2022-12-26 17:01:20.607007. +# Generated by Fair on 2023-09-18 15:19:43.100582. source: fair_samples|lib/page/appbar/appbar_template.dart -md5: e5f4cb764283d409724ea14fe006ecf2 +md5: 9508ed642936ff05de9ad9b2bf802297 json: fair_samples|build/fair/lib_page_appbar_appbar_template.fair.json -date: 2022-12-26 17:01:20.607107 +date: 2023-09-18 15:19:43.100660 diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_detail_page_fair_detail.fair.js b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_detail_page_fair_detail.fair.js index 91861876..a301e302 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_detail_page_fair_detail.fair.js +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_detail_page_fair_detail.fair.js @@ -1 +1 @@ -GLOBAL['#FairKey#']=(function(__initProps__){const __global__=this;defineModule(1,function(__mod__){with(__mod__.imports){}},[]);return runCallback(function(__mod__){with(__mod__.imports){function DetailModel(){const inner=DetailModel.__inner__;if(this==__global__){return new DetailModel({__args__:arguments});}else{const args=arguments.length>0?arguments[0].__args__||arguments:[];inner.apply(this,args);DetailModel.prototype.ctor.apply(this,args);return this;}}DetailModel.__inner__=function inner(){this.auth='';this.title='';this.des='';this.time='';this.location='';this.detail='';};DetailModel.prototype={};DetailModel.prototype.ctor=function(){};function _FairDetailState(){const inner=_FairDetailState.__inner__;if(this==__global__){return new _FairDetailState({__args__:arguments});}else{const args=arguments.length>0?arguments[0].__args__||arguments:[];inner.apply(this,args);_FairDetailState.prototype.ctor.apply(this,args);return this;}}_FairDetailState.__inner__=function inner(){this._detailModel=DetailModel();};_FairDetailState.prototype={initState:function initState(){const __thiz__=this;with(__thiz__){onLoad();}},onLoad:function onLoad(){const __thiz__=this;with(__thiz__){requestData();}},onUnload:function onUnload(){const __thiz__=this;with(__thiz__){}},requestData:function requestData(){const __thiz__=this;with(__thiz__){FairNet().request(convertObjectLiteralToSetOrMap({['pageName']:'#FairKey#',['method']:'GET',['url']:'https://wos2.58cdn.com.cn/DeFazYxWvDti/frsupload/59383a3efd1554c4c8fbaa8eb3700a44_fair_detail_data.json',['data']:convertObjectLiteralToSetOrMap({['page']:0,}),['success']:function dummy(resp){if(resp==null){return null;}let data=resp.__op_idx__('data');try{_detailModel.auth=data.auth;_detailModel.title=data.title;_detailModel.des=data.des;_detailModel.time=data.time;_detailModel.location=data.location;_detailModel.detail=data.detail;}catch(e){_detailModel.auth=data.__op_idx__('auth');_detailModel.title=data.__op_idx__('title');_detailModel.des=data.__op_idx__('des');_detailModel.time=data.__op_idx__('time');_detailModel.location=data.__op_idx__('location');_detailModel.detail=data.__op_idx__('detail');}setState('#FairKey#',function dummy(){});},}));}},_getAuth:function _getAuth(){const __thiz__=this;with(__thiz__){return _detailModel.auth;}},_getTitle:function _getTitle(){const __thiz__=this;with(__thiz__){return _detailModel.title;}},_getDes:function _getDes(){const __thiz__=this;with(__thiz__){return _detailModel.des;}},_getTime:function _getTime(){const __thiz__=this;with(__thiz__){return _detailModel.time;}},_getLocation:function _getLocation(){const __thiz__=this;with(__thiz__){return _detailModel.location;}},_getDetailContent:function _getDetailContent(){const __thiz__=this;with(__thiz__){return _detailModel.detail;}},_onPress:function _onPress(){const __thiz__=this;with(__thiz__){print('onPressed');}},};_FairDetailState.prototype.ctor=function(){};;return _FairDetailState();}},[1]);})(convertObjectLiteralToSetOrMap(JSON.parse('#FairProps#'))); \ No newline at end of file +GLOBAL['#FairKey#']=(function(__initProps__){const __global__=this;defineModule(1,function(__mod__){with(__mod__.imports){}},[]);return runCallback(function(__mod__){with(__mod__.imports){function DetailModel(){const inner=DetailModel.__inner__;if(this==__global__){return new DetailModel({__args__:arguments});}else{const args=arguments.length>0?arguments[0].__args__||arguments:[];inner.apply(this,args);DetailModel.prototype.ctor.apply(this,args);return this;}}DetailModel.__inner__=function inner(){this.auth='';this.title='';this.des='';this.time='';this.location='';this.detail='';};DetailModel.prototype={};DetailModel.prototype.ctor=function(){};function _FairDetailState(){const inner=_FairDetailState.__inner__;if(this==__global__){return new _FairDetailState({__args__:arguments});}else{const args=arguments.length>0?arguments[0].__args__||arguments:[];inner.apply(this,args);_FairDetailState.prototype.ctor.apply(this,args);return this;}}_FairDetailState.__inner__=function inner(){this._detailModel=DetailModel();};_FairDetailState.prototype={initState:function initState(){const __thiz__=this;with(__thiz__){onLoad();}},onLoad:function onLoad(){const __thiz__=this;with(__thiz__){requestData();}},onUnload:function onUnload(){const __thiz__=this;with(__thiz__){}},requestData:function requestData(){const __thiz__=this;with(__thiz__){FairNet().requestData(convertObjectLiteralToSetOrMap({['pageName']:'#FairKey#',['method']:'GET',['url']:'https://wos2.58cdn.com.cn/DeFazYxWvDti/frsupload/59383a3efd1554c4c8fbaa8eb3700a44_fair_detail_data.json',['data']:convertObjectLiteralToSetOrMap({['page']:0,}),['success']:function dummy(resp){if(resp==null){return null;}let data=resp.__op_idx__('data');try{_detailModel.auth=data.auth;_detailModel.title=data.title;_detailModel.des=data.des;_detailModel.time=data.time;_detailModel.location=data.location;_detailModel.detail=data.detail;}catch(e){_detailModel.auth=data.__op_idx__('auth');_detailModel.title=data.__op_idx__('title');_detailModel.des=data.__op_idx__('des');_detailModel.time=data.__op_idx__('time');_detailModel.location=data.__op_idx__('location');_detailModel.detail=data.__op_idx__('detail');}setState('#FairKey#',function dummy(){});},}));}},_getAuth:function _getAuth(){const __thiz__=this;with(__thiz__){return _detailModel.auth;}},_getTitle:function _getTitle(){const __thiz__=this;with(__thiz__){return _detailModel.title;}},_getDes:function _getDes(){const __thiz__=this;with(__thiz__){return _detailModel.des;}},_getTime:function _getTime(){const __thiz__=this;with(__thiz__){return _detailModel.time;}},_getLocation:function _getLocation(){const __thiz__=this;with(__thiz__){return _detailModel.location;}},_getDetailContent:function _getDetailContent(){const __thiz__=this;with(__thiz__){return _detailModel.detail;}},_onPress:function _onPress(){const __thiz__=this;with(__thiz__){print('onPressed');}},};_FairDetailState.prototype.ctor=function(){};;return _FairDetailState();}},[1]);})(convertObjectLiteralToSetOrMap(JSON.parse('#FairProps#'))); \ No newline at end of file diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_detail_page_fair_detail.fair.json b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_detail_page_fair_detail.fair.json index 07356bc3..7f52ab87 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_detail_page_fair_detail.fair.json +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_detail_page_fair_detail.fair.json @@ -373,5 +373,6 @@ } } } - } + }, + "digest": "09000ffe6f4810abaaf7e31275357cef" } \ No newline at end of file diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_detail_page_fair_detail.fair.metadata b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_detail_page_fair_detail.fair.metadata index 5632a056..70b681bd 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_detail_page_fair_detail.fair.metadata +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_detail_page_fair_detail.fair.metadata @@ -1,6 +1,6 @@ -# Generated by Fair on 2022-12-26 17:01:20.754433. +# Generated by Fair on 2023-09-18 15:19:43.128636. source: fair_samples|lib/page/detail_page/fair_detail.dart -md5: 285ee91c30d7e5f110a846775136a0c9 +md5: 5c7cba177dbc739570997843f51458c5 json: fair_samples|build/fair/lib_page_detail_page_fair_detail.fair.json -date: 2022-12-26 17:01:20.754526 +date: 2023-09-18 15:19:43.128880 diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_drawer_drawer_template.fair.json b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_drawer_drawer_template.fair.json index 8a549915..84ffa29d 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_drawer_drawer_template.fair.json +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_drawer_drawer_template.fair.json @@ -127,5 +127,6 @@ } } }, - "methodMap": {} + "methodMap": {}, + "digest": "1b35ef934fd0850a4b5a6e0156ca8c02" } \ No newline at end of file diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_drawer_drawer_template.fair.metadata b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_drawer_drawer_template.fair.metadata index a4652cba..975b514a 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_drawer_drawer_template.fair.metadata +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_drawer_drawer_template.fair.metadata @@ -1,6 +1,6 @@ -# Generated by Fair on 2022-12-26 17:01:20.690213. +# Generated by Fair on 2023-09-18 15:19:43.199649. source: fair_samples|lib/page/drawer/drawer_template.dart -md5: 368e50aa99209d6277ff3563a01d7e83 +md5: 93cb2e24302e0e95273ddbee595f4158 json: fair_samples|build/fair/lib_page_drawer_drawer_template.fair.json -date: 2022-12-26 17:01:20.690318 +date: 2023-09-18 15:19:43.199716 diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_fab_fab_template.fair.json b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_fab_fab_template.fair.json index b55d80a9..445edc91 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_fab_fab_template.fair.json +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_fab_fab_template.fair.json @@ -60,5 +60,6 @@ } } }, - "methodMap": {} + "methodMap": {}, + "digest": "ba9a0afab388928f888a246767dd3c15" } \ No newline at end of file diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_fab_fab_template.fair.metadata b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_fab_fab_template.fair.metadata index 98770922..06c93f76 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_fab_fab_template.fair.metadata +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_fab_fab_template.fair.metadata @@ -1,6 +1,6 @@ -# Generated by Fair on 2022-12-26 17:01:20.761368. +# Generated by Fair on 2023-09-18 15:19:43.163307. source: fair_samples|lib/page/fab/fab_template.dart -md5: a72c9aa6fd5b9ddf77c6bc02008a85b9 +md5: 4b0162f98424b2c36d09a69eb82d62ff json: fair_samples|build/fair/lib_page_fab_fab_template.fair.json -date: 2022-12-26 17:01:20.761425 +date: 2023-09-18 15:19:43.163482 diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_gridview_gridview_template.fair.js b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_gridview_gridview_template.fair.js index f436f3a1..1baba612 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_gridview_gridview_template.fair.js +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_gridview_gridview_template.fair.js @@ -1 +1 @@ -GLOBAL['#FairKey#']=(function(__initProps__){const __global__=this;defineModule(1,function(__mod__){with(__mod__.imports){}},[]);return runCallback(function(__mod__){with(__mod__.imports){function ItemData(){const inner=ItemData.__inner__;if(this==__global__){return new ItemData({__args__:arguments});}else{const args=arguments.length>0?arguments[0].__args__||arguments:[];inner.apply(this,args);ItemData.prototype.ctor.apply(this,args);return this;}}ItemData.__inner__=function inner(){this.picUrl='';};ItemData.prototype={};ItemData.prototype.ctor=function(){};function _GridViewTemplateState(){const inner=_GridViewTemplateState.__inner__;if(this==__global__){return new _GridViewTemplateState({__args__:arguments});}else{const args=arguments.length>0?arguments[0].__args__||arguments:[];inner.apply(this,args);_GridViewTemplateState.prototype.ctor.apply(this,args);return this;}}_GridViewTemplateState.__inner__=function inner(){this._listData=[];this._page=0;};_GridViewTemplateState.prototype={initState:function initState(){const __thiz__=this;with(__thiz__){onLoad();}},onLoad:function onLoad(){const __thiz__=this;with(__thiz__){requestData();}},onUnload:function onUnload(){const __thiz__=this;with(__thiz__){}},requestData:function requestData(){const __thiz__=this;with(__thiz__){_page++;FairNet().request(convertObjectLiteralToSetOrMap({['pageName']:'#FairKey#',['method']:'GET',['url']:'https://wos2.58cdn.com.cn/DeFazYxWvDti/frsupload/6f8e5d9e196cbaa4a46041928770b187_grid_data.json',['data']:convertObjectLiteralToSetOrMap({['page']:_page,}),['success']:function dummy(resp){if(resp==null){return null;}let data=resp.__op_idx__('data');data.forEach(function dummy(item){let dataItem=ItemData();try{dataItem.picUrl=item.imagePath;}catch(e){dataItem.picUrl=item.__op_idx__('imagePath');}_listData.add(dataItem);});setState('#FairKey#',function dummy(){});},}));}},isDataEmpty:function isDataEmpty(){const __thiz__=this;with(__thiz__){return _listData.isEmpty;}},};_GridViewTemplateState.prototype.ctor=function(){};;return _GridViewTemplateState();}},[1]);})(convertObjectLiteralToSetOrMap(JSON.parse('#FairProps#'))); \ No newline at end of file +GLOBAL['#FairKey#']=(function(__initProps__){const __global__=this;defineModule(1,function(__mod__){with(__mod__.imports){}},[]);return runCallback(function(__mod__){with(__mod__.imports){function ItemData(){const inner=ItemData.__inner__;if(this==__global__){return new ItemData({__args__:arguments});}else{const args=arguments.length>0?arguments[0].__args__||arguments:[];inner.apply(this,args);ItemData.prototype.ctor.apply(this,args);return this;}}ItemData.__inner__=function inner(){this.picUrl='';};ItemData.prototype={};ItemData.prototype.ctor=function(){};function _GridViewTemplateState(){const inner=_GridViewTemplateState.__inner__;if(this==__global__){return new _GridViewTemplateState({__args__:arguments});}else{const args=arguments.length>0?arguments[0].__args__||arguments:[];inner.apply(this,args);_GridViewTemplateState.prototype.ctor.apply(this,args);return this;}}_GridViewTemplateState.__inner__=function inner(){this._listData=[];this._page=0;};_GridViewTemplateState.prototype={initState:function initState(){const __thiz__=this;with(__thiz__){onLoad();}},onLoad:function onLoad(){const __thiz__=this;with(__thiz__){requestData();}},onUnload:function onUnload(){const __thiz__=this;with(__thiz__){}},requestData:function requestData(){const __thiz__=this;with(__thiz__){_page++;FairNet().requestData(convertObjectLiteralToSetOrMap({['pageName']:'#FairKey#',['method']:'GET',['url']:'https://wos2.58cdn.com.cn/DeFazYxWvDti/frsupload/6f8e5d9e196cbaa4a46041928770b187_grid_data.json',['data']:convertObjectLiteralToSetOrMap({['page']:_page,}),['success']:function dummy(resp){if(resp==null){return null;}let data=resp.__op_idx__('data');data.forEach(function dummy(item){let dataItem=ItemData();try{dataItem.picUrl=item.imagePath;}catch(e){dataItem.picUrl=item.__op_idx__('imagePath');}_listData.add(dataItem);});setState('#FairKey#',function dummy(){});},}));}},isDataEmpty:function isDataEmpty(){const __thiz__=this;with(__thiz__){return _listData.isEmpty;}},};_GridViewTemplateState.prototype.ctor=function(){};;return _GridViewTemplateState();}},[1]);})(convertObjectLiteralToSetOrMap(JSON.parse('#FairProps#'))); \ No newline at end of file diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_gridview_gridview_template.fair.json b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_gridview_gridview_template.fair.json index 3b98cb85..afe424e0 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_gridview_gridview_template.fair.json +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_gridview_gridview_template.fair.json @@ -82,6 +82,11 @@ } } } + }, + "functionParameters": { + "pa": [ + "item" + ] } } } @@ -91,5 +96,6 @@ } } }, - "methodMap": {} + "methodMap": {}, + "digest": "d0a8c069b2b2cc58b9c69b3fa56bb050" } \ No newline at end of file diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_gridview_gridview_template.fair.metadata b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_gridview_gridview_template.fair.metadata index 1772ab78..368bd311 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_gridview_gridview_template.fair.metadata +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_gridview_gridview_template.fair.metadata @@ -1,6 +1,6 @@ -# Generated by Fair on 2022-12-26 17:01:20.682184. +# Generated by Fair on 2023-09-18 15:19:43.115668. source: fair_samples|lib/page/gridview/gridview_template.dart -md5: d94e36518d471ce9c3edb90205931a00 +md5: 73fec4aa4aa7bff8fae150213572319b json: fair_samples|build/fair/lib_page_gridview_gridview_template.fair.json -date: 2022-12-26 17:01:20.682258 +date: 2023-09-18 15:19:43.115737 diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_hotel_listview_hotel_listview_template.fair.js b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_hotel_listview_hotel_listview_template.fair.js index a71eb0bc..3c6e7d02 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_hotel_listview_hotel_listview_template.fair.js +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_hotel_listview_hotel_listview_template.fair.js @@ -1 +1 @@ -GLOBAL['#FairKey#']=(function(__initProps__){const __global__=this;defineModule(1,function(__mod__){with(__mod__.imports){}},[]);return runCallback(function(__mod__){with(__mod__.imports){function HotelModel(){const inner=HotelModel.__inner__;if(this==__global__){return new HotelModel({__args__:arguments});}else{const args=arguments.length>0?arguments[0].__args__||arguments:[];inner.apply(this,args);HotelModel.prototype.ctor.apply(this,args);return this;}}HotelModel.__inner__=function inner(){this.imagePath='';this.titleTxt='';this.subTxt='';this.dist='';this.reviews='';this.perNight='';};HotelModel.prototype={};HotelModel.prototype.ctor=function(){};function _HotelListViewState(){const inner=_HotelListViewState.__inner__;if(this==__global__){return new _HotelListViewState({__args__:arguments});}else{const args=arguments.length>0?arguments[0].__args__||arguments:[];inner.apply(this,args);_HotelListViewState.prototype.ctor.apply(this,args);return this;}}_HotelListViewState.__inner__=function inner(){this._listData=[];this._page=0;};_HotelListViewState.prototype={initState:function initState(){const __thiz__=this;with(__thiz__){onLoad();}},onLoad:function onLoad(){const __thiz__=this;with(__thiz__){requestData();}},onUnload:function onUnload(){const __thiz__=this;with(__thiz__){}},requestData:function requestData(){const __thiz__=this;with(__thiz__){_page++;FairNet().request(convertObjectLiteralToSetOrMap({['pageName']:'#FairKey#',['method']:'GET',['url']:'https://wos2.58cdn.com.cn/DeFazYxWvDti/frsupload/3be6c61070d3b48c8165af5d18464c0e_hotel_list_data.json',['data']:convertObjectLiteralToSetOrMap({['page']:_page,}),['success']:function dummy(resp){if(resp==null){return null;}let data=resp.__op_idx__('data');data.forEach(function dummy(item){let dataItem=HotelModel();try{dataItem.imagePath=item.imagePath;dataItem.titleTxt=item.titleTxt;dataItem.subTxt=item.subTxt;dataItem.dist=item.dist+' km';dataItem.reviews=item.reviews+' reviews';dataItem.perNight=item.perNight+'';}catch(e){dataItem.imagePath=item.__op_idx__('imagePath');dataItem.titleTxt=item.__op_idx__('titleTxt');dataItem.subTxt=item.__op_idx__('subTxt');dataItem.dist=`${item['dist']} km`;dataItem.reviews=`${item['reviews']} reviews`;dataItem.perNight=`${item['perNight']}`;}_listData.add(dataItem);});setState('#FairKey#',function dummy(){});},}));}},isDataEmpty:function isDataEmpty(){const __thiz__=this;with(__thiz__){return _listData.isEmpty;}},};_HotelListViewState.prototype.ctor=function(){};;return _HotelListViewState();}},[1]);})(convertObjectLiteralToSetOrMap(JSON.parse('#FairProps#'))); \ No newline at end of file +GLOBAL['#FairKey#']=(function(__initProps__){const __global__=this;defineModule(1,function(__mod__){with(__mod__.imports){}},[]);return runCallback(function(__mod__){with(__mod__.imports){function HotelModel(){const inner=HotelModel.__inner__;if(this==__global__){return new HotelModel({__args__:arguments});}else{const args=arguments.length>0?arguments[0].__args__||arguments:[];inner.apply(this,args);HotelModel.prototype.ctor.apply(this,args);return this;}}HotelModel.__inner__=function inner(){this.imagePath='';this.titleTxt='';this.subTxt='';this.dist='';this.reviews='';this.perNight='';};HotelModel.prototype={};HotelModel.prototype.ctor=function(){};function _HotelListViewState(){const inner=_HotelListViewState.__inner__;if(this==__global__){return new _HotelListViewState({__args__:arguments});}else{const args=arguments.length>0?arguments[0].__args__||arguments:[];inner.apply(this,args);_HotelListViewState.prototype.ctor.apply(this,args);return this;}}_HotelListViewState.__inner__=function inner(){this._listData=[];this._page=0;};_HotelListViewState.prototype={initState:function initState(){const __thiz__=this;with(__thiz__){onLoad();}},onLoad:function onLoad(){const __thiz__=this;with(__thiz__){requestData();}},onUnload:function onUnload(){const __thiz__=this;with(__thiz__){}},requestData:function requestData(){const __thiz__=this;with(__thiz__){_page++;FairNet().requestData(convertObjectLiteralToSetOrMap({['pageName']:'#FairKey#',['method']:'GET',['url']:'https://wos2.58cdn.com.cn/DeFazYxWvDti/frsupload/3be6c61070d3b48c8165af5d18464c0e_hotel_list_data.json',['data']:convertObjectLiteralToSetOrMap({['page']:_page,}),['success']:function dummy(resp){if(resp==null){return null;}let data=resp.__op_idx__('data');data.forEach(function dummy(item){let dataItem=HotelModel();try{dataItem.imagePath=item.imagePath;dataItem.titleTxt=item.titleTxt;dataItem.subTxt=item.subTxt;dataItem.dist=item.dist+' km';dataItem.reviews=item.reviews+' reviews';dataItem.perNight=item.perNight+'';}catch(e){dataItem.imagePath=item.__op_idx__('imagePath');dataItem.titleTxt=item.__op_idx__('titleTxt');dataItem.subTxt=item.__op_idx__('subTxt');dataItem.dist=`${item['dist']} km`;dataItem.reviews=`${item['reviews']} reviews`;dataItem.perNight=`${item['perNight']}`;}_listData.add(dataItem);});setState('#FairKey#',function dummy(){});},}));}},isDataEmpty:function isDataEmpty(){const __thiz__=this;with(__thiz__){return _listData.isEmpty;}},};_HotelListViewState.prototype.ctor=function(){};;return _HotelListViewState();}},[1]);})(convertObjectLiteralToSetOrMap(JSON.parse('#FairProps#'))); \ No newline at end of file diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_hotel_listview_hotel_listview_template.fair.json b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_hotel_listview_hotel_listview_template.fair.json index 09f684e9..dc78291a 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_hotel_listview_hotel_listview_template.fair.json +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_hotel_listview_hotel_listview_template.fair.json @@ -377,6 +377,11 @@ } } } + }, + "functionParameters": { + "pa": [ + "item" + ] } } } @@ -388,5 +393,6 @@ } } }, - "methodMap": {} + "methodMap": {}, + "digest": "037199fbfd21349468fb4aa419d64f22" } \ No newline at end of file diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_hotel_listview_hotel_listview_template.fair.metadata b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_hotel_listview_hotel_listview_template.fair.metadata index b4a50404..79d268db 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_hotel_listview_hotel_listview_template.fair.metadata +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_hotel_listview_hotel_listview_template.fair.metadata @@ -1,6 +1,6 @@ -# Generated by Fair on 2022-12-26 17:01:20.773241. +# Generated by Fair on 2023-09-18 15:19:42.976461. source: fair_samples|lib/page/hotel_listview/hotel_listview_template.dart -md5: 5d4c50d5061d6964a481368fa30273d7 +md5: d65ed5facc0557e4038f74456677360f json: fair_samples|build/fair/lib_page_hotel_listview_hotel_listview_template.fair.json -date: 2022-12-26 17:01:20.773466 +date: 2023-09-18 15:19:42.976745 diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_list_card_moments_list.fair.js b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_list_card_moments_list.fair.js index f8572043..e7abda2d 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_list_card_moments_list.fair.js +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_list_card_moments_list.fair.js @@ -1 +1 @@ -GLOBAL['#FairKey#']=(function(__initProps__){const __global__=this;defineModule(1,function(__mod__){with(__mod__.imports){}},[]);return runCallback(function(__mod__){with(__mod__.imports){function MomentsModel(){const inner=MomentsModel.__inner__;if(this==__global__){return new MomentsModel({__args__:arguments});}else{const args=arguments.length>0?arguments[0].__args__||arguments:[];inner.apply(this,args);MomentsModel.prototype.ctor.apply(this,args);return this;}}MomentsModel.__inner__=function inner(){this.avatar='';this.username='';this.content='';this.picture='';this.likes='';this.comments='';};MomentsModel.prototype={};MomentsModel.prototype.ctor=function(){};function _MomentsListState(){const inner=_MomentsListState.__inner__;if(this==__global__){return new _MomentsListState({__args__:arguments});}else{const args=arguments.length>0?arguments[0].__args__||arguments:[];inner.apply(this,args);_MomentsListState.prototype.ctor.apply(this,args);return this;}}_MomentsListState.__inner__=function inner(){this._listData=[];this._page=0;};_MomentsListState.prototype={initState:function initState(){const __thiz__=this;with(__thiz__){onLoad();}},onLoad:function onLoad(){const __thiz__=this;with(__thiz__){requestData();}},onUnload:function onUnload(){const __thiz__=this;with(__thiz__){}},requestData:function requestData(){const __thiz__=this;with(__thiz__){_page++;FairNet().request(convertObjectLiteralToSetOrMap({['pageName']:'#FairKey#',['method']:'GET',['url']:'https://wos2.58cdn.com.cn/DeFazYxWvDti/frsupload/ed04fcaf655b79b1ae81ad2836ce67e9_moments_data.json',['data']:convertObjectLiteralToSetOrMap({['page']:_page,}),['success']:function dummy(resp){if(resp==null){return null;}let data=resp.__op_idx__('data');data.forEach(function dummy(item){let dataItem=MomentsModel();try{dataItem.avatar=item.avatar;dataItem.username=item.username;dataItem.content=item.content;dataItem.picture=item.picture;dataItem.likes=item.likes;dataItem.comments=item.comments;}catch(e){dataItem.avatar=item.__op_idx__('avatar');dataItem.username=item.__op_idx__('username');dataItem.content=item.__op_idx__('content');dataItem.picture=item.__op_idx__('picture');dataItem.likes=item.__op_idx__('likes');dataItem.comments=item.__op_idx__('comments');}_listData.add(dataItem);});setState('#FairKey#',function dummy(){});},}));}},dataLength:function dataLength(){const __thiz__=this;with(__thiz__){return _listData.length;}},isDataEmpty:function isDataEmpty(){const __thiz__=this;with(__thiz__){return _listData.isEmpty;}},_getAvatar:function _getAvatar(index){const __thiz__=this;const __arg_ctx__={index,};with(__thiz__){with(__arg_ctx__){return _listData.__op_idx__(index).avatar;}}},_getUsername:function _getUsername(index){const __thiz__=this;const __arg_ctx__={index,};with(__thiz__){with(__arg_ctx__){return _listData.__op_idx__(index).username;}}},_getContent:function _getContent(index){const __thiz__=this;const __arg_ctx__={index,};with(__thiz__){with(__arg_ctx__){return _listData.__op_idx__(index).content;}}},_getPicture:function _getPicture(index){const __thiz__=this;const __arg_ctx__={index,};with(__thiz__){with(__arg_ctx__){return _listData.__op_idx__(index).picture;}}},_getLikes:function _getLikes(index){const __thiz__=this;const __arg_ctx__={index,};with(__thiz__){with(__arg_ctx__){return _listData.__op_idx__(index).likes;}}},_getComments:function _getComments(index){const __thiz__=this;const __arg_ctx__={index,};with(__thiz__){with(__arg_ctx__){return _listData.__op_idx__(index).comments;}}},};_MomentsListState.prototype.ctor=function(){};;return _MomentsListState();}},[1]);})(convertObjectLiteralToSetOrMap(JSON.parse('#FairProps#'))); \ No newline at end of file +GLOBAL['#FairKey#']=(function(__initProps__){const __global__=this;defineModule(1,function(__mod__){with(__mod__.imports){}},[]);return runCallback(function(__mod__){with(__mod__.imports){function MomentsModel(){const inner=MomentsModel.__inner__;if(this==__global__){return new MomentsModel({__args__:arguments});}else{const args=arguments.length>0?arguments[0].__args__||arguments:[];inner.apply(this,args);MomentsModel.prototype.ctor.apply(this,args);return this;}}MomentsModel.__inner__=function inner(){this.avatar='';this.username='';this.content='';this.picture='';this.likes='';this.comments='';};MomentsModel.prototype={};MomentsModel.prototype.ctor=function(){};function _MomentsListState(){const inner=_MomentsListState.__inner__;if(this==__global__){return new _MomentsListState({__args__:arguments});}else{const args=arguments.length>0?arguments[0].__args__||arguments:[];inner.apply(this,args);_MomentsListState.prototype.ctor.apply(this,args);return this;}}_MomentsListState.__inner__=function inner(){this._listData=[];this._page=0;};_MomentsListState.prototype={initState:function initState(){const __thiz__=this;with(__thiz__){onLoad();}},onLoad:function onLoad(){const __thiz__=this;with(__thiz__){requestData();}},onUnload:function onUnload(){const __thiz__=this;with(__thiz__){}},requestData:function requestData(){const __thiz__=this;with(__thiz__){_page++;FairNet().requestData(convertObjectLiteralToSetOrMap({['pageName']:'#FairKey#',['method']:'GET',['url']:'https://wos2.58cdn.com.cn/DeFazYxWvDti/frsupload/ed04fcaf655b79b1ae81ad2836ce67e9_moments_data.json',['data']:convertObjectLiteralToSetOrMap({['page']:_page,}),['success']:function dummy(resp){if(resp==null){return null;}let data=resp.__op_idx__('data');data.forEach(function dummy(item){let dataItem=MomentsModel();try{dataItem.avatar=item.avatar;dataItem.username=item.username;dataItem.content=item.content;dataItem.picture=item.picture;dataItem.likes=item.likes;dataItem.comments=item.comments;}catch(e){dataItem.avatar=item.__op_idx__('avatar');dataItem.username=item.__op_idx__('username');dataItem.content=item.__op_idx__('content');dataItem.picture=item.__op_idx__('picture');dataItem.likes=item.__op_idx__('likes');dataItem.comments=item.__op_idx__('comments');}_listData.add(dataItem);});setState('#FairKey#',function dummy(){});},}));}},dataLength:function dataLength(){const __thiz__=this;with(__thiz__){return _listData.length;}},isDataEmpty:function isDataEmpty(){const __thiz__=this;with(__thiz__){return _listData.isEmpty;}},_getAvatar:function _getAvatar(index){const __thiz__=this;const __arg_ctx__={index,};with(__thiz__){with(__arg_ctx__){return _listData.__op_idx__(index).avatar;}}},_getUsername:function _getUsername(index){const __thiz__=this;const __arg_ctx__={index,};with(__thiz__){with(__arg_ctx__){return _listData.__op_idx__(index).username;}}},_getContent:function _getContent(index){const __thiz__=this;const __arg_ctx__={index,};with(__thiz__){with(__arg_ctx__){return _listData.__op_idx__(index).content;}}},_getPicture:function _getPicture(index){const __thiz__=this;const __arg_ctx__={index,};with(__thiz__){with(__arg_ctx__){return _listData.__op_idx__(index).picture;}}},_getLikes:function _getLikes(index){const __thiz__=this;const __arg_ctx__={index,};with(__thiz__){with(__arg_ctx__){return _listData.__op_idx__(index).likes;}}},_getComments:function _getComments(index){const __thiz__=this;const __arg_ctx__={index,};with(__thiz__){with(__arg_ctx__){return _listData.__op_idx__(index).comments;}}},};_MomentsListState.prototype.ctor=function(){};;return _MomentsListState();}},[1]);})(convertObjectLiteralToSetOrMap(JSON.parse('#FairProps#'))); \ No newline at end of file diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_list_card_moments_list.fair.json b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_list_card_moments_list.fair.json index a5a993c3..cdcdc7e9 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_list_card_moments_list.fair.json +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_list_card_moments_list.fair.json @@ -395,6 +395,12 @@ } } } + }, + "functionParameters": { + "pa": [ + "context", + "index" + ] } } } @@ -406,5 +412,6 @@ } } }, - "methodMap": {} + "methodMap": {}, + "digest": "7efa1308d5af7322f96d200cc66d4e95" } \ No newline at end of file diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_list_card_moments_list.fair.metadata b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_list_card_moments_list.fair.metadata index c2c320f2..061bed3d 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_list_card_moments_list.fair.metadata +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_list_card_moments_list.fair.metadata @@ -1,6 +1,6 @@ -# Generated by Fair on 2022-12-26 17:01:20.738320. +# Generated by Fair on 2023-09-18 15:19:43.234613. source: fair_samples|lib/page/list_card/moments_list.dart -md5: 69711d9e3dd4a643becd4e2d15a7f440 +md5: 8e6fa18124e9b5d9c9771d1fabc323c3 json: fair_samples|build/fair/lib_page_list_card_moments_list.fair.json -date: 2022-12-26 17:01:20.738492 +date: 2023-09-18 15:19:43.234800 diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_list_page_list_page.fair.js b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_list_page_list_page.fair.js index 6c2b3bc4..4f5279ae 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_list_page_list_page.fair.js +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_list_page_list_page.fair.js @@ -1 +1 @@ -GLOBAL['#FairKey#']=(function(__initProps__){const __global__=this;defineModule(1,function(__mod__){with(__mod__.imports){}},[]);return runCallback(function(__mod__){with(__mod__.imports){function ItemData(){const inner=ItemData.__inner__;if(this==__global__){return new ItemData({__args__:arguments});}else{const args=arguments.length>0?arguments[0].__args__||arguments:[];inner.apply(this,args);ItemData.prototype.ctor.apply(this,args);return this;}}ItemData.__inner__=function inner(){this.icon='';this.title='';this.subTitle='';this.distance='';};ItemData.prototype={};ItemData.prototype.ctor=function(){};function _ListDemoPageState(){const inner=_ListDemoPageState.__inner__;if(this==__global__){return new _ListDemoPageState({__args__:arguments});}else{const args=arguments.length>0?arguments[0].__args__||arguments:[];inner.apply(this,args);_ListDemoPageState.prototype.ctor.apply(this,args);return this;}}_ListDemoPageState.__inner__=function inner(){this._listData=[];this._page=0;};_ListDemoPageState.prototype={initState:function initState(){const __thiz__=this;with(__thiz__){onLoad();}},onLoad:function onLoad(){const __thiz__=this;with(__thiz__){requestData();}},onUnload:function onUnload(){const __thiz__=this;with(__thiz__){}},requestData:function requestData(){const __thiz__=this;with(__thiz__){_page++;FairNet().request(convertObjectLiteralToSetOrMap({['pageName']:'#FairKey#',['method']:'GET',['url']:'https://wos2.58cdn.com.cn/DeFazYxWvDti/frsupload/3b8ae7a4e0884b4d75b8094f6c83cd8c_list_page_data.json',['data']:convertObjectLiteralToSetOrMap({['page']:_page,}),['success']:function dummy(resp){if(resp==null){return null;}let data=resp.__op_idx__('data');data.forEach(function dummy(item){let dataItem=ItemData();try{dataItem.icon=item.icon;dataItem.title=item.title;dataItem.subTitle=item.subTitle;dataItem.distance=item.distance;}catch(e){dataItem.icon=item.__op_idx__('icon');dataItem.title=item.__op_idx__('title');dataItem.subTitle=item.__op_idx__('subTitle');dataItem.distance=item.__op_idx__('distance');}_listData.add(dataItem);});setState('#FairKey#',function dummy(){});},}));}},dataLength:function dataLength(){const __thiz__=this;with(__thiz__){return _listData.length;}},isDataEmpty:function isDataEmpty(){const __thiz__=this;with(__thiz__){return _listData.isEmpty;}},_getIcon:function _getIcon(index){const __thiz__=this;const __arg_ctx__={index,};with(__thiz__){with(__arg_ctx__){return _listData.__op_idx__(index).icon;}}},_getTitle:function _getTitle(index){const __thiz__=this;const __arg_ctx__={index,};with(__thiz__){with(__arg_ctx__){return _listData.__op_idx__(index).title;}}},_getSubTitle:function _getSubTitle(index){const __thiz__=this;const __arg_ctx__={index,};with(__thiz__){with(__arg_ctx__){return _listData.__op_idx__(index).subTitle;}}},_getDistance:function _getDistance(index){const __thiz__=this;const __arg_ctx__={index,};with(__thiz__){with(__arg_ctx__){return _listData.__op_idx__(index).distance;}}},};_ListDemoPageState.prototype.ctor=function(){};;return _ListDemoPageState();}},[1]);})(convertObjectLiteralToSetOrMap(JSON.parse('#FairProps#'))); \ No newline at end of file +GLOBAL['#FairKey#']=(function(__initProps__){const __global__=this;defineModule(1,function(__mod__){with(__mod__.imports){}},[]);return runCallback(function(__mod__){with(__mod__.imports){function ItemData(){const inner=ItemData.__inner__;if(this==__global__){return new ItemData({__args__:arguments});}else{const args=arguments.length>0?arguments[0].__args__||arguments:[];inner.apply(this,args);ItemData.prototype.ctor.apply(this,args);return this;}}ItemData.__inner__=function inner(){this.icon='';this.title='';this.subTitle='';this.distance='';};ItemData.prototype={};ItemData.prototype.ctor=function(){};function _ListDemoPageState(){const inner=_ListDemoPageState.__inner__;if(this==__global__){return new _ListDemoPageState({__args__:arguments});}else{const args=arguments.length>0?arguments[0].__args__||arguments:[];inner.apply(this,args);_ListDemoPageState.prototype.ctor.apply(this,args);return this;}}_ListDemoPageState.__inner__=function inner(){this._listData=[];this._page=0;};_ListDemoPageState.prototype={initState:function initState(){const __thiz__=this;with(__thiz__){onLoad();}},onLoad:function onLoad(){const __thiz__=this;with(__thiz__){requestData();}},onUnload:function onUnload(){const __thiz__=this;with(__thiz__){}},requestData:function requestData(){const __thiz__=this;with(__thiz__){_page++;FairNet().requestData(convertObjectLiteralToSetOrMap({['pageName']:'#FairKey#',['method']:'GET',['url']:'https://wos2.58cdn.com.cn/DeFazYxWvDti/frsupload/3b8ae7a4e0884b4d75b8094f6c83cd8c_list_page_data.json',['data']:convertObjectLiteralToSetOrMap({['page']:_page,}),['success']:function dummy(resp){if(resp==null){return null;}let data=resp.__op_idx__('data');data.forEach(function dummy(item){let dataItem=ItemData();try{dataItem.icon=item.icon;dataItem.title=item.title;dataItem.subTitle=item.subTitle;dataItem.distance=item.distance;}catch(e){dataItem.icon=item.__op_idx__('icon');dataItem.title=item.__op_idx__('title');dataItem.subTitle=item.__op_idx__('subTitle');dataItem.distance=item.__op_idx__('distance');}_listData.add(dataItem);});setState('#FairKey#',function dummy(){});},}));}},dataLength:function dataLength(){const __thiz__=this;with(__thiz__){return _listData.length;}},isDataEmpty:function isDataEmpty(){const __thiz__=this;with(__thiz__){return _listData.isEmpty;}},_getIcon:function _getIcon(index){const __thiz__=this;const __arg_ctx__={index,};with(__thiz__){with(__arg_ctx__){return _listData.__op_idx__(index).icon;}}},_getTitle:function _getTitle(index){const __thiz__=this;const __arg_ctx__={index,};with(__thiz__){with(__arg_ctx__){return _listData.__op_idx__(index).title;}}},_getSubTitle:function _getSubTitle(index){const __thiz__=this;const __arg_ctx__={index,};with(__thiz__){with(__arg_ctx__){return _listData.__op_idx__(index).subTitle;}}},_getDistance:function _getDistance(index){const __thiz__=this;const __arg_ctx__={index,};with(__thiz__){with(__arg_ctx__){return _listData.__op_idx__(index).distance;}}},};_ListDemoPageState.prototype.ctor=function(){};;return _ListDemoPageState();}},[1]);})(convertObjectLiteralToSetOrMap(JSON.parse('#FairProps#'))); \ No newline at end of file diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_list_page_list_page.fair.json b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_list_page_list_page.fair.json index 23f92f3a..0ef409d8 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_list_page_list_page.fair.json +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_list_page_list_page.fair.json @@ -361,6 +361,12 @@ ] } } + }, + "functionParameters": { + "pa": [ + "context", + "index" + ] } } } @@ -370,5 +376,6 @@ } } }, - "methodMap": {} + "methodMap": {}, + "digest": "e71b1c8454da62874c0eb8d02be74724" } \ No newline at end of file diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_list_page_list_page.fair.metadata b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_list_page_list_page.fair.metadata index 268f8dca..d9b3e33b 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_list_page_list_page.fair.metadata +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_list_page_list_page.fair.metadata @@ -1,6 +1,6 @@ -# Generated by Fair on 2022-12-26 17:01:20.673106. +# Generated by Fair on 2023-09-18 15:19:43.154498. source: fair_samples|lib/page/list_page/list_page.dart -md5: 92ed28502964dc411c8a8ce8a4665590 +md5: 33bb2ee3238b52095a8ae506a6b50f80 json: fair_samples|build/fair/lib_page_list_page_list_page.fair.json -date: 2022-12-26 17:01:20.673244 +date: 2023-09-18 15:19:43.154646 diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_login_page_login_page_template.fair.json b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_login_page_login_page_template.fair.json index 2f666597..8c61d697 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_login_page_login_page_template.fair.json +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_login_page_login_page_template.fair.json @@ -361,5 +361,6 @@ } } }, - "methodMap": {} + "methodMap": {}, + "digest": "eb65d3597473ea40139bca4400a4f6e1" } \ No newline at end of file diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_login_page_login_page_template.fair.metadata b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_login_page_login_page_template.fair.metadata index eeb9ee88..4643975e 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_login_page_login_page_template.fair.metadata +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_login_page_login_page_template.fair.metadata @@ -1,6 +1,6 @@ -# Generated by Fair on 2022-12-26 17:01:20.725014. +# Generated by Fair on 2023-09-18 15:19:43.220567. source: fair_samples|lib/page/login_page/login_page_template.dart -md5: 1d84f3cab8dcde2019a129f6965ef25a +md5: 968299bc582f11db5eea58f77d532c92 json: fair_samples|build/fair/lib_page_login_page_login_page_template.fair.json -date: 2022-12-26 17:01:20.725166 +date: 2023-09-18 15:19:43.220702 diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_pageview_pageview_template.fair.js b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_pageview_pageview_template.fair.js index 45c959f7..3386a0e2 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_pageview_pageview_template.fair.js +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_pageview_pageview_template.fair.js @@ -1 +1 @@ -GLOBAL['#FairKey#']=(function(__initProps__){const __global__=this;defineModule(1,function(__mod__){with(__mod__.imports){}},[]);return runCallback(function(__mod__){with(__mod__.imports){function PageViewModel(){const inner=PageViewModel.__inner__;if(this==__global__){return new PageViewModel({__args__:arguments});}else{const args=arguments.length>0?arguments[0].__args__||arguments:[];inner.apply(this,args);PageViewModel.prototype.ctor.apply(this,args);return this;}}PageViewModel.__inner__=function inner(){this.imagePath='';this.title='';};PageViewModel.prototype={};PageViewModel.prototype.ctor=function(){};function _PageViewTemplateState(){const inner=_PageViewTemplateState.__inner__;if(this==__global__){return new _PageViewTemplateState({__args__:arguments});}else{const args=arguments.length>0?arguments[0].__args__||arguments:[];inner.apply(this,args);_PageViewTemplateState.prototype.ctor.apply(this,args);return this;}}_PageViewTemplateState.__inner__=function inner(){this._listData=[];this._page=0;};_PageViewTemplateState.prototype={onLoad:function onLoad(){const __thiz__=this;with(__thiz__){requestData();}},onUnload:function onUnload(){const __thiz__=this;with(__thiz__){}},requestData:function requestData(){const __thiz__=this;with(__thiz__){_page++;FairNet().request(convertObjectLiteralToSetOrMap({['pageName']:'#FairKey#',['method']:'GET',['url']:'https://wos2.58cdn.com.cn/DeFazYxWvDti/frsupload/81900c8ba18b20328389b43c729a251e_tabbar_data.json',['data']:convertObjectLiteralToSetOrMap({['page']:_page,}),['success']:function dummy(resp){if(resp==null){return null;}let data=resp.__op_idx__('data');data.forEach(function dummy(item){let dataItem=PageViewModel();try{dataItem.imagePath=item.imageUrl;dataItem.title=item.title;}catch(e){dataItem.imagePath=item.__op_idx__('imageUrl');dataItem.title=item.__op_idx__('title');}_listData.add(dataItem);});setState('#FairKey#',function dummy(){});},}));}},isDataEmpty:function isDataEmpty(){const __thiz__=this;with(__thiz__){return _listData.isEmpty;}},_getImagePath:function _getImagePath(index){const __thiz__=this;const __arg_ctx__={index,};with(__thiz__){with(__arg_ctx__){return _listData.__op_idx__(index).imagePath;}}},_getText:function _getText(index){const __thiz__=this;const __arg_ctx__={index,};with(__thiz__){with(__arg_ctx__){return _listData.__op_idx__(index).title;}}},};_PageViewTemplateState.prototype.ctor=function(){};;return _PageViewTemplateState();}},[1]);})(convertObjectLiteralToSetOrMap(JSON.parse('#FairProps#'))); \ No newline at end of file +GLOBAL['#FairKey#']=(function(__initProps__){const __global__=this;defineModule(1,function(__mod__){with(__mod__.imports){}},[]);return runCallback(function(__mod__){with(__mod__.imports){function PageViewModel(){const inner=PageViewModel.__inner__;if(this==__global__){return new PageViewModel({__args__:arguments});}else{const args=arguments.length>0?arguments[0].__args__||arguments:[];inner.apply(this,args);PageViewModel.prototype.ctor.apply(this,args);return this;}}PageViewModel.__inner__=function inner(){this.imagePath='';this.title='';};PageViewModel.prototype={};PageViewModel.prototype.ctor=function(){};function _PageViewTemplateState(){const inner=_PageViewTemplateState.__inner__;if(this==__global__){return new _PageViewTemplateState({__args__:arguments});}else{const args=arguments.length>0?arguments[0].__args__||arguments:[];inner.apply(this,args);_PageViewTemplateState.prototype.ctor.apply(this,args);return this;}}_PageViewTemplateState.__inner__=function inner(){this._listData=[];this._page=0;};_PageViewTemplateState.prototype={initState:function initState(){const __thiz__=this;with(__thiz__){onLoad();}},onLoad:function onLoad(){const __thiz__=this;with(__thiz__){requestData();}},onUnload:function onUnload(){const __thiz__=this;with(__thiz__){}},requestData:function requestData(){const __thiz__=this;with(__thiz__){_page++;FairNet().requestData(convertObjectLiteralToSetOrMap({['pageName']:'#FairKey#',['method']:'GET',['url']:'https://wos2.58cdn.com.cn/DeFazYxWvDti/frsupload/81900c8ba18b20328389b43c729a251e_tabbar_data.json',['data']:convertObjectLiteralToSetOrMap({['page']:_page,}),['success']:function dummy(resp){if(resp==null){return null;}let data=resp.__op_idx__('data');data.forEach(function dummy(item){let dataItem=PageViewModel();try{dataItem.imagePath=item.imageUrl;dataItem.title=item.title;}catch(e){dataItem.imagePath=item.__op_idx__('imageUrl');dataItem.title=item.__op_idx__('title');}_listData.add(dataItem);});setState('#FairKey#',function dummy(){});},}));}},isDataEmpty:function isDataEmpty(){const __thiz__=this;with(__thiz__){return _listData.isEmpty;}},_getImagePath:function _getImagePath(index){const __thiz__=this;const __arg_ctx__={index,};with(__thiz__){with(__arg_ctx__){return _listData.__op_idx__(index).imagePath;}}},_getText:function _getText(index){const __thiz__=this;const __arg_ctx__={index,};with(__thiz__){with(__arg_ctx__){return _listData.__op_idx__(index).title;}}},};_PageViewTemplateState.prototype.ctor=function(){};;return _PageViewTemplateState();}},[1]);})(convertObjectLiteralToSetOrMap(JSON.parse('#FairProps#'))); \ No newline at end of file diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_pageview_pageview_template.fair.json b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_pageview_pageview_template.fair.json index 36e838e9..550f37d7 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_pageview_pageview_template.fair.json +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_pageview_pageview_template.fair.json @@ -78,6 +78,12 @@ ] } ] + }, + "functionParameters": { + "pa": [ + "context", + "index" + ] } }, "childCount": 3 @@ -88,5 +94,6 @@ } } }, - "methodMap": {} + "methodMap": {}, + "digest": "c0dabac0b7db4c026140c54293b9a930" } \ No newline at end of file diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_pageview_pageview_template.fair.metadata b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_pageview_pageview_template.fair.metadata index 258d8f4d..2b4cf4c9 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_pageview_pageview_template.fair.metadata +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_pageview_pageview_template.fair.metadata @@ -1,6 +1,6 @@ -# Generated by Fair on 2022-12-26 17:01:20.695354. +# Generated by Fair on 2023-09-18 15:19:43.109723. source: fair_samples|lib/page/pageview/pageview_template.dart -md5: 833798162c097e536815c644057b4bcd +md5: 6bc0fda312ee26c735ba469c696e6bdf json: fair_samples|build/fair/lib_page_pageview_pageview_template.fair.json -date: 2022-12-26 17:01:20.695415 +date: 2023-09-18 15:19:43.109787 diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_scrollview_home_scrollview.fair.js b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_scrollview_home_scrollview.fair.js index 9f234694..0111c97c 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_scrollview_home_scrollview.fair.js +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_scrollview_home_scrollview.fair.js @@ -1 +1 @@ -GLOBAL['#FairKey#']=(function(__initProps__){const __global__=this;defineModule(1,function(__mod__){with(__mod__.imports){}},[]);return runCallback(function(__mod__){with(__mod__.imports){function HomeItemData(){const inner=HomeItemData.__inner__;if(this==__global__){return new HomeItemData({__args__:arguments});}else{const args=arguments.length>0?arguments[0].__args__||arguments:[];inner.apply(this,args);HomeItemData.prototype.ctor.apply(this,args);return this;}}HomeItemData.__inner__=function inner(){this.imagePath='';};HomeItemData.prototype={};HomeItemData.prototype.ctor=function(){};function _HomeScrollViewState(){const inner=_HomeScrollViewState.__inner__;if(this==__global__){return new _HomeScrollViewState({__args__:arguments});}else{const args=arguments.length>0?arguments[0].__args__||arguments:[];inner.apply(this,args);_HomeScrollViewState.prototype.ctor.apply(this,args);return this;}}_HomeScrollViewState.__inner__=function inner(){this._listData=[];this._page=0;};_HomeScrollViewState.prototype={onLoad:function onLoad(){const __thiz__=this;with(__thiz__){requestData();}},onUnload:function onUnload(){const __thiz__=this;with(__thiz__){}},requestData:function requestData(){const __thiz__=this;with(__thiz__){_page++;FairNet().request(convertObjectLiteralToSetOrMap({['pageName']:'#FairKey#',['method']:'GET',['url']:'https://wos2.58cdn.com.cn/DeFazYxWvDti/frsupload/3158c2fc5e3ed9bc08b34f8d694c763d_home_scroll_data.json',['data']:convertObjectLiteralToSetOrMap({['page']:_page,}),['success']:function dummy(resp){if(resp==null){return null;}let data=resp.__op_idx__('data');data.forEach(function dummy(item){let dataItem=HomeItemData();try{dataItem.imagePath=item.imageUrl;}catch(e){dataItem.imagePath=item.__op_idx__('imageUrl');}_listData.add(dataItem);});setState('#FairKey#',function dummy(){});},}));}},isDataEmpty:function isDataEmpty(){const __thiz__=this;with(__thiz__){return _listData.isEmpty;}},_getImagePath:function _getImagePath(index){const __thiz__=this;const __arg_ctx__={index,};with(__thiz__){with(__arg_ctx__){return _listData.__op_idx__(index).imagePath;}}},};_HomeScrollViewState.prototype.ctor=function(){};;return _HomeScrollViewState();}},[1]);})(convertObjectLiteralToSetOrMap(JSON.parse('#FairProps#'))); \ No newline at end of file +GLOBAL['#FairKey#']=(function(__initProps__){const __global__=this;defineModule(1,function(__mod__){with(__mod__.imports){}},[]);return runCallback(function(__mod__){with(__mod__.imports){function HomeItemData(){const inner=HomeItemData.__inner__;if(this==__global__){return new HomeItemData({__args__:arguments});}else{const args=arguments.length>0?arguments[0].__args__||arguments:[];inner.apply(this,args);HomeItemData.prototype.ctor.apply(this,args);return this;}}HomeItemData.__inner__=function inner(){this.imagePath='';};HomeItemData.prototype={};HomeItemData.prototype.ctor=function(){};function _HomeScrollViewState(){const inner=_HomeScrollViewState.__inner__;if(this==__global__){return new _HomeScrollViewState({__args__:arguments});}else{const args=arguments.length>0?arguments[0].__args__||arguments:[];inner.apply(this,args);_HomeScrollViewState.prototype.ctor.apply(this,args);return this;}}_HomeScrollViewState.__inner__=function inner(){this._listData=[];this._page=0;};_HomeScrollViewState.prototype={initState:function initState(){const __thiz__=this;with(__thiz__){onLoad();}},onLoad:function onLoad(){const __thiz__=this;with(__thiz__){requestData();}},onUnload:function onUnload(){const __thiz__=this;with(__thiz__){}},requestData:function requestData(){const __thiz__=this;with(__thiz__){_page++;FairNet().requestData(convertObjectLiteralToSetOrMap({['pageName']:'#FairKey#',['method']:'GET',['url']:'https://wos2.58cdn.com.cn/DeFazYxWvDti/frsupload/3158c2fc5e3ed9bc08b34f8d694c763d_home_scroll_data.json',['data']:convertObjectLiteralToSetOrMap({['page']:_page,}),['success']:function dummy(resp){if(resp==null){return null;}let data=resp.__op_idx__('data');data.forEach(function dummy(item){let dataItem=HomeItemData();try{dataItem.imagePath=item.imageUrl;}catch(e){dataItem.imagePath=item.__op_idx__('imageUrl');}_listData.add(dataItem);});setState('#FairKey#',function dummy(){});},}));}},isDataEmpty:function isDataEmpty(){const __thiz__=this;with(__thiz__){return _listData.isEmpty;}},_getImagePath:function _getImagePath(index){const __thiz__=this;const __arg_ctx__={index,};with(__thiz__){with(__arg_ctx__){return _listData.__op_idx__(index).imagePath;}}},};_HomeScrollViewState.prototype.ctor=function(){};;return _HomeScrollViewState();}},[1]);})(convertObjectLiteralToSetOrMap(JSON.parse('#FairProps#'))); \ No newline at end of file diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_scrollview_home_scrollview.fair.json b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_scrollview_home_scrollview.fair.json index e03e2835..3c4d2d45 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_scrollview_home_scrollview.fair.json +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_scrollview_home_scrollview.fair.json @@ -109,6 +109,12 @@ } } } + }, + "functionParameters": { + "pa": [ + "content", + "index" + ] } }, "childCount": 4 @@ -151,6 +157,12 @@ } } } + }, + "functionParameters": { + "pa": [ + "content", + "index" + ] } }, "childCount": 3 @@ -164,5 +176,6 @@ } } }, - "methodMap": {} + "methodMap": {}, + "digest": "865eefda58d732e23e4bf704a5dc7da0" } \ No newline at end of file diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_scrollview_home_scrollview.fair.metadata b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_scrollview_home_scrollview.fair.metadata index 08831a80..759ba8f7 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_scrollview_home_scrollview.fair.metadata +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_scrollview_home_scrollview.fair.metadata @@ -1,6 +1,6 @@ -# Generated by Fair on 2022-12-26 17:01:20.665968. +# Generated by Fair on 2023-09-18 15:19:43.176792. source: fair_samples|lib/page/scrollview/home_scrollview.dart -md5: ef3553494970222e1d155ea8ce1f2a09 +md5: 3cc5ced6191897afb123058d571c2c6b json: fair_samples|build/fair/lib_page_scrollview_home_scrollview.fair.json -date: 2022-12-26 17:01:20.666046 +date: 2023-09-18 15:19:43.176884 diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_staggered_view_staggeredview_template.fair.js b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_staggered_view_staggeredview_template.fair.js index 96c52c6d..23656074 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_staggered_view_staggeredview_template.fair.js +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_staggered_view_staggeredview_template.fair.js @@ -1 +1 @@ -GLOBAL['#FairKey#']=(function(__initProps__){const __global__=this;defineModule(1,function(__mod__){with(__mod__.imports){}},[]);return runCallback(function(__mod__){with(__mod__.imports){function StaggeredViewModel(){const inner=StaggeredViewModel.__inner__;if(this==__global__){return new StaggeredViewModel({__args__:arguments});}else{const args=arguments.length>0?arguments[0].__args__||arguments:[];inner.apply(this,args);StaggeredViewModel.prototype.ctor.apply(this,args);return this;}}StaggeredViewModel.__inner__=function inner(){this.picUrl='';};StaggeredViewModel.prototype={};StaggeredViewModel.prototype.ctor=function(){};function _StaggeredItemViewState(){const inner=_StaggeredItemViewState.__inner__;if(this==__global__){return new _StaggeredItemViewState({__args__:arguments});}else{const args=arguments.length>0?arguments[0].__args__||arguments:[];inner.apply(this,args);_StaggeredItemViewState.prototype.ctor.apply(this,args);return this;}}_StaggeredItemViewState.__inner__=function inner(){this._listData=[];this._page=0;};_StaggeredItemViewState.prototype={initState:function initState(){const __thiz__=this;with(__thiz__){onLoad();}},onLoad:function onLoad(){const __thiz__=this;with(__thiz__){requestData();}},onUnload:function onUnload(){const __thiz__=this;with(__thiz__){}},requestData:function requestData(){const __thiz__=this;with(__thiz__){_page++;FairNet().request(convertObjectLiteralToSetOrMap({['pageName']:'#FairKey#',['method']:'GET',['url']:'https://wos2.58cdn.com.cn/DeFazYxWvDti/frsupload/9e04cb323c425e6520cc2a3dea4b5793_staggeredview_data.json',['data']:convertObjectLiteralToSetOrMap({['page']:_page,}),['success']:function dummy(resp){if(resp==null){return null;}let data=resp.__op_idx__('data');data.forEach(function dummy(item){let dataItem=StaggeredViewModel();try{dataItem.picUrl=item.imagePath;}catch(e){dataItem.picUrl=item.__op_idx__('imagePath');}_listData.add(dataItem);});setState('#FairKey#',function dummy(){});},}));}},isDataEmpty:function isDataEmpty(){const __thiz__=this;with(__thiz__){return _listData.isEmpty;}},};_StaggeredItemViewState.prototype.ctor=function(){};;return _StaggeredItemViewState();}},[1]);})(convertObjectLiteralToSetOrMap(JSON.parse('#FairProps#'))); \ No newline at end of file +GLOBAL['#FairKey#']=(function(__initProps__){const __global__=this;defineModule(1,function(__mod__){with(__mod__.imports){}},[]);return runCallback(function(__mod__){with(__mod__.imports){function StaggeredViewModel(){const inner=StaggeredViewModel.__inner__;if(this==__global__){return new StaggeredViewModel({__args__:arguments});}else{const args=arguments.length>0?arguments[0].__args__||arguments:[];inner.apply(this,args);StaggeredViewModel.prototype.ctor.apply(this,args);return this;}}StaggeredViewModel.__inner__=function inner(){this.picUrl='';};StaggeredViewModel.prototype={};StaggeredViewModel.prototype.ctor=function(){};function _StaggeredItemViewState(){const inner=_StaggeredItemViewState.__inner__;if(this==__global__){return new _StaggeredItemViewState({__args__:arguments});}else{const args=arguments.length>0?arguments[0].__args__||arguments:[];inner.apply(this,args);_StaggeredItemViewState.prototype.ctor.apply(this,args);return this;}}_StaggeredItemViewState.__inner__=function inner(){this._listData=[];this._page=0;};_StaggeredItemViewState.prototype={initState:function initState(){const __thiz__=this;with(__thiz__){onLoad();}},onLoad:function onLoad(){const __thiz__=this;with(__thiz__){requestData();}},onUnload:function onUnload(){const __thiz__=this;with(__thiz__){}},requestData:function requestData(){const __thiz__=this;with(__thiz__){_page++;FairNet().requestData(convertObjectLiteralToSetOrMap({['pageName']:'#FairKey#',['method']:'GET',['url']:'https://wos2.58cdn.com.cn/DeFazYxWvDti/frsupload/9e04cb323c425e6520cc2a3dea4b5793_staggeredview_data.json',['data']:convertObjectLiteralToSetOrMap({['page']:_page,}),['success']:function dummy(resp){if(resp==null){return null;}let data=resp.__op_idx__('data');data.forEach(function dummy(item){let dataItem=StaggeredViewModel();try{dataItem.picUrl=item.imagePath;}catch(e){dataItem.picUrl=item.__op_idx__('imagePath');}_listData.add(dataItem);});setState('#FairKey#',function dummy(){});},}));}},isDataEmpty:function isDataEmpty(){const __thiz__=this;with(__thiz__){return _listData.isEmpty;}},};_StaggeredItemViewState.prototype.ctor=function(){};;return _StaggeredItemViewState();}},[1]);})(convertObjectLiteralToSetOrMap(JSON.parse('#FairProps#'))); \ No newline at end of file diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_staggered_view_staggeredview_template.fair.json b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_staggered_view_staggeredview_template.fair.json index c9353177..6d5c47be 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_staggered_view_staggeredview_template.fair.json +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_staggered_view_staggeredview_template.fair.json @@ -82,6 +82,11 @@ } } } + }, + "functionParameters": { + "pa": [ + "item" + ] } } } @@ -91,5 +96,6 @@ } } }, - "methodMap": {} + "methodMap": {}, + "digest": "b401bfa8f7aa64ed2371413b4d151a18" } \ No newline at end of file diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_staggered_view_staggeredview_template.fair.metadata b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_staggered_view_staggeredview_template.fair.metadata index 2eb04d21..842e3fde 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_staggered_view_staggeredview_template.fair.metadata +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_staggered_view_staggeredview_template.fair.metadata @@ -1,6 +1,6 @@ -# Generated by Fair on 2022-12-26 17:01:20.705204. +# Generated by Fair on 2023-09-18 15:19:43.188127. source: fair_samples|lib/page/staggered_view/staggeredview_template.dart -md5: ad26cc6f53426ceeb95f2977620f2b01 +md5: aa737cc483b1d8d5fb353133ceab374a json: fair_samples|build/fair/lib_page_staggered_view_staggeredview_template.fair.json -date: 2022-12-26 17:01:20.705254 +date: 2023-09-18 15:19:43.188223 diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_tabbar_page_tabbar_page.fair.js b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_tabbar_page_tabbar_page.fair.js index 7b51c6d2..f7a1ba26 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_tabbar_page_tabbar_page.fair.js +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_tabbar_page_tabbar_page.fair.js @@ -1 +1 @@ -GLOBAL['#FairKey#']=(function(__initProps__){const __global__=this;defineModule(1,function(__mod__){with(__mod__.imports){}},[]);return runCallback(function(__mod__){with(__mod__.imports){function TabBarModel(){const inner=TabBarModel.__inner__;if(this==__global__){return new TabBarModel({__args__:arguments});}else{const args=arguments.length>0?arguments[0].__args__||arguments:[];inner.apply(this,args);TabBarModel.prototype.ctor.apply(this,args);return this;}}TabBarModel.__inner__=function inner(){this.imagePath='';this.title='';};TabBarModel.prototype={};TabBarModel.prototype.ctor=function(){};function _SugarTabBarPageState(){const inner=_SugarTabBarPageState.__inner__;if(this==__global__){return new _SugarTabBarPageState({__args__:arguments});}else{const args=arguments.length>0?arguments[0].__args__||arguments:[];inner.apply(this,args);_SugarTabBarPageState.prototype.ctor.apply(this,args);return this;}}_SugarTabBarPageState.__inner__=function inner(){this._listData=[];this._page=0;};_SugarTabBarPageState.prototype={onLoad:function onLoad(){const __thiz__=this;with(__thiz__){requestData();}},onUnload:function onUnload(){const __thiz__=this;with(__thiz__){}},requestData:function requestData(){const __thiz__=this;with(__thiz__){_page++;FairNet().request(convertObjectLiteralToSetOrMap({['pageName']:'#FairKey#',['method']:'GET',['url']:'https://wos2.58cdn.com.cn/DeFazYxWvDti/frsupload/81900c8ba18b20328389b43c729a251e_tabbar_data.json',['data']:convertObjectLiteralToSetOrMap({['page']:_page,}),['success']:function dummy(resp){if(resp==null){return null;}let data=resp.__op_idx__('data');data.forEach(function dummy(item){let dataItem=TabBarModel();try{dataItem.imagePath=item.imageUrl;dataItem.title=item.title;}catch(e){dataItem.imagePath=item.__op_idx__('imageUrl');dataItem.title=item.__op_idx__('title');}_listData.add(dataItem);});setState('#FairKey#',function dummy(){});},}));}},isDataEmpty:function isDataEmpty(){const __thiz__=this;with(__thiz__){return _listData.isEmpty;}},_getImagePath:function _getImagePath(index){const __thiz__=this;const __arg_ctx__={index,};with(__thiz__){with(__arg_ctx__){return _listData.__op_idx__(index).imagePath;}}},_getTitle:function _getTitle(index){const __thiz__=this;const __arg_ctx__={index,};with(__thiz__){with(__arg_ctx__){return _listData.__op_idx__(index).title;}}},};_SugarTabBarPageState.prototype.ctor=function(){};;return _SugarTabBarPageState();}},[1]);})(convertObjectLiteralToSetOrMap(JSON.parse('#FairProps#'))); \ No newline at end of file +GLOBAL['#FairKey#']=(function(__initProps__){const __global__=this;defineModule(1,function(__mod__){with(__mod__.imports){}},[]);return runCallback(function(__mod__){with(__mod__.imports){function TabBarModel(){const inner=TabBarModel.__inner__;if(this==__global__){return new TabBarModel({__args__:arguments});}else{const args=arguments.length>0?arguments[0].__args__||arguments:[];inner.apply(this,args);TabBarModel.prototype.ctor.apply(this,args);return this;}}TabBarModel.__inner__=function inner(){this.imagePath='';this.title='';};TabBarModel.prototype={};TabBarModel.prototype.ctor=function(){};function _SugarTabBarPageState(){const inner=_SugarTabBarPageState.__inner__;if(this==__global__){return new _SugarTabBarPageState({__args__:arguments});}else{const args=arguments.length>0?arguments[0].__args__||arguments:[];inner.apply(this,args);_SugarTabBarPageState.prototype.ctor.apply(this,args);return this;}}_SugarTabBarPageState.__inner__=function inner(){this._listData=[];this._page=0;};_SugarTabBarPageState.prototype={initState:function initState(){const __thiz__=this;with(__thiz__){onLoad();}},onLoad:function onLoad(){const __thiz__=this;with(__thiz__){requestData();}},onUnload:function onUnload(){const __thiz__=this;with(__thiz__){}},requestData:function requestData(){const __thiz__=this;with(__thiz__){_page++;FairNet().requestData(convertObjectLiteralToSetOrMap({['pageName']:'#FairKey#',['method']:'GET',['url']:'https://wos2.58cdn.com.cn/DeFazYxWvDti/frsupload/81900c8ba18b20328389b43c729a251e_tabbar_data.json',['data']:convertObjectLiteralToSetOrMap({['page']:_page,}),['success']:function dummy(resp){if(resp==null){return null;}let data=resp.__op_idx__('data');data.forEach(function dummy(item){let dataItem=TabBarModel();try{dataItem.imagePath=item.imageUrl;dataItem.title=item.title;}catch(e){dataItem.imagePath=item.__op_idx__('imageUrl');dataItem.title=item.__op_idx__('title');}_listData.add(dataItem);});setState('#FairKey#',function dummy(){});},}));}},isDataEmpty:function isDataEmpty(){const __thiz__=this;with(__thiz__){return _listData.isEmpty;}},_getImagePath:function _getImagePath(index){const __thiz__=this;const __arg_ctx__={index,};with(__thiz__){with(__arg_ctx__){return _listData.__op_idx__(index).imagePath;}}},_getTitle:function _getTitle(index){const __thiz__=this;const __arg_ctx__={index,};with(__thiz__){with(__arg_ctx__){return _listData.__op_idx__(index).title;}}},};_SugarTabBarPageState.prototype.ctor=function(){};;return _SugarTabBarPageState();}},[1]);})(convertObjectLiteralToSetOrMap(JSON.parse('#FairProps#'))); \ No newline at end of file diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_tabbar_page_tabbar_page.fair.json b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_tabbar_page_tabbar_page.fair.json index 1951f13f..1d404724 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_tabbar_page_tabbar_page.fair.json +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_tabbar_page_tabbar_page.fair.json @@ -267,6 +267,12 @@ } } } + }, + "functionParameters": { + "pa": [ + "context", + "index" + ] } } } @@ -424,6 +430,12 @@ } } } + }, + "functionParameters": { + "pa": [ + "content", + "index" + ] } }, "childCount": 3 @@ -436,5 +448,6 @@ } } } - } + }, + "digest": "717afee55ab7a6a0aec98fdbbe1dd7cf" } \ No newline at end of file diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_tabbar_page_tabbar_page.fair.metadata b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_tabbar_page_tabbar_page.fair.metadata index 1504b507..408f47df 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_tabbar_page_tabbar_page.fair.metadata +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/fair/lib_page_tabbar_page_tabbar_page.fair.metadata @@ -1,6 +1,6 @@ -# Generated by Fair on 2022-12-26 17:01:20.749208. +# Generated by Fair on 2023-09-18 15:19:43.149537. source: fair_samples|lib/page/tabbar_page/tabbar_page.dart -md5: c8909190afbd0f30bcc399c86dd8cd93 +md5: 87ec2c7513e98c75984e41d182cb3fc1 json: fair_samples|build/fair/lib_page_tabbar_page_tabbar_page.fair.json -date: 2022-12-26 17:01:20.749395 +date: 2023-09-18 15:19:43.149704 diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/plugin/fair_net_plugin.js b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/plugin/fair_net_plugin.js index 06186fac..9b76fed9 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/plugin/fair_net_plugin.js +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/assets/plugin/fair_net_plugin.js @@ -5,12 +5,12 @@ let callBackId = 0; let FairNet = function () { return { - request: function (resp) { + requestData: function (resp) { let respMap = {}; respMap = mapOrSetToObject(resp); let id = 'FairNet$' + (++callBackId); let requestParameter = {}; - requestParameter['className'] = "FairNet#request"; + requestParameter['className'] = "FairNet#requestData"; callBack[id] = [respMap['complete'], respMap['error'], respMap['success']]; respMap['callId'] = id; requestParameter['funcName'] = 'invokePlugin'; diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/code/action/HotelDataRequest.dart b/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/code/action/HotelDataRequest.dart index e6c425e7..bd7fe76e 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/code/action/HotelDataRequest.dart +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/code/action/HotelDataRequest.dart @@ -2,7 +2,7 @@ import '../../fair_common.dart'; void requestData() { var listData = []; - FairNet().request({ + FairNet().requestData({ 'pageName': '#FairKey#', 'method': 'GET', 'url': diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/page/detail_page/fair_detail.dart b/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/page/detail_page/fair_detail.dart index 12455492..98dce6d7 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/page/detail_page/fair_detail.dart +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/page/detail_page/fair_detail.dart @@ -28,7 +28,7 @@ class _FairDetailState extends State { void onUnload() {} void requestData() { - FairNet().request({ + FairNet().requestData({ 'pageName': '#FairKey#', 'method': 'GET', 'url': diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/page/gridview/gridview_template.dart b/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/page/gridview/gridview_template.dart index 0d4235e9..e78e69ec 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/page/gridview/gridview_template.dart +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/page/gridview/gridview_template.dart @@ -29,7 +29,7 @@ class _GridViewTemplateState extends State { void requestData() { _page++; - FairNet().request({ + FairNet().requestData({ 'pageName': '#FairKey#', 'method': 'GET', 'url': @@ -69,12 +69,12 @@ class _GridViewTemplateState extends State { child: Icon(Icons.add), ), body: Sugar.ifEqualBool(isDataEmpty(), - trueValue: Center( + trueValue: () => Center( child: Text( '加载中...', ), ), - falseValue: GridView.count( + falseValue: () => GridView.count( crossAxisCount: 2, mainAxisSpacing: 10, crossAxisSpacing: 10, diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/page/hotel_listview/hotel_listview_template.dart b/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/page/hotel_listview/hotel_listview_template.dart index d02f7cf3..738037ca 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/page/hotel_listview/hotel_listview_template.dart +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/page/hotel_listview/hotel_listview_template.dart @@ -31,7 +31,7 @@ class _HotelListViewState extends State { void requestData() { _page++; - FairNet().request({ + FairNet().requestData({ 'pageName': '#FairKey#', 'method': 'GET', 'url': @@ -78,12 +78,12 @@ class _HotelListViewState extends State { ), backgroundColor: Color(0xFFFEFEFE), body: Sugar.ifEqualBool(isDataEmpty(), - trueValue: Center( + trueValue: () => Center( child: Text( '加载中...', ), ), - falseValue: Container( + falseValue: () => Container( color: Color(0xFFFFFFFF), child: ListView( children: Sugar.map(_listData, builder: (HotelModel item) { diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/page/list_card/moments_list.dart b/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/page/list_card/moments_list.dart index c1532c97..2354c196 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/page/list_card/moments_list.dart +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/page/list_card/moments_list.dart @@ -32,7 +32,7 @@ class _MomentsListState extends State { void requestData() { _page++; - FairNet().request({ + FairNet().requestData({ 'pageName': '#FairKey#', 'method': 'GET', 'url': @@ -151,12 +151,12 @@ class _MomentsListState extends State { color: Colors.white, child: Sugar.ifEqualBool( isDataEmpty(), - trueValue: Center( + trueValue: () => Center( child: Text( '加载中...', ), ), - falseValue: Sugar.listBuilder( + falseValue: () => Sugar.listBuilder( itemCount: dataLength(), itemBuilder: (context, index) { return Container( diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/page/list_page/list_page.dart b/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/page/list_page/list_page.dart index 81e93007..4100ebc1 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/page/list_page/list_page.dart +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/page/list_page/list_page.dart @@ -31,7 +31,7 @@ class _ListDemoPageState extends State { void requestData() { _page++; - FairNet().request({ + FairNet().requestData({ 'pageName': '#FairKey#', 'method': 'GET', 'url': @@ -127,12 +127,12 @@ class _ListDemoPageState extends State { body: Container( color: Colors.white, child: Sugar.ifEqualBool(isDataEmpty(), - trueValue: Center( + trueValue: () => Center( child: Text( '加载中...', ), ), - falseValue: Sugar.listBuilder( + falseValue: () => Sugar.listBuilder( itemCount: dataLength(), itemBuilder: (context, index) { return SizedBox( diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/page/pageview/pageview_template.dart b/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/page/pageview/pageview_template.dart index 0231b4f9..dd189eed 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/page/pageview/pageview_template.dart +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/page/pageview/pageview_template.dart @@ -29,7 +29,7 @@ class _PageViewTemplateState extends State { void requestData() { _page++; - FairNet().request({ + FairNet().requestData({ 'pageName': '#FairKey#', 'method': 'GET', 'url': @@ -75,12 +75,12 @@ class _PageViewTemplateState extends State { title: Text('PageView模版'), ), body: Sugar.ifEqualBool(isDataEmpty(), - trueValue: Center( + trueValue: () => Center( child: Text( '加载中...', ), ), - falseValue: PageView.custom( + falseValue: () => PageView.custom( childrenDelegate: Sugar.sliverChildBuilderDelegate( builder: (context, index) { return Column( diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/page/scrollview/home_scrollview.dart b/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/page/scrollview/home_scrollview.dart index 5f5f9b90..61abcaa1 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/page/scrollview/home_scrollview.dart +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/page/scrollview/home_scrollview.dart @@ -32,7 +32,7 @@ class _HomeScrollViewState extends State { void requestData() { _page++; - FairNet().request({ + FairNet().requestData({ 'pageName': '#FairKey#', 'method': 'GET', 'url': @@ -70,12 +70,12 @@ class _HomeScrollViewState extends State { return Scaffold( body: Sugar.ifEqualBool( isDataEmpty(), - trueValue: Center( + trueValue: () => Center( child: Text( '加载中...', ), ), - falseValue: CustomScrollView( + falseValue: () => CustomScrollView( slivers: [ SliverAppBar( title: Text('CustomScrollView模版'), diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/page/staggered_view/staggeredview_template.dart b/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/page/staggered_view/staggeredview_template.dart index 58f0a23e..fea6714c 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/page/staggered_view/staggeredview_template.dart +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/page/staggered_view/staggeredview_template.dart @@ -30,7 +30,7 @@ class _StaggeredItemViewState extends State { void requestData() { _page++; - FairNet().request({ + FairNet().requestData({ 'pageName': '#FairKey#', 'method': 'GET', 'url': @@ -71,12 +71,12 @@ class _StaggeredItemViewState extends State { ), body: Sugar.ifEqualBool( isDataEmpty(), - trueValue: Center( + trueValue: () => Center( child: Text( '加载中...', ), ), - falseValue: StaggeredGrid.count( + falseValue: () => StaggeredGrid.count( crossAxisCount: 2, mainAxisSpacing: 10, crossAxisSpacing: 5, diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/page/tabbar_page/tabbar_page.dart b/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/page/tabbar_page/tabbar_page.dart index bc1946a5..830c8723 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/page/tabbar_page/tabbar_page.dart +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/page/tabbar_page/tabbar_page.dart @@ -34,7 +34,7 @@ class _SugarTabBarPageState extends State { void requestData() { _page++; - FairNet().request({ + FairNet().requestData({ 'pageName': '#FairKey#', 'method': 'GET', 'url': @@ -101,12 +101,12 @@ class _SugarTabBarPageState extends State { ), ), body: Sugar.ifEqualBool(isDataEmpty(), - trueValue: Center( + trueValue: () => Center( child: Text( '加载中...', ), ), - falseValue: TabBarView( + falseValue: () => TabBarView( children: [ _allTabList(), _getList(), diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/plugins/net/fair_net_plugin.dart b/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/plugins/net/fair_net_plugin.dart index 8f932d75..52419c59 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/plugins/net/fair_net_plugin.dart +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/plugins/net/fair_net_plugin.dart @@ -13,7 +13,7 @@ class FairNet extends IFairPlugin { return _fairNet; } - Future request(dynamic map) async { + Future requestData(dynamic map) async { if (map == null) { return; } @@ -98,7 +98,7 @@ class FairNet extends IFairPlugin { @override Map getRegisterMethods() { var functions = {}; - functions.putIfAbsent('request', () => request); + functions.putIfAbsent('requestData', () => requestData); return functions; } diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/src/generated.fair.dart b/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/src/generated.fair.dart index 716221a2..941f7537 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/src/generated.fair.dart +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/lib/src/generated.fair.dart @@ -1,5 +1,30 @@ -// Generated by Fair on 2022-12-26 17:01:20.172428. -// ignore_for_file: implementation_imports, unused_import, depend_on_referenced_packages, unused_shown_name, duplicate_import, always_specify_types +// GENERATED CODE - DO NOT MODIFY MANUALLY +// ************************************************************************** +// But you can define a new GeneratedModule as following: +// class MyAppGeneratedModule extends AppGeneratedModule { +// @override +// Map components() { +// return { +// ...super.components(), +// // add your cases here. +// }; +// } +// +// /// true means it's a widget. +// @override +// Map mapping() { +// return { +// ...super.mapping(), +// // remember add your cases here too. +// }; +// } +// } +// ************************************************************************** +// Auto generated by https://github.com/wuba/Fair +// ************************************************************************** +// +// ignore_for_file: implementation_imports, unused_import, depend_on_referenced_packages, unused_shown_name, duplicate_import, always_specify_types, unnecessary_import + import 'package:flutter_staggered_grid_view/src/widgets/staggered_grid.dart'; import 'package:flutter_staggered_grid_view/src/widgets/masonry_grid_view.dart'; import 'package:flutter/material.dart'; diff --git a/fair_online/fair_online_service/fairDir/template/project/fair_samples/pubspec.yaml b/fair_online/fair_online_service/fairDir/template/project/fair_samples/pubspec.yaml index 424b9f2f..61608cb4 100644 --- a/fair_online/fair_online_service/fairDir/template/project/fair_samples/pubspec.yaml +++ b/fair_online/fair_online_service/fairDir/template/project/fair_samples/pubspec.yaml @@ -54,11 +54,16 @@ dev_dependencies: flutter_lints: ^1.0.0 fair_compiler: path: ../../../fair/compiler - build_runner: ^2.0.0 + build_runner: ^2.1.2 dependency_overrides: fair_version: path: ../../../fair/flutter_version/flutter_3_3_0 + collection: 1.17.0 + permission_handler: ^10.2.0 + analyzer: 5.6.0 + dart_style: 2.2.5 + dio: 4.0.6 # For information on the generic Dart part of this file, see the diff --git a/fair_online/fair_online_service/web/README.md b/fair_online/fair_online_service/web/README.md new file mode 100644 index 00000000..6d8bedcb --- /dev/null +++ b/fair_online/fair_online_service/web/README.md @@ -0,0 +1,10 @@ +## 前端页面路径 + +编译fair-online工程 + +```bash +$ flutter build web +``` + +编译完成后,将编译产物拷贝到该路径 +