From 696a0561d73970efdef2136d111269f626369fc9 Mon Sep 17 00:00:00 2001
From: 闫增涛 <1829501689@qq.com>
Date: 星期三, 27 三月 2024 16:58:10 +0800
Subject: [PATCH] 登录功能记录登录信息完善

---
 assets/js/userAction.js |   58 +++++-----------------------------------------------------
 1 files changed, 5 insertions(+), 53 deletions(-)

diff --git a/assets/js/userAction.js b/assets/js/userAction.js
index 9231bb6..cdfd7e3 100644
--- a/assets/js/userAction.js
+++ b/assets/js/userAction.js
@@ -2,34 +2,15 @@
 import jobApi from "./middleGround/api/job";// newJobWithNewView // newSession,
 
 export function setSessionGuid(type, id) {
-  var cityCode = null;
-  var SnIp = null;
-  try {
-    // eslint-disable-next-line
-    // SnIp = window.returnCitySN;
-  } catch (error) {
-    SnIp = null;
-    console.log(error);
-  }
-  if (SnIp != undefined && SnIp != null) {
-    cityCode = SnIp;
-  } else {
-    cityCode = {
-      cip: "0.0.0.0",
-      cname: "鏈煡",
-    };
-  }
-  const _city = cityCode.cname.substring(3);
-  const _province = cityCode.cname.substring(0, 3);
   const params = {
     appRefCode: config.appRefCode,
     hostName: config.requestCtx,
-    ipAddress: cityCode.cip,
-    browser: myBrowser(),
-    os: navigator.platform,
+    ipAddress: "0.0.0.0", // 鍚庡彴鑾峰彇,鍓嶅彴闅忎究浼�
+    browser: 'WeChatApp',
+    os: 'WeChat',
     device: "pc",
-    province: _province,
-    city: _city ? _city : _province,
+    province: "鏈煡",// 鍚庡彴鑾峰彇,鍓嶅彴闅忎究浼�
+    city: "鏈煡",// 鍚庡彴鑾峰彇,鍓嶅彴闅忎究浼�
   };
 
   jobApi.newSession(params).then(res => {
@@ -80,35 +61,6 @@
     return val;
   },
 };
-
-function myBrowser() {
-  const userAgent = navigator.userAgent; //鍙栧緱娴忚鍣ㄧ殑userAgent瀛楃涓�
-  const isOpera = userAgent.indexOf("Opera") > -1;
-  if (isOpera) {
-    //鍒ゆ柇鏄惁Opera娴忚鍣�
-    return "Opera";
-  }
-  if (userAgent.indexOf("Firefox") > -1) {
-    //鍒ゆ柇鏄惁Firefox娴忚鍣�
-    return "Firefox";
-  }
-  if (userAgent.indexOf("Chrome") > -1) {
-    return "Chrome";
-  }
-  if (userAgent.indexOf("Safari") > -1) {
-    //鍒ゆ柇鏄惁Safari娴忚鍣�
-    return "Safari";
-  }
-  if (
-    userAgent.indexOf("compatible") > -1 &&
-    userAgent.indexOf("MSIE") > -1 &&
-    !isOpera
-  ) {
-    //鍒ゆ柇鏄惁IE娴忚鍣�
-    return "IE";
-  }
-  return "";
-}
 
 export function setNewView(type, id) {
   if (!wx.getStorageSync("sessionGuid")) {

--
Gitblit v1.9.1