master
jack ning 3 years ago
parent 8414606bfa
commit 6771eb9950

BIN
.DS_Store vendored

Binary file not shown.

@ -46,7 +46,7 @@ dependencies:
# 请在ios/Podfile中添加use_frameworks!
vibration: ^1.7.3
# 在线客服 https://pub.dev/packages/bytedesk_kefu
bytedesk_kefu: ^1.3.0
bytedesk_kefu: ^1.3.1
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.

@ -1,5 +1,13 @@
# Upgrade Log
## 1.3.1
* optimize user experience
## 1.3.0
* optimize user experience
## 1.2.9
* optimize user experience

@ -1,7 +1,7 @@
arguments=
auto.sync=false
build.scans.enabled=false
connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(7.1.1))
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
connection.project.dir=
eclipse.preferences.version=1
gradle.user.home=

@ -387,11 +387,18 @@ class BytedeskUserHttpApi extends BytedeskBaseHttpApi {
}
//
Future<User> updateProfile(String? nickname, String? avatar, String? description) async {
Future<User> updateProfile(
String? nickname, String? avatar, String? description) async {
//
var body = json.encode({"nickname": nickname, "avatar": avatar, "description": description, "client": client});
var body = json.encode({
"nickname": nickname,
"avatar": avatar,
"description": description,
"client": client
});
//
final initUrl = Uri.http(BytedeskConstants.host, '/api/user/update/visitor/profile');
final initUrl =
Uri.http(BytedeskConstants.host, '/api/user/update/visitor/profile');
final initResponse =
await this.httpClient.post(initUrl, headers: getHeaders(), body: body);
//json
@ -630,15 +637,19 @@ class BytedeskUserHttpApi extends BytedeskBaseHttpApi {
//string json
final responseJson =
json.decode(utf8decoder.convert(initResponse.bodyBytes));
print("responseJson $responseJson");
print("checkAppVersion:");
print(responseJson);
// token
if (responseJson.toString().contains('invalid_token')) {
bytedeskEventBus.fire(InvalidTokenEventBus());
}
// TODO: status_code
//
int statusCode = responseJson['status_code'];
if (statusCode == 200) {
return App.fromJson(responseJson['data']);
}
return App(version: "0");
}
// token
Future<String> getAliyunOneKeyLoginMobile(String? token) async {
@ -820,5 +831,4 @@ class BytedeskUserHttpApi extends BytedeskBaseHttpApi {
print(responseJson);
BytedeskUtils.clearUserCache();
}
}

@ -711,7 +711,8 @@ class _ChatKFPageState extends State<ChatKFPage>
//
String? timestamp = BytedeskUtils.formatedDateNow();
String? client = BytedeskUtils.getClient();
String? type = BytedeskConstants.MESSAGE_TYPE_ROBOT_RESULT;
// String? type = BytedeskConstants.MESSAGE_TYPE_ROBOT_RESULT;
String? type = BytedeskConstants.MESSAGE_TYPE_ROBOT;
//
// R
Message message = new Message();

@ -569,7 +569,8 @@ class MessageWidget extends StatelessWidget {
),
),
Visibility(
visible: message.categories != null && message.categories!.length > 0,
visible:
message.categories != null && message.categories!.length > 0,
// visible: false,
child: Container(
// color: Colors.black,
@ -579,8 +580,9 @@ class MessageWidget extends StatelessWidget {
// ListView使ScrollView
physics: const NeverScrollableScrollPhysics(),
padding: EdgeInsets.all(0),
itemCount:
message.categories == null ? 0 : message.categories!.length,
itemCount: message.categories == null
? 0
: message.categories!.length,
itemBuilder: (_, index) {
//
var category = message.categories![index];
@ -601,8 +603,7 @@ class MessageWidget extends StatelessWidget {
onTap: () => {
// print(category.name),
bytedeskEventBus.fire(QueryCategoryEventBus(
category.cid!,
category.name!))
category.cid!, category.name!))
}),
));
},

@ -45,13 +45,13 @@ class BytedeskConstants {
// static const String httpBaseUrliOS = 'http://' + mqttHost + ':8000';
// static const String httpUploadUrl = 'http://' + mqttHost + ':8000';
// static const String host = mqttHost + ':8000';
// static const String mqttHost = '192.168.0.102';
// static const String mqttHost = '192.168.0.103';
// 线
static const bool isDebug = false; // false;
static const bool isSecure = true; // secure
static const bool isWebSocketWss = true;
static const String webSocketWssUrl = 'wss://flutter.bytedesk.com/websocket';
static const String webSocketWssUrl = 'wss://' + mqttHost + '/websocket';
static const int mqttPort = 13883; // secure
static const String httpBaseUrl = 'https://' + mqttHost;
static const String httpBaseUrlAndroid = 'https://' + mqttHost;

@ -1,6 +1,6 @@
name: bytedesk_kefu
description: the best app chat sdk in china, you can chat with the agent freely at anytime. the agent can chat with the visitor by web/pc/mac/ios/android client.
version: 1.2.9
version: 1.3.1
homepage: https://www.weikefu.net
environment:
@ -49,7 +49,8 @@ dependencies:
# https://pub.dev/packages/flutter_easyloading
flutter_easyloading: ^3.0.3
# H5-webchat https://pub.dev/packages/webview_flutter
webview_flutter: ^3.0.2
# webview_flutter: ^3.0.2
webview_flutter: ^2.0.4
# https://pub.dev/packages/device_info
device_info: ^2.0.3
# 查看大图 https://pub.dev/packages/photo_view
@ -77,7 +78,8 @@ dependencies:
# audioplayers: ^0.16.1
# https://pub.dev/packages/flutter_html
# https://github.com/Sub6Resources/flutter_html
flutter_html: ^3.0.0-alpha.3
# flutter_html: ^3.0.0-alpha.3 # bug界面不能及时更新
flutter_html: ^2.2.1
# https://pub.dev/packages/flutter_cache_manager
flutter_cache_manager: ^3.3.0
# 保存图片到相册
@ -86,7 +88,7 @@ dependencies:
# https://pub.dev/packages/feedback
# feedback: ^2.0.0-beta.0
# feedback: ^1.2.2
# 替代 dart:html 以便于在APP上运行
# 替代 dart:html 以便于在APP上运行, mqtt依赖
# https://pub.dev/packages/universal_html
universal_html: ^2.0.8
# flutter_html依赖下列
@ -111,7 +113,8 @@ dependencies:
# Plugins for rendering the <audio> tag.
# chewie_audio: ^1.0.0+1
# Plugins for rendering the <svg> tag.
flutter_svg: ^1.0.3
# flutter_svg: ^1.0.3
flutter_svg: ^0.23.0+1
flutter_web_plugins:
sdk: flutter

Loading…
Cancel
Save