安装协议页面导入安装协议
This commit is contained in:
parent
f44d76a7a2
commit
08374b4a41
10
pages.json
10
pages.json
|
|
@ -124,13 +124,11 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/InstallationAgreement/InstallationAgreement",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "安装协议"
|
||||
}
|
||||
"path": "pages/InstallationAgreement/InstallationAgreement",
|
||||
"style": {
|
||||
"navigationBarTitleText": "签署安装协议"
|
||||
}
|
||||
}
|
||||
|
||||
],
|
||||
"subPackages": [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<uv-button throttleTime="1000" type="primary " @click="openProtocol">点击查看协议</uv-button>
|
||||
<uv-form ref="form" :model="userInfo" :rules="rules" labelPosition="left" labelWidth="auto">
|
||||
<uv-form-item borderBottom label="电话:" prop="phone">
|
||||
<uv-input v-model="userInfo.phone" border="none"></uv-input>
|
||||
|
|
@ -118,6 +119,19 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
openProtocol() {
|
||||
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) {},
|
||||
})
|
||||
},
|
||||
})
|
||||
},
|
||||
handleUploadSuccess(result) {
|
||||
console.log('图片上传成功:', result.url)
|
||||
this.userInfo.businessLicenseUrl = result.url
|
||||
|
|
|
|||
|
|
@ -1,64 +1,90 @@
|
|||
<!--<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>-->
|
||||
<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>
|
||||
<view @click="open()">123</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCurrentInstance, onMounted, ref } from 'vue'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
title: 'Hello',
|
||||
penColor: 'red',
|
||||
penSize: 5,
|
||||
url: '',
|
||||
openSmooth: true,
|
||||
}
|
||||
return {}
|
||||
},
|
||||
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]()
|
||||
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) {},
|
||||
})
|
||||
},
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user