Commit a7290f46 by 李宁

1

1 parent b881b66f
...@@ -282,12 +282,20 @@ ...@@ -282,12 +282,20 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 全页面加载遮罩 -->
<div class="global-loading" v-if="gjStore.isLoading">
<div class="loading-overlay">
<div class="loading-spinner"></div>
<div class="loading-text">提交中...</div>
</div>
</div>
</div> </div>
<!-- 引入Vue.js --> <!-- 引入Vue.js -->
<script src="js/vue.min.js"></script> <script src="js/vue.min.js"></script>
<script src="js/axios.min.js"></script> <script src="js/axios.min.js"></script>
<script src="js/util.js"></script> <script src="js/util.js"></script>
<script src="js/busiDetail.js?000"></script> <script src="js/busiDetail.js?099911100"></script>
</body> </body>
</html> </html>
\ No newline at end of file \ No newline at end of file
...@@ -161,6 +161,63 @@ body { ...@@ -161,6 +161,63 @@ body {
.alertCon .alertButt div.submit{ .alertCon .alertButt div.submit{
color: #fff; color: #fff;
background: #0068EE; background: #0068EE;
transition: all 0.3s ease;
}
.alertCon .alertButt div.submit.loading {
background: #ccc;
cursor: not-allowed;
opacity: 0.7;
}
.alertCon .alertButt div.submit.loading:hover {
background: #ccc;
}
/* 全页面加载遮罩 */
.global-loading {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
z-index: 999999;
display: flex;
align-items: center;
justify-content: center;
}
.loading-overlay {
background: rgba(255, 255, 255, 0.95);
border-radius: 12px;
padding: 40px 60px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
.loading-spinner {
width: 40px;
height: 40px;
border: 4px solid #f3f3f3;
border-top: 4px solid #0068EE;
border-radius: 50%;
animation: spin 1s linear infinite;
margin-bottom: 16px;
}
.loading-text {
font-size: 16px;
color: #333;
font-weight: 500;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
} }
.alertCon .botTs{ .alertCon .botTs{
color: #666; color: #666;
......
...@@ -121,6 +121,9 @@ new Vue({ ...@@ -121,6 +121,9 @@ new Vue({
// return // return
// } // }
// 设置加载状态
d.isLoading = true
const fd = new FormData(); const fd = new FormData();
fd.append('followContent',d.des) fd.append('followContent',d.des)
fd.append('opportunityId',this.detailId) fd.append('opportunityId',this.detailId)
...@@ -128,21 +131,27 @@ new Vue({ ...@@ -128,21 +131,27 @@ new Vue({
fd.append('images',item.file) fd.append('images',item.file)
}) })
// 调用API提交 try {
const result = await utils.httpRequest({ // 调用API提交
url: '/opportunity/follow', const result = await utils.httpRequest({
data: fd url: '/opportunity/follow',
}) data: fd
})
if (result.code == 200) { if (result.code == 200) {
utils.toast('跟进提交成功!'); utils.toast('跟进提交成功!');
this.gjStore.isShow = false this.gjStore.isShow = false
this.queryDetail() this.queryDetail()
this.queryFollow() this.queryFollow()
} else { } else {
utils.toast(result.message || '提交失败,请重试'); utils.toast(result.message || '提交失败,请重试');
}
} catch (error) {
console.error('提交跟进失败:', error);
utils.toast('网络错误,请重试');
} finally {
// 无论成功或失败,都取消加载状态
d.isLoading = false
} }
}, },
completeBusi(){ completeBusi(){
......
...@@ -168,6 +168,6 @@ ...@@ -168,6 +168,6 @@
<script src="js/axios.min.js"></script> <script src="js/axios.min.js"></script>
<script src="js/vue.min.js"></script> <script src="js/vue.min.js"></script>
<script src="js/util.js"></script> <script src="js/util.js"></script>
<script src="js/myBusi.js"></script> <script src="js/myBusi.js?123123"></script>
</body> </body>
</html> </html>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!