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