首页

java 微信公众号地理位置获取

java

2020-6-29

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<html>
<head>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script>
    wx.config({
        appId: '${appId}',
        timestamp: parseInt("${timestamp}",10), 
        nonceStr: '${noncestr}',
        signature: '${signature}',
        jsApiList: [
            'getLocation'
        ]
    });
    wx.ready(function(){
    	
    });

    wx.error(function(res){
    });
</script>
</head>
<body>
<button id="getBBS" onclick="submitOrderInfoClick();">获取地理位置</button>
</body>
<script type="text/javascript">
function submitOrderInfoClick(){
  wx.getLocation({
	    success: function (res) {
	    	alert("经纬度为:("   res.latitude   ","   res.longitude   ")" );
        },
        fail: function(error) {
        	alert("获取地理位置失败,请确保开启GPS且允许微信获取您的地理位置!");
        }
	});
}
</script>
</html>
资源下载此资源下载价格为3D币(VIP免费),请先
资源文件列表
first_maven_project/.classpath , 1517
first_maven_project/.project , 1584
first_maven_project/.settings/.jsdtscope , 575
first_maven_project/.settings/org.eclipse.core.resources.prefs , 168
first_maven_project/.settings/org.eclipse.jdt.core.prefs , 736
first_maven_project/.settings/org.eclipse.m2e.core.prefs , 90
first_maven_project/.settings/org.eclipse.wst.common.component , 708
first_maven_project/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml , 321
first_maven_project/.settings/org.eclipse.wst.common.project.facet.core.xml , 346
first_maven_project/.settings/org.eclipse.wst.jsdt.ui.superType.container , 49
first_maven_project/.settings/org.eclipse.wst.jsdt.ui.superType.name , 6
first_maven_project/.settings/org.eclipse.wst.validation.prefs , 50
first_maven_project/pom.xml , 3286
first_maven_project/src/main/java/com/ty/controller/HttpXmlClient.java , 3825
first_maven_project/src/main/java/com/ty/controller/UserController.java , 3293
first_maven_project/src/main/resources/application.xml , 725
first_maven_project/src/main/resources/springmvc/spring-mvc.xml , 1096
first_maven_project/src/main/webapp/META-INF/MANIFEST.MF , 39
first_maven_project/src/main/webapp/WEB-INF/view/index.jsp , 1015
first_maven_project/src/main/webapp/WEB-INF/web.xml , 2298
first_maven_project/target/classes/application.xml , 725
first_maven_project/target/classes/com/ty/controller/HttpXmlClient.class , 5481
first_maven_project/target/classes/com/ty/controller/UserController.class , 3945
first_maven_project/target/classes/springmvc/spring-mvc.xml , 1096
first_maven_project/target/first_maven_project-0.0.1-SNAPSHOT/META-INF/MANIFEST.MF , 39
first_maven_project/target/first_maven_project-0.0.1-SNAPSHOT/WEB-INF/classes/application.xml , 725
first_maven_project/target/first_maven_project-0.0.1-SNAPSHOT/WEB-INF/classes/com/luo/controller/UserController.class , 3942
first_maven_project/target/first_maven_project-0.0.1-SNAPSHOT/WEB-INF/classes/com/luo/util/HttpXmlClient.class , 5470
first_maven_project/target/first_maven_project-0.0.1-SNAPSHOT/WEB-INF/classes/com/ty/controller/HttpXmlClient.class , 5481
first_maven_project/target/first_maven_project-0.0.1-SNAPSHOT/WEB-INF/classes/com/ty/controller/UserController.class , 3945
first_maven_project/target/first_maven_project-0.0.1-SNAPSHOT/WEB-INF/classes/springmvc/spring-mvc.xml , 1096
first_maven_project/target/first_maven_project-0.0.1-SNAPSHOT/WEB-INF/lib/aopalliance-1.0.jar , 4467
first_maven_project/target/first_maven_project-0.0.1-SNAPSHOT/WEB-INF/lib/aspectjweaver-1.7.4.jar , 1850391
first_maven_project/target/first_maven_project-0.0.1-SNAPSHOT/WEB-INF/lib/commons-beanutils-1.8.0.jar , 231320
first_maven_project/target/first_maven_project-0.0.1-SNAPSHOT/WEB-INF/lib/commons-codec-1.9.jar , 263965
first_maven_project/target/first_maven_project-0.0.1-SNAPSHOT/WEB-INF/lib/commons-collections-3.2.1.jar , 575389
first_maven_project/target/first_maven_project-0.0.1-SNAPSHOT/WEB-INF/lib/commons-lang-2.5.jar , 279193
first_maven_project/target/first_maven_project-0.0.1-SNAPSHOT/WEB-INF/lib/commons-logging-1.1.3.jar , 62050
first_maven_project/target/first_maven_project-0.0.1-SNAPSHOT/WEB-INF/lib/ezmorph-1.0.6.jar , 86487
first_maven_project/target/first_maven_project-0.0.1-SNAPSHOT/WEB-INF/lib/httpclient-4.5.1.jar , 732765
first_maven_project/target/first_maven_project-0.0.1-SNAPSHOT/WEB-INF/lib/httpcore-4.4.3.jar , 326594
first_maven_project/target/first_maven_project-0.0.1-SNAPSHOT/WEB-INF/lib/json-lib-2.4-jdk15.jar , 159123
first_maven_project/target/first_maven_project-0.0.1-SNAPSHOT/WEB-INF/lib/spring-aop-3.2.8.RELEASE.jar , 337694
first_maven_project/target/first_maven_project-0.0.1-SNAPSHOT/WEB-INF/lib/spring-aspects-3.2.8.RELEASE.jar , 51456
first_maven_project/target/first_maven_project-0.0.1-SNAPSHOT/WEB-INF/lib/spring-beans-3.2.8.RELEASE.jar , 612569
first_maven_project/target/first_maven_project-0.0.1-SNAPSHOT/WEB-INF/lib/spring-context-3.2.8.RELEASE.jar , 866273
first_maven_project/target/first_maven_project-0.0.1-SNAPSHOT/WEB-INF/lib/spring-context-support-3.2.8.RELEASE.jar , 128595
first_maven_project/target/first_maven_project-0.0.1-SNAPSHOT/WEB-INF/lib/spring-core-3.2.8.RELEASE.jar , 873608
first_maven_project/target/first_maven_project-0.0.1-SNAPSHOT/WEB-INF/lib/spring-expression-3.2.8.RELEASE.jar , 196367
first_maven_project/target/first_maven_project-0.0.1-SNAPSHOT/WEB-INF/lib/spring-jdbc-3.2.8.RELEASE.jar , 405717
first_maven_project/target/first_maven_project-0.0.1-SNAPSHOT/WEB-INF/lib/spring-tx-3.2.8.RELEASE.jar , 242436
first_maven_project/target/first_maven_project-0.0.1-SNAPSHOT/WEB-INF/lib/spring-web-3.2.8.RELEASE.jar , 628456
first_maven_project/target/first_maven_project-0.0.1-SNAPSHOT/WEB-INF/lib/spring-webmvc-3.2.8.RELEASE.jar , 637903
first_maven_project/target/first_maven_project-0.0.1-SNAPSHOT/WEB-INF/lib/xalan-2.7.0.jar , 2730442
first_maven_project/target/first_maven_project-0.0.1-SNAPSHOT/WEB-INF/lib/xercesImpl-2.8.0.jar , 1207073
first_maven_project/target/first_maven_project-0.0.1-SNAPSHOT/WEB-INF/lib/xml-apis-1.3.03.jar , 195119
first_maven_project/target/first_maven_project-0.0.1-SNAPSHOT/WEB-INF/lib/xom-1.2.5.jar , 308863
first_maven_project/target/first_maven_project-0.0.1-SNAPSHOT/WEB-INF/view/index.jsp , 1015
first_maven_project/target/first_maven_project-0.0.1-SNAPSHOT/WEB-INF/web.xml , 2298
first_maven_project/target/first_maven_project-0.0.1-SNAPSHOT.war , 12652633
first_maven_project/target/m2e-wtp/web-resources/META-INF/MANIFEST.MF , 110
first_maven_project/target/m2e-wtp/web-resources/META-INF/maven/com.luo/first_maven_project/pom.properties , 361
first_maven_project/target/m2e-wtp/web-resources/META-INF/maven/com.luo/first_maven_project/pom.xml , 3286
first_maven_project/target/maven-archiver/pom.properties , 125
first_maven_project/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst , 0
first_maven_project/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst , 287
first_maven_project/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst , 0
没有账号? 忘记密码?

社交账号快速登录