/**
    wx.chooseLocation({
      success: function (res) {
        console.log("签到", res)
        if (res.latitude && res.longitude) {
          that.setData({
            \'signInObj.signInName\': res.name,//地址名
            \'signInObj.signInAddress\': res.address,//地址
            \'signInObj.signInLatitude\': res.latitude,//纬度
            \'signInObj.signInLongitude\': res.longitude,//经度
            \'signInObj.signInState\': "已签到",//签到标记
            \'signInObj.signInTime\': util.serverFormatTime(new Date()),
            signInTime: util.frontFormatTime(new Date())
          })
        } else {
          wx.showModal({
            confirmColor: \'#2c89da\',
            cancelColor: \'#515151\',
            confirmText: \'好的\',
            content: \'没有经纬度将无法提交,请打开手机GPS定位再试\',
            showCancel: false,
            title: \'没有获取到经纬度信息\',
            success: (result) => { },
            fail: (res) => { },
            complete: (res) => { },
          })
        }
      }, fail: function (res) {
        wx.showToast({
          title: \'获取位置失败!\',
          duration: 1800,
          icon: \'none\',
          mask: false,
        })
        console.error("getLocation:fail");
      }, complete: function (res) {
        // console.log("获取签到位置信,结束!");
      }
    });
     */

  

版权声明:本文为gzhbk原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/gzhbk/p/13748187.html