提交 ca1f1348 authored 作者: yueweilu's avatar yueweilu

Merge remote-tracking branch 'origin/test' into test

...@@ -21,7 +21,7 @@ class LibraryController extends GetxController with GetTickerProviderStateMixin{ ...@@ -21,7 +21,7 @@ class LibraryController extends GetxController with GetTickerProviderStateMixin{
late FilterModel selectedDown = FilterModel(); late FilterModel selectedDown = FilterModel();
late TabController tabController = TabController(length:categories.length, vsync: this); // late TabController tabController = TabController(length:categories.length, vsync: this);
final EasyRefreshController refreshController = EasyRefreshController( final EasyRefreshController refreshController = EasyRefreshController(
controlFinishLoad: true, controlFinishLoad: true,
...@@ -110,7 +110,7 @@ class LibraryController extends GetxController with GetTickerProviderStateMixin{ ...@@ -110,7 +110,7 @@ class LibraryController extends GetxController with GetTickerProviderStateMixin{
@override @override
void onClose() { void onClose() {
tabController.dispose(); // tabController.dispose();
refreshController.dispose(); refreshController.dispose();
super.onClose(); super.onClose();
} }
...@@ -147,10 +147,10 @@ class LibraryController extends GetxController with GetTickerProviderStateMixin{ ...@@ -147,10 +147,10 @@ class LibraryController extends GetxController with GetTickerProviderStateMixin{
/// 确定 /// 确定
void sureFilter(){ void sureFilter(){
WidgetsBinding.instance!.addPostFrameCallback((_) { // WidgetsBinding.instance!.addPostFrameCallback((_) {
tabController.animateTo(3); // 你想要的标签索引 // tabController.animateTo(3); // 你想要的标签索引
}); // });
update(); // update();
for(FilterModel model in filterCategories){ for(FilterModel model in filterCategories){
if (model.selected){ if (model.selected){
selectedCategory = model; selectedCategory = model;
...@@ -206,8 +206,8 @@ class LibraryController extends GetxController with GetTickerProviderStateMixin{ ...@@ -206,8 +206,8 @@ class LibraryController extends GetxController with GetTickerProviderStateMixin{
void _getTabs() async { void _getTabs() async {
categories = await LibraryAPI.categories(); categories = await LibraryAPI.categories();
tabController.dispose(); // tabController.dispose();
tabController = TabController(length:categories.length, vsync: this); // tabController = TabController(length:categories.length, vsync: this);
filterCategories = categories.map((model) { filterCategories = categories.map((model) {
return FilterModel(id: model.categoryId.toString(), name: model.name??'',selected: model.selected); return FilterModel(id: model.categoryId.toString(), name: model.name??'',selected: model.selected);
......
...@@ -175,63 +175,63 @@ class _LibraryPageState extends State<LibraryPage> { ...@@ -175,63 +175,63 @@ class _LibraryPageState extends State<LibraryPage> {
} }
PreferredSizeWidget _buildTab(LibraryController controller){ // PreferredSizeWidget _buildTab(LibraryController controller){
return PreferredSize( // return PreferredSize(
preferredSize: Size.fromHeight(48.w), // preferredSize: Size.fromHeight(48.w),
child: Container( // child: Container(
color: Colors.white, // color: Colors.white,
child: Row( // child: Row(
children: [ // children: [
// TabBar放在左侧 // // TabBar放在左侧
Expanded( // Expanded(
child: TabBar( // child: TabBar(
indicator: BoxDecoration( // indicator: BoxDecoration(
border: const Border(bottom: BorderSide(color: Colors.transparent, width: 0.0)), // 将指示器的底边框颜色设置为透明 // border: const Border(bottom: BorderSide(color: Colors.transparent, width: 0.0)), // 将指示器的底边框颜色设置为透明
color: const Color(0xFFC02D55).withOpacity(0.08) // color: const Color(0xFFC02D55).withOpacity(0.08)
), // ),
labelStyle: TextStyle(color: AppTheme.primary,fontSize: 14.w,height: 1.5,fontWeight: Fonts.medium), // labelStyle: TextStyle(color: AppTheme.primary,fontSize: 14.w,height: 1.5,fontWeight: Fonts.medium),
unselectedLabelColor: Colours.c9, // unselectedLabelColor: Colours.c9,
unselectedLabelStyle: TextStyle(color: Colours.c9,fontSize: 14.w,height: 1.5), // unselectedLabelStyle: TextStyle(color: Colours.c9,fontSize: 14.w,height: 1.5),
controller: controller.tabController, // controller: controller.tabController,
isScrollable: true, // isScrollable: true,
tabs: controller.filterCategories.map((model){ // tabs: controller.filterCategories.map((model){
return Tab(text: model.name); // return Tab(text: model.name);
}).toList(), // }).toList(),
), // ),
), // ),
// 筛选按钮放在右侧 // // 筛选按钮放在右侧
GestureDetector( // GestureDetector(
onTap: (){ // onTap: (){
controller.setShow(controller.show); // controller.setShow(controller.show);
}, // },
child: Container( // child: Container(
padding: EdgeInsets.symmetric(horizontal: 10.w), // padding: EdgeInsets.symmetric(horizontal: 10.w),
alignment: Alignment.center, // alignment: Alignment.center,
height: 38.w, // height: 38.w,
child: Row( // child: Row(
mainAxisAlignment: MainAxisAlignment.center, // mainAxisAlignment: MainAxisAlignment.center,
children: [ // children: [
Container( // Container(
width: 12.w, // width: 12.w,
height: 12.w, // height: 12.w,
// color: Colors.red, // // color: Colors.red,
alignment: Alignment.center, // alignment: Alignment.center,
child: Image.asset( // child: Image.asset(
'assets/images/filter.png', // 'assets/images/filter.png',
), // ),
), // ),
Gaps.hGaps5, // Gaps.hGaps5,
Text('筛选',style: TextStyle(color: Colours.c9,fontSize: 14.w,height: 1.5),) // Text('筛选',style: TextStyle(color: Colours.c9,fontSize: 14.w,height: 1.5),)
], // ],
), // ),
// width: 75, // // width: 75,
), // ),
) // )
], // ],
), // ),
), // ),
); // );
} // }
// @override // @override
// bool get wantKeepAlive => true; // bool get wantKeepAlive => true;
} }
...@@ -3,8 +3,8 @@ part of utils; ...@@ -3,8 +3,8 @@ part of utils;
// 服务器地址 // 服务器地址
// const String kServerUrl = 'http://192.168.11.88:81'; // const String kServerUrl = 'http://192.168.11.88:81';
// const String kServerUrl = 'http://8.141.148.247:7421'; // const String kServerUrl = 'http://8.141.148.247:7421';
const String kServerUrl = 'http://1507.superge.cn:81'; const String kServerUrl = 'https://ebook-app.ezijing.com';
const String kHtmlBaseServer = 'http://150.158.138.40:9200'; // const String kServerUrl = 'http://1507.superge.cn:81';
const String kLocalToken = 'local_token'; const String kLocalToken = 'local_token';
const String kLocalAccessToken = 'local_access_token'; const String kLocalAccessToken = 'local_access_token';
const String kLocalAccount = 'local_account'; const String kLocalAccount = 'local_account';
...@@ -19,19 +19,21 @@ const String kUserPriAgreement = '/html/agreement/pri_agreement.html'; ...@@ -19,19 +19,21 @@ const String kUserPriAgreement = '/html/agreement/pri_agreement.html';
const String kUserRechargeAgreement = '/html/agreement/rec_agreement.html'; const String kUserRechargeAgreement = '/html/agreement/rec_agreement.html';
// 错题详情页 html // 错题详情页 html
const String kUserWrongDes = '$kHtmlBaseServer/evaluating_wrong.html'; const String kUserWrongDes = '$kServerUrl/html/app/evaluating_wrong.html';
// 阅读页 html // 阅读页 html
String kReadTestUnderLineBook = '$kHtmlBaseServer/read_unline.html?t=${DateTime.now().millisecondsSinceEpoch}'; String kReadTestUnderLineBook = '$kHtmlBaseServer/read_unline.html?t=${DateTime.now().millisecondsSinceEpoch}';
const String kReadBook = '$kHtmlBaseServer/read.html'; const String kReadBook = '$kHtmlBaseServer/read.html';
// 答题页 // 答题页
const String kAnswer = '$kHtmlBaseServer/evaluating.html'; const String kAnswer = '$kServerUrl/html/app/evaluating.html';
// 答题结果页 // 答题结果页
const String kAnswerResult = '$kHtmlBaseServer/evaluating_result.html'; const String kAnswerResult = '$kServerUrl/html/app/evaluating_result.html';
// 画廊 扩展阅读 // 画廊 扩展阅读
const String kReadInfo = '$kHtmlBaseServer/read_info.html'; const String kReadInfo = '$kServerUrl/html/app/read_info.html';
// 阅读页 图片预览 // 阅读页 图片预览
const String kScaleImage = '$kHtmlBaseServer/read_img.html'; const String kScaleImage = '$kServerUrl/html/app/read_img.html';
abstract class C { abstract class C {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论