loading
This commit is contained in:
@@ -84,6 +84,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</u-popup> -->
|
</u-popup> -->
|
||||||
|
<div class="load-content" v-if="showLoad">
|
||||||
|
<img src="https://cdn.sinoecare.com/i/2024/08/07/66b2cfd4d220d.gif" alt="">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@@ -128,7 +131,8 @@ export default {
|
|||||||
aiConfigName: '',
|
aiConfigName: '',
|
||||||
showType: false,
|
showType: false,
|
||||||
showPopup: true,
|
showPopup: true,
|
||||||
latLng: ''
|
latLng: '',
|
||||||
|
showLoad: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -223,7 +227,8 @@ export default {
|
|||||||
if(!this.token) {
|
if(!this.token) {
|
||||||
return this.$u.toast("请先进行登录")
|
return this.$u.toast("请先进行登录")
|
||||||
}
|
}
|
||||||
this.$loading()
|
// this.$loading()
|
||||||
|
this.showLoad = true
|
||||||
this.$instance.post("/app/appaicopilotinfo/add", {
|
this.$instance.post("/app/appaicopilotinfo/add", {
|
||||||
content: this.content,
|
content: this.content,
|
||||||
appType: 0,
|
appType: 0,
|
||||||
@@ -241,7 +246,8 @@ export default {
|
|||||||
selector: `.item${this.messageList.length-1}`
|
selector: `.item${this.messageList.length-1}`
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
this.$hideLoading()
|
// this.$hideLoading()
|
||||||
|
this.showLoad = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -249,7 +255,8 @@ export default {
|
|||||||
if(!this.token) {
|
if(!this.token) {
|
||||||
return this.$u.toast("请先进行登录")
|
return this.$u.toast("请先进行登录")
|
||||||
}
|
}
|
||||||
this.$loading()
|
// this.$loading()
|
||||||
|
this.showLoad = true
|
||||||
this.$instance.post("/app/appaicopilotinfo/add", {sdkFileUrl: this.voiceUrl, fileId: this.voiceId, appType: 0, aiConfigId: this.aiConfigId}).then(res => {
|
this.$instance.post("/app/appaicopilotinfo/add", {sdkFileUrl: this.voiceUrl, fileId: this.voiceId, appType: 0, aiConfigId: this.aiConfigId}).then(res => {
|
||||||
if(res.code == 0) {
|
if(res.code == 0) {
|
||||||
this.voiceUrl = ''
|
this.voiceUrl = ''
|
||||||
@@ -265,16 +272,19 @@ export default {
|
|||||||
duration: 300,
|
duration: 300,
|
||||||
selector: `.item${this.messageList.length-1}`
|
selector: `.item${this.messageList.length-1}`
|
||||||
});
|
});
|
||||||
this.$hideLoading()
|
// this.$hideLoading()
|
||||||
|
this.showLoad = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getHistoryList() {
|
getHistoryList() {
|
||||||
|
uni.stopPullDownRefresh()
|
||||||
if(!this.token) {
|
if(!this.token) {
|
||||||
return this.$u.toast("请先进行登录")
|
return this.$u.toast("请先进行登录")
|
||||||
}
|
}
|
||||||
uni.stopPullDownRefresh()
|
if(this.current > this.pages) return
|
||||||
this.$loading()
|
// this.$loading()
|
||||||
|
this.showLoad = true
|
||||||
this.$instance.post(`/app/appaicopilotinfo/list?current=${this.current}&size=10&aiConfigId=${this.aiConfigId}`).then(res => {
|
this.$instance.post(`/app/appaicopilotinfo/list?current=${this.current}&size=10&aiConfigId=${this.aiConfigId}`).then(res => {
|
||||||
if(res.code == 0 && res.data.records.length) {
|
if(res.code == 0 && res.data.records.length) {
|
||||||
res.data.records.map((item) => {
|
res.data.records.map((item) => {
|
||||||
@@ -291,7 +301,8 @@ export default {
|
|||||||
});
|
});
|
||||||
})
|
})
|
||||||
this.pages = res.data.pages
|
this.pages = res.data.pages
|
||||||
this.$hideLoading()
|
// this.$hideLoading()
|
||||||
|
this.showLoad = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -738,5 +749,19 @@ page {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.load-content {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background-color: rgba(255, 255, 255, .8);
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 99;
|
||||||
|
text-align: center;
|
||||||
|
img {
|
||||||
|
margin-top: 300px;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user