ソースを参照

[new]优化谈话详情付费引导

zk 1 年間 前
コミット
374c14f9cb

+ 1 - 1
assets/string/base/string.xml

@@ -58,7 +58,7 @@
     <string name="talk_electric_low">电量不足无法分析谈话</string>
     <string name="talk_go_store">去充电</string>
     <string name="talk_analyse_fail">分析失败</string>
-    <string name="talk_analyse_low_toast">小听电量太低,不足以分析这段谈话</string>
+    <string name="talk_analyse_low_toast">小听电量不足以分析转写,快给我充电叭</string>
     <string name="talk_analyse_summary_fail">谈话分析失败,点击去</string>
     <string name="talk_analyse_fail_feedback">反馈问题</string>
     <string name="talk_todo_title">待办事项</string>

+ 1 - 9
lib/module/talk/controller.dart

@@ -68,8 +68,6 @@ class TalkController extends BaseController {
   StreamSubscription? _talkUploadListener;
   final RxDouble uploadProgress = RxDouble(0);
 
-  final isShowElectricLow = false.obs;
-
   bool isAudioLoading = false;
 
   final double sliderMax = 1;
@@ -547,8 +545,8 @@ class TalkController extends BaseController {
         //检查网络以及文件大小
         _checkFileSizeAndNet();
       } else {
+        StorePage.start(fromType: StoreFromType.analyse);
         ToastUtil.showToast(StringName.talkAnalyseLowToast.tr);
-        isShowElectricLow.value = true;
       }
     }).catchError((error) {
       ErrorHandler.toastError(error);
@@ -609,12 +607,6 @@ class TalkController extends BaseController {
     }
   }
 
-  void onGoElectricStore() {
-    StorePage.start(fromType: StoreFromType.analyse);
-    Future.delayed(const Duration(milliseconds: 250), () {
-      isShowElectricLow.value = false;
-    });
-  }
 
   void onEditModelClick() async {
     if (!await checkLogin()) {

+ 1 - 52
lib/module/talk/view.dart

@@ -350,11 +350,7 @@ class TalkPage extends BasePage<TalkController> {
     return Obx(() {
       if (controller.talkBean.value?.status.value == TalkStatus.notAnalysis &&
           controller.isUploading.value != true) {
-        if (controller.isShowElectricLow.value) {
-          return buildElectricLowView();
-        } else {
-          return buildNotAnalysisView();
-        }
+        return buildNotAnalysisView();
       } else {
         return buildTabContentView();
       }
@@ -414,53 +410,6 @@ class TalkPage extends BasePage<TalkController> {
     );
   }
 
-  Widget buildElectricLowView() {
-    return GestureDetector(
-      onTap: () {
-        controller.onGoElectricStore();
-      },
-      child: Container(
-        color: const Color(0xFFDFE4FC),
-        padding:
-            EdgeInsets.only(left: 16.w, right: 12.w, top: 8.h, bottom: 8.h),
-        child: Row(
-          children: [
-            SizedBox(
-                width: 46.w,
-                height: 56.w,
-                child: Assets.images.iconTalkElectricLow.image()),
-            SizedBox(width: 10.w),
-            IntrinsicHeight(
-              child: Column(
-                crossAxisAlignment: CrossAxisAlignment.start,
-                children: [
-                  SizedBox(
-                      width: 90.w,
-                      height: 21.w,
-                      child: Assets.images.iconTalkElectricLowTxt.image()),
-                  SizedBox(width: 1.w),
-                  Text(StringName.talkElectricLow.tr,
-                      style: TextStyle(
-                          fontSize: 12.sp,
-                          color: ColorName.secondaryTextColor)),
-                ],
-              ),
-            ),
-            const Spacer(),
-            Container(
-                decoration: getPrimaryBtnDecoration(8),
-                width: 100.w,
-                height: 36.w,
-                child: Center(
-                  child: Text(StringName.talkGoStore.tr,
-                      style:
-                          TextStyle(fontSize: 16.sp, color: ColorName.white)),
-                ))
-          ],
-        ),
-      ),
-    );
-  }
 
   Widget buildBottomView() {
     return Obx(() {