2023-02-22 09:37:42 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<view class="app">
|
2023-02-22 10:40:49 +08:00
|
|
|
|
<view class="title">
|
|
|
|
|
|
长按识别二维码
|
|
|
|
|
|
</view>
|
2023-03-03 15:18:55 +08:00
|
|
|
|
<image :src="img" mode="" :show-menu-by-longpress="true"></image>
|
2023-02-22 09:37:42 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
2023-03-03 15:18:55 +08:00
|
|
|
|
import baseurl from '@/api/baseurl.js'
|
2023-02-22 09:37:42 +08:00
|
|
|
|
export default {
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
2023-03-03 15:18:55 +08:00
|
|
|
|
img: '',
|
2023-02-22 09:37:42 +08:00
|
|
|
|
};
|
2023-02-22 10:24:18 +08:00
|
|
|
|
},
|
2023-03-03 15:18:55 +08:00
|
|
|
|
onShow() {
|
|
|
|
|
|
this.img = baseurl + '/profile/appletPicture/customer.jpg'
|
|
|
|
|
|
},
|
2023-02-22 10:24:18 +08:00
|
|
|
|
methods: {
|
2023-02-22 10:40:49 +08:00
|
|
|
|
previewImage(e) {
|
2023-02-22 10:24:18 +08:00
|
|
|
|
uni.previewImage({
|
2023-02-22 10:40:49 +08:00
|
|
|
|
// 需要预览的图片链接列表。若无需预览,可以注释urls
|
2023-03-03 15:18:55 +08:00
|
|
|
|
urls: this.img,
|
2023-02-22 10:40:49 +08:00
|
|
|
|
// 为当前显示图片的链接/索引值
|
2023-02-22 10:24:18 +08:00
|
|
|
|
current: 0,
|
2023-02-22 10:40:49 +08:00
|
|
|
|
// 图片指示器样式
|
|
|
|
|
|
indicator: 'default',
|
|
|
|
|
|
// 是否可循环预览
|
|
|
|
|
|
loop: false,
|
|
|
|
|
|
// 长按图片显示操作菜单,如不填默认为保存相册
|
|
|
|
|
|
// longPressActions:{
|
|
|
|
|
|
// itemList:[this.l('发送给朋友'),this.l]
|
|
|
|
|
|
// },
|
|
|
|
|
|
success: res => {
|
|
|
|
|
|
console.log('previewImage res', res);
|
|
|
|
|
|
},
|
|
|
|
|
|
fail: err => {
|
|
|
|
|
|
console.log('previewImage err', err);
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
2023-02-22 10:24:18 +08:00
|
|
|
|
},
|
2023-02-24 16:13:52 +08:00
|
|
|
|
},
|
|
|
|
|
|
//1.分享给朋友
|
|
|
|
|
|
onShareAppMessage(res) {
|
|
|
|
|
|
let pages = getCurrentPages();
|
|
|
|
|
|
let url = pages[pages.length - 1].$page.fullPath
|
|
|
|
|
|
return {
|
|
|
|
|
|
title: '泉医到家',
|
|
|
|
|
|
path: url,
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
//2.分享到朋友圈
|
|
|
|
|
|
onShareTimeline(res) {
|
|
|
|
|
|
let pages = getCurrentPages();
|
|
|
|
|
|
let url = pages[pages.length - 1].$page.fullPath
|
|
|
|
|
|
return {
|
|
|
|
|
|
title: '泉医到家',
|
|
|
|
|
|
path: url,
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2023-02-22 09:37:42 +08:00
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
|
.app {
|
|
|
|
|
|
width: 100%;
|
2023-02-22 10:24:18 +08:00
|
|
|
|
height: 100vh;
|
2023-02-22 09:46:52 +08:00
|
|
|
|
padding: 0;
|
2023-02-22 10:24:18 +08:00
|
|
|
|
background-color: #000000;
|
2023-02-22 10:40:49 +08:00
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
|
|
|
|
.title {
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
top: 50rpx;
|
|
|
|
|
|
}
|
2023-02-22 10:24:18 +08:00
|
|
|
|
|
2023-02-22 09:37:42 +08:00
|
|
|
|
image {
|
|
|
|
|
|
width: 100%;
|
2023-02-22 10:24:18 +08:00
|
|
|
|
height: 1300rpx;
|
2023-02-22 09:37:42 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|