HomeLease/pages/test/test.vue

93 lines
2.7 KiB
Vue
Raw Normal View History

2025-09-11 14:52:11 +08:00
<!--<template>-->
<!-- <view style="width: 750rpx; height: 750rpx">-->
<!-- <l-signature-->
<!-- ref="signatureRef"-->
<!-- :openSmooth="openSmooth"-->
<!-- :penColor="penColor"-->
<!-- :penSize="penSize"-->
<!-- disableScroll-->
<!-- ></l-signature>-->
<!-- </view>-->
<!-- <view>-->
<!-- <button @click="onClick('clear')">清空</button>-->
<!-- <button @click="onClick('undo')">撤消</button>-->
<!-- <button @click="onClick('save')">保存</button>-->
<!-- <button @click="onClick('openSmooth')">压感{{ openSmooth ? '' : '' }}</button>-->
<!-- </view>-->
<!--</template>-->
<!--<script>-->
<!--import { getCurrentInstance, onMounted, ref } from 'vue'-->
<!--export default {-->
<!-- data() {-->
<!-- return {-->
<!-- title: 'Hello',-->
<!-- penColor: 'red',-->
<!-- penSize: 5,-->
<!-- url: '',-->
<!-- openSmooth: true,-->
<!-- }-->
<!-- },-->
<!-- methods: {-->
<!-- onClick(type) {-->
<!-- if (type == 'openSmooth') {-->
<!-- this.openSmooth = !this.openSmooth-->
<!-- return-->
<!-- }-->
<!-- if (type == 'save') {-->
<!-- this.$refs.signatureRef.canvasToTempFilePath({-->
<!-- success: res => {-->
<!-- // 是否为空画板 无签名-->
<!-- console.log(res.isEmpty)-->
<!-- // 生成图片的临时路径-->
<!-- // H5 生成的是base64-->
<!-- this.url = res.tempFilePath-->
<!-- console.log(res.tempFilePath)-->
<!-- // uni.saveImageToPhotosAlbum({-->
<!-- // filePath: res.tempFilePath,-->
<!-- // success: () => {-->
<!-- // uni.showToast({ title: '已保存到相册' })-->
<!-- // },-->
<!-- // })-->
<!-- uni.previewImage({-->
<!-- urls: [res.tempFilePath],-->
<!-- current: 0,-->
<!-- })-->
<!-- },-->
<!-- })-->
<!-- return-->
<!-- }-->
<!-- if (this.$refs.signatureRef) this.$refs.signatureRef[type]()-->
<!-- },-->
<!-- },-->
<!--}-->
<!--</script>-->
<!--<style lang="scss"></style>-->
2025-09-03 17:06:27 +08:00
<template>
2025-09-11 14:52:11 +08:00
<view @click="open()">123</view>
2025-09-03 17:06:27 +08:00
</template>
<script>
export default {
data() {
2025-09-11 14:52:11 +08:00
return {}
},
methods: {
2025-09-11 14:52:11 +08:00
open() {
uni.downloadFile({
url: 'https://api.ccttiot.com/安装协议(准备好)-1757570264575.pdf',
success: function (res) {
var filePath = res.tempFilePath
uni.openDocument({
filePath: filePath,
showMenu: true,
success: function (res) {},
})
},
})
},
},
}
2025-09-03 17:06:27 +08:00
</script>
2025-09-10 11:05:53 +08:00
<style lang="scss"></style>