手机端签字不自动回显

This commit is contained in:
2026-04-10 11:05:13 +08:00
parent 45d92c0d56
commit 6712a2a984
2 changed files with 23 additions and 9 deletions
@@ -40,6 +40,13 @@ module.exports = {
} }
}, },
methods: { methods: {
async init() {
const {code, data} = await this.$axios.post("/platform/signature/get")
if (code === 0) {
this.signatureContent = data && data.signature
this.$emit("input", this.signatureContent)
}
},
openSignature() { openSignature() {
this.showSignaturePanel = true this.showSignaturePanel = true
}, },
@@ -86,7 +93,9 @@ module.exports = {
return new File([blob], filename, { type: contentType }) return new File([blob], filename, { type: contentType })
} }
}, },
created() {} created() {
this.init()
}
} }
</script> </script>
@@ -91,17 +91,22 @@ const mine = {
</div> </div>
</div> </div>
`, `,
computed: { data() {
avatar() { return {
const sex = this.$store.state.user.sex avatar: ""
if (sex === "男" || !sex) { }
return "/assets/platform/img/home/avatar_boy.png" },
} else { computed: {},
return "/assets/platform/img/home/avatar_girl.png" created() {
} const sex = this.$store.state.user.sex
if (sex === "男" || !sex) {
this.avatar = "/assets/platform/img/home/avatar_boy.png"
} else {
this.avatar = "/assets/platform/img/home/avatar_girl.png"
} }
}, },
methods: { methods: {
logout() { logout() {
this.$dialog this.$dialog
.confirm({ .confirm({