时间:2021-05-18
本文实例讲述了微信小程序开发实现的IP地址查询功能。分享给大家供大家参考,具体如下:
微信小程序 开发 参考 https://mp.weixin.qq.com/debug/wxadoc/dev/component/
search.wxml
<view class="container"> <view class="page-body"> <view class="weui-search-bar {{searchFocusCss}}" id="searchBar"> <view class="weui-search-bar__form"> <view class="weui-search-bar__box"> <icon class="weui-icon-search"></icon> <input type="text" class="weui-search-bar__input" id="searchInput" placeholder="输入IP" confirm-type="search" bindinput="bindKeyInput" bindconfirm="searchSubmit" value="{{searchValue}}" focus="{{focus}}" /> <a href="javascript:" rel="external nofollow" class="weui-icon-clear" id="searchClear" bindtap="searchClearClick"></a> </view> <view class="weui-search-bar__label" id="searchText" bindtap="searchTextClick"> <icon class="weui-icon-search"></icon> <view class="weui-search-bar__label_span">搜索(8.8.8.8)</view> </view> </view> <view class="weui-search-bar__cancel-btn" id="searchCancel" bindtap="searchCancelClick">取消</view> </view> </view> <view class="page-section"> <view class="page-section-title"> <text>查询结果</text> </view> <view class="page-section-spacing"> <scroll-view scroll-y="true" class="ip-scroll" bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll" scroll-into-view="{{toView}}" scroll-top="{{scrollTop}}"> <view class="scroll-view-item"> <view class="view-item-ip"> {{r.ip}}</view> </view> <view class="weui-cell"> <view class="weui-cell__bd"> <text>{{r.continent}}</text> </view> <view class="weui-cell__ft">大洲</view> </view> <view class="weui-cell"> <view class="weui-cell__bd"> <text>{{r.country}}</text> </view> <view class="weui-cell__ft">国家</view> </view> <view class="weui-cell"> <view class="weui-cell__bd"> <text>{{r.province}}</text> </view> <view class="weui-cell__ft">省份</view> </view> <view class="weui-cell"> <view class="weui-cell__bd"> <text>{{r.city}}</text> </view> <view class="weui-cell__ft">城市</view> </view> <view class="weui-cell"> <view class="weui-cell__bd"> <text>{{r.district}}</text> </view> <view class="weui-cell__ft">县区</view> </view> <view class="weui-cell"> <view class="weui-cell__bd"> <text>{{r.isp}}</text> </view> <view class="weui-cell__ft">运营商</view> </view> <view class="weui-cell"> <view class="weui-cell__bd"> <text>{{r.areacode}}</text> </view> <view class="weui-cell__ft">行政区划</view> </view> <view class="weui-cell"> <view class="weui-cell__bd"> <text>{{r.en}}</text> </view> <view class="weui-cell__ft">国家英文</view> </view> <view class="weui-cell"> <view class="weui-cell__bd"> <text>{{r.cc}}</text> </view> <view class="weui-cell__ft">国家缩写</view> </view> <view class="weui-cell"> <view class="weui-cell__bd"> <text>{{r.lng}}</text> </view> <view class="weui-cell__ft">经度</view> </view> <view class="weui-cell"> <view class="weui-cell__bd"> <text>{{r.lat}}</text> </view> <view class="weui-cell__ft">纬度</view> </view> <view class="weui-cell"> <view class="weui-cell__bd"> <text>{{r.version}}</text> </view> <view class="weui-cell__ft">版本</view> </view> </scroll-view> <view class="ip-tip">滚动查看内容</view> </view> </view></view>search.js
Page({ data: { inputValue: '', focus: false, searchFocusCss: '', r: [] }, onReady: function () { var that = this; wx.request({ url: 'https:///zengzhan/qqzeng-ip希望本文所述对大家微信小程序开发有所帮助。
声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。
在微信小程序项目中,开发模块涉及到手写签名功能,微信小程序canvas闪亮登场前言微信小程序canvas实现签名功能核心内容简介:(1)签名实现,开始,移动,结
本文实例讲述了微信小程序实现的一键复制功能。分享给大家供大家参考,具体如下:微信小程序不支持页面复制功能,故要实现某些信息的复制,需要开发复制功能微信小程序中复
微信小程序已占据很多的市场份额,目前也开发了很多的功能,所以小程序的前景更被看好,相信随着时间推移,小程序必定会开发更多的功能,未来小程序和微信将实现更佳的链接
企业微信小程序的开发通过企业微信小程序模拟器插件来实现,方便用户在微信开发者工具中进行企业微信小程序开发、调试和代码上传。一、开发须知开发者在使用企业微信小程序
我们在微信小程序中经常会使用到分享商品海报,或者是重绘微信小程序分享链的图片功能。实现该功能只要跟着如下几个步骤就可以快速实现啦!(本文示例代码使用的是uni-