|
|
@@ -1,22 +1,50 @@
|
|
|
import Vue from 'vue';
|
|
|
import App from './App';
|
|
|
-import GoEasy from '@/uni_modules/GOEASY-IM/js_sdk/goeasy-2.13.21.esm.min.js'
|
|
|
+//import GoEasy from '@/uni_modules/GOEASY-IM/js_sdk/goeasy-2.13.21.esm.min.js'
|
|
|
+import GoEasy from '@/uni_modules/GOEASY-IM/js_sdk/goeasy-2.13.24-0.esm.min.js'
|
|
|
import GRTC from './lib/goeasy-rtc-0.3.7.esm.min.js'
|
|
|
+//import GRTC from './lib/goeasy-2.13.24-0.esm.min.js'
|
|
|
import request from '@/utils/request.js'
|
|
|
Vue.prototype.$http = request.http
|
|
|
Vue.prototype.$http2 = request.http2
|
|
|
Vue.prototype.$request =request
|
|
|
-GoEasy.init({
|
|
|
- host:"hangzhou.goeasy.io",//应用所在的区域地址: 【hangzhou.goeasy.io |singapore.goeasy.io】
|
|
|
- appkey:"BC-729fefdf1ad7417daea8e62b9fce3f74",// common key
|
|
|
- modules: ['im'],
|
|
|
- // true表示支持通知栏提醒,false则表示不需要通知栏提醒
|
|
|
- allowNotification: true //仅有效于app,小程序和H5将会被自动忽略
|
|
|
-});
|
|
|
-GRTC.init(GoEasy);
|
|
|
+console.log("main.js")
|
|
|
+console.log(request.baseUrl)
|
|
|
+var header={};
|
|
|
+header['Content-Type']='application/x-www-form-urlencoded';
|
|
|
+uni.request({
|
|
|
+ method: "POST",
|
|
|
+ url: request.baseUrl + 'imSys/imAppKey',
|
|
|
+ data: {},
|
|
|
+ header: header,
|
|
|
+ dataType: 'json',
|
|
|
+ }).then((response) => {
|
|
|
+ let [error, res] = response;
|
|
|
+ var appKey=res.data.data.appKey
|
|
|
+ console.log(res.data.data.appKey)
|
|
|
+ GoEasy.init({
|
|
|
+ host:"hangzhou.goeasy.io",//应用所在的区域地址: 【hangzhou.goeasy.io |singapore.goeasy.io】
|
|
|
+ appkey:appKey,//"BC-729fefdf1ad7417daea8e62b9fce3f74",// common key
|
|
|
+ modules: ['im'],
|
|
|
+ // true表示支持通知栏提醒,false则表示不需要通知栏提醒
|
|
|
+ allowNotification: true //仅有效于app,小程序和H5将会被自动忽略
|
|
|
+ });
|
|
|
+ GRTC.init(GoEasy);
|
|
|
+ uni.$GoEasy = GoEasy;
|
|
|
+ uni.$GRTC = GRTC;
|
|
|
+
|
|
|
+ Vue.config.productionTip = false;
|
|
|
+ App.mpType = 'app';
|
|
|
+ const app = new Vue({
|
|
|
+ ...App
|
|
|
+ });
|
|
|
+ app.$mount();
|
|
|
+
|
|
|
+
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
|
|
|
-uni.$GoEasy = GoEasy;
|
|
|
-uni.$GRTC = GRTC;
|
|
|
|
|
|
GoEasy.onClickNotification((message) => {
|
|
|
let currentUrl;
|
|
|
@@ -46,9 +74,3 @@ GoEasy.onClickNotification((message) => {
|
|
|
|
|
|
});
|
|
|
|
|
|
-Vue.config.productionTip = false;
|
|
|
-App.mpType = 'app';
|
|
|
-const app = new Vue({
|
|
|
- ...App
|
|
|
-});
|
|
|
-app.$mount();
|