杨磊
23 分钟以前 ee213bf458d3961a0560ce3b68a3ad38322ece97
src/views/classManage/classHome.vue
@@ -26,8 +26,8 @@
              </div>
              <div class="infoBox">
                <div class="main">{{ currentClass?.bookName }}</div>
                <div class="job">作者:{{ classInfo?.author ?? '-' }}</div>
                <div class="job">ISBN:{{ classInfo?.isbn ?? '-' }}</div>
                <div class="job">作者:{{ currentClass?.author ?? '-' }}</div>
                <div class="job">ISBN:{{ currentClass?.isbn ?? '-' }}</div>
              </div>
            </div>
            <div class="line"></div>
@@ -283,10 +283,13 @@
    .getCourseClass({
      ClassIdOrRefCode: String(classInfo.id),
    })
    .then((res: any) => {
    .then(async (res: any) => {
      if (res) {
        const detail = await getBookDetail(res.linkProductDto.product.id)
        res.bookName = res.linkProductDto.product.name
        res.bookIcon = getPublicImage(res.linkProductDto.product.icon, 100)
        res.bookIcon = detail.icon ?? defaultImg
        res.author = detail.author
        res.isbn = detail.isbn
        res.classTime =
          moment(res.beginDate).format('YYYY.MM.DD') +
          '--' +
@@ -507,9 +510,30 @@
      console.log(e)
    })
}
// 获取教材详情
const getBookDetail = async (id: string) => {
  const query = {
    path: '*',
    queryType: '*',
    productId: id,
    coverSize: {
      height: 300,
      width: 210,
    },
    fields: {
      author: [],
      isbn: [],
    },
  }
  const res = await MG.store.getProductDetail(query)
  return res.datas ?? null
}
</script>
<style lang="less" scoped>
.main {
  color: #019e58;
}
.nullBox {
  width: 100%;
  display: flex;
@@ -532,6 +556,7 @@
        height: 190px;
        margin-top: 30px;
        border-radius: 10px;
        border: 1px solid #019e58;
        .title {
          width: 80px;
          text-align: center;
@@ -626,8 +651,6 @@
      .titleBox {
        display: flex;
        align-items: center;
        margin: 10px 0;
        font-size: 16px;
        .title {
          width: 100%;
          display: flex;
@@ -665,7 +688,6 @@
      .titleBox {
        display: flex;
        align-items: center;
        margin: 10px 0;
        .border {
          width: 4px;
          height: 23px;
@@ -676,7 +698,7 @@
    }
    .notBox {
      width: 100%;
      height: 100px;
      height: 120px;
      display: flex;
      align-items: center;
      justify-content: center;
@@ -747,6 +769,7 @@
    width: 100%;
    height: calc(100% - 63px);
    padding: 5px 25px;
    box-sizing: border-box;
    overflow: auto;
    .noticeItem {
      display: flex;