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

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

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