|
@@ -31,56 +31,6 @@ Vue.prototype.$TUIKitTIM = TIM;
|
|
Vue.prototype.$TUIKitEvent = TIM.EVENT;
|
|
Vue.prototype.$TUIKitEvent = TIM.EVENT;
|
|
Vue.prototype.$TUIKitVersion = TIM.VERSION;
|
|
Vue.prototype.$TUIKitVersion = TIM.VERSION;
|
|
Vue.prototype.$TUIKitTypes = TIM.TYPES; // 监听系统级事件
|
|
Vue.prototype.$TUIKitTypes = TIM.TYPES; // 监听系统级事件
|
|
-Vue.prototype.$getIDFA=()=>{
|
|
|
|
- window.webkit.messageHandlers.call.postMessage({
|
|
|
|
- api:"com.js.getIDFA",
|
|
|
|
- data:{},
|
|
|
|
- callback:'idfaInvoke'
|
|
|
|
- })
|
|
|
|
-}
|
|
|
|
-Vue.prototype.$getDeviceInfo=()=>{
|
|
|
|
- window.webkit.messageHandlers.call.postMessage({
|
|
|
|
- api:"com.js.getDeviceInfo",
|
|
|
|
- data:{},
|
|
|
|
- callback:'deviceInfoInvoke'
|
|
|
|
- })
|
|
|
|
-}
|
|
|
|
-Vue.prototype.$getDeviceToken=()=>{
|
|
|
|
- window.webkit.messageHandlers.call.postMessage({
|
|
|
|
- api:"com.js.deviceToken",
|
|
|
|
- data:{},
|
|
|
|
- callback:'deviceTokenInvoke'
|
|
|
|
- })
|
|
|
|
-}
|
|
|
|
-Vue.prototype.$toShare=(img,url)=>{
|
|
|
|
- window.webkit.messageHandlers.call.postMessage({
|
|
|
|
- api:"com.js.nativeShare",
|
|
|
|
- data:{
|
|
|
|
- title:'糖果公园',
|
|
|
|
- image:img||'https://lmg.jj20.com/up/allimg/4k/s/02/2109242332225H9-0-lp.jpg',
|
|
|
|
- link:url
|
|
|
|
- },
|
|
|
|
- callback:'toShareInvoke'
|
|
|
|
- })
|
|
|
|
-}
|
|
|
|
-Vue.prototype.$toOutLink=(url)=>{
|
|
|
|
- window.webkit.messageHandlers.call.postMessage({
|
|
|
|
- api:"com.js.urlJump",
|
|
|
|
- data:{
|
|
|
|
- url:url
|
|
|
|
- },
|
|
|
|
- callback:'toOutLinkInvoke'
|
|
|
|
- })
|
|
|
|
-}
|
|
|
|
-Vue.prototype.$toOutLinkByBrowser=(url)=>{
|
|
|
|
- window.location.href=`sugarpark://${encodeURIComponent(url)}`
|
|
|
|
-}
|
|
|
|
-Vue.prototype.$getStatusBarHeight=()=>{//获取状态栏和底部安全距离
|
|
|
|
- window.webkit.messageHandlers.call.postMessage({
|
|
|
|
- api:"com.js.getStatusBarHeight",
|
|
|
|
- callback:'getStatusBarHeightInvoke'
|
|
|
|
- })
|
|
|
|
-}
|
|
|
|
new Vue({
|
|
new Vue({
|
|
router,
|
|
router,
|
|
store,
|
|
store,
|