|
|
@@ -6,6 +6,9 @@ import 'package:injectable/injectable.dart';
|
|
|
import 'package:keyboard/base/base_controller.dart';
|
|
|
import 'package:keyboard/data/api/request/intimacy_analyze_request.dart';
|
|
|
import 'package:keyboard/data/bean/upload_info.dart';
|
|
|
+import 'package:keyboard/data/repository/account_repository.dart';
|
|
|
+import 'package:keyboard/resource/string.gen.dart';
|
|
|
+import 'package:keyboard/utils/toast_util.dart';
|
|
|
import 'package:keyboard/utils/upload/upload_scene_type.dart';
|
|
|
import 'package:wechat_assets_picker/wechat_assets_picker.dart';
|
|
|
import '../../../data/api/response/intimacy_analyze_config_response.dart';
|
|
|
@@ -21,6 +24,7 @@ import '../../../utils/image_picker_util.dart';
|
|
|
import '../../../utils/intimacy_analyze_config_helper.dart';
|
|
|
import '../../../utils/upload/upload_file_manager.dart';
|
|
|
import '../../profile/profile_page.dart';
|
|
|
+import '../../store/store_page.dart';
|
|
|
|
|
|
/// 亲密度分析上传页Controller
|
|
|
@injectable
|
|
|
@@ -30,6 +34,9 @@ class IntimacyAnalyseUploadController extends BaseController {
|
|
|
/// 上传场景
|
|
|
final UploadSceneType uploadSceneType = UploadSceneType.intimacyAnalyse;
|
|
|
|
|
|
+ /// 用户信息
|
|
|
+ final AccountRepository accountRepository;
|
|
|
+
|
|
|
/// 亲密度分析Repository
|
|
|
IntimacyAnalyzeRepository intimacyAnalyzeRepository;
|
|
|
|
|
|
@@ -99,6 +106,7 @@ class IntimacyAnalyseUploadController extends BaseController {
|
|
|
this.intimacyAnalyzeRepository,
|
|
|
this.intimacyAnalyzeConfigHelper,
|
|
|
this.uploadFileManager,
|
|
|
+ this.accountRepository,
|
|
|
);
|
|
|
|
|
|
@override
|
|
|
@@ -275,7 +283,13 @@ class IntimacyAnalyseUploadController extends BaseController {
|
|
|
|
|
|
/// 点击了下一步按钮
|
|
|
void clickNextBtn() async {
|
|
|
- // TODO hezihao,需要判断是否解锁,未解锁弹出购买弹窗,目前先直接让通过
|
|
|
+ // 非Vip,跳转到商店页
|
|
|
+ bool isVip = accountRepository.memberStatusInfo.value?.isMember ?? false;
|
|
|
+ if (!isVip) {
|
|
|
+ ToastUtil.show(StringName.needVipTip);
|
|
|
+ StorePage.start();
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
// 上传的图片后端地址
|
|
|
List<String> imageList =
|