提交 db7185dc 编写于 作者: taohebin@dcloud.io's avatar taohebin@dcloud.io

update: 插件中调用network示例增加条件编译

上级 8554e406
...@@ -19,10 +19,13 @@ ...@@ -19,10 +19,13 @@
<!-- #endif --> <!-- #endif -->
</template> </template>
<script> <script>
// #ifdef APP
import { import {
testInovkeDownloadFile, testInovkeDownloadFile,
CommonOptions CommonOptions
} from '@/uni_modules/test-invoke-network-api' } from '@/uni_modules/test-invoke-network-api'
// #endif
export default { export default {
data() { data() {
...@@ -134,6 +137,7 @@ ...@@ -134,6 +137,7 @@
}); });
}, },
jest_uts_module_invoked(){ jest_uts_module_invoked(){
// #ifdef APP
testInovkeDownloadFile({ testInovkeDownloadFile({
success:(res: any)=>{ success:(res: any)=>{
console.log("success :", res); console.log("success :", res);
...@@ -144,6 +148,7 @@ ...@@ -144,6 +148,7 @@
this.jest_result = false this.jest_result = false
} }
} as CommonOptions) } as CommonOptions)
// #endif
} }
} }
} }
......
...@@ -69,11 +69,12 @@ ...@@ -69,11 +69,12 @@
</view> </view>
</template> </template>
<script> <script>
// #ifdef APP
import { import {
testInovkeRequest, testInovkeRequest,
CommonOptions CommonOptions
} from '@/uni_modules/test-invoke-network-api' } from '@/uni_modules/test-invoke-network-api'
// #endif
class GETDataType { class GETDataType {
data: UTSJSONObject | null = null data: UTSJSONObject | null = null
...@@ -365,6 +366,7 @@ ...@@ -365,6 +366,7 @@
}); });
}, },
jest_uts_module_invoked(){ jest_uts_module_invoked(){
// #ifdef APP
testInovkeRequest({ testInovkeRequest({
success:(res: any)=>{ success:(res: any)=>{
console.log("success :", res); console.log("success :", res);
...@@ -375,6 +377,7 @@ ...@@ -375,6 +377,7 @@
this.jest_result = false this.jest_result = false
} }
} as CommonOptions) } as CommonOptions)
// #endif
} }
} }
} }
......
...@@ -16,10 +16,12 @@ ...@@ -16,10 +16,12 @@
<!-- #endif --> <!-- #endif -->
</template> </template>
<script> <script>
// #ifdef APP
import { import {
testInovkeUploadFile, testInovkeUploadFile,
CommonOptions CommonOptions
} from '@/uni_modules/test-invoke-network-api' } from '@/uni_modules/test-invoke-network-api'
// #endif
export default { export default {
data() { data() {
...@@ -178,6 +180,7 @@ ...@@ -178,6 +180,7 @@
}) })
}, },
jest_uts_module_invoked(){ jest_uts_module_invoked(){
#// #ifdef APP
testInovkeUploadFile({ testInovkeUploadFile({
success:(res: any)=>{ success:(res: any)=>{
console.log("success :", res); console.log("success :", res);
...@@ -188,6 +191,7 @@ ...@@ -188,6 +191,7 @@
this.jest_result = false this.jest_result = false
} }
} as CommonOptions) } as CommonOptions)
// #endif
} }
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册