Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
data-table
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
hookehuyr
2024-12-25 14:55:52 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
68d9b1f69442a32484a5aaa4ce487fde207312e2
68d9b1f6
1 parent
47704f49
新增查看打卡点功能
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
6 deletions
src/App.vue
src/views/stop.vue
src/App.vue
View file @
68d9b1f
...
...
@@ -2,7 +2,7 @@
* @Author: hookehuyr hookehuyr@gmail.com
* @Date: 2022-05-26 23:52:36
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-12-2
4 16:17:28
* @LastEditTime: 2024-12-2
5 14:49:43
* @FilePath: /data-table/src/App.vue
* @Description:
-->
...
...
@@ -176,7 +176,7 @@ onMounted(async () => {
let is_in = isWithinRadius(currentLat, currentLng, targetLat, targetLng, radius);
if (!is_in) {
// 表单定位错误
$router.push("/stop?status=location_error
"
);
$router.push("/stop?status=location_error
&latitude=" + targetLat + "&longitude=" + targetLng
);
}
},
fail: function (res) {
...
...
src/views/stop.vue
View file @
68d9b1f
<!--
* @Date: 2022-06-29 18:18:02
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-12-2
4 10:43:11
* @LastEditTime: 2024-12-2
5 14:55:30
* @FilePath: /data-table/src/views/stop.vue
* @Description: 文件描述
-->
...
...
@@ -19,8 +19,9 @@
<span v-if="status === 'apply'">表单未开始</span>
<span v-if="status === 'finish'">表单已结束</span>
<span v-if="status === 'disable'">表单已关闭</span>
<span v-if="status === 'get_location_fail'" class="text-error">获取定位授权失败!<br/>请在“设置”中打开<br/>“定位服务”或“位置信息”权限后再试</span>
<span v-if="status === 'location_error'" class="text-error">提交失败!<br/>表单管理员设置了填表的限定位置<br/>请在指定位置完成提交</span>
<span v-if="status === 'get_location_fail'" class="text-normal">获取定位授权失败!<br/>请在“设置”中打开<br/>“定位服务”或“位置信息”权限后再试</span>
<span v-if="status === 'location_error'" class="text-normal">提交失败!<br/>表单管理员设置了填表的限定位置<br/>请在指定位置完成提交</span>
<p v-if="status === 'location_error'" class="text-normal open-location" @click="openLocation">查看打卡点位置</p>
</p>
<!-- <p style="font-size: 0.9rem; margin-bottom: 0.5rem">您的作品正在审核中</p> -->
<!-- <p style="font-size: 0.9rem">请耐心等待~~</p> -->
...
...
@@ -67,6 +68,16 @@ onMounted(() => {});
const handle = () => {
$router.go(-1);
};
const openLocation = () => { // 打开位置
wx.openLocation({
latitude: +$route.query.latitude,
longitude: +$route.query.longitude,
scale: 16,
name: "打卡点",
address: ""
});
}
</script>
<style lang="less" scoped>
...
...
@@ -85,10 +96,14 @@ const handle = () => {
font-weight: bold;
}
.text-
error
{
.text-
normal
{
font-weight: normal;
font-size: 1rem;
line-height: 1.75;
}
.open-location {
text-decoration: underline;
}
}
</style>
...
...
Please
register
or
login
to post a comment