@zhangxuejing123./sip-phone-sdk 0.0.1 → 0.0.3
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/dist/sip-phone-sdk.common.js +103 -86
- package/dist/sip-phone-sdk.css +2 -2
- package/dist/sip-phone-sdk.umd.js +103 -86
- package/dist/sip-phone-sdk.umd.min.js +5 -5
- package/package.json +1 -1
- package/public/index.html +0 -1
- package/src/App.vue +1 -4
- package/src/components/MobilePhone.vue +29 -13
- package/src/components/vuetify.css +2 -1
- package/src/main.js +1 -1
- package/vue.config.js +27 -27
package/package.json
CHANGED
package/public/index.html
CHANGED
package/src/App.vue
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<v-app style="background-color: rgba(5,29,63)"
|
|
2
|
+
<v-app style="background-color: rgba(5,29,63)" >
|
|
3
3
|
|
|
4
4
|
<!-- <button @click="onMakeCall">拨号</button> -->
|
|
5
5
|
<v-main>
|
|
@@ -34,7 +34,6 @@ export default {
|
|
|
34
34
|
},
|
|
35
35
|
|
|
36
36
|
data: () => ({
|
|
37
|
-
isAPP:false,
|
|
38
37
|
debug: false,
|
|
39
38
|
password: '',
|
|
40
39
|
calledNum: '',
|
|
@@ -77,8 +76,6 @@ export default {
|
|
|
77
76
|
},
|
|
78
77
|
|
|
79
78
|
mounted () {
|
|
80
|
-
this.isAPP = window.config.isAPP;
|
|
81
|
-
console.log("isAPP22",this.isAPP)
|
|
82
79
|
let {
|
|
83
80
|
calledNum = '0000021000021001',
|
|
84
81
|
//calledNum = '000001100002011001',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- 主模板:视频通话界面 -->
|
|
2
|
-
<template>
|
|
2
|
+
<template >
|
|
3
3
|
<!-- 主容器:使用flex垂直布局,内容居中对齐 -->
|
|
4
|
-
<div class="d-flex flex-column align-center justify-space-between sip-call-main">
|
|
4
|
+
<div :class="isAPP ? 'my-APP' : ''" class="d-flex flex-column align-center justify-space-between sip-call-main">
|
|
5
5
|
<!-- 位置信息显示区域 -->
|
|
6
6
|
<div class="location-wrapper" v-if="showLocation">
|
|
7
7
|
<!-- 显示经纬度和海拔信息 -->
|
|
@@ -240,6 +240,7 @@ export default {
|
|
|
240
240
|
|
|
241
241
|
data: function () {
|
|
242
242
|
return {
|
|
243
|
+
isAPP:false,
|
|
243
244
|
prompt: `${this.$t('serverConnecting')}...`,
|
|
244
245
|
callPrompt: this.$t('pleaseBePatient'),
|
|
245
246
|
|
|
@@ -915,10 +916,23 @@ export default {
|
|
|
915
916
|
|
|
916
917
|
stopSendPosition () {
|
|
917
918
|
clearTimeout(this.sendPositionHandler)
|
|
918
|
-
}
|
|
919
|
+
},
|
|
920
|
+
isAPPIF(){
|
|
921
|
+
if (/android/i.test(navigator.userAgent)) {
|
|
922
|
+
this.isAPP = true;
|
|
923
|
+
console.log("当前为Android App");
|
|
924
|
+
} else if (/iphone|ipad|ipod/i.test(navigator.userAgent)) {
|
|
925
|
+
console.log("当前为iOS App");
|
|
926
|
+
this.isAPP = true;
|
|
927
|
+
} else {
|
|
928
|
+
this.isAPP = false;
|
|
929
|
+
console.log("当前为H5页面");
|
|
930
|
+
}
|
|
931
|
+
},
|
|
919
932
|
},
|
|
920
933
|
|
|
921
934
|
async mounted() {
|
|
935
|
+
// this.isAPPIF()
|
|
922
936
|
console.info('MobilePhone mounted')
|
|
923
937
|
await this.checkBrowser().catch(e => {
|
|
924
938
|
this.showSnackbar = true
|
|
@@ -1097,6 +1111,7 @@ export default {
|
|
|
1097
1111
|
opacity: .6 !important;
|
|
1098
1112
|
position: absolute !important;
|
|
1099
1113
|
left: calc(50% + 160px) !important;
|
|
1114
|
+
color: #FFFFFF;
|
|
1100
1115
|
}
|
|
1101
1116
|
.transparent-btn::before {
|
|
1102
1117
|
background-color: transparent !important;
|
|
@@ -1292,16 +1307,17 @@ export default {
|
|
|
1292
1307
|
}
|
|
1293
1308
|
|
|
1294
1309
|
.transparent-btn {
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1310
|
+
background: transparent !important;
|
|
1311
|
+
box-shadow: none !important;
|
|
1312
|
+
min-width: 0 !important;
|
|
1313
|
+
width: auto !important;
|
|
1314
|
+
height: auto !important;
|
|
1315
|
+
padding: 0 !important;
|
|
1316
|
+
margin: 0 !important;
|
|
1317
|
+
opacity: .6 !important;
|
|
1318
|
+
position: absolute !important;
|
|
1319
|
+
left: calc(50% + 160px) !important;
|
|
1320
|
+
color: #FFFFFF;
|
|
1305
1321
|
}
|
|
1306
1322
|
.transparent-btn::before {
|
|
1307
1323
|
background-color: transparent !important;
|
package/src/main.js
CHANGED
|
@@ -4,7 +4,7 @@ import VueI18n from 'vue-i18n'
|
|
|
4
4
|
import vuetify from './plugins/vuetify'
|
|
5
5
|
import zh from '@/libs/zh.js'
|
|
6
6
|
import en from '@/libs/en.js'
|
|
7
|
-
import '@/utils/rem'
|
|
7
|
+
// import '@/utils/rem'
|
|
8
8
|
Vue.use(VueI18n)
|
|
9
9
|
const i18n = new VueI18n({
|
|
10
10
|
locale: window.config.lang || localStorage.getItem('language') || 'zh', // 语言标识
|
package/vue.config.js
CHANGED
|
@@ -5,33 +5,33 @@ module.exports = {
|
|
|
5
5
|
publicPath: '/sip-phone-demo',
|
|
6
6
|
productionSourceMap: false,
|
|
7
7
|
// 新增的css配置部分
|
|
8
|
-
css: {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
},
|
|
8
|
+
// css: {
|
|
9
|
+
// loaderOptions: {
|
|
10
|
+
// stylus: {
|
|
11
|
+
// use: [
|
|
12
|
+
// require('poststylus')([
|
|
13
|
+
// require('postcss-pxtorem')({
|
|
14
|
+
// rootValue: 100,
|
|
15
|
+
// propWhiteList: [],
|
|
16
|
+
// minPixelValue: 2,
|
|
17
|
+
// }),
|
|
18
|
+
// 'autoprefixer',
|
|
19
|
+
// ]),
|
|
20
|
+
// ],
|
|
21
|
+
// import: [require('path').resolve('./src/assets/theme.custom')]
|
|
22
|
+
// },
|
|
23
|
+
// postcss: {
|
|
24
|
+
// plugins: [
|
|
25
|
+
// require('postcss-pxtorem')({
|
|
26
|
+
// rootValue: 100,
|
|
27
|
+
// propWhiteList: [],
|
|
28
|
+
// minPixelValue: 2,
|
|
29
|
+
// }),
|
|
30
|
+
// require('autoprefixer')(),
|
|
31
|
+
// ],
|
|
32
|
+
// }
|
|
33
|
+
// }
|
|
34
|
+
// },
|
|
35
35
|
devServer: {
|
|
36
36
|
port: 8080,
|
|
37
37
|
hot: true
|