hookehuyr

判断定位填表功能,调整查询字段

...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
2 * @Author: hookehuyr hookehuyr@gmail.com 2 * @Author: hookehuyr hookehuyr@gmail.com
3 * @Date: 2022-05-26 23:52:36 3 * @Date: 2022-05-26 23:52:36
4 * @LastEditors: hookehuyr hookehuyr@gmail.com 4 * @LastEditors: hookehuyr hookehuyr@gmail.com
5 - * @LastEditTime: 2024-12-20 17:53:24 5 + * @LastEditTime: 2024-12-23 17:06:55
6 * @FilePath: /data-table/src/App.vue 6 * @FilePath: /data-table/src/App.vue
7 * @Description: 7 * @Description:
8 --> 8 -->
...@@ -163,11 +163,11 @@ onMounted(async () => { ...@@ -163,11 +163,11 @@ onMounted(async () => {
163 wx.ready(() => { 163 wx.ready(() => {
164 wx.showAllNonBaseMenuItem(); 164 wx.showAllNonBaseMenuItem();
165 // TEST:判断定位填表功能, 可能会弹出来上一次的表单提示,因为如果定位正确时还是需要恢复相应的表单 165 // TEST:判断定位填表功能, 可能会弹出来上一次的表单提示,因为如果定位正确时还是需要恢复相应的表单
166 - let open_location = false; 166 + let open_location = form_setting.geofence_enable;
167 if (force_back !== '1' && open_location) { // 非后台用户模式 167 if (force_back !== '1' && open_location) { // 非后台用户模式
168 - const targetLat = 31.278001; 168 + const targetLat = form_setting.geofence_center_latitude;
169 - const targetLng = 121.542778; 169 + const targetLng = form_setting.geofence_center_longitude;
170 - const radius = 1000; // 半径 1000 米 170 + const radius = form_setting.geofence_circle_radius; // 半径 1000 米
171 wx.getLocation({ 171 wx.getLocation({
172 type: 'wgs84', // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02' 172 type: 'wgs84', // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
173 success: function (res) { 173 success: function (res) {
......