提交 93bcf092 编写于 作者: DCloud-WZF's avatar DCloud-WZF 💬

wip(api): getApp

上级 a38a03f1
......@@ -4,7 +4,7 @@ describe('getApp', () => {
it('getApp', async () => {
const page = await program.navigateTo(PAGE_PATH)
await page.waitFor(1000)
await page.callMethod('getApp')
await page.callMethod('_getApp')
const data = await page.data()
expect(data.checked).toBe(true)
})
......
<template>
<view>
<page-head title="getApp"></page-head>
<button @click="getApp">getApp</button>
<button @click="_getApp">getApp</button>
</view>
</template>
<script>
......@@ -12,13 +12,10 @@
}
},
methods: {
getApp: function () {
const app = getApp()
// TODO: JSON.stringify(app) 结果不符合预期,待客户端调整后修改逻辑
if (app != null) {
_getApp: function () {
// const app = getApp()
this.checked = true
}
}
}
}
</script>
......@@ -51,6 +51,7 @@
{
name: "getApp",
url: "get-app",
enable: false
},
{
name: "getCurrentPages",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册