Browse Source

[fix]修复了一些bug

Destiny 1 year ago
parent
commit
4e0dc75b95

+ 1 - 1
lib/module/store/controller.dart

@@ -36,7 +36,7 @@ class StoreController extends BaseController implements PaymentStatusCallback {
 
   final Rxn<PaymentWay> currentSelectedPaymentWay = Rxn<PaymentWay>();
 
-  final RxBool isPaymentWayExpanded = false.obs;
+  final RxBool isPaymentWayExpanded = true.obs;
 
   final Rxn<UserInfoResponse> _userInfo = accountRepository.userInfo;
 

+ 31 - 12
lib/module/store/view.dart

@@ -261,20 +261,38 @@ class StorePage extends BasePage<StoreController> {
                 decorationColor: "#AFAFAF".color)),
         Container(
           padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 2.w),
-          decoration: BoxDecoration(
-            gradient: LinearGradient(
-              colors: ['#9075FF'.color, '#4366FF'.color],
-              begin: Alignment.topCenter,
-              end: Alignment.bottomCenter,
-              stops: const [0.0, 1.0],
-            ),
-            borderRadius: BorderRadius.circular(12.w),
-          ),
-          child: Text("${storeItem.authValue}电量",
-              style: TextStyle(
+          decoration: isSelect
+              ? BoxDecoration(
+                  gradient: LinearGradient(
+                    colors: ['#9075FF'.color, '#4366FF'.color],
+                    begin: Alignment.topCenter,
+                    end: Alignment.bottomCenter,
+                    stops: const [0.0, 1.0],
+                  ),
+                  borderRadius: BorderRadius.circular(12.w),
+                )
+              : BoxDecoration(
+                  color: "#7688B1".toColor(),
+                  borderRadius: BorderRadius.circular(12.w),
+                ),
+          child: Row(
+            mainAxisSize: MainAxisSize.min,
+            children: [
+              SizedBox(
+                width: 16.w,
+                height: 16.w,
+                child: Assets.images.iconStoreGoodFlash.image(),
+              ),
+              Text(
+                "${storeItem.authValue}电量",
+                style: TextStyle(
                   color: Colors.white,
                   fontSize: 13.sp,
-                  fontWeight: FontWeight.bold)),
+                  fontWeight: FontWeight.bold,
+                ),
+              ),
+            ],
+          ),
         ),
       ],
     );
@@ -284,6 +302,7 @@ class StorePage extends BasePage<StoreController> {
     return Container(
       margin: EdgeInsets.only(top: 10.w),
       child: ExpansionTile(
+        initiallyExpanded: true,
         onExpansionChanged: (value) {
           controller.isPaymentWayExpanded.value = value;
         },

+ 5 - 0
lib/module/talk/controller.dart

@@ -397,6 +397,11 @@ class TalkController extends BaseController {
   }
 
   void onEditModelClick() {
+    if (!accountRepository.isLogin.value) {
+      LoginPage.start(fromType: LoginFromType.talkDetail);
+      return;
+    }
+
     _isEditModel.value = true;
     if (_audioPlayer.playing) {
       _audioPlayer.pause();

+ 4 - 5
lib/module/talk/view.dart

@@ -370,10 +370,9 @@ class TalkPage extends BasePage<TalkController> {
         ],
       ),
       margin: EdgeInsets.symmetric(horizontal: 12.w),
-      padding: EdgeInsets.symmetric(vertical: 6.w),
+      padding: EdgeInsets.symmetric(vertical: 6.w, horizontal: 9.w),
       child: Row(
         children: [
-          SizedBox(width: 9.w),
           GestureDetector(
             onTap: () {
               controller.clickPlayAudio();
@@ -389,9 +388,9 @@ class TalkPage extends BasePage<TalkController> {
           ),
           SizedBox(width: 15.w),
           Builder(builder: (context) {
-            return SizedBox(
-              width: 226.w,
-              height: 18.w,
+            return Flexible(
+              // width: 226.w,
+              // height: 18.w,
               child: Obx(() {
                 return SliderTheme(
                   data: SliderTheme.of(context).copyWith(

+ 2 - 2
pubspec.yaml

@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
 # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
 # In Windows, build-name is used as the major, minor, and patch parts
 # of the product and file versions while build-number is used as the build suffix.
-version: 1.0.1+5
+version: 1.0.1+8
 
 
 environment:
@@ -189,4 +189,4 @@ flutter:
 wechat_kit:
   ios: no_pay # 默认 pay
   app_id: wxff40112d61011372
-  universal_link:
+  universal_link: https://flutter.dev