余尚辉 3 місяців тому
батько
коміт
aafd3d07ae

+ 3 - 3
dist/hs-cti.d.ts

@@ -4,11 +4,11 @@
 - Version 1.0.9 
 - Version 1.0.9 
 - JS Standard any
 - JS Standard any
 - Author platformfe
 - Author platformfe
-- Built on 2024/12/9 09:57:48
+- Built on 2024/12/10 18:07:14
 - GitHub 
 - GitHub 
 - Branch main
 - Branch main
-- CommitID eefc7c80211667ca5ecc3de0de3bfe02ec94e8c0
-- CommitMessage fix: bug
+- CommitID c0ee87b0ee2fe0dc94c0b34e0888b2b786f25057
+- CommitMessage fix: 去掉log
 */
 */
 /**
 /**
  * Minimal `EventEmitter` interface that is molded against the Node.js
  * Minimal `EventEmitter` interface that is molded against the Node.js

+ 6 - 5
dist/hs-cti.es5.esm.js

@@ -4,11 +4,11 @@
 - Version 1.0.9 
 - Version 1.0.9 
 - JS Standard es5
 - JS Standard es5
 - Author platformfe
 - Author platformfe
-- Built on 2024/12/9 09:57:48
+- Built on 2024/12/10 18:07:14
 - GitHub 
 - GitHub 
 - Branch main
 - Branch main
-- CommitID eefc7c80211667ca5ecc3de0de3bfe02ec94e8c0
-- CommitMessage fix: bug
+- CommitID c0ee87b0ee2fe0dc94c0b34e0888b2b786f25057
+- CommitMessage fix: 去掉log
 */
 */
 import { Web, RequestPendingError, SessionState, UserAgent, UserAgentState, Registerer, RegistererState, Inviter, Invitation, Session, Messager } from 'sip.js';
 import { Web, RequestPendingError, SessionState, UserAgent, UserAgentState, Registerer, RegistererState, Inviter, Invitation, Session, Messager } from 'sip.js';
 import io from 'socket.io-client';
 import io from 'socket.io-client';
@@ -3582,12 +3582,13 @@ var hsTrackJPOST = function (_a) {
           case 0:
           case 0:
             _a.trys.push([0, 2,, 3]);
             _a.trys.push([0, 2,, 3]);
             return [4 /*yield*/, JPOST({
             return [4 /*yield*/, JPOST({
-              baseUrl: baseUrl,
+              baseUrl: getBaseOption(BaseOption.ENV) == 'production' ? 'https://pbx.fuxicarbon.com/fs_api/' : baseUrl,
               url: url,
               url: url,
               data: data
               data: data
             })];
             })];
           case 1:
           case 1:
             res = _a.sent();
             res = _a.sent();
+            console.log(getBaseOption(BaseOption.ENV), 90000000);
             code = res.code, msg = res.msg;
             code = res.code, msg = res.msg;
             console.log(msg);
             console.log(msg);
             if (code === 0) {
             if (code === 0) {
@@ -4268,7 +4269,7 @@ var HsCTI = /** @class */function (_super) {
                 // 单次初始化唯一 ID
                 // 单次初始化唯一 ID
                 ctiSessionId: generateUniqueId(),
                 ctiSessionId: generateUniqueId(),
                 // IM websocket url
                 // IM websocket url
-                imWsServer: 'ws://pbx.fuxicarbon.com:8091/ws/cs-im',
+                imWsServer: 'wss://pbx.fuxicarbon.com/ws/cs-im',
                 // IM websocket path
                 // IM websocket path
                 imWsPath: 'ws/cs-im'
                 imWsPath: 'ws/cs-im'
               });
               });

Різницю між файлами не показано, бо вона завелика
+ 3 - 3
dist/hs-cti.es5.esm.prod.js


+ 6 - 5
dist/hs-cti.es5.umd.js

@@ -4,11 +4,11 @@
 - Version 1.0.9 
 - Version 1.0.9 
 - JS Standard es5
 - JS Standard es5
 - Author platformfe
 - Author platformfe
-- Built on 2024/12/9 09:57:48
+- Built on 2024/12/10 18:07:14
 - GitHub 
 - GitHub 
 - Branch main
 - Branch main
-- CommitID eefc7c80211667ca5ecc3de0de3bfe02ec94e8c0
-- CommitMessage fix: bug
+- CommitID c0ee87b0ee2fe0dc94c0b34e0888b2b786f25057
+- CommitMessage fix: 去掉log
 */
 */
 (function (global, factory) {
 (function (global, factory) {
     typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('sip.js'), require('socket.io-client')) :
     typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('sip.js'), require('socket.io-client')) :
@@ -3585,12 +3585,13 @@
               case 0:
               case 0:
                 _a.trys.push([0, 2,, 3]);
                 _a.trys.push([0, 2,, 3]);
                 return [4 /*yield*/, JPOST({
                 return [4 /*yield*/, JPOST({
-                  baseUrl: baseUrl,
+                  baseUrl: getBaseOption(BaseOption.ENV) == 'production' ? 'https://pbx.fuxicarbon.com/fs_api/' : baseUrl,
                   url: url,
                   url: url,
                   data: data
                   data: data
                 })];
                 })];
               case 1:
               case 1:
                 res = _a.sent();
                 res = _a.sent();
+                console.log(getBaseOption(BaseOption.ENV), 90000000);
                 code = res.code, msg = res.msg;
                 code = res.code, msg = res.msg;
                 console.log(msg);
                 console.log(msg);
                 if (code === 0) {
                 if (code === 0) {
@@ -4271,7 +4272,7 @@
                     // 单次初始化唯一 ID
                     // 单次初始化唯一 ID
                     ctiSessionId: generateUniqueId(),
                     ctiSessionId: generateUniqueId(),
                     // IM websocket url
                     // IM websocket url
-                    imWsServer: 'ws://pbx.fuxicarbon.com:8091/ws/cs-im',
+                    imWsServer: 'wss://pbx.fuxicarbon.com/ws/cs-im',
                     // IM websocket path
                     // IM websocket path
                     imWsPath: 'ws/cs-im'
                     imWsPath: 'ws/cs-im'
                   });
                   });

Різницю між файлами не показано, бо вона завелика
+ 3 - 3
dist/hs-cti.es5.umd.prod.js


+ 6 - 5
dist/hs-cti.es6.esm.js

@@ -4,11 +4,11 @@
 - Version 1.0.9 
 - Version 1.0.9 
 - JS Standard es6
 - JS Standard es6
 - Author platformfe
 - Author platformfe
-- Built on 2024/12/9 09:57:48
+- Built on 2024/12/10 18:07:14
 - GitHub 
 - GitHub 
 - Branch main
 - Branch main
-- CommitID eefc7c80211667ca5ecc3de0de3bfe02ec94e8c0
-- CommitMessage fix: bug
+- CommitID c0ee87b0ee2fe0dc94c0b34e0888b2b786f25057
+- CommitMessage fix: 去掉log
 */
 */
 import { Web, UserAgent, UserAgentState, Registerer, RegistererState, Inviter, Invitation, Session, Messager, RequestPendingError, SessionState } from 'sip.js';
 import { Web, UserAgent, UserAgentState, Registerer, RegistererState, Inviter, Invitation, Session, Messager, RequestPendingError, SessionState } from 'sip.js';
 import io from 'socket.io-client';
 import io from 'socket.io-client';
@@ -2958,10 +2958,11 @@ const hsTrackJPOST = ({
   return new Promise((resolve, reject) => __awaiter(void 0, void 0, void 0, function* () {
   return new Promise((resolve, reject) => __awaiter(void 0, void 0, void 0, function* () {
     try {
     try {
       const res = yield JPOST({
       const res = yield JPOST({
-        baseUrl,
+        baseUrl: getBaseOption(BaseOption.ENV) == 'production' ? 'https://pbx.fuxicarbon.com/fs_api/' : baseUrl,
         url,
         url,
         data
         data
       });
       });
+      console.log(getBaseOption(BaseOption.ENV), 90000000);
       const {
       const {
         code,
         code,
         msg
         msg
@@ -3556,7 +3557,7 @@ class HsCTI extends EventEmitter {
         // 单次初始化唯一 ID
         // 单次初始化唯一 ID
         ctiSessionId: generateUniqueId(),
         ctiSessionId: generateUniqueId(),
         // IM websocket url
         // IM websocket url
-        imWsServer: 'ws://pbx.fuxicarbon.com:8091/ws/cs-im',
+        imWsServer: 'wss://pbx.fuxicarbon.com/ws/cs-im',
         // IM websocket path
         // IM websocket path
         imWsPath: 'ws/cs-im'
         imWsPath: 'ws/cs-im'
       });
       });

Різницю між файлами не показано, бо вона завелика
+ 3 - 3
dist/hs-cti.es6.esm.prod.js


+ 6 - 5
dist/hs-cti.es6.umd.js

@@ -4,11 +4,11 @@
 - Version 1.0.9 
 - Version 1.0.9 
 - JS Standard es6
 - JS Standard es6
 - Author platformfe
 - Author platformfe
-- Built on 2024/12/9 09:57:48
+- Built on 2024/12/10 18:07:14
 - GitHub 
 - GitHub 
 - Branch main
 - Branch main
-- CommitID eefc7c80211667ca5ecc3de0de3bfe02ec94e8c0
-- CommitMessage fix: bug
+- CommitID c0ee87b0ee2fe0dc94c0b34e0888b2b786f25057
+- CommitMessage fix: 去掉log
 */
 */
 (function (global, factory) {
 (function (global, factory) {
     typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('sip.js'), require('socket.io-client')) :
     typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('sip.js'), require('socket.io-client')) :
@@ -2961,10 +2961,11 @@
       return new Promise((resolve, reject) => __awaiter(void 0, void 0, void 0, function* () {
       return new Promise((resolve, reject) => __awaiter(void 0, void 0, void 0, function* () {
         try {
         try {
           const res = yield JPOST({
           const res = yield JPOST({
-            baseUrl,
+            baseUrl: getBaseOption(BaseOption.ENV) == 'production' ? 'https://pbx.fuxicarbon.com/fs_api/' : baseUrl,
             url,
             url,
             data
             data
           });
           });
+          console.log(getBaseOption(BaseOption.ENV), 90000000);
           const {
           const {
             code,
             code,
             msg
             msg
@@ -3559,7 +3560,7 @@
             // 单次初始化唯一 ID
             // 单次初始化唯一 ID
             ctiSessionId: generateUniqueId(),
             ctiSessionId: generateUniqueId(),
             // IM websocket url
             // IM websocket url
-            imWsServer: 'ws://pbx.fuxicarbon.com:8091/ws/cs-im',
+            imWsServer: 'wss://pbx.fuxicarbon.com/ws/cs-im',
             // IM websocket path
             // IM websocket path
             imWsPath: 'ws/cs-im'
             imWsPath: 'ws/cs-im'
           });
           });

Різницю між файлами не показано, бо вона завелика
+ 3 - 3
dist/hs-cti.es6.umd.prod.js


+ 9 - 1
src/api/fetchApi.ts

@@ -47,7 +47,15 @@ export const hsTrackJPOST = ({
   // eslint-disable-next-line no-async-promise-executor
   // eslint-disable-next-line no-async-promise-executor
   return new Promise(async (resolve, reject) => {
   return new Promise(async (resolve, reject) => {
     try {
     try {
-      const res = await JPOST({ baseUrl, url, data })
+      const res = await JPOST({
+        baseUrl:
+          getBaseOption(BaseOption.ENV) == 'production'
+            ? 'https://pbx.fuxicarbon.com/fs_api/'
+            : baseUrl,
+        url,
+        data
+      })
+      console.log(getBaseOption(BaseOption.ENV), 90000000)
       const { code, msg } = res
       const { code, msg } = res
       console.log(msg)
       console.log(msg)
       if (code === 0) {
       if (code === 0) {

+ 1 - 1
src/hs-cti/HsCTI.ts

@@ -284,7 +284,7 @@ export class HsCTI extends EventEmitter {
       // 单次初始化唯一 ID
       // 单次初始化唯一 ID
       ctiSessionId: generateUniqueId(),
       ctiSessionId: generateUniqueId(),
       // IM websocket url
       // IM websocket url
-      imWsServer: 'ws://pbx.fuxicarbon.com:8091/ws/cs-im',
+      imWsServer: 'wss://pbx.fuxicarbon.com/ws/cs-im',
       // IM websocket path
       // IM websocket path
       imWsPath: 'ws/cs-im'
       imWsPath: 'ws/cs-im'
     }
     }

+ 1 - 1
src/sdk.html

@@ -8,7 +8,7 @@
   <meta name="description" content="JsSIP based example web application." />
   <meta name="description" content="JsSIP based example web application." />
 
 
   <!-- <script src="https://static.fuxicarbon.com/hs-cti/socket.io.min.js"></script> -->
   <!-- <script src="https://static.fuxicarbon.com/hs-cti/socket.io.min.js"></script> -->
-  <script src="https://cdn.socket.io/4.0.0/socket.io.min.js"></script>
+  <script src="http://static.fuxicarbon.com/hs-cti/socket.io.min.js"></script>
   <script src="http://static.fuxicarbon.com/hs-cti/SIP.min.js"></script>
   <script src="http://static.fuxicarbon.com/hs-cti/SIP.min.js"></script>
   <script src="hs-cti.es6.umd.js"></script>
   <script src="hs-cti.es6.umd.js"></script>
 
 

Деякі файли не було показано, через те що забагато файлів було змінено