wr1207
2023-10-23 bde305f2c01d6248f8b290c7dee5386d32e9bfd6
区县区县添加
2个文件已修改
16 ■■■■■ 已修改文件
js/indexM.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
mobile/index.html 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
js/indexM.js
@@ -50,6 +50,9 @@
  // catch (err) {
  //   window.top.location = mars3d.global_variables.un_authorization_url;
  // }
  mars3d.global_variables.regionCode = localStorage.getItem("regionCode");
  mars3d.global_variables.userid = localStorage.getItem("user_id_");
 
  if(!mars3d.global_variables.userid) {
    mars3d.global_variables.userid = 2;
mobile/index.html
@@ -24,9 +24,9 @@
  <!--第三方lib-->
  <link href="css/style.css" rel="stylesheet" />
  <script>
    if(localStorage.getItem('user_id_') != null) {
      window.location = "../mobile/cars.html";
    }
    // if(localStorage.getItem('user_id_') != null) {
    //   window.location = "../mobile/cars.html";
    // }
  </script>
</head>
@@ -35,7 +35,7 @@
    <div class="login-head">
      <img src="../img/logo.png" class="login-logo" />
      上海市道路交通环境监测平台
      <p>为持续改善空气质量而努力</p>
      <p>让上海的道路环境更加美好</p>
    </div>
    <div class="login-form" id="road">
      <form id="myform">
@@ -45,7 +45,7 @@
      </form>
      <script>
        function DoAjax() {
          // debugger;
          debugger;
          $.ajax({
            type: "get",
            url: default_system_params.nodejs_url_predix+"dataapi/Bdata?bid=mobile_login",
@@ -56,6 +56,7 @@
              window.location = "../mobile";
            },
            success: function (data) {
              debugger;
              data = data.data;
              if(!data && !data.result) {
                alert("连接错误!");
@@ -69,6 +70,8 @@
              if(record.status == 0 && record.is_deleted ==0) {
                localStorage.setItem("user_id_",record.id);
                localStorage.setItem("name",record.name);
                localStorage.setItem("regionCode", data.result.length>1 ? "1": record.divcode);
                //mars3d.global_variables.regionCode = record.divcode;
                window.location = "../mobile/cars.html";                
              } else {
                alert("账号异常!");