32435
32435
  • 发布:2018-10-10 16:28
  • 更新:2018-10-11 14:38
  • 阅读:3971

请问uni-app如何获取api的返回值

分类:uni-app
<template>  
    <view>  
        <page-head :title="title"></page-head>  
        <view class="page-body">  

            <view  class="page-section page-section-gap" id="aa" style="height: 200px;">  
                <map :latitude="latitude" :longitude="longitude" :markers="covers" @markertap="func1(e)">  
                </map>  

            </view>  

        </view>  
    </view>  
</template>  

<script>  

 export default {  
        data() {  
            return {  
                title: 'map',  
                latitude: 39.909,  
                longitude: 116.39742,  
                covers: [{  
                    label:{  
                        content:"说啥"  
                    },  
                    id:123,  
                    latitude: 39.909,  
                    longitude: 116.39742,  
                    iconPath: '../../static/img/sinaweibo.png'  
                }, {  

                    id:345,   
                    latitude: 39.90,  
                    longitude: 116.39,  
                    iconPath: '../../static/img/sinaweibo.png'  
                }]  

            }  
        },  
        methods: {  
           func1:function(e){  
               plus.nativeUI.alert(e.id)  
           }   
        }  
    }

我这样写是获取不到,请问如何获取这个id

2018-10-10 16:28 负责人:无 分享
已邀请:
Trust

Trust - 少说废话

没太明白什么意思,麻烦描述详细一点,或者上传下完整的demo,讲清楚你想要干什么。

该问题目前已经被锁定, 无法添加新回复