优化
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../common/vendor.js");
|
||||
new common_vendor.COS({
|
||||
SecretId: "AKID4KPIyQgjjnkWJzSnwtfHj281tcBZo28v",
|
||||
// 推荐使用环境变量获取;用户的 SecretId,建议使用子账号密钥,授权遵循最小权限指引,降低使用风险。子账号密钥获取可参考https://cloud.tencent.com/document/product/598/37140
|
||||
SecretKey: "kQvMjuscBWgfSCqeHiGfx3vc7PUP7ctx"
|
||||
// 推荐使用环境变量获取;用户的 SecretKey,建议使用子账号密钥,授权遵循最小权限指引,降低使用风险。子账号密钥获取可参考https://cloud.tencent.com/document/product/598/37140
|
||||
});
|
||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/components/audioMessages.js.map
|
||||
@@ -38,6 +38,10 @@ function getConversationList(goeasy) {
|
||||
},
|
||||
onFailed: function(error) {
|
||||
common_vendor.index.__f__("log", "at components/goEasyTool/tool.js:43", "获取会话列表失败, code:" + error.code + " content:" + error.content);
|
||||
common_vendor.index.showToast({
|
||||
title: "获取会话列表失败",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -55,12 +59,16 @@ function getConversationMessages(goeasy, userid, imestamp) {
|
||||
limit: 30,
|
||||
//可选项,返回的消息条数,默认为10条,最多30条
|
||||
onSuccess: function(result) {
|
||||
common_vendor.index.__f__("log", "at components/goEasyTool/tool.js:59", "获取消息列表成功", result);
|
||||
common_vendor.index.__f__("log", "at components/goEasyTool/tool.js:63", "获取消息列表成功", result);
|
||||
resolve(result.content);
|
||||
},
|
||||
//查询成功
|
||||
onFailed: function(error) {
|
||||
common_vendor.index.__f__("log", "at components/goEasyTool/tool.js:63", "获取消息列表失败, code:" + error.code + " content:" + error.content);
|
||||
common_vendor.index.__f__("log", "at components/goEasyTool/tool.js:67", "获取消息列表失败, code:" + error.code + " content:" + error.content);
|
||||
common_vendor.index.showToast({
|
||||
title: "获取消息列表失败",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
//查询失败
|
||||
});
|
||||
@@ -87,7 +95,11 @@ function sendMessage(goeasy, userid, message, avatar, nickname) {
|
||||
resolve(textMessage);
|
||||
},
|
||||
onFailed: function(error) {
|
||||
common_vendor.index.__f__("log", "at components/goEasyTool/tool.js:90", "发送消息失败,code:" + error.code + " ,error " + error.content);
|
||||
common_vendor.index.__f__("log", "at components/goEasyTool/tool.js:98", "发送消息失败,code:" + error.code + " ,error " + error.content);
|
||||
common_vendor.index.showToast({
|
||||
title: "发送消息失败",
|
||||
icon: "none"
|
||||
});
|
||||
reject(error);
|
||||
}
|
||||
});
|
||||
@@ -104,7 +116,11 @@ function messageRead(goeasy, userid) {
|
||||
resolve();
|
||||
},
|
||||
onFailed: function(error) {
|
||||
common_vendor.index.__f__("log", "at components/goEasyTool/tool.js:109", "标记私聊已读失败", error);
|
||||
common_vendor.index.__f__("log", "at components/goEasyTool/tool.js:121", "标记私聊已读失败", error);
|
||||
common_vendor.index.showToast({
|
||||
title: "标记私聊已读失败",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -131,7 +147,11 @@ function sendCustomMessage(goeasy, type, userid, order, avatar, nickname) {
|
||||
resolve(customMessage);
|
||||
},
|
||||
onFailed: function(error) {
|
||||
common_vendor.index.__f__("log", "at components/goEasyTool/tool.js:137", "Failed to send message,code:" + error.code + ",error" + error.content);
|
||||
common_vendor.index.__f__("log", "at components/goEasyTool/tool.js:153", "Failed to send message,code:" + error.code + ",error" + error.content);
|
||||
common_vendor.index.showToast({
|
||||
title: "发送自定义消息失败",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -147,7 +167,11 @@ function conversationTop(goeasy, conversation, top) {
|
||||
resolve("成功");
|
||||
},
|
||||
onFailed: function(error) {
|
||||
common_vendor.index.__f__("log", "at components/goEasyTool/tool.js:154", "失败:", error);
|
||||
common_vendor.index.__f__("log", "at components/goEasyTool/tool.js:174", "失败:", error);
|
||||
common_vendor.index.showToast({
|
||||
title: "置顶会话失败",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -161,7 +185,28 @@ function conversationDelete(goeasy, conversation) {
|
||||
resolve("删除会话成功");
|
||||
},
|
||||
onFailed: function(error) {
|
||||
common_vendor.index.__f__("log", "at components/goEasyTool/tool.js:169", error);
|
||||
common_vendor.index.__f__("log", "at components/goEasyTool/tool.js:193", error);
|
||||
common_vendor.index.showToast({
|
||||
title: "删除会话失败",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
function sendGroupMessage(goeasy, message) {
|
||||
return new Promise((resolve, reject) => {
|
||||
var im = goeasy.im;
|
||||
im.sendMessage({
|
||||
message,
|
||||
onSuccess: () => {
|
||||
resolve(message);
|
||||
},
|
||||
onFailed: function(error) {
|
||||
common_vendor.index.showToast({
|
||||
title: "发送消息失败",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -174,5 +219,6 @@ exports.goEasylogin = goEasylogin;
|
||||
exports.goEasylogout = goEasylogout;
|
||||
exports.messageRead = messageRead;
|
||||
exports.sendCustomMessage = sendCustomMessage;
|
||||
exports.sendGroupMessage = sendGroupMessage;
|
||||
exports.sendMessage = sendMessage;
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/components/goEasyTool/tool.js.map
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../common/vendor.js");
|
||||
new common_vendor.COS({
|
||||
SecretId: "AKID4KPIyQgjjnkWJzSnwtfHj281tcBZo28v",
|
||||
// 推荐使用环境变量获取;用户的 SecretId,建议使用子账号密钥,授权遵循最小权限指引,降低使用风险。子账号密钥获取可参考https://cloud.tencent.com/document/product/598/37140
|
||||
SecretKey: "kQvMjuscBWgfSCqeHiGfx3vc7PUP7ctx"
|
||||
// 推荐使用环境变量获取;用户的 SecretKey,建议使用子账号密钥,授权遵循最小权限指引,降低使用风险。子账号密钥获取可参考https://cloud.tencent.com/document/product/598/37140
|
||||
});
|
||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/components/picturesVideosMessages.js.map
|
||||
Reference in New Issue
Block a user