简历投递添加loading

This commit is contained in:
xuchao
2026-01-12 19:02:11 +08:00
parent 9315d0c371
commit 9d37f3a22a

View File

@@ -134,7 +134,9 @@
<text :style="{ color: getStatusText(job.jobFairPersonJob?.status).color }">{{ getStatusText(job.jobFairPersonJob?.status).text }}</text>
</view>
<view v-else class="btn">
<button plain style="color: #1685f7;border-color:#1685f7" @click="deliverResume(job)">简历投递</button>
<button plain :disabled="deliveringJobs[job.jobId]" style="color: #1685f7;border-color:#1685f7" @click="deliverResume(job)">
{{ deliveringJobs[job.jobId] ? '投递中...' : '简历投递' }}
</button>
</view>
</view>
</view>
@@ -317,8 +319,12 @@
const closeFeedBackPopup = () => {
feedBackPopup.value.close();
};
// 投递简历loading状态使用对象存储每个job的投递状态
const deliveringJobs = reactive({});
// 岗位投递
function deliverResume(job) {
if(deliveringJobs[job.jobId]) return
deliveringJobs[job.jobId] = true
const raw = uni.getStorageSync("Padmin-Token");
const token = typeof raw === "string" ? raw.trim() : "";
const headers = token ? {
@@ -343,13 +349,16 @@
} else {
$api.msg((data && data.msg) || "简历投递失败");
}
deliveringJobs[job.jobId] = false
});
});
} else {
$api.msg('请先登录')
$api.msg('请先登录');
deliveringJobs[job.jobId] =false
}
}).catch(() => {
deliveringJobs[job.jobId] =false;
});
}
// 提交面试邀请