This commit is contained in:
yanran200730
2022-06-16 09:57:56 +08:00
parent 42b9c192cc
commit 995c5684e3

View File

@@ -24,7 +24,7 @@
</template> </template>
<script> <script>
import { mapState } from 'vuex' import { mapState, mapActions } from 'vuex'
export default { export default {
name: 'Photo', name: 'Photo',
@@ -62,6 +62,8 @@
}, },
methods: { methods: {
...mapActions(['wxInvoke']),
back () { back () {
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
@@ -85,10 +87,11 @@
preview (url) { preview (url) {
if (!this.isShow) return if (!this.isShow) return
wx.previewImage({ this.wxInvoke(['previewImage', {
current: url, // 第一张显示的图片链接 current: url, // 第一张显示的图片链接
urls: [url] // 需要预加载的图片http链接列表预加载后可以滑动浏览这些图片 urls: [url] // 需要预加载的图片http链接列表预加载后可以滑动浏览这些图片
}) }, () => {
}])
} }
} }
} }