日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程语言 > php >内容正文

php

vue 安装php,vue中使用openinstall

發(fā)布時(shí)間:2024/2/28 php 37 豆豆
生活随笔 收集整理的這篇文章主要介紹了 vue 安装php,vue中使用openinstall 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

該樓層疑似違規(guī)已被系統(tǒng)折疊?隱藏此樓查看此樓

1、在html的head中引入外部cdn鏈接

2、

在webpack.base.conf.js中配置

externals: {

OpenInstall: 'OpenInstall'

}

3、

頁(yè)面引入import OpenInstall from 'OpenInstall'

get_openinstall () {

/*

*/

// openinstall初始化時(shí)將與openinstall服務(wù)器交互,應(yīng)盡可能早的調(diào)用

/* web頁(yè)面向app傳遞的json數(shù)據(jù)(json string/js Object),應(yīng)用被拉起或是首次安裝時(shí),通過(guò)相應(yīng)的android/ios api可以獲取此數(shù)據(jù) */

const data = OpenInstall.parseUrlParams()// openinstall.js中提供的工具函數(shù),解析url中的所有查詢參數(shù)

console.log(data)

new OpenInstall({

/* appKey必選參數(shù),openinstall平臺(tái)為每個(gè)應(yīng)用分配的ID */

appKey: '***',

/* openinstall初始化完成的回調(diào)函數(shù),可選 */

onready: function () {

const m = this

const button = document.getElementById('downloadButton')

button.style.visibility = 'visible'

/* 在app已安裝的情況嘗試?yán)餫pp */

m.schemeWakeup()

/* 用戶點(diǎn)擊某個(gè)按鈕時(shí)(假定按鈕id為downloadButton),安裝app */

button.onclick = function () {

m.wakeupOrInstall()

return false

}

}

}, data)

}

4、在methods添加方法 get_openinstall(); 在初始化獲取數(shù)據(jù)后執(zhí)行方法get_openinstall()

總結(jié)

以上是生活随笔為你收集整理的vue 安装php,vue中使用openinstall的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。