Showing
2 changed files
with
21 additions
and
6 deletions
| ... | @@ -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-24 16:17:28 | 5 | + * @LastEditTime: 2024-12-25 14:49:43 |
| 6 | * @FilePath: /data-table/src/App.vue | 6 | * @FilePath: /data-table/src/App.vue |
| 7 | * @Description: | 7 | * @Description: |
| 8 | --> | 8 | --> |
| ... | @@ -176,7 +176,7 @@ onMounted(async () => { | ... | @@ -176,7 +176,7 @@ onMounted(async () => { |
| 176 | let is_in = isWithinRadius(currentLat, currentLng, targetLat, targetLng, radius); | 176 | let is_in = isWithinRadius(currentLat, currentLng, targetLat, targetLng, radius); |
| 177 | if (!is_in) { | 177 | if (!is_in) { |
| 178 | // 表单定位错误 | 178 | // 表单定位错误 |
| 179 | - $router.push("/stop?status=location_error"); | 179 | + $router.push("/stop?status=location_error&latitude=" + targetLat + "&longitude=" + targetLng); |
| 180 | } | 180 | } |
| 181 | }, | 181 | }, |
| 182 | fail: function (res) { | 182 | fail: function (res) { | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2022-06-29 18:18:02 | 2 | * @Date: 2022-06-29 18:18:02 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-12-24 10:43:11 | 4 | + * @LastEditTime: 2024-12-25 14:55:30 |
| 5 | * @FilePath: /data-table/src/views/stop.vue | 5 | * @FilePath: /data-table/src/views/stop.vue |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | --> | 7 | --> |
| ... | @@ -19,8 +19,9 @@ | ... | @@ -19,8 +19,9 @@ |
| 19 | <span v-if="status === 'apply'">表单未开始</span> | 19 | <span v-if="status === 'apply'">表单未开始</span> |
| 20 | <span v-if="status === 'finish'">表单已结束</span> | 20 | <span v-if="status === 'finish'">表单已结束</span> |
| 21 | <span v-if="status === 'disable'">表单已关闭</span> | 21 | <span v-if="status === 'disable'">表单已关闭</span> |
| 22 | - <span v-if="status === 'get_location_fail'" class="text-error">获取定位授权失败!<br/>请在“设置”中打开<br/>“定位服务”或“位置信息”权限后再试</span> | 22 | + <span v-if="status === 'get_location_fail'" class="text-normal">获取定位授权失败!<br/>请在“设置”中打开<br/>“定位服务”或“位置信息”权限后再试</span> |
| 23 | - <span v-if="status === 'location_error'" class="text-error">提交失败!<br/>表单管理员设置了填表的限定位置<br/>请在指定位置完成提交</span> | 23 | + <span v-if="status === 'location_error'" class="text-normal">提交失败!<br/>表单管理员设置了填表的限定位置<br/>请在指定位置完成提交</span> |
| 24 | + <p v-if="status === 'location_error'" class="text-normal open-location" @click="openLocation">查看打卡点位置</p> | ||
| 24 | </p> | 25 | </p> |
| 25 | <!-- <p style="font-size: 0.9rem; margin-bottom: 0.5rem">您的作品正在审核中</p> --> | 26 | <!-- <p style="font-size: 0.9rem; margin-bottom: 0.5rem">您的作品正在审核中</p> --> |
| 26 | <!-- <p style="font-size: 0.9rem">请耐心等待~~</p> --> | 27 | <!-- <p style="font-size: 0.9rem">请耐心等待~~</p> --> |
| ... | @@ -67,6 +68,16 @@ onMounted(() => {}); | ... | @@ -67,6 +68,16 @@ onMounted(() => {}); |
| 67 | const handle = () => { | 68 | const handle = () => { |
| 68 | $router.go(-1); | 69 | $router.go(-1); |
| 69 | }; | 70 | }; |
| 71 | + | ||
| 72 | +const openLocation = () => { // 打开位置 | ||
| 73 | + wx.openLocation({ | ||
| 74 | + latitude: +$route.query.latitude, | ||
| 75 | + longitude: +$route.query.longitude, | ||
| 76 | + scale: 16, | ||
| 77 | + name: "打卡点", | ||
| 78 | + address: "" | ||
| 79 | + }); | ||
| 80 | +} | ||
| 70 | </script> | 81 | </script> |
| 71 | 82 | ||
| 72 | <style lang="less" scoped> | 83 | <style lang="less" scoped> |
| ... | @@ -85,10 +96,14 @@ const handle = () => { | ... | @@ -85,10 +96,14 @@ const handle = () => { |
| 85 | font-weight: bold; | 96 | font-weight: bold; |
| 86 | } | 97 | } |
| 87 | 98 | ||
| 88 | - .text-error { | 99 | + .text-normal { |
| 89 | font-weight: normal; | 100 | font-weight: normal; |
| 90 | font-size: 1rem; | 101 | font-size: 1rem; |
| 91 | line-height: 1.75; | 102 | line-height: 1.75; |
| 92 | } | 103 | } |
| 104 | + | ||
| 105 | + .open-location { | ||
| 106 | + text-decoration: underline; | ||
| 107 | + } | ||
| 93 | } | 108 | } |
| 94 | </style> | 109 | </style> | ... | ... |
-
Please register or login to post a comment