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

Merge branch 'dev' into alpha

......@@ -11,14 +11,12 @@
</view>
</template>
<script>
// #ifndef H5
import {
checkHasIntegration
} from "@/uni_modules/uts-tencentgeolocation";
import {
checkHasLottieIntegration
} from "@/uni_modules/uts-animation-view";
// #endif
export default {
......@@ -53,7 +51,6 @@
})
},
gotoLottie: function(e) {
// #ifndef H5
if (checkHasLottieIntegration()) {
uni.navigateTo({
url: '/pages/SDKIntegration/Lottie/index'
......@@ -64,8 +61,6 @@
title: '需要在自定义基座中运行'
})
}
// #endif
},
gotoTencentLocation: function(e) {
......
......@@ -22,15 +22,14 @@
</template>
<script>
// #ifndef H5
import {
checkHasIntegration,
requestPremission,
getLocation,
watchPosition,
clearWatch
} from "@/uni_modules/uts-tencentgeolocation";
// #endif
} from "@/uni_modules/uts-tencentgeolocation";
export default {
data() {
return {
......
......@@ -19,7 +19,6 @@
import { showToast } from '@/uni_modules/uts-toast'
export default {
data() {
......
......@@ -45,7 +45,6 @@
</template>
<script>
// #ifdef APP-ANDROID
import {
getAppContextTest,
getUniActivityTest,
......@@ -63,7 +62,6 @@
getDeviceInfoTest,
privacyStateTest
} from '@/uni_modules/uts-platform-api'
// #endif
/**
* 测试在页面生命周期之外,使用api
*/
......
......@@ -33,7 +33,6 @@
</template>
<script>
// #ifndef APP-ANDROID
import {
getCurrentVCTest,
getKeyWindowTest,
......@@ -45,7 +44,6 @@
tepeofTest,
dataConvertTest,
} from "@/uni_modules/uts-platform-api"
// #endif
export default {
......
......@@ -18,9 +18,7 @@
</view>
</template>·
<script>
// #ifdef APP-ANDROID
import { gotoDemoActivity } from "@/uni_modules/uts-nativepage";
// #endif
import { getBatteryInfo } from "@/uni_modules/uts-getbatteryinfo";
export default {
......@@ -89,7 +87,7 @@
testGetBatteryCapacity() {
getBatteryInfo({
success(res) {
console.log(res)
console.log(res)
uni.showToast({
title: "当前电量:" + res.level + '%',
icon: 'none'
......@@ -98,7 +96,6 @@
})
},
testGotoDemoActivity() {
// #ifdef APP-ANDROID
let ret = gotoDemoActivity();
if (!ret) {
uni.showToast({
......@@ -106,7 +103,6 @@
title: '需要在自定义基座中运行'
})
}
// #endif
}
}
}
......
......@@ -17,11 +17,9 @@
</view>
</template>
<script>
// #ifdef APP
import {
runTests
} from '../../uni_modules/uts-tests'
// #endif
export default {
data() {
return {
......
......@@ -93,10 +93,15 @@ export function getAppTempPathTest() : boolean {
if (UTSAndroid.getAppCachePath()!.contains("uni.UNI70BE9D0/apps/__UNI__70BE9D0/temp")) {
return true
}
let cachePath = UTSAndroid.getAppCachePath()!
// 2.0的路径
if (UTSAndroid.getAppCachePath()!.contains("cache/temp")) {
if (cachePath.contains("io.dcloud.uniappx/cache")) {
return true
}
// 2.0 自定义基座的情况
if (cachePath.contains("uni.UNI70BE9D0/cache")) {
return true
}
return false
}
......
......@@ -32,9 +32,9 @@ export function testGlobal(): Result {
expect(isNaN(parseInt("345", 2))).toEqual(true)
expect(isNaN(parseInt("hello"))).toEqual(true)
expect(parseInt("6.022e23")).toEqual(6)
expect(parseInt("9223372036854775807")).toEqual(9.223372036854778e+18)
expect(parseInt("9223372036854775807000")).toEqual(9.223372036854777e+21)
expect(parseInt("922337203685477580700099999999999999999999999999999999999999999999999999999999999999999")).toEqual(9.223372036854776e+86)
expect(parseInt("9223372036854775807")).toEqualNumber(9.223372036854778e+18)
expect(parseInt("9223372036854775807000")).toEqualNumber(9.223372036854777e+21)
expect(parseInt("922337203685477580700099999999999999999999999999999999999999999999999999999999999999999")).toEqualNumber(9.223372036854776e+86)
expect(parseInt("50") / 100).toEqualNumber(0.5);
expect(parseInt("500") / 100).toEqualNumber(5);
......
......@@ -98,7 +98,13 @@ export function testNumber() : Result {
expect(a.toString(2).substring(0,32)).toEqual("10010110011101101001100101010000");
expect(a.toString(2).substring(100)).toEqual("000000000000000000000000000");
const b = 1e22
expect(b.toString(12)).toEqual("27373a86ba1a194a65054");
const bStr12 = b.toString(12)
/**
* 移动端: 27373a86ba1a194a65054
* 浏览器端:27373a86ba1a195400000
*/
expect(bStr12.length).toEqual(21);
expect(bStr12.substring(0,14)).toEqual("27373a86ba1a19");
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册