fix: login ua

This commit is contained in:
RB 2022-03-12 15:51:00 +08:00
parent 49099cb32f
commit e99608a856
2 changed files with 6 additions and 3 deletions

View file

@ -244,8 +244,11 @@ public class LoginController extends BaseController {
try {
UserAgent uas = UserAgent.parseUserAgentString(ua);
uaClear = uas.getBrowser().toString();
if (uas.getBrowserVersion() != null) uaClear = "-" + uas.getBrowserVersion();
uaClear = uas.getBrowser().name();
if (uas.getBrowserVersion() != null) {
String mv = uas.getBrowserVersion().getMajorVersion();
if (!uaClear.endsWith(mv)) uaClear += "-" + mv;
}
OperatingSystem os = uas.getOperatingSystem();
if (os != null) {

View file

@ -871,7 +871,7 @@ var $autoLocation = function (call) {
geo.getCurrentPosition(function (e) {
if (this.getStatus() === window.BMAP_STATUS_SUCCESS) {
var geoc = new window.BMapGL.Geocoder()
geoc.getLocation(e.point, (r) => {
geoc.getLocation(e.point, function (r) {
var v = {
lat: e.latitude,
lng: e.longitude,