提交 c0027983 编写于 作者: 杜庆泉's avatar 杜庆泉

修复 vue2 web 模式编译失败的问题

上级 534539fb
......@@ -11,13 +11,15 @@
</view>
</template>
<script>
import {
checkHasIntegration
} from "@/uni_modules/uts-tencentgeolocation";
import {
checkHasLottieIntegration
} from "@/uni_modules/uts-animation-view";
// #ifndef H5
import {
checkHasIntegration
} from "@/uni_modules/uts-tencentgeolocation";
import {
checkHasLottieIntegration
} from "@/uni_modules/uts-animation-view";
// #endif
export default {
data() {
......@@ -50,17 +52,20 @@
url: `/pages/${e.url}`
})
},
gotoLottie: function(e) {
if (checkHasLottieIntegration()) {
uni.navigateTo({
url: '/pages/SDKIntegration/Lottie/index'
})
} else {
uni.showToast({
icon: 'none',
title: '需要在自定义基座中运行'
})
}
gotoLottie: function(e) {
// #ifndef H5
if (checkHasLottieIntegration()) {
uni.navigateTo({
url: '/pages/SDKIntegration/Lottie/index'
})
} else {
uni.showToast({
icon: 'none',
title: '需要在自定义基座中运行'
})
}
// #endif
},
gotoTencentLocation: function(e) {
......
......@@ -21,7 +21,8 @@
</view>
</template>
<script>
<script>
// #ifndef H5
import {
checkHasIntegration,
requestPremission,
......@@ -29,7 +30,7 @@
watchPosition,
clearWatch
} from "@/uni_modules/uts-tencentgeolocation";
// #endif
export default {
data() {
return {
......
......@@ -16,8 +16,9 @@
</template>
<script>
// #ifdef APP-ANDROID
import { showToast } from '@/uni_modules/uts-toast'
// #endif
export default {
......
......@@ -49,7 +49,8 @@
<button @click="testAll">点击测试所有</button>
</view>
</template>
<script>
<script>
// #ifndef H5
import {
MAX,
testSync,
......@@ -58,7 +59,7 @@
Test,
request,
} from "../../uni_modules/uts-syntaxcase";
// #endif
let test
let id = 0
export default {
......
<template>
<view>
<view class="uni-padding-wrap uni-common-mt">
<view class="uni-hello-text">
逐一点击执行,观察测试反馈
......@@ -39,10 +40,12 @@
</view>
</view>
<button @tap="getDeviceInfoClick">获取设备基础信息</button>
</view>
</template>
<script>
// #ifdef APP-ANDROID
import {
getAppContextTest,
getUniActivityTest,
......@@ -60,7 +63,7 @@
getDeviceInfoTest,
privacyStateTest
} from '@/uni_modules/uts-platform-api'
// #endif
/**
* 测试在页面生命周期之外,使用api
*/
......
......@@ -33,7 +33,7 @@
</template>
<script>
// #ifdef APP-IOS
import {
getCurrentVCTest,
getKeyWindowTest,
......@@ -45,7 +45,7 @@
tepeofTest,
dataConvertTest,
} from "@/uni_modules/uts-platform-api"
// #endif
export default {
data() {
return {
......
......@@ -10,7 +10,9 @@
</template>
<script>
// #ifdef APP
import { showAlert,showPrompt } from '@/uni_modules/uts-alert'
// #endif
export default {
data() {
......
......@@ -10,7 +10,9 @@
</template>
<script>
// #ifdef APP
import { showAlert,showPrompt } from '@/uni_modules/uts-alert'
// #endif
export default {
data() {
......
......@@ -11,11 +11,12 @@
</template>
<script>
// #ifndef H5
import {
onUserCaptureScreen,
offUserCaptureScreen
} from "@/uni_modules/uts-screenshot-listener";
// #endif
export default {
data() {
return {
......
......@@ -17,8 +17,10 @@
</view>
</view>
</template>·
<script>
import { gotoDemoActivity } from "@/uni_modules/uts-nativepage";
<script>
// #ifdef APP-ANDROID
import { gotoDemoActivity } from "@/uni_modules/uts-nativepage";
// #endif
import { getBatteryInfo } from "@/uni_modules/uts-getbatteryinfo";
export default {
......@@ -95,14 +97,16 @@
}
})
},
testGotoDemoActivity() {
testGotoDemoActivity() {
// #ifdef APP-ANDROID
let ret = gotoDemoActivity();
if (!ret) {
uni.showToast({
icon: 'none',
title: '需要在自定义基座中运行'
})
}
}
// #endif
}
}
}
......
......@@ -19,9 +19,10 @@
</scroll-view>
<!-- #endif -->
</template>
<script lang="ts">
import { runTests, Result } from '../../uni_modules/uts-tests'
<script lang="ts">
// #ifdef APP
import { runTests, Result } from '../../uni_modules/uts-tests'
// #endif
export default {
data() {
return {
......
......@@ -16,10 +16,12 @@
</view>
</view>
</template>
<script>
<script>
// #ifdef APP
import {
runTests
} from '../../uni_modules/uts-tests'
} from '../../uni_modules/uts-tests'
// #endif
export default {
data() {
return {
......
export function addViewToDecorView() { }
export function removeViewToDecorView() { }
export function initAppLifecycle() { }
export function getLogoPath() {}
export function playAssetAudio(){}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册