SDKIntegration.vue 1.4 KB
Newer Older
杜庆泉's avatar
init  
杜庆泉 已提交
1 2
<template>
	<view>
杜庆泉's avatar
杜庆泉 已提交
3
		<page-head :title="title"></page-head>
杜庆泉's avatar
杜庆泉 已提交
4 5
		<uni-list>
			<uni-list-item @tap="gotoTencentLocation" title="腾讯定位sdk集成示例" class="itemButton" :clickable="true" link/>
6
			<uni-list-item @tap="gotoToast" title="Toast示例" class="itemButton" :clickable="true" link/>
打打卡夫卡's avatar
打打卡夫卡 已提交
7
			<uni-list-item @tap="gotoLottie" title="Lottie动画示例" class="itemButton" :clickable="true" link/>
杜庆泉's avatar
杜庆泉 已提交
8
		</uni-list>
杜庆泉's avatar
init  
杜庆泉 已提交
9 10 11 12
	</view>
</template>

<script>
杜庆泉's avatar
杜庆泉 已提交
13
	 
14 15 16 17
	 import {
	 	checkHasIntegration
	 } from "@/uni_modules/uts-tencentgeolocation";
	 
打打卡夫卡's avatar
打打卡夫卡 已提交
18 19 20 21
	 import {
	 	checkHasLottieIntegration
	 } from "@/uni_modules/uts-animation-view";
	 
杜庆泉's avatar
init  
杜庆泉 已提交
22 23 24
	export default {
		data() {
			return {
杜庆泉's avatar
杜庆泉 已提交
25
				title: 'SDK集成示例',
杜庆泉's avatar
init  
杜庆泉 已提交
26 27 28
			}
		},
		methods: {
杜庆泉's avatar
杜庆泉 已提交
29
			
30
			gotoToast:function(e){
杜庆泉's avatar
杜庆泉 已提交
31
				uni.navigateTo({
32
					url:'/pages/SDKIntegration/Toast/Toast'
杜庆泉's avatar
杜庆泉 已提交
33
				})
杜庆泉's avatar
杜庆泉 已提交
34
			},
打打卡夫卡's avatar
打打卡夫卡 已提交
35 36 37 38 39
			gotoLottie:function(e){
				uni.navigateTo({
					url:'/pages/SDKIntegration/Lottie/index'
				})
			},
杜庆泉's avatar
杜庆泉 已提交
40
			gotoTencentLocation:function(e){
41 42 43 44 45 46 47 48 49 50 51 52 53
				
				let ret = checkHasIntegration();
				if(!ret){
					uni.showToast({
						icon:'none',
						title:'需要在自定义基座中运行'
					})
				}else{
					uni.navigateTo({
						url:'/pages/SDKIntegration/TencentLocation/TencentLocation'
					})
				}
				
杜庆泉's avatar
杜庆泉 已提交
54 55 56 57 58
			},
			gotoTencentMap:function(e){
				uni.navigateTo({
					url:'/pages/SDKIntegration/TencentMap/TencentMap'
				})
DCloud_iOS_XHY's avatar
DCloud_iOS_XHY 已提交
59
			}
杜庆泉's avatar
init  
杜庆泉 已提交
60 61 62 63 64 65 66
		}
	}
</script>

<style>

</style>