版本检测接口
This commit is contained in:
11
App.vue
11
App.vue
@@ -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)
|
||||||
|
})
|
||||||
|
|
||||||
// 请求一个接口
|
// 请求一个接口
|
||||||
// 是否需要更新
|
// 是否需要更新
|
||||||
// 弹出更新提示
|
// 弹出更新提示
|
||||||
|
|||||||
22
apis/interfaces/versions.js
Normal file
22
apis/interfaces/versions.js
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
|
||||||
|
/**
|
||||||
|
* Web唐明明
|
||||||
|
* 匆匆数载恍如梦,岁月迢迢华发增。
|
||||||
|
* 碌碌无为枉半生,一朝惊醒万事空。
|
||||||
|
* moduleName: 版本信息
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
import { request } from '../index'
|
||||||
|
|
||||||
|
// 微信配置信息
|
||||||
|
const getVersions = data => {
|
||||||
|
return request({
|
||||||
|
url: 'app/version',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export {
|
||||||
|
getVersions
|
||||||
|
}
|
||||||
2
unpackage/dist/dev/app-plus/app-service.js
vendored
2
unpackage/dist/dev/app-plus/app-service.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user