完成下单

This commit is contained in:
2021-11-26 14:00:23 +08:00
parent 29da9c7746
commit 84380ef55a
10 changed files with 673 additions and 31 deletions
@@ -22,7 +22,7 @@
<div class="add-merit-name" v-if="actionName === 'desire'">
<h3 class="title">心愿</h3>
<div class="desire-input">
<textarea class="desire-textarea" v-model="desire" type="text" maxlength="50" placeholder="请输入您的心愿" />
<textarea class="desire-textarea" v-model="dream" type="text" maxlength="50" placeholder="请输入您的心愿" />
<span>{{dream.length}}/50</span>
</div>
<div class="desire-quike">
@@ -41,7 +41,7 @@
</template>
<script>
import { deleteMeritName, getMeritName, postMeritName, getDreamList } from '@/api';
import { getDreamList } from '@/api';
export default {
data(){
@@ -82,20 +82,8 @@ export default {
this.dream = this.desire;
this.onConfirmMeritName();
},
async addName(){
if(!this.name) return
await postMeritName(this.name)
this.name = ''
await this.getName()
},
async onDeleteName(name){
await deleteMeritName(name.id);
await this.getName();
},
async getName(){
const data = await getMeritName();
this.names = data;
},
//获取心愿列表
async getDreamList(){
const list = await getDreamList();