update donate bar
This commit is contained in:
parent
5532e35a93
commit
97315e7684
@ -12,20 +12,20 @@
|
|||||||
</sui-segment>
|
</sui-segment>
|
||||||
<sui-form @submit.prevent="formSubmit">
|
<sui-form @submit.prevent="formSubmit">
|
||||||
<sui-form-field>
|
<sui-form-field>
|
||||||
<label>Title</label>
|
<label>標題</label>
|
||||||
<input placeholder="Doante bar title" v-model="title" name="title"/>
|
<input placeholder="Doante bar title" v-model="title" name="title"/>
|
||||||
</sui-form-field>
|
</sui-form-field>
|
||||||
<sui-form-field>
|
<sui-form-field>
|
||||||
<label>TargetAmount</label>
|
<label>目標金額</label>
|
||||||
<input placeholder="Target amount" type="number" v-model="amount" name="amount"/>
|
<input placeholder="Target amount" type="number" v-model="amount" name="amount"/>
|
||||||
</sui-form-field>
|
</sui-form-field>
|
||||||
<sui-form-fields :fields="2">
|
<sui-form-fields :fields="2">
|
||||||
<sui-form-field>
|
<sui-form-field>
|
||||||
<label>StartDate</label>
|
<label>起始金額</label>
|
||||||
<DatePicker v-model="sDate" format="yyyy-MM-dd"/>
|
<input placeholder="start amount" type="number" v-model="startAmount" name="start_amount" />
|
||||||
</sui-form-field>
|
</sui-form-field>
|
||||||
<sui-form-field>
|
<sui-form-field>
|
||||||
<label>EndDate</label>
|
<label>結束時間</label>
|
||||||
<DatePicker v-model="eDate" format="yyyy-MM-dd"/>
|
<DatePicker v-model="eDate" format="yyyy-MM-dd"/>
|
||||||
</sui-form-field>
|
</sui-form-field>
|
||||||
</sui-form-fields>
|
</sui-form-fields>
|
||||||
@ -52,7 +52,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
title: '',
|
title: '',
|
||||||
amount: 0,
|
amount: 0,
|
||||||
sDate: '',
|
startAmount: 0,
|
||||||
eDate: ''
|
eDate: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -60,10 +60,6 @@ export default {
|
|||||||
...mapActions(['changeOpaySetting']),
|
...mapActions(['changeOpaySetting']),
|
||||||
...mapMutations(['addDialog']),
|
...mapMutations(['addDialog']),
|
||||||
formSubmit: function () {
|
formSubmit: function () {
|
||||||
let sts = 0
|
|
||||||
try {
|
|
||||||
sts = new Date(this.sDate).getTime()
|
|
||||||
} catch (err) {}
|
|
||||||
let ets = 0
|
let ets = 0
|
||||||
try {
|
try {
|
||||||
ets = new Date(this.eDate).getTime()
|
ets = new Date(this.eDate).getTime()
|
||||||
@ -71,7 +67,7 @@ export default {
|
|||||||
let data = {
|
let data = {
|
||||||
title: this.title,
|
title: this.title,
|
||||||
amount: this.amount,
|
amount: this.amount,
|
||||||
start: sts,
|
start_amount: this.startAmount,
|
||||||
end: ets
|
end: ets
|
||||||
}
|
}
|
||||||
this.changeOpaySetting({
|
this.changeOpaySetting({
|
||||||
@ -84,7 +80,7 @@ export default {
|
|||||||
setting: function (val, old) {
|
setting: function (val, old) {
|
||||||
this.title = val.title
|
this.title = val.title
|
||||||
this.amount = val.target_amount
|
this.amount = val.target_amount
|
||||||
this.sDate = val.start_date
|
this.startAmount = val.start_amount
|
||||||
this.eDate = val.end_date
|
this.eDate = val.end_date
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -18,8 +18,9 @@
|
|||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.main {
|
.main {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
font-size: 1em;
|
font-size: 1.5em;
|
||||||
font-weight: 900;
|
font-weight: 900;
|
||||||
|
color: #666;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -4,12 +4,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="less">
|
|
||||||
html,body,#app {
|
|
||||||
background-color: inherit;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.show-donate {
|
.show-donate {
|
||||||
padding: 5px 10px;
|
padding: 5px 10px;
|
||||||
@ -34,6 +28,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
|
document.getElementById('app').style.backgroundColor = 'inherit'
|
||||||
this.client = axios.create({
|
this.client = axios.create({
|
||||||
baseURL: apiUrl
|
baseURL: apiUrl
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user