|
@@ -36,6 +36,7 @@ import {
|
|
|
onLoad
|
|
onLoad
|
|
|
} from "@dcloudio/uni-app"
|
|
} from "@dcloudio/uni-app"
|
|
|
import writeSign from "@/components/writeSign/index.vue"
|
|
import writeSign from "@/components/writeSign/index.vue"
|
|
|
|
|
+import {throttleAdvanced} from "@/utils/common.js"
|
|
|
|
|
|
|
|
const tId = ref(null)
|
|
const tId = ref(null)
|
|
|
const pdfUrl1 = ref(null)
|
|
const pdfUrl1 = ref(null)
|
|
@@ -64,6 +65,28 @@ function goUpPage() {
|
|
|
uni.navigateBack()
|
|
uni.navigateBack()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+const handleQM = throttleAdvanced((img) => {
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ title: "签名提交中..."
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ httpApi.getHetongQianming({
|
|
|
|
|
+ id: tId.value,
|
|
|
|
|
+ fuzeren: img.replace(/^data:image\/\w+;base64,/,'')
|
|
|
|
|
+ }).then(res => {
|
|
|
|
|
+ if (res.data) {
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ title: "签名成功",
|
|
|
|
|
+ duration: 2000,
|
|
|
|
|
+ mask: true,
|
|
|
|
|
+ success() {
|
|
|
|
|
+ setTimeout(() => goUpPage(),2000)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
function getBase64(img) {
|
|
function getBase64(img) {
|
|
|
if (!img) {
|
|
if (!img) {
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
@@ -71,23 +94,8 @@ function getBase64(img) {
|
|
|
})
|
|
})
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- httpApi.getHetongQianming({
|
|
|
|
|
- id: tId.value,
|
|
|
|
|
- fuzeren: img.replace(/^data:image\/\w+;base64,/,'')
|
|
|
|
|
- }).then(res => {
|
|
|
|
|
- if (res.data) {
|
|
|
|
|
- uni.showToast({
|
|
|
|
|
- title: "签名成功",
|
|
|
|
|
- duration: 2000,
|
|
|
|
|
- mask: true,
|
|
|
|
|
- success() {
|
|
|
|
|
- setTimeout(() => goUpPage(),2000)
|
|
|
|
|
|
|
+ handleQM(img)
|
|
|
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|