Browse Source

fix lock car api

git 5 years ago
parent
commit
3e6397f87c
2 changed files with 5 additions and 3 deletions
  1. 2 2
      config/config.js
  2. 3 1
      pages/amap/amap.js

+ 2 - 2
config/config.js

@@ -1,7 +1,7 @@
 var config = {
     //webapi: 'http://localhost:31173/'// 后台地址
 	//webapi: 'http://www.renlian.cn/admsapi/'
-	//webapi: 'http://czapp.rltest.cn'
-	webapi: 'http://czapi.zgjtgs.com'
+	webapi: 'http://czapp.rltest.cn'
+	// webapi: 'http://czapi.zgjtgs.com'
 	//webapi: 'http://hfczapi.renlianiot.com'
 };

+ 3 - 1
pages/amap/amap.js

@@ -396,13 +396,15 @@
 
                 var postData = {
                     deviceNumber: renlian.storage.get('userinfo').baseinfo.deviceNumber,
+                    gpsNumber: renlian.storage.get('userinfo').baseinfo.gpsNumber,
+                    plate: renlian.storage.get('userinfo').baseinfo.plate,
                     lockStatus: lockStatus.hasClass('icon-jiesuo') ? 1 : 0
                 }
 
 
                 renlian.httppost(config.webapi+'?s=api/change_lock_status',postData,function(res){
                     if(!res.success){
-                        // renlian.layer.toast('锁车失败');
+                        renlian.layer.toast(res.message);
                         return;
                     }
                     if(lockStatus.hasClass('icon-jiesuo')){