版本检测接口

This commit is contained in:
唐明明
2021-11-01 17:24:30 +08:00
parent cb0da38a87
commit 61366da9d2
3 changed files with 33 additions and 2 deletions

11
App.vue
View File

@@ -1,4 +1,5 @@
<script> <script>
import { getVersions } from './apis/interfaces/versions'
export default { export default {
onLaunch() { onLaunch() {
//#ifdef H5 //#ifdef H5
@@ -25,6 +26,14 @@
// 获取系统版本号 // 获取系统版本号
console.log(plus.runtime.versionCode) console.log(plus.runtime.versionCode)
console.log(plus.runtime.uniVersion) console.log(plus.runtime.uniVersion)
getVersions({
version:
}).then(res => {
console.log(res)
})
// 请求一个接口 // 请求一个接口
// 是否需要更新 // 是否需要更新
// 弹出更新提示 // 弹出更新提示

View File

@@ -0,0 +1,22 @@
/**
* Web唐明明
* 匆匆数载恍如梦,岁月迢迢华发增。
* 碌碌无为枉半生,一朝惊醒万事空。
* moduleName: 版本信息
*/
import { request } from '../index'
// 微信配置信息
const getVersions = data => {
return request({
url: 'app/version',
data
})
}
export {
getVersions
}

File diff suppressed because one or more lines are too long