Browse Source

修改接口调用的url

Reiskuchen 5 years ago
parent
commit
2e4ff67398
2 changed files with 6 additions and 6 deletions
  1. 5 5
      minigame/WebContent/static/lottery.html
  2. 1 1
      minigame/WebContent/static/result.html

+ 5 - 5
minigame/WebContent/static/lottery.html

@@ -30,7 +30,7 @@
             
             
             //获取
-            $.post("../prize/luckDrawList", {}, function(resp) {
+            $.post("./prize/luckDrawList", {}, function(resp) {
 				if (resp.code == 'error') {
 					console.log(resp.code);
 				}else{
@@ -49,7 +49,7 @@
             $(".button").click(function () {
                 if(enable == true){
 					//获取抽奖结果
-                    $.post("../prize/luckDraw", {userId: id}, function(resp) {
+                    $.post("./prize/luckDraw", {userId: id}, function(resp) {
         				if (resp.code == 'error') {
         					alert(resp.msg);
         				}else{
@@ -103,7 +103,7 @@
                 if(name == "" || phone == ""){
                 	alert("请填写完整信息");
                 }else{
-                	$.post("../prize/luckDrawAddInfo", {
+                	$.post("./prize/luckDrawAddInfo", {
                 		id: id,
                 		phone: phone,
                 		username: name
@@ -184,7 +184,7 @@
         document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
     		//发送给好友
     		WeixinJSBridge.on('menu:share:appmessage', function(argv){
-    			$.post("../prize/luckDrawAddShare", {uid: id}, function(resp) {
+    			$.post("./prize/luckDrawAddShare", {uid: id}, function(resp) {
     				if (resp.code == 'error') {
     					console.log(resp.code);
     				}else{
@@ -194,7 +194,7 @@
     		});
     		//分享到朋友圈
     		WeixinJSBridge.on('menu:share:timeline', function(argv){
-    			$.post("../prize/luckDrawAddShare", {uid: id}, function(resp) {
+    			$.post("./prize/luckDrawAddShare", {uid: id}, function(resp) {
     				if (resp.code == 'error') {
     					console.log(resp.code);
     				}else{

+ 1 - 1
minigame/WebContent/static/result.html

@@ -16,7 +16,7 @@
     <link href="https://cdn.bootcss.com/twitter-bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet">
     <script type="text/javascript">
 	    $(function(){
-	    	$.post("../prize/luckDrawListBack", {}, function(resp) {
+	    	$.post("./prize/luckDrawListBack", {}, function(resp) {
 				if (resp.code == 'error') {
 					console.log(resp.code);
 				}else{