更新
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import 'package:ef/ef.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_pdfview/flutter_pdfview.dart';
|
||||
import 'package:vbvs_app/common/color/appConstants.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/controller/setting/pdf/PrivacyPdfController.dart';
|
||||
@@ -19,14 +20,16 @@ class _PrivacySchemePageState extends State<PrivacySchemePage> {
|
||||
void initState() {
|
||||
super.initState();
|
||||
String language = "zh_CN"; // 默认语言
|
||||
|
||||
int ent_type = AppConstants().ent_type;
|
||||
if (languageController.selectLanguage?.value?.language_code != null) {
|
||||
language = languageController.selectLanguage!.value!.language_code!;
|
||||
}
|
||||
} // 根据 ent_type 拼接不同的文件名
|
||||
String pdfName =
|
||||
ent_type == 1 ? "$language.pdf" : "${language}_$ent_type.pdf";
|
||||
|
||||
pdfController.loadPdf(
|
||||
2,
|
||||
"https://vsbst-api.he-info.cn/vsbs_sotrage/privacy-scheme/$language.pdf",
|
||||
"https://vsbst-api.he-info.cn/vsbs_sotrage/privacy-scheme/$pdfName",
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user