浏览代码

Revert "完善中医支付体系"

This reverts commit 1dabac5711878d5012077a3797f0a5712d52c66c.
carlos 1 年之前
父节点
当前提交
718d2db311

+ 1 - 1
app/android/app/src/main/kotlin/com/yak/app/tcm/NativeTCMApiImpl.kt

@@ -68,7 +68,7 @@ class NativeTCMApiImpl(private val context: Context, private val flutterEngine:
 
     override fun isPay(): Boolean {
         Log.d(TAG, "tcm isPay")
-        return LibSktcm.isPay()
+        return LibSktcm.isPay
     }
 
     override fun startPayActivity() {

+ 2 - 8
app/lib/module/health/health_controller.dart

@@ -39,7 +39,7 @@ import 'models/health_model.dart';
 
 class HealthController extends GetxController with WatchRequestOption {
   final api = HealthApi();
-  var unlock = false.obs; //true 解锁中医诊脉 false 未解锁
+  var unlock = true.obs; //true 解锁中医诊脉 false 未解锁
   var tcmLogin = false; //中医登录
   StreamSubscription? _streamSubscription;
   final HostTCMApi hostTCMApi = HostTCMApi();
@@ -119,11 +119,7 @@ class HealthController extends GetxController with WatchRequestOption {
     var userId = GlobalConfig.prefs.getString(PreferenceConst.USER_ID) ?? '';
     mac = GlobalConfig.prefs.getString(PreferenceConst.PRE_DEVICE_MAC) ?? '';
 
-    if (token.isEmpty ||
-        userId.isEmpty ||
-        mac.isEmpty ||
-        !connectCore.deviceConnected.value) {
-      debugPrint('*** didnot connected, return ***');
+    if (token.isEmpty || userId.isEmpty || mac.isEmpty || !connectCore.deviceConnected.value) {
       return;
     }
     var sex = '男';
@@ -144,8 +140,6 @@ class HealthController extends GetxController with WatchRequestOption {
         userId, mac, sex, birthday, height, weight, token);
     tcmLogin = await hostTCMApi.login();
     if (tcmLogin) {
-      bool isPay = await hostTCMApi.isPay();
-      unlock.value = isPay;
       var tcmLevels = await hostTCMApi.getRecentReport();
       if (tcmLevels == null ||
           tcmLevels.healthPoints == null ||