We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents adb7843 + 98175b5 commit 87b74b7Copy full SHA for 87b74b7
1 file changed
resources/views/payment/detail.blade.php
@@ -37,7 +37,7 @@
37
</tr>
38
<tr>
39
<td colspan="2" align="center">
40
- <img src="{{$payment->qr_local_url}}" width=75%/>
+ <img id="qr" src="{{$payment->qr_local_url}}"/>
41
</td>
42
43
</table>
@@ -74,5 +74,13 @@ function getStatus () {
74
}
75
});
76
77
+
78
+ //qr自适应
79
+ var w=window.innerWidth;
80
+ var h=window.innerHeight;
81
+ x=document.getElementById("qr");
82
+ if (w<=h)
83
+ x.setAttribute("width", "75%");
84
+ else x.setAttribute("height", "75%");
85
</script>
86
@endsection
0 commit comments