68 lines
1.5 KiB
Vue
68 lines
1.5 KiB
Vue
<template>
|
|
<view>
|
|
<!-- 头部 -->
|
|
<status-nav :ifReturn="false" navBarTitle="GPS" :marginBottom="0"></status-nav>
|
|
<!-- 二维码 -->
|
|
<view class="gps-code">
|
|
<view class="tips font26">长按识别二维码</view>
|
|
<image :show-menu-by-longpress="true" src="/static/public/gps-code.jpg" mode="widthFix" @click="previewImage"></image>
|
|
</view>
|
|
<!-- 尾部 -->
|
|
<foot-tab :current="2"></foot-tab>
|
|
</view>
|
|
</template>
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
screenHeight:uni.getSystemInfoSync().screenHeight,
|
|
statusHeight:uni.getSystemInfoSync().statusBarHeight,
|
|
}
|
|
},
|
|
onLoad(op) {
|
|
|
|
},
|
|
methods: {
|
|
previewImage(e) {
|
|
console.log('e', e);
|
|
uni.previewImage({
|
|
// 需要预览的图片链接列表
|
|
urls: [],
|
|
// 为当前显示图片的链接/索引值
|
|
current: '/static/public/gps-code.jpg',
|
|
// 图片指示器样式
|
|
indicator:'default',
|
|
// 是否可循环预览
|
|
loop:false,
|
|
// 长按图片显示操作菜单,如不填默认为保存相册
|
|
// longPressActions:{
|
|
// itemList:[this.l('发送给朋友'),this.l]
|
|
// },
|
|
success: res => {
|
|
console.log('res', res);
|
|
},
|
|
fail: err => {
|
|
onsole.log('err', err);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
<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%;
|
|
}
|
|
</style> |