@titaui/pc 1.10.83-beta.2 → 1.10.83-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.husky/pre-commit
CHANGED
|
@@ -111,14 +111,24 @@ var WeChatBtn = function WeChatBtn(props) {
|
|
|
111
111
|
|
|
112
112
|
var isWx = navigator.userAgent.match(/wxwork/);
|
|
113
113
|
var isMac = navigator.userAgent.match(/Mac/);
|
|
114
|
+
/**
|
|
115
|
+
* 点击企业微信图标这块稍许复杂 注释说明一下
|
|
116
|
+
* 先判断有没有群 没群就新建群
|
|
117
|
+
* 有群就先调用加人的接口 人本身不在群的情况 成功加人就打开进入群聊
|
|
118
|
+
* 人在群的情况 加人接口返回报错信息updateEnterpriseChat:fail_unsupported chat 则调用打开群接口
|
|
119
|
+
* 群解散的情况 则弹窗提示 联系负责人手动加群
|
|
120
|
+
* mac 不支持加人接口
|
|
121
|
+
*/
|
|
114
122
|
|
|
115
123
|
var handleClickWechatBtn = function handleClickWechatBtn() {
|
|
124
|
+
console.log("\u540E\u7AEF\u8FD4\u56DE\u6765\u7684id: ".concat(chatId));
|
|
125
|
+
|
|
116
126
|
if (isWx) {
|
|
117
127
|
//有群了,判断没在群就先进群再打开群
|
|
118
128
|
if (chatId !== null && chatId !== 'chatId') {
|
|
119
129
|
wx.invoke('updateEnterpriseChat', {
|
|
120
130
|
chatId: chatId,
|
|
121
|
-
userIdsToAdd: loginUserOpenId
|
|
131
|
+
userIdsToAdd: "".concat(loginUserOpenId)
|
|
122
132
|
}, function (res) {
|
|
123
133
|
console.log("1.\u4EBA\u5728\u7FA4\uFF0C\u8C03\u7528\u52A0\u4EBA\u63A5\u53E3\u8FD4\u56DE\u4FE1\u606F\uFF1B2.\u4EBA\u4E0D\u5728\u7FA4\uFF0C\u8C03\u7528\u52A0\u4EBA\u63A5\u53E3\u8FD4\u56DE\u4FE1\u606F\uFF1B 3.\u7FA4\u89E3\u6563\u4E86\uFF0C\u8C03\u7528\u52A0\u4EBA\u63A5\u53E3\u8FD4\u56DE\u4FE1\u606F 4.mac\u8C03\u7528\u52A0\u4EBA\u63A5\u53E3\u8FD4\u56DE\u4FE1\u606F ".concat(res.err_msg));
|
|
124
134
|
|
|
@@ -185,6 +195,7 @@ var WeChatBtn = function WeChatBtn(props) {
|
|
|
185
195
|
}, function (res) {
|
|
186
196
|
if (res.err_msg === 'createChatWithMsg:ok') {
|
|
187
197
|
if (res.chatId) {
|
|
198
|
+
console.log("\u521B\u5EFA\u7FA4\uFF0C\u4F20\u7ED9\u540E\u7AEF\u7684chatid:".concat(res.chatId));
|
|
188
199
|
(0, _request.rpost)('v1')('chat/add', {
|
|
189
200
|
objId: id,
|
|
190
201
|
objType: objType,
|