This commit is contained in:
liuye
2024-08-07 10:13:52 +08:00
parent cc34079add
commit c53f60c9d3

View File

@@ -84,6 +84,9 @@
</div>
</div>
</u-popup> -->
<div class="load-content" v-if="showLoad">
<img src="https://cdn.sinoecare.com/i/2024/08/07/66b2cfd4d220d.gif" alt="">
</div>
</div>
</template>
<script>
@@ -128,7 +131,8 @@ export default {
aiConfigName: '',
showType: false,
showPopup: true,
latLng: ''
latLng: '',
showLoad: false
}
},
computed: {
@@ -223,7 +227,8 @@ export default {
if(!this.token) {
return this.$u.toast("请先进行登录")
}
this.$loading()
// this.$loading()
this.showLoad = true
this.$instance.post("/app/appaicopilotinfo/add", {
content: this.content,
appType: 0,
@@ -241,7 +246,8 @@ export default {
selector: `.item${this.messageList.length-1}`
});
})
this.$hideLoading()
// this.$hideLoading()
this.showLoad = false
}
})
},
@@ -249,7 +255,8 @@ export default {
if(!this.token) {
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 => {
if(res.code == 0) {
this.voiceUrl = ''
@@ -265,16 +272,19 @@ export default {
duration: 300,
selector: `.item${this.messageList.length-1}`
});
this.$hideLoading()
// this.$hideLoading()
this.showLoad = false
}
})
},
getHistoryList() {
uni.stopPullDownRefresh()
if(!this.token) {
return this.$u.toast("请先进行登录")
}
uni.stopPullDownRefresh()
this.$loading()
if(this.current > this.pages) return
// this.$loading()
this.showLoad = true
this.$instance.post(`/app/appaicopilotinfo/list?current=${this.current}&size=10&aiConfigId=${this.aiConfigId}`).then(res => {
if(res.code == 0 && res.data.records.length) {
res.data.records.map((item) => {
@@ -291,7 +301,8 @@ export default {
});
})
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>