智慧保安互联网APP
shuishen
2021-08-13 18bc56d4176b90ab5a1afceddcfa3ce55da5e070
store/actions.js
@@ -4,8 +4,7 @@
const getLocationData = (userId) => {
   var geolocation = new qq.maps.Geolocation("T7RBZ-62U3X-RSQ4P-ZZVCB-WE7JT-HRBOG", "mapqq");
   var geolocation = new qq.maps.Geolocation("T7RBZ-62U3X-RSQ4P-ZZVCB-WE7JT-HRBOG", "myapp");
   var positionNum = 0;
   var options = {
      timeout: 8000
@@ -88,7 +87,6 @@
         //    // dataType: 'JSON',
         success: (res) => {
            if (res.statusCode == 200) {
               console.log(res)
               if (res.data.error_code == "400") {
                  uni.showToast({
                     title: '密码错误,请重试',
@@ -98,7 +96,6 @@
                  return;
               }
               store.commit('getUserData', res.data)
               // console.log(res.data,123542);
               data.isit = true;
               data.userName = res.data.nick_name; //警袁姓名
               data.userID = res.data.user_id; //警袁id
@@ -106,8 +103,13 @@
               data.accounts = data.name;
               data.pass = data.pass;
               // data.userPhon = res.user_id;
               uni.getLocation({
                  type: 'wgs84',
                  geocode: true,
                  success: (res) => {
                  }
               })
               getLocationData(res.data.user_id)
               setInterval(function() {
                     getLocationData(res.data.user_id);
                  },