Browse Source

api修改

hy 7 years ago
parent
commit
e3944282aa

+ 9 - 4
frontend/saas-portal-web/src/pages/invitation_mobile_join/invitation_mobile_join.html

@@ -17,6 +17,11 @@
         <link href="../../../static/css/toast.style.css" rel="stylesheet">
         <script type="text/javascript">
             $(document).ready(function(){ 
+                var hostname = window.location.hostname;
+                var api = 'https://saas-api.usoftchina.com'
+                if(hostname.indexOf('saas-dev')>-1){
+                    api = 'https://saas-api-dev.usoftchina.com:5443'
+                }
                 $( "#dialog-message" ).dialog({
                     autoOpen : false, 
                     modal: true,
@@ -31,7 +36,7 @@
                 var param = getUrlParam('param');
                 var companyId = 0;
                 $.ajax({
-                  url:"https://saas-api.usoftchina.com/api/commons/share/valid/param",
+                  url:api+"/api/commons/share/valid/param",
                   type: "POST",
                   data: "param="+param,
                   async:false,
@@ -44,7 +49,7 @@
                                 $("#sendmsg").text(data.companyName);
                                 document.getElementsByClassName('x-join-center')[0].hidden = false;
                                 $.ajax({
-                                    url:"https://saas-api.usoftchina.com/api/account/role/list/"+data.companyId,
+                                    url:api+"/api/account/role/list/"+data.companyId,
                                     type: "GET",
                                     async:false,
                                     success: function(data){
@@ -101,7 +106,7 @@
                 };
                 if($('#myMobile').attr('valid')=="true"){
                     $.ajax({
-                        url:"https://saas-api.usoftchina.com/api/commons/share/submit",
+                        url:api+"/api/commons/share/submit",
                         type: "POST",
                         async:false,
                         data:JSON.stringify(params),
@@ -128,7 +133,7 @@
                 var mobile = $('#myMobile').val();
                 if(mobile.trim()!=""&&$('#myMobile').attr('valid')=="true"){
                     $.ajax({
-                        url:"https://saas-api.usoftchina.com/api/commons/share/getSmsCode",
+                        url:api+"/api/commons/share/getSmsCode",
                         type: "POST",
                         data:"mobile="+mobile,
                         async:false,