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

wip(api): getApp

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