KerwinZheng 5 年之前
父節點
當前提交
dd038ad43a
共有 7 個檔案被更改,包括 37 行新增22 行删除
  1. +1
    -1
      i18n/vi-VN.json
  2. +1
    -1
      lib/chat/company_server_view.dart
  3. +12
    -8
      lib/chat/download_item.dart
  4. +1
    -1
      lib/chat/input_bar.dart
  5. +1
    -1
      lib/home/AddProgram.dart
  6. +1
    -1
      lib/home/InformUser.dart
  7. +20
    -9
      lib/home/ProfilePage.dart

+ 1
- 1
i18n/vi-VN.json 查看文件

@@ -723,7 +723,7 @@
"she_liar": "Em ấy là một kẻ lừa đảo",
"he_liar": "Anh ấy là một kẻ lừa đảo",
"provide_screenshots": "Xin cung cấp ảnh chụp màn hình liên quan để chúng tôi theo dõi xác thực",
"describe_details": "Vui lòng mô tả chi tiết (trong vòng 100 từ)",
"describe_details": "Vui lòng mô tả chi tiết(trong vòng 100 ký tự)",
"report_reason": "Vui lòng chọn lý do báo cáo",
"report_success2": "Báo cáo thành công",
"successfully_modified": "Đã sửa đổi thành công",


+ 1
- 1
lib/chat/company_server_view.dart 查看文件

@@ -169,7 +169,7 @@ class _CompanyServerPageState extends State<CompanyServerPage> {
for (var i = 0; i < resultList.length; i++) {
Asset photoEntity = resultList[i];
ByteData byteData = await photoEntity.getByteData();
File file = await FileCacheMgr().writeFile('temp-photo-${DateTime.now().millisecondsSinceEpoch}-${photoEntity.name}', byteData.buffer.asInt8List(0));
File file = await FileCacheMgr().writeFile('temp-photo-${DateTime.now().millisecondsSinceEpoch}.png', byteData.buffer.asInt8List(0));
_sendPhotoFile(file);
}
}


+ 12
- 8
lib/chat/download_item.dart 查看文件

@@ -13,13 +13,14 @@ class DownloadItem extends StatefulWidget {
final bool isAutoDown;
final Function onComplete;
final Function onFinishTap;
DownloadItem(
{this.msg,
this.child,
this.isShowProgress = true,
this.isAutoDown = true,
this.onComplete,
this.onFinishTap});
DownloadItem({
this.msg,
this.child,
this.isShowProgress = true,
this.isAutoDown = true,
this.onComplete,
this.onFinishTap,
});
@override
_DownloadItemState createState() => _DownloadItemState();
}
@@ -134,7 +135,10 @@ class _DownloadItemState extends State<DownloadItem> {
onTap: isNeedDown ? downloadRes : widget.onFinishTap,
child: Stack(
alignment: Alignment.center,
children: <Widget>[widget.child, _downloadWidget()],
children: <Widget>[
widget.child,
_downloadWidget(),
],
));
}
}

+ 1
- 1
lib/chat/input_bar.dart 查看文件

@@ -771,7 +771,7 @@ class InputBarState extends State<InputBar>
Asset photoEntity = resultList[i];
ByteData byteData = await photoEntity.getByteData();
File file = await FileCacheMgr().writeFile(
'temp-photo-${DateTime.now().millisecondsSinceEpoch}-${photoEntity.name}',
'temp-photo-${DateTime.now().millisecondsSinceEpoch}.png',
byteData.buffer.asInt8List(0));
_sendPhotoFile(file);
}


+ 1
- 1
lib/home/AddProgram.dart 查看文件

@@ -732,7 +732,7 @@ class _AddProgramState extends State<AddProgram> {
Asset photoEntity = resultList[i];
print('名字:${photoEntity.name}');
ByteData byteData = await photoEntity.getByteData();
File file = await FileCacheMgr().writeFile('temp-photo-${DateTime.now().millisecondsSinceEpoch}-${photoEntity.name}', byteData.buffer.asInt8List(0));
File file = await FileCacheMgr().writeFile('temp-photo-${DateTime.now().millisecondsSinceEpoch}.png', byteData.buffer.asInt8List(0));
fileList.add(file);
}


+ 1
- 1
lib/home/InformUser.dart 查看文件

@@ -201,7 +201,7 @@ class _InformUserPageState extends State<InformUserPage> {
for (var i = 0; i < resultList.length; i++) {
Asset photoEntity = resultList[i];
ByteData byteData = await photoEntity.getByteData();
File file = await FileCacheMgr().writeFile('temp-photo-${DateTime.now().millisecondsSinceEpoch}-${photoEntity.name}', byteData.buffer.asInt8List(0));
File file = await FileCacheMgr().writeFile('temp-photo-${DateTime.now().millisecondsSinceEpoch}.png', byteData.buffer.asInt8List(0));
fileList.add(file);
}
Map data = {"type": 3, "userId": UserData().basicInfo.userId};


+ 20
- 9
lib/home/ProfilePage.dart 查看文件

@@ -434,8 +434,10 @@ class _ProfilePageState extends State<ProfilePage>
// }
int leftLength = MaxImgSize - imgList.length;
if(leftLength <=0){
showToast(I18n.of(context).max_upload_size.replaceFirst('/s1', MaxImgSize.toString()));
if (leftLength <= 0) {
showToast(I18n.of(context)
.max_upload_size
.replaceFirst('/s1', MaxImgSize.toString()));
return;
}
List<Asset> resultList = List<Asset>();
@@ -461,7 +463,7 @@ class _ProfilePageState extends State<ProfilePage>
print('名字:${photoEntity.name}');
ByteData byteData = await photoEntity.getByteData();
File file = await FileCacheMgr().writeFile(
'temp-photo-${DateTime.now().millisecondsSinceEpoch}-${photoEntity.name}',
'temp-photo-${DateTime.now().millisecondsSinceEpoch}.png',
byteData.buffer.asInt8List(0));
fileList.add(file);
@@ -483,8 +485,8 @@ class _ProfilePageState extends State<ProfilePage>
showToast(I18n.of(context).hava_error_photo);
}
MessageMgr().emit('refresh_photo');
}else{
showToast(resData['msg']);
} else {
showToast(resData['msg']);
}
}
@@ -1382,8 +1384,8 @@ class _ProfilePageState extends State<ProfilePage>
return;
}
var moneyList = [];
for(int i = 0 ; i< imgList.length;i++){
if(imgList[i]['Status'] == 1){
for (int i = 0; i < imgList.length; i++) {
if (imgList[i]['Status'] == 1) {
moneyList.add(imgList[i]);
}
}
@@ -1869,6 +1871,15 @@ class _ProfilePageState extends State<ProfilePage>
}
}
clickChatAccout() {
if (widget.fromWhere != null && widget.fromWhere == 0) {
///如果是聊天界面跳转过来的,直接返回
Navigator.of(context).pop();
} else {
testChatPermission(() {});
}
}
buyPhoto() {
//女性用户付费,男性用户会员的话免费解锁,非会员付费解锁
becomeVip() {
@@ -1983,12 +1994,12 @@ class _ProfilePageState extends State<ProfilePage>
_bottomBorderBox(I18n.of(context).expect_lover, lovePeople, true, () {}),
(userInfo.wechat != null && userInfo.wechat != '')
? _bottomBorderBox(
I18n.of(context).wechat_number, wechat, true, buyChatAccount,
I18n.of(context).wechat_number, wechat, true, clickChatAccout,
showIcon: !isAuthority)
: Container(),
(userInfo.facebook != null && userInfo.facebook != '')
? _bottomBorderBox(
I18n.of(context).facebook, facebook, true, buyChatAccount,
I18n.of(context).facebook, facebook, true, clickChatAccout,
showIcon: !isAuthority)
: Container(),
userInfo.ownMsg != null && userInfo.ownMsg != ''


正在載入中…
取消
儲存