shjz-applet/pages/gps/gps.vue

64 lines
1.4 KiB
Vue
Raw Normal View History

2022-08-12 10:25:42 +00:00
<template>
<view>
2022-08-26 08:02:17 +00:00
<!-- 头部 -->
<status-nav :ifReturn="false" navBarTitle="GPS" :marginBottom="0"></status-nav>
<!-- 二维码 -->
<view class="gps-code">
2022-09-01 05:28:28 +00:00
<view class="tips font26">请长按识别</view>
2022-08-26 08:02:17 +00:00
<image :show-menu-by-longpress="true" src="/static/public/gps-code.jpg" mode="widthFix" @click="previewImage"></image>
</view>
2022-08-12 10:25:42 +00:00
<!-- 尾部 -->
<foot-tab :current="2"></foot-tab>
</view>
</template>
<script>
2022-08-26 08:02:17 +00:00
export default {
data() {
return {
screenHeight:uni.getSystemInfoSync().screenHeight,
statusHeight:uni.getSystemInfoSync().statusBarHeight,
}
},
onLoad(op) {
},
methods: {
2022-09-01 05:28:28 +00:00
previewImage() {
2022-08-26 08:02:17 +00:00
uni.previewImage({
// 需要预览的图片链接列表
urls: [],
// 为当前显示图片的链接/索引值
current: '/static/public/gps-code.jpg',
// 图片指示器样式
indicator:'default',
// 是否可循环预览
loop:false,
// 长按图片显示操作菜单,如不填默认为保存相册
success: res => {
console.log('res', res);
},
fail: err => {
2022-09-01 05:28:28 +00:00
console.log('err', err);
2022-08-26 08:02:17 +00:00
}
});
}
}
}
2022-08-12 10:25:42 +00:00
</script>
2022-08-26 08:02:17 +00:00
<style scoped>
.gps-code{
width: 80%;
position: fixed;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
}
.gps-code .tips{
line-height: 1.2;
text-align: center;
margin-bottom: 30rpx;
}
.gps-code>image{
width: 100%;
}
2022-08-12 10:25:42 +00:00
</style>