add url show

This commit is contained in:
Jay 2018-08-24 20:09:59 +08:00
parent 8bf4ad9e86
commit c3b7541ca0
2 changed files with 12 additions and 0 deletions

View File

@ -4,6 +4,12 @@
<sui-segment stacked>
<Donatebar :title="title" :max="amountInt" :now="amountInt / 3" :timestamp="datetime" />
</sui-segment>
<sui-segment piled>
<sui-header>Donate Bar URL</sui-header>
<sui-message>
{{url}}
</sui-message>
</sui-segment>
<sui-form @submit.prevent="formSubmit">
<sui-form-field>
<label>Title</label>
@ -83,6 +89,11 @@ export default {
}
},
computed: {
url: function () {
let path = this.$router.resolve(`/donatebar/${this.$route.params.chid}/opay`).href
let origin = window.location.origin
return `${origin.replace(/\/$/, '')}${path}`
},
amountInt: function () {
return toInt(this.amount, 0)
},

View File

@ -30,6 +30,7 @@
height: 30px;
position: relative;
border-radius: 10px;
border: 3px solid black;
.progress-body {
border-radius: 10px;