Browse Source

Merge remote-tracking branch 'origin/dev' into remove_uniapp

ff_new
fmk 3 years ago
parent
commit
694344480b
  1. 11
      assets/svg/qiandao.svg
  2. 1
      lib/community/headlines/article_page.dart
  3. 6
      lib/community/headlines/headlines_collection.dart
  4. 27
      lib/community/headlines/headlines_column_details.dart
  5. 14
      lib/home/home_view/shortcut_operation.dart
  6. 13
      lib/integral/intergra_view/in_for_points.dart
  7. 8
      lib/integral/intergra_view/integral_task.dart
  8. 5
      lib/integral/intergra_view/integral_vip.dart
  9. 27
      lib/integral_store/integral_store_details_page.dart
  10. 8
      lib/retrofit/retrofit_api.dart
  11. 2
      lib/retrofit/retrofit_api.g.dart

11
assets/svg/qiandao.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 40 KiB

1
lib/community/headlines/article_page.dart

@ -160,6 +160,7 @@ class _ArticlePage extends State<ArticlePage>
_onRefresh(){ _onRefresh(){
queryHeadlinesBanner(); queryHeadlinesBanner();
queryHeadlinesList();// queryHeadlinesList();//
queryArticleList();
} }
@override @override

6
lib/community/headlines/headlines_collection.dart

@ -46,10 +46,12 @@ class _HeadlinesCollection extends State<HeadlinesCollection> {
itemBuilder: (context, position) { itemBuilder: (context, position) {
return GestureDetector( return GestureDetector(
onTap: () { onTap: () {
List<Article> articles = [];
articles.addAll(widget.articles);
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
'/router/headlines_column_details', '/router/headlines_column_details',
arguments: {"categoryId":widget.articles[position].categoryId, arguments: {"id":widget.headlines[position].id,
"articles":widget.articles}); "articles":articles});
}, },
child: headlinesCollectionItem(widget.headlines[position]), child: headlinesCollectionItem(widget.headlines[position]),
); );

27
lib/community/headlines/headlines_column_details.dart

@ -10,7 +10,6 @@ import 'package:huixiang/retrofit/data/page.dart';
import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/font_weight.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/custom_image.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
@ -34,15 +33,14 @@ class _HeadlinesColumnDetails extends State<HeadlinesColumnDetails>
List<HeadlinesList> headlines = []; List<HeadlinesList> headlines = [];
final RefreshController refreshController = RefreshController(); final RefreshController refreshController = RefreshController();
int pageNum = 1; int pageNum = 1;
final ScrollController scrollController = ScrollController();
@override @override
void initState() { void initState() {
super.initState(); super.initState();
articles = widget.arguments["articles"]; articles = widget.arguments["articles"];
WidgetsBinding.instance.addObserver(this); WidgetsBinding.instance.addObserver(this);
queryHeadlinesDetails(widget.arguments["categoryId"]); queryHeadlinesDetails(widget.arguments["id"]);
queryArticleList(widget.arguments["categoryId"]); queryArticleList(widget.arguments["id"]);
} }
/// ///
@ -80,7 +78,7 @@ class _HeadlinesColumnDetails extends State<HeadlinesColumnDetails>
"searchKey": "", "searchKey": "",
"state": 1, "state": 1,
"type": 2, "type": 2,
"categoryId":widget.arguments["categoryId"] "categoryId":categoryId
}).catchError((onError){ }).catchError((onError){
refreshController.refreshFailed(); refreshController.refreshFailed();
refreshController.loadFailed(); refreshController.loadFailed();
@ -104,24 +102,11 @@ class _HeadlinesColumnDetails extends State<HeadlinesColumnDetails>
} }
} }
_onRefresh(){
queryHeadlinesDetails(widget.arguments["categoryId"]);
queryArticleList(widget.arguments["categoryId"]);//
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
body: Container( body: Container(
child: SmartRefresher( child: Column(
controller: refreshController,
enablePullDown: true,
enablePullUp: false,
header: MyHeader(),
physics: ClampingScrollPhysics(),
onRefresh: _onRefresh,
scrollController: scrollController,
child:Column(
children: [ children: [
Expanded( Expanded(
child: SingleChildScrollView( child: SingleChildScrollView(
@ -251,7 +236,7 @@ class _HeadlinesColumnDetails extends State<HeadlinesColumnDetails>
), ),
ListView.builder( ListView.builder(
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
itemCount:articles.length, itemCount:articles == null ? 0 : articles.length,
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
shrinkWrap: true, shrinkWrap: true,
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
@ -276,7 +261,7 @@ class _HeadlinesColumnDetails extends State<HeadlinesColumnDetails>
), ),
], ],
), ),
),) ),
); );
} }

14
lib/home/home_view/shortcut_operation.dart

@ -35,12 +35,12 @@ class _ShortcutOperation extends State<ShortcutOperation> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
height: 150.h, height: 150.h,
margin: EdgeInsets.only(bottom:15), margin: EdgeInsets.only(bottom:15,left: 16,right: 16),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
GestureDetector( Expanded(child:GestureDetector(
onTap: (){ onTap: (){
widget.goToOrder(); widget.goToOrder();
}, },
@ -77,8 +77,8 @@ class _ShortcutOperation extends State<ShortcutOperation> {
], ],
), ),
), ),
), ) ),
GestureDetector( Expanded(child:GestureDetector(
onTap: (){ onTap: (){
Navigator.of(context).pushNamed('/router/recharge_page'); Navigator.of(context).pushNamed('/router/recharge_page');
}, },
@ -115,8 +115,8 @@ class _ShortcutOperation extends State<ShortcutOperation> {
], ],
), ),
), ),
), ), ),
GestureDetector( Expanded(child: GestureDetector(
onTap: (){ onTap: (){
Navigator.of(context).pushNamed('/router/roll_center_page'); Navigator.of(context).pushNamed('/router/roll_center_page');
}, },
@ -153,7 +153,7 @@ class _ShortcutOperation extends State<ShortcutOperation> {
], ],
), ),
), ),
), ),),
], ],
), ),
); );

13
lib/integral/intergra_view/in_for_points.dart

@ -1,5 +1,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart'; import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
import 'package:flutter_svg/svg.dart';
import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/sign_info.dart'; import 'package:huixiang/retrofit/data/sign_info.dart';
import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/font_weight.dart';
@ -164,8 +165,8 @@ class _InForPoints extends State<InForPoints> {
alignment: Alignment.center, alignment: Alignment.center,
child: Image.asset( child: Image.asset(
"assets/image/icon_gold_blessing.png", "assets/image/icon_gold_blessing.png",
width: 59.w, width: 59,
height: 59.h, height: 59,
), ),
), ),
], ],
@ -200,10 +201,10 @@ class _InForPoints extends State<InForPoints> {
), ),
Container( Container(
alignment: Alignment.center, alignment: Alignment.center,
child: Image.asset( child: SvgPicture.asset(
"assets/image/icon_gold_coin.png", "assets/svg/qiandao.svg",
width: 30.w, width: 30,
height: 30.h, height: 30,
), ),
), ),
Container( Container(

8
lib/integral/intergra_view/integral_task.dart

@ -106,20 +106,20 @@ class _IntegralTask extends State<IntegralTask> {
taskImg(String taskType) { taskImg(String taskType) {
switch (taskType) { switch (taskType) {
case "bill_type_point_login": case "bill_type_point_order":
return "assets/image/icon_integral_login.png"; return "assets/image/icon_integral_login.png";
break; break;
case "bill_type_point_share": case "bill_type_point_share":
return "assets/image/icon_integral_share.png"; return "assets/image/icon_integral_share.png";
break; break;
case "bill_type_point_order": case "bill_type_point_login":
return "assets/image/icon_integral_order.png"; return "assets/image/icon_integral_order.png";
break; break;
case "bill_type_point_signin": case "bill_type_point_signin":
return "assets/image/icon_integral_sign.png"; return "assets/image/icon_integral_sign.png";
break; break;
} }
return "assets/image/icon_integral_share.png"; return "assets/image/icon_integral_login.png";
} }
Widget taskItem(Task task) { Widget taskItem(Task task) {
@ -202,7 +202,7 @@ class _IntegralTask extends State<IntegralTask> {
), ),
) )
: RoundButton( : RoundButton(
text: "x10", text: "x${double.tryParse(task.rewardValue).toInt()}",
textColor: textColor:
task.limitDay == (task.complateNum ?? task.conplateNum) task.limitDay == (task.complateNum ?? task.conplateNum)
? Color(0xFF808080) ? Color(0xFF808080)

5
lib/integral/intergra_view/integral_vip.dart

@ -1,4 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/sign_info.dart'; import 'package:huixiang/retrofit/data/sign_info.dart';
import 'package:huixiang/retrofit/data/user_info.dart'; import 'package:huixiang/retrofit/data/user_info.dart';
@ -76,8 +77,8 @@ class _IntegralVip extends State<IntegralVip> {
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Image.asset( SvgPicture.asset(
"assets/image/icon_gold_coin.png", "assets/svg/qiandao.svg",
width: 20, width: 20,
height: 20, height: 20,
), ),

27
lib/integral_store/integral_store_details_page.dart

@ -117,29 +117,30 @@ class _IntegralStoreDetailsPage extends State<IntegralStoreDetailsPage> {
), ),
GestureDetector( GestureDetector(
onTap: () { onTap: () {
if(payType > 0){ // if(payType > 0){
toExchangeOrder(); // toExchangeOrder();
}else{ // }else{
SmartDialog.showToast("您的积分不足!", alignment: Alignment.center); // SmartDialog.showToast("您的积分不足!", alignment: Alignment.center);
return; // return;
} // }
}, },
child: Container( child: Container(
padding: EdgeInsets.only(top: 16.h, bottom: 16.h), padding: EdgeInsets.only(top: 16.h, bottom: 16.h),
decoration: BoxDecoration( decoration: BoxDecoration(
color: (payType > 0) color: Color(0xFFD8D8D8),
? Color(0xFF32A060) // (payType > 0)
: Color(0xFFD8D8D8), // ? Color(0xFF32A060)
// : Color(0xFFD8D8D8),
borderRadius: BorderRadius.vertical( borderRadius: BorderRadius.vertical(
top: Radius.circular(4), top: Radius.circular(4),
), ),
), ),
alignment: Alignment.center, alignment: Alignment.center,
child: Text( child: Text(
(payType > 0) // (payType > 0)
? S.of(context).duihuan // ? S.of(context).duihuan
: S.of(context).jifenbuzu, // : S.of(context).jifenbuzu,
// "兑换功能暂未开放", "兑换功能暂未开放",
style: TextStyle( style: TextStyle(
fontSize: 16.sp, fontSize: 16.sp,
color: Color(0xFFFFFFFF), color: Color(0xFFFFFFFF),

8
lib/retrofit/retrofit_api.dart

@ -53,11 +53,11 @@ import 'data/wx_pay.dart';
part 'retrofit_api.g.dart'; part 'retrofit_api.g.dart';
// const base_url = "https://pos.platform.lotus-wallet.com/app/"; /// const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///
// const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; /// const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///
const base_url = "http://192.168.10.236:8766/app/"; /// // const base_url = "http://192.168.10.236:8766/app/"; ///
const baseUrl = "http://192.168.10.236:8766/app/"; /// // const baseUrl = "http://192.168.10.236:8766/app/"; ///
// const base_url = "http://192.168.10.37:8766/app/"; // const base_url = "http://192.168.10.37:8766/app/";
// const baseUrl = "http://192.168.10.37:8766/app/"; // const baseUrl = "http://192.168.10.37:8766/app/";

2
lib/retrofit/retrofit_api.g.dart

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

Loading…
Cancel
Save