QYF-GitLab1
6 小时以前 75e366b1ba202dec9619e0407acb2ede41c38c6a
课程样式修改
16个文件已修改
1031 ■■■■ 已修改文件
src/App.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/images/personalCenter/collect-click.png 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/main.css 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layout/baseLayout.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layout/components/footerPage.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/classManage/classHome.vue 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/classManage/index.vue 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/courseManage/components/class.vue 44 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/personalCenter/activeCode.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/personalCenter/class.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/personalCenter/config.ts 44 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/personalCenter/index.vue 74 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/personalCenter/myApply.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/personalCenter/myCollection.vue 120 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/personalCenter/teacherCertification.vue 569 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/personalCenter/userInfo.vue 62 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/App.vue
@@ -7,9 +7,3 @@
<template>
  <el-config-provider :locale="zhCn"> <RouterView /></el-config-provider>
</template>
<style scoped>
#app {
  width: 100%;
}
</style>
src/assets/images/personalCenter/collect-click.png

src/assets/main.css
@@ -15,6 +15,17 @@
  outline: none;
}
html,
body {
  width: 100%;
  height: 100%;
}
#app {
  width: 100%;
  height: 100%;
}
/* 居中布局 */
.contentBox {
  width: 1200px;
@@ -52,11 +63,11 @@
}
.titleBox {
  background: #d8f7e6;
  padding: 8px 10px;
  font-weight: 700;
  color: #00873c;
  color: #019e58;
  font-size: 14px;
  padding: 10px;
  box-sizing: border-box;
}
@@ -222,8 +233,12 @@
}
.wait,
.main {
  color: #019e58;
  color: #fc9b1e;
}
.grey {
  color: #949494;
}
.mainbg{
  background:#00873c;
  color:#fff;
}
src/layout/baseLayout.vue
@@ -3,8 +3,8 @@
    <Header class="header"></Header>
    <div class="layoutContentBox" id="layout">
      <RouterView />
      <Footer class="footer"></Footer>
    </div>
    <Footer class="footer"></Footer>
    <login ref="loginRef"></login>
  </div>
</template>
@@ -35,14 +35,13 @@
<style lang="less" scoped>
.layoutBox {
  width: 100%;
  height: 100vh;
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: #fff;
  .layoutContentBox {
    flex: 1;
    height: auto;
  }
  .header {
@@ -54,7 +53,6 @@
@media screen and (min-width: 1200px) {
  .layoutContentBox {
    flex: 1;
    overflow: auto;
  }
}
</style>
src/layout/components/footerPage.vue
@@ -115,6 +115,9 @@
.pageFooter {
  background: #444444;
  background-image: url('@/assets/images/xiehe/home/footer-bg.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  .footerContent {
    padding: 30px 0;
    .infoBox {
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;
src/views/classManage/index.vue
@@ -90,9 +90,29 @@
  path.value = to.path
})
onMounted(() => {
// 获取教材详情
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
}
onMounted(async () => {
  classInfo.value = JSON.parse(route.query.classInfo)
  classIcon.value = classInfo.value.icon ?? defaultImg
  const detail = await getBookDetail(classInfo.value.bookId)
  classIcon.value = detail.icon ?? defaultImg
  menu.forEach((item) => {
    if ('/' + item.path === path.value) {
      label.value = item.label
@@ -173,6 +193,9 @@
    flex: 1;
    height: auto;
  }
  .main {
    color: #019e58;
  }
  .classContentBox {
    padding: 10px 40px;
    display: flex;
@@ -198,7 +221,7 @@
        margin-bottom: 10px;
        display: flex;
        .iconBox {
          width: 90px;
          width: 100px;
          height: 120px;
          img {
            width: 100%;
@@ -212,6 +235,7 @@
          .main {
            font-size: 16px;
            line-height: 20px;
            color: #019e58;
          }
          .job {
            // padding:10px;
src/views/courseManage/components/class.vue
@@ -10,7 +10,7 @@
      </div>
      <el-button type="primary" class="applyStartClasses" @click="applyClass">申请开班</el-button>
    </div>
    <div class="classListBox" v-loading="pages.loading">
    <div class="classListBox" v-if="classList.length > 0" v-loading="pages.loading">
      <div class="classItem" v-for="(item, index) in classList" :key="index">
        <div class="itemHeader">
          <div class="title">{{ item.name }}</div>
@@ -137,7 +137,7 @@
  page: 1,
  pageSize: 6,
  count: 0,
  loading: true
  loading: true,
})
const searchData = () => {
@@ -156,7 +156,7 @@
      size: pages.pageSize,
      sort: {
        type: 'Desc',
        field: 'CreateDate'
        field: 'CreateDate',
      },
      filterList: [],
      searchList: searchKey.value
@@ -164,14 +164,14 @@
            {
              keywords: searchKey.value,
              field: 'Name',
              compareType: 'Contains'
            }
              compareType: 'Contains',
            },
          ]
        : []
        : [],
    })
    .then((res: any) => {
      pages.loading = false
      pages.count = res.totalSize;
      pages.count = res.totalSize
      classList.value = res.datas.map((item: any) => {
        return {
          ...item,
@@ -179,7 +179,7 @@
          id: item.id,
          icon: item.icon ? getPublicImage(item.icon, 80) : '',
          introduction: item.description,
          reason: item.applyReturnMsg ? JSON.parse(item.applyReturnMsg).reason : ''
          reason: item.applyReturnMsg ? JSON.parse(item.applyReturnMsg).reason : '',
        }
      })
      refreshParent()
@@ -191,7 +191,7 @@
  formData.value = {
    name: '',
    num: '',
    date: ''
    date: '',
  }
  applyClassDialog.value = true
}
@@ -205,7 +205,7 @@
const formData = ref({
  name: '',
  num: '',
  date: ''
  date: '',
})
const submit = () => {
@@ -221,7 +221,7 @@
      endDate: moment(formData.value.date[1]).format('YYYY-MM-DD'),
      config: '',
      price: 0,
      maxUserCount: formData.value.num
      maxUserCount: formData.value.num,
    })
    .then((res: any) => {
      if (res) {
@@ -247,7 +247,7 @@
    await toClipboard(text)
    ElMessage({
      message: '复制成功',
      type: 'success'
      type: 'success',
    })
  } catch (e) {
    console.error(e)
@@ -257,7 +257,7 @@
// 删除班级
const delClass = (item: any) => {
  const data = {
    ids: [item.id]
    ids: [item.id],
  }
  MG.edu
    .delCourseClass(data)
@@ -265,7 +265,7 @@
      if (res) {
        ElMessage({
          message: '已删除',
          type: 'success'
          type: 'success',
        })
        getData()
      }
@@ -273,7 +273,7 @@
    .catch((err: any) => {
      ElMessage({
        message: '删除失败',
        type: 'error'
        type: 'error',
      })
      console.log(err)
    })
@@ -284,7 +284,7 @@
  page: 1,
  pageSize: 10,
  count: 0,
  loading: false
  loading: false,
})
const courseListData = ref([])
@@ -335,14 +335,14 @@
  if (item.applyState == 'WaitAudit') {
    ElMessage({
      message: '正在审核中....',
      type: 'warning'
      type: 'warning',
    })
    return false
  }
  if (item.applyState == 'Reject') {
    ElMessage({
      message: '审核未通过',
      type: 'warning'
      type: 'warning',
    })
    return false
  }
@@ -356,13 +356,13 @@
    bookId: bookData.id,
    author: bookData.author,
    isbn: bookData.isbn,
    bookRefCode: bookData.refCode
    bookRefCode: bookData.refCode,
  }
  let page = uRouter.resolve({
    path: '/classManage',
    query: {
      classInfo: JSON.stringify(classinfo)
    }
      classInfo: JSON.stringify(classinfo),
    },
  })
  window.open(page.href, '_blank')
}
@@ -423,7 +423,7 @@
          margin-top: 10px;
          font-size: 12px;
          background-color: #fff;
          color: #3b93fe;
          color: #019e58;
          padding: 0 6px;
          border-radius: 50px;
          overflow: hidden;
src/views/personalCenter/activeCode.vue
@@ -7,7 +7,7 @@
        <el-input class="inputBox" v-model="activateCode" placeholder="请输入激活码">
          <template #append>
            <el-button
              style="background-color: #019e58; color: #fff"
              style="background-color: #144941; color: #fff"
              @click="userActiveCodeGet"
              :loading="loading"
              >激活</el-button
@@ -232,7 +232,7 @@
  border: 1px solid #edecec;
  background: #edf4f2;
  .flex1 span {
    color: #019e58;
    color: #000;
  }
}
src/views/personalCenter/class.vue
@@ -42,7 +42,9 @@
        <template #footer>
          <div class="dialog-footer">
            <el-button @click="dialogVisible = false"> 取消 </el-button>
            <el-button type="primary" @click="joinClass()"> 确认 </el-button>
            <el-button type="primary" :disabled="!classDetail?.name" @click="joinClass()">
              加入
            </el-button>
          </div>
        </template>
      </el-dialog>
@@ -394,7 +396,7 @@
          margin-top: 10px;
          font-size: 12px;
          background-color: #fff;
          color: #3b93fe;
          color: #019e58;
          padding: 0 6px;
          border-radius: 50px;
          overflow: hidden;
src/views/personalCenter/config.ts
@@ -9,16 +9,16 @@
</svg>
`,
  },
  {
    label: '购物车',
    key: '2',
    path: 'myCart',
    icon: `<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
    <path
        d="M1 2.68571C1 2.30701 1.32622 2 1.72862 2H2.27096C3.19434 2 3.74721 2.58422 4.06336 3.1273C4.27408 3.48932 4.42653 3.90919 4.54577 4.28933C4.57806 4.28694 4.61078 4.28571 4.64387 4.28571H16.7849C17.5914 4.28571 18.1738 5.01204 17.9527 5.74199L16.177 11.6017C15.8498 12.6818 14.8012 13.4266 13.6079 13.4266H7.82937C6.62618 13.4266 5.57145 12.6696 5.25303 11.5777L4.51422 9.04411L3.2915 5.15957L3.28952 5.15277C3.13825 4.63361 2.99629 4.14862 2.78534 3.78624C2.58048 3.43433 2.41718 3.37143 2.27096 3.37143H1.72862C1.32622 3.37143 1 3.06442 1 2.68571ZM5.92822 8.71113L6.6583 11.2147C6.80304 11.7111 7.28247 12.0551 7.82937 12.0551H13.6079C14.1503 12.0551 14.6269 11.7166 14.7758 11.2257L16.463 5.65714H4.96902L5.91484 8.66222C5.91997 8.67849 5.92442 8.69477 5.92822 8.71113ZM9.25768 16.1714C9.25768 17.1813 8.38781 18 7.3147 18C6.24162 18 5.37172 17.1813 5.37172 16.1714C5.37172 15.1615 6.24162 14.3429 7.3147 14.3429C8.38781 14.3429 9.25768 15.1615 9.25768 16.1714ZM7.80045 16.1714C7.80045 15.919 7.58297 15.7143 7.3147 15.7143C7.04643 15.7143 6.82895 15.919 6.82895 16.1714C6.82895 16.4239 7.04643 16.6286 7.3147 16.6286C7.58297 16.6286 7.80045 16.4239 7.80045 16.1714ZM16.0581 16.1714C16.0581 17.1813 15.1883 18 14.1151 18C13.042 18 12.1722 17.1813 12.1722 16.1714C12.1722 15.1615 13.042 14.3429 14.1151 14.3429C15.1883 14.3429 16.0581 15.1615 16.0581 16.1714ZM14.6009 16.1714C14.6009 15.919 14.3834 15.7143 14.1151 15.7143C13.8469 15.7143 13.6294 15.919 13.6294 16.1714C13.6294 16.4239 13.8469 16.6286 14.1151 16.6286C14.3834 16.6286 14.6009 16.4239 14.6009 16.1714Z"
    />
</svg>`,
  },
//   {
//     label: '购物车',
//     key: '2',
//     path: 'myCart',
//     icon: `<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
//     <path
//         d="M1 2.68571C1 2.30701 1.32622 2 1.72862 2H2.27096C3.19434 2 3.74721 2.58422 4.06336 3.1273C4.27408 3.48932 4.42653 3.90919 4.54577 4.28933C4.57806 4.28694 4.61078 4.28571 4.64387 4.28571H16.7849C17.5914 4.28571 18.1738 5.01204 17.9527 5.74199L16.177 11.6017C15.8498 12.6818 14.8012 13.4266 13.6079 13.4266H7.82937C6.62618 13.4266 5.57145 12.6696 5.25303 11.5777L4.51422 9.04411L3.2915 5.15957L3.28952 5.15277C3.13825 4.63361 2.99629 4.14862 2.78534 3.78624C2.58048 3.43433 2.41718 3.37143 2.27096 3.37143H1.72862C1.32622 3.37143 1 3.06442 1 2.68571ZM5.92822 8.71113L6.6583 11.2147C6.80304 11.7111 7.28247 12.0551 7.82937 12.0551H13.6079C14.1503 12.0551 14.6269 11.7166 14.7758 11.2257L16.463 5.65714H4.96902L5.91484 8.66222C5.91997 8.67849 5.92442 8.69477 5.92822 8.71113ZM9.25768 16.1714C9.25768 17.1813 8.38781 18 7.3147 18C6.24162 18 5.37172 17.1813 5.37172 16.1714C5.37172 15.1615 6.24162 14.3429 7.3147 14.3429C8.38781 14.3429 9.25768 15.1615 9.25768 16.1714ZM7.80045 16.1714C7.80045 15.919 7.58297 15.7143 7.3147 15.7143C7.04643 15.7143 6.82895 15.919 6.82895 16.1714C6.82895 16.4239 7.04643 16.6286 7.3147 16.6286C7.58297 16.6286 7.80045 16.4239 7.80045 16.1714ZM16.0581 16.1714C16.0581 17.1813 15.1883 18 14.1151 18C13.042 18 12.1722 17.1813 12.1722 16.1714C12.1722 15.1615 13.042 14.3429 14.1151 14.3429C15.1883 14.3429 16.0581 15.1615 16.0581 16.1714ZM14.6009 16.1714C14.6009 15.919 14.3834 15.7143 14.1151 15.7143C13.8469 15.7143 13.6294 15.919 13.6294 16.1714C13.6294 16.4239 13.8469 16.6286 14.1151 16.6286C14.3834 16.6286 14.6009 16.4239 14.6009 16.1714Z"
//     />
// </svg>`,
//   },
  {
    label: '我的书架',
    key: '3',
@@ -112,18 +112,18 @@
    </g>
</svg>`,
  },
  {
    label: '我的订单',
    key: '8',
    path: 'myOrder',
    icon: `<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
    <g id="Group 201">
        <path id="Vector"
            d="M17.4571 4C17.4571 3.80109 17.5384 3.61032 17.6831 3.46967C17.8278 3.32902 18.024 3.25 18.2286 3.25C18.4332 3.25 18.6294 3.32902 18.7741 3.46967C18.9187 3.61032 19 3.80109 19 4V17.25C19 18.7687 17.7336 20 16.1714 20H3.82857C2.26643 20 1 18.7687 1 17.25V2.75C1 1.23125 2.26643 2.34375e-08 3.82857 0H18.2286C18.4332 4.19176e-09 18.6294 0.0790176 18.7741 0.21967C18.9187 0.360322 19 0.551088 19 0.75C19 0.948912 18.9187 1.13968 18.7741 1.28033C18.6294 1.42098 18.4332 1.5 18.2286 1.5H3.82857C3.65973 1.5 3.49254 1.53233 3.33655 1.59515C3.18056 1.65797 3.03882 1.75004 2.91943 1.86612C2.80004 1.98219 2.70534 2.11999 2.64073 2.27165C2.57611 2.4233 2.54286 2.58585 2.54286 2.75V17.25C2.54286 17.4142 2.57611 17.5767 2.64073 17.7284C2.70534 17.88 2.80004 18.0178 2.91943 18.1339C3.03882 18.25 3.18056 18.342 3.33655 18.4048C3.49254 18.4677 3.65973 18.5 3.82857 18.5H16.1714C16.3403 18.5 16.5075 18.4677 16.6635 18.4048C16.8194 18.342 16.9612 18.25 17.0806 18.1339C17.2 18.0178 17.2947 17.88 17.3593 17.7284C17.4239 17.5767 17.4571 17.4142 17.4571 17.25V4ZM5.88571 8.25C5.68112 8.25 5.4849 8.17098 5.34023 8.03033C5.19556 7.88968 5.11429 7.69891 5.11429 7.5C5.11429 7.30109 5.19556 7.11032 5.34023 6.96967C5.4849 6.82902 5.68112 6.75 5.88571 6.75H14.1143C14.3189 6.75 14.5151 6.82902 14.6598 6.96967C14.8044 7.11032 14.8857 7.30109 14.8857 7.5C14.8857 7.69891 14.8044 7.88968 14.6598 8.03033C14.5151 8.17098 14.3189 8.25 14.1143 8.25H5.88571ZM5.88571 12.25C5.68112 12.25 5.4849 12.171 5.34023 12.0303C5.19556 11.8897 5.11429 11.6989 5.11429 11.5C5.11429 11.3011 5.19556 11.1103 5.34023 10.9697C5.4849 10.829 5.68112 10.75 5.88571 10.75H11.0286C11.2332 10.75 11.4294 10.829 11.5741 10.9697C11.7187 11.1103 11.8 11.3011 11.8 11.5C11.8 11.6989 11.7187 11.8897 11.5741 12.0303C11.4294 12.171 11.2332 12.25 11.0286 12.25H5.88571Z"
        />
    </g>
</svg>`,
  },
//   {
//     label: '我的订单',
//     key: '8',
//     path: 'myOrder',
//     icon: `<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
//     <g id="Group 201">
//         <path id="Vector"
//             d="M17.4571 4C17.4571 3.80109 17.5384 3.61032 17.6831 3.46967C17.8278 3.32902 18.024 3.25 18.2286 3.25C18.4332 3.25 18.6294 3.32902 18.7741 3.46967C18.9187 3.61032 19 3.80109 19 4V17.25C19 18.7687 17.7336 20 16.1714 20H3.82857C2.26643 20 1 18.7687 1 17.25V2.75C1 1.23125 2.26643 2.34375e-08 3.82857 0H18.2286C18.4332 4.19176e-09 18.6294 0.0790176 18.7741 0.21967C18.9187 0.360322 19 0.551088 19 0.75C19 0.948912 18.9187 1.13968 18.7741 1.28033C18.6294 1.42098 18.4332 1.5 18.2286 1.5H3.82857C3.65973 1.5 3.49254 1.53233 3.33655 1.59515C3.18056 1.65797 3.03882 1.75004 2.91943 1.86612C2.80004 1.98219 2.70534 2.11999 2.64073 2.27165C2.57611 2.4233 2.54286 2.58585 2.54286 2.75V17.25C2.54286 17.4142 2.57611 17.5767 2.64073 17.7284C2.70534 17.88 2.80004 18.0178 2.91943 18.1339C3.03882 18.25 3.18056 18.342 3.33655 18.4048C3.49254 18.4677 3.65973 18.5 3.82857 18.5H16.1714C16.3403 18.5 16.5075 18.4677 16.6635 18.4048C16.8194 18.342 16.9612 18.25 17.0806 18.1339C17.2 18.0178 17.2947 17.88 17.3593 17.7284C17.4239 17.5767 17.4571 17.4142 17.4571 17.25V4ZM5.88571 8.25C5.68112 8.25 5.4849 8.17098 5.34023 8.03033C5.19556 7.88968 5.11429 7.69891 5.11429 7.5C5.11429 7.30109 5.19556 7.11032 5.34023 6.96967C5.4849 6.82902 5.68112 6.75 5.88571 6.75H14.1143C14.3189 6.75 14.5151 6.82902 14.6598 6.96967C14.8044 7.11032 14.8857 7.30109 14.8857 7.5C14.8857 7.69891 14.8044 7.88968 14.6598 8.03033C14.5151 8.17098 14.3189 8.25 14.1143 8.25H5.88571ZM5.88571 12.25C5.68112 12.25 5.4849 12.171 5.34023 12.0303C5.19556 11.8897 5.11429 11.6989 5.11429 11.5C5.11429 11.3011 5.19556 11.1103 5.34023 10.9697C5.4849 10.829 5.68112 10.75 5.88571 10.75H11.0286C11.2332 10.75 11.4294 10.829 11.5741 10.9697C11.7187 11.1103 11.8 11.3011 11.8 11.5C11.8 11.6989 11.7187 11.8897 11.5741 12.0303C11.4294 12.171 11.2332 12.25 11.0286 12.25H5.88571Z"
//         />
//     </g>
// </svg>`,
//   },
  {
    label: '我的申请',
    key: '9',
src/views/personalCenter/index.vue
@@ -1,43 +1,41 @@
<template>
  <page>
    <div class="contentBox">
      <div class="breadcrumbBox">
        <span>位置:</span>
        <el-breadcrumb :separator-icon="ArrowRight">
          <el-breadcrumb-item>个人中心</el-breadcrumb-item>
          <el-breadcrumb-item>{{ label }}</el-breadcrumb-item>
        </el-breadcrumb>
      </div>
      <el-divider />
      <div class="personalPage clear">
        <div class="leftList fl">
          <ul class="menu">
            <li
              v-for="item in listMenu"
              :key="item.key"
              @click="goRouter(item)"
              :class="`/${item.path}` === path ? 'activeItem hover' : 'menuItem hover'"
  <div class="contentBox">
    <div class="breadcrumbBox">
      <span>位置:</span>
      <el-breadcrumb :separator-icon="ArrowRight">
        <el-breadcrumb-item>个人中心</el-breadcrumb-item>
        <el-breadcrumb-item>{{ label }}</el-breadcrumb-item>
      </el-breadcrumb>
    </div>
    <el-divider />
    <div class="personalPage clear">
      <div class="leftList fl">
        <ul class="menu">
          <li
            v-for="item in listMenu"
            :key="item.key"
            @click="goRouter(item)"
            :class="`/${item.path}` === path ? 'activeItem hover' : 'menuItem hover'"
          >
            <span
              :style="{
                fill: `/${item.path}` === path ? '#fff' : '#000',
              }"
              v-html="item.icon"
            >
              <span
                :style="{
                  fill: `/${item.path}` === path ? '#fff' : '#000',
                }"
                v-html="item.icon"
              >
              </span>
              <span>{{ item.label }}</span>
            </li>
          </ul>
        </div>
        <div class="rightContent">
          <div>
            <!-- 让主体做子路由的显示 -->
            <router-view />
          </div>
            </span>
            <span>{{ item.label }}</span>
          </li>
        </ul>
      </div>
      <div class="rightContent">
        <div>
          <!-- 让主体做子路由的显示 -->
          <router-view />
        </div>
      </div>
    </div>
  </page>
  </div>
</template>
<script setup lang="ts">
@@ -92,6 +90,12 @@
}
</script>
<style lang="less" scoped>
.homePage {
  min-width: 1220px;
  min-height: calc(100vh - 61.8%);
  background-color: #fff;
  padding-bottom: 100px;
}
.breadcrumbBox {
  display: flex;
  padding: 20px;
src/views/personalCenter/myApply.vue
@@ -31,7 +31,9 @@
              试用期限:<span>{{ item.updateDate }}</span> --
              <span>{{ item.feedBack.endDate }}</span>
            </div>
            <div style="color: orangered" v-if="item.isExpiry">阅读期限:<span>已过期</span></div>
            <div class="no" style="color: orangered" v-if="item.isExpiry">
              阅读期限:<span>已过期</span>
            </div>
            <div class="time">申请时间:{{ item.updateDate }}</div>
          </div>
          <div class="reasonForFailure" style="margin: 10px 0" v-if="item.state == 'Reject'">
src/views/personalCenter/myCollection.vue
@@ -15,19 +15,15 @@
              currentCollect == 'book' || currentCollect == 'textBooks'
                ? 'bookCartContent cartContent'
                : currentCollect == 'course'
                ? 'courseCartContent cartContent'
                : 'cartContent'
                  ? 'courseCartContent cartContent'
                  : 'cartContent'
            "
          >
            <div
              class="collectList flex jc-sb clear"
              v-if="collectList.length > 0 && !pages.loading"
            >
              <div
                v-for="(item, index) in collectList"
                :key="index"
                class="collectList-item fl"
              >
              <div v-for="(item, index) in collectList" :key="index" class="collectList-item fl">
                <div class="cover" @click="goBookDetails(item.id, item.name)">
                  <img :src="item.icon" alt="" />
                </div>
@@ -35,10 +31,7 @@
                  <span>{{ item.name }}</span>
                </div>
                <div class="currentBtn hover" @click="setCoolect(item)">
                  <img
                    src="@/assets/images/personalCenter/collect-click.png"
                    alt="star"
                  />
                  <img src="@/assets/images/personalCenter/collect-click.png" alt="star" />
                </div>
              </div>
            </div>
@@ -66,43 +59,43 @@
</template>
<script setup lang="ts">
import { reactive, ref, onMounted, inject, watch } from "vue";
import { ElMessage, ElMessageBox } from "element-plus";
import { useUserStore } from "@/store";
import { useRouter } from "vue-router";
const userStore = useUserStore();
const router = useRouter();
const MG: any = inject("MG");
const config: any = inject("config");
let currentCollect = ref("book");
let collectList = ref([]);
const background = ref(false);
const disabled = ref(false);
import { reactive, ref, onMounted, inject, watch } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { useUserStore } from '@/store'
import { useRouter } from 'vue-router'
const userStore = useUserStore()
const router = useRouter()
const MG: any = inject('MG')
const config: any = inject('config')
let currentCollect = ref('textBooks')
let collectList = ref([])
const background = ref(false)
const disabled = ref(false)
let pages = reactive({
  page: 1,
  pageSize: 10,
  count: 0,
  loading: false,
});
let linkType = ref("FavoriteBookCity");
})
let linkType = ref('FavoriteBookCity')
const tabCart = (event: Event) => {
  pages.page = 1;
  pages.loading = true;
  collectList.value = [];
  currentCollect.value = event.props.name;
  if (currentCollect.value == "textBooks") {
    linkType.value = "FavoriteBookCity";
  pages.page = 1
  pages.loading = true
  collectList.value = []
  currentCollect.value = event.props.name
  if (currentCollect.value == 'textBooks') {
    linkType.value = 'FavoriteBookCity'
  }
  getDataList();
};
  getDataList()
}
function getDataList() {
  pages.loading = true;
  pages.loading = true
  MG.store
    .getProductList({
      handelEBooK: true,
      queryType: "AppUserProductLink",
      queryType: 'AppUserProductLink',
      linkType: linkType.value,
      paging: {
        start: pages.pageSize * pages.page - pages.pageSize,
@@ -110,17 +103,17 @@
      },
    })
    .then((res) => {
      collectList.value = res.datas;
      pages.count = res.total;
      pages.loading = false;
      collectList.value = res.datas
      pages.count = res.total
      pages.loading = false
    })
    .catch(() => {
      pages.loading = false;
    });
      pages.loading = false
    })
}
onMounted(() => {
  getDataList();
});
  getDataList()
})
// watch(
//   () => userStore.token,
@@ -130,16 +123,16 @@
// )
const handleCurrentChange = (val: number) => {
  pages.page = val;
  getDataList();
};
  pages.page = val
  getDataList()
}
const setCoolect = (item) => {
  ElMessageBox.confirm("确定要取消收藏吗?", {
    confirmButtonText: "确定",
    cancelButtonText: "取消",
  ElMessageBox.confirm('确定要取消收藏吗?', {
    confirmButtonText: '确定',
    cancelButtonText: '取消',
    autofocus: false,
    type: "warning",
    type: 'warning',
  })
    .then(() => {
      MG.store
@@ -149,24 +142,24 @@
        })
        .then(() => {
          ElMessage({
            message: "收藏已取消!",
            type: "success",
          });
          pages.page = 1;
          getDataList();
        });
            message: '收藏已取消!',
            type: 'success',
          })
          pages.page = 1
          getDataList()
        })
    })
    .catch(() => {});
};
    .catch(() => {})
}
// 跳转书本详情
const goBookDetails = (id: number, name: string) => {
  router.push({
    path: "/bookdetail",
    path: '/bookdetail',
    query: {
      bookId: id,
    },
  });
};
  })
}
</script>
<style lang="less" scoped>
.cartClass {
@@ -287,12 +280,11 @@
  padding: 2px;
  background-color: #fff;
  position: absolute;
  top: 10px;
  right: 10px;
  top: 5px;
  right: 2px;
  img {
    width: 16px;
    height: 16px;
    height: 20px;
  }
}
src/views/personalCenter/teacherCertification.vue
@@ -35,7 +35,7 @@
              <span class="wait" v-else>待认证</span>
            </el-form-item>
            <el-form-item label="学校:" prop="schoolName">
              <span v-if="!editState">{{ teacherInfo.schoolName || "-" }}</span>
              <span v-if="!editState">{{ teacherInfo.schoolName || '-' }}</span>
              <el-input
                v-else
                v-model="teacherInfo.schoolName"
@@ -44,7 +44,7 @@
              />
            </el-form-item>
            <el-form-item label="真实姓名:" prop="fullName">
              <span v-if="!editState">{{ teacherInfo.fullName || "-" }}</span>
              <span v-if="!editState">{{ teacherInfo.fullName || '-' }}</span>
              <el-input
                v-else
                v-model="teacherInfo.fullName"
@@ -53,12 +53,8 @@
              />
            </el-form-item>
            <el-form-item label="职称:">
              <span v-if="!editState">{{ teacherInfo.positionalTitle || "-" }}</span>
              <el-select
                v-else
                v-model="teacherInfo.positionalTitle"
                placeholder="请选择职称"
              >
              <span v-if="!editState">{{ teacherInfo.positionalTitle || '-' }}</span>
              <el-select v-else v-model="teacherInfo.positionalTitle" placeholder="请选择职称">
                <el-option
                  v-for="item in teachPosts"
                  :key="item.value"
@@ -68,7 +64,7 @@
              </el-select>
            </el-form-item>
            <el-form-item label="任教课程:" prop="courseName">
              <span v-if="!editState">{{ teacherInfo.courseName || "-" }}</span>
              <span v-if="!editState">{{ teacherInfo.courseName || '-' }}</span>
              <el-input
                v-else
                v-model="teacherInfo.courseName"
@@ -77,7 +73,7 @@
              />
            </el-form-item>
            <el-form-item label="手机号:" prop="phone">
              <span v-if="!editState">{{ teacherInfo.phone || "-" }}</span>
              <span v-if="!editState">{{ teacherInfo.phone || '-' }}</span>
              <el-input
                v-else
                v-model="teacherInfo.phone"
@@ -86,7 +82,7 @@
              />
            </el-form-item>
            <el-form-item label="座机:" prop="telphone">
              <span v-if="!editState">{{ teacherInfo.telphone || "-" }}</span>
              <span v-if="!editState">{{ teacherInfo.telphone || '-' }}</span>
              <el-input
                v-else
                v-model="teacherInfo.telphone"
@@ -95,7 +91,7 @@
              />
            </el-form-item>
            <el-form-item label="邮箱:" prop="email">
              <span v-if="!editState">{{ teacherInfo.email || "-" }}</span>
              <span v-if="!editState">{{ teacherInfo.email || '-' }}</span>
              <el-input
                v-else
                v-model="teacherInfo.email"
@@ -104,7 +100,7 @@
              />
            </el-form-item>
            <el-form-item label="详细地址:" prop="detailedAddress">
              <span v-if="!editState">{{ teacherInfo.detailedAddress || "-" }}</span>
              <span v-if="!editState">{{ teacherInfo.detailedAddress || '-' }}</span>
              <el-input
                v-else
                v-model="teacherInfo.detailedAddress"
@@ -182,11 +178,7 @@
        <div class="footer-box">
          <span class="myDialog-footer" v-if="!loading && editState">
            <el-button @click="closeDialog(teacherFormRef)"> 取消</el-button>
            <el-button
              type="primary"
              @click="submitBtn(teacherFormRef)"
              :loading="subLoading"
            >
            <el-button type="primary" @click="submitBtn(teacherFormRef)" :loading="subLoading">
              提交</el-button
            >
          </span>
@@ -210,12 +202,7 @@
      </template>
    </el-dialog>
    <!-- 查看原因 -->
    <el-dialog
      align-center
      :close-on-click-modal="false"
      v-model="dialogReason"
      title="驳回原因"
    >
    <el-dialog align-center :close-on-click-modal="false" v-model="dialogReason" title="驳回原因">
      <div class="reason" v-if="reasonTxt">
        {{ reasonTxt }}
      </div>
@@ -225,23 +212,23 @@
</template>
<script setup lang="ts">
import { reactive, ref, watch, defineEmits, inject, onMounted } from "vue";
import type { FormInstance, FormRules } from "element-plus";
import { ElMessage } from "element-plus";
import tool from "@/assets/js/toolClass.js";
import { getTopicMsgCmsItemFile } from "@/assets/js/middleGround/tool.js";
import { useUserStore } from "@/store";
const userStore = useUserStore();
const MG: any = inject("MG");
const config: any = inject("config");
import { reactive, ref, watch, defineEmits, inject, onMounted } from 'vue'
import type { FormInstance, FormRules } from 'element-plus'
import { ElMessage } from 'element-plus'
import tool from '@/assets/js/toolClass.js'
import { getTopicMsgCmsItemFile } from '@/assets/js/middleGround/tool.js'
import { useUserStore } from '@/store'
const userStore = useUserStore()
const MG: any = inject('MG')
const config: any = inject('config')
// 证件验证
const valiCertificate = (rule: any, value: any, callback: any) => {
  if (fileList.value.length == 0) {
    callback(new Error("请上传相关证件"));
    callback(new Error('请上传相关证件'))
  } else {
    callback();
    callback()
  }
};
}
// const validateTelphone = (rule: any, value: any, callback: any) => {
//   if (value !== "" && !config.reg_telphone.test(value)) {
@@ -251,128 +238,125 @@
// };
const validatePhone = (rule: any, value: any, callback: any) => {
  if (value === "") {
    callback(new Error("请输入联系电话"));
  if (value === '') {
    callback(new Error('请输入联系电话'))
  } else {
    if (!config.reg_tel.test(value)) {
      callback(new Error("请输入正确格式的电话"));
      callback(new Error('请输入正确格式的电话'))
    }
    callback();
    callback()
  }
};
}
const validateEmail = (rule: any, value: any, callback: any) => {
  let myreg = /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/;
  if (value === "") {
    callback(new Error("请输入电子邮箱"));
  let myreg = /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/
  if (value === '') {
    callback(new Error('请输入电子邮箱'))
  } else {
    if (!myreg.test(value)) {
      callback(new Error("请输入正确格式的电子邮箱"));
      callback(new Error('请输入正确格式的电子邮箱'))
    }
    callback();
    callback()
  }
};
}
const props = defineProps({
  isShow: Boolean,
});
})
let teacherDialog = ref(false); //弹窗
let loading = ref(false);
let subLoading = ref(false);
const teachPosts = ref([]);
let teacherDialog = ref(false) //弹窗
let loading = ref(false)
let subLoading = ref(false)
const teachPosts = ref([])
const teacherInfo = reactive({
  schoolName: "", //学校名称
  fullName: "", //姓名
  positionalTitle: "", //职称
  courseName: "", //任课教程
  phone: "", //联系电话
  telphone: "", //座机
  email: "", //联系邮箱
  detailedAddress: "", //通讯地址
  schoolName: '', //学校名称
  fullName: '', //姓名
  positionalTitle: '', //职称
  courseName: '', //任课教程
  phone: '', //联系电话
  telphone: '', //座机
  email: '', //联系邮箱
  detailedAddress: '', //通讯地址
  relevantCertificates: [], //相关证件
  state: "", //审核状态默认待审核
  state: '', //审核状态默认待审核
  agree: false,
});
const topicMessageList = ref([]);
const topicId = ref();
const worksInfo = ref([]);
const userId = ref();
const teacherFormRef = ref<FormInstance>();
})
const topicMessageList = ref([])
const topicId = ref()
const worksInfo = ref([])
const userId = ref()
const teacherFormRef = ref<FormInstance>()
interface TeacherInfo {
  schoolName: string;
  fullName: string;
  courseName: string;
  telphone: string;
  phone: string;
  email: string;
  detailedAddress: string;
  relevantCertificates: string[];
  schoolName: string
  fullName: string
  courseName: string
  telphone: string
  phone: string
  email: string
  detailedAddress: string
  relevantCertificates: string[]
}
const teacherRules = reactive<FormRules<TeacherInfo>>({
  schoolName: [{ required: true, message: "学校名称不能为空", trigger: "blur" }],
  fullName: [{ required: true, message: "真实姓名不能为空", trigger: "blur" }],
  courseName: [{ required: true, message: "任教课程不能为空", trigger: "blur" }],
  schoolName: [{ required: true, message: '学校名称不能为空', trigger: 'blur' }],
  fullName: [{ required: true, message: '真实姓名不能为空', trigger: 'blur' }],
  courseName: [{ required: true, message: '任教课程不能为空', trigger: 'blur' }],
  // telphone: [{ validator: validateTelphone, trigger: "blur" }],
  phone: [{ required: true, validator: validatePhone, trigger: "blur" }],
  email: [{ required: true, validator: validateEmail, trigger: "blur" }],
  detailedAddress: [{ required: true, message: "详细地址不能为空", trigger: "blur" }],
  relevantCertificates: [
    { required: true, validator: valiCertificate, trigger: "change" },
  ],
});
const fileList = ref([]);
const editState = ref<boolean>(true);
  phone: [{ required: true, validator: validatePhone, trigger: 'blur' }],
  email: [{ required: true, validator: validateEmail, trigger: 'blur' }],
  detailedAddress: [{ required: true, message: '详细地址不能为空', trigger: 'blur' }],
  relevantCertificates: [{ required: true, validator: valiCertificate, trigger: 'change' }],
})
const fileList = ref([])
const editState = ref<boolean>(true)
watch(props, (newValue) => {
  // 统监听props的值变化,动态修改isShow的值
  teacherDialog.value = newValue.isShow;
  teacherDialog.value = newValue.isShow
  if (teacherDialog.value) {
    getpositionalTitle();
    getAgreement();
    getpositionalTitle()
    getAgreement()
    if (localStorage.getItem(config.tokenKey)) {
      getUserRole();
      getUserRole()
    }
  }
});
})
// 获取职称
function getpositionalTitle() {
  const data = {
    refCodes: ["positionalTitle"],
  };
    refCodes: ['positionalTitle'],
  }
  MG.store.getProductTypeField(data).then((res) => {
    try {
      const list = res[0];
      const options = JSON.parse(list.config).option;
      teachPosts.value = options;
      const list = res[0]
      const options = JSON.parse(list.config).option
      teachPosts.value = options
    } catch (error) {
      teachPosts.value = [];
      teachPosts.value = []
    }
  });
  })
}
// 获取登录用户身份
function getUserRole() {
  loading.value = true;
  loading.value = true
  MG.identity.getCurrentAppUser().then((res) => {
    if (res) {
      getType();
      userId.value = res.userId;
      let userInfo = res.infoList.find((item: any) => item.type == "userInfo");
      let userTypeObj = res.infoList.find((item: any) => item.type == "userType");
      getType()
      userId.value = res.userId
      let userInfo = res.infoList.find((item: any) => item.type == 'userInfo')
      let userTypeObj = res.infoList.find((item: any) => item.type == 'userType')
      const userData = {
        userName: userInfo && userInfo.data ? JSON.parse(userInfo.data).name : "",
        school: userInfo && userInfo.data ? JSON.parse(userInfo.data).school : "",
        address: userInfo && userInfo.data ? JSON.parse(userInfo.data).address : "",
        userType:
          userTypeObj && userTypeObj.data ? JSON.parse(userTypeObj.data).userType : "",
      };
      let teacherRole = res.roleLinks.find((item) => item.role.refCode == "teacher");
      let teacherInfos = res.infoList.find((item) => item.type == "teacherInfo");
      let wechatInfo = res.infoList.find((item) => item.type == "WeChat");
      let studentInfo = res.infoList.find((item) => item.type == "Default");
      let phoneInfo = res.secretList.find((item) => item.type == "MobilePhone");
      let emailInfo = res.secretList.find((item) => item.type == "EMail");
        userName: userInfo && userInfo.data ? JSON.parse(userInfo.data).name : '',
        school: userInfo && userInfo.data ? JSON.parse(userInfo.data).school : '',
        address: userInfo && userInfo.data ? JSON.parse(userInfo.data).address : '',
        userType: userTypeObj && userTypeObj.data ? JSON.parse(userTypeObj.data).userType : '',
      }
      let teacherRole = res.roleLinks.find((item) => item.role.refCode == 'teacher')
      let teacherInfos = res.infoList.find((item) => item.type == 'teacherInfo')
      let wechatInfo = res.infoList.find((item) => item.type == 'WeChat')
      let studentInfo = res.infoList.find((item) => item.type == 'Default')
      let phoneInfo = res.secretList.find((item) => item.type == 'MobilePhone')
      let emailInfo = res.secretList.find((item) => item.type == 'EMail')
      if (teacherRole && teacherInfos) {
        userStore.setUserInfo({
          ...userData,
@@ -380,22 +364,22 @@
          phoneNumber: phoneInfo?.credential,
          Email: emailInfo ? emailInfo.credential : JSON.parse(teacherInfos.data).email,
          icon: wechatInfo?.icon,
          role: "Teacher",
          role: 'Teacher',
          roleId: teacherRole.role.id,
          userId: res.userId,
        });
        })
      } else if (wechatInfo) {
        userStore.setUserInfo({
          ...userData,
          ...wechatInfo,
          phoneNumber: phoneInfo?.credential,
          Email: emailInfo?.credential,
          role: "Student",
          role: 'Student',
          userId: res.userId,
        });
        })
      } else if (studentInfo) {
        if (!studentInfo?.fullName) {
          teacherInfo.fullName = userStore.userInfo!.userName;
          teacherInfo.fullName = userStore.userInfo!.userName
        }
        userStore.setUserInfo({
          ...userData,
@@ -403,9 +387,9 @@
          icon: wechatInfo?.icon,
          phoneNumber: phoneInfo?.credential,
          Email: emailInfo?.credential,
          role: "Student",
          role: 'Student',
          userId: res.userId,
        });
        })
      } else if (phoneInfo) {
        userStore.setUserInfo({
          ...userData,
@@ -413,321 +397,313 @@
          name: phoneInfo?.credential,
          icon: phoneInfo?.icon,
          phoneNumber: phoneInfo?.credential,
          role: "Student",
          role: 'Student',
          userId: res.userId,
        });
        })
      }
      teacherInfo.phone = userStore.userInfo!.phoneNumber;
      teacherInfo.schoolName = userStore.userInfo!.school;
      teacherInfo.detailedAddress = userStore.userInfo!.address;
      teacherInfo.phone = userStore.userInfo!.phoneNumber
      teacherInfo.schoolName = userStore.userInfo!.school
      teacherInfo.detailedAddress = userStore.userInfo!.address
    }
  });
  })
}
function getType() {
  const data = {
    refCodes: ["teacherCertification"],
  };
    refCodes: ['teacherCertification'],
  }
  MG.resource.getCmsTypeByRefCode(data).then((res) => {
    worksInfo.value = res[0].cmsTypeLinks[0].children;
    newGetTeacherInfo();
  });
    worksInfo.value = res[0].cmsTypeLinks[0].children
    newGetTeacherInfo()
  })
}
// 文件上传
function fileUpload(file) {
  console.log(file, 2);
  console.log(file, 2)
  return new Promise((resolve, reject) => {
    const isJPG = file.file.type === "image/jpeg" || file.file.type === "image/png";
    const isLt2M = (0.5 * file.file.size) / 1024 / 1024 < 0.5;
    const isJPG = file.file.type === 'image/jpeg' || file.file.type === 'image/png'
    const isLt2M = (0.5 * file.file.size) / 1024 / 1024 < 0.5
    if (!isJPG) {
      ElMessage.error("上传文件只能是 jpg/png 格式!");
      return reject();
      ElMessage.error('上传文件只能是 jpg/png 格式!')
      return reject()
    }
    if (!isLt2M) {
      ElMessage.error("上传文件大小不能超过 500KB!");
      return reject();
      ElMessage.error('上传文件大小不能超过 500KB!')
      return reject()
    }
    const FileName = file.file.name.split(".")[0];
    const Extension = file.file.name.split(".")[1];
    const FileType = file.file.type;
    let size = 1024;
    const FileName = file.file.name.split('.')[0]
    const Extension = file.file.name.split('.')[1]
    const FileType = file.file.type
    let size = 1024
    tool
      .getFileMd5(file.file, size * 1024)
      .then((e) => {
        console.log(e, 2);
        console.log(e, 2)
        if (!fileList.value.find((item) => item.md5 == e)) {
          const imgData = new FormData();
          imgData.append("Md5", e);
          imgData.append("FileName", FileName);
          imgData.append("Extension", Extension);
          imgData.append("FileType", FileType);
          imgData.append("MetaData", null);
          imgData.append("file", file.file);
          const imgData = new FormData()
          imgData.append('Md5', e)
          imgData.append('FileName', FileName)
          imgData.append('Extension', Extension)
          imgData.append('FileType', FileType)
          imgData.append('MetaData', null)
          imgData.append('file', file.file)
          MG.file.upload(imgData).then(() => {
            fileList.value.push({
              md5: e,
              linkType: "LinkFile",
              linkProtectType: "Public",
              linkType: 'LinkFile',
              linkProtectType: 'Public',
              url: config.requestCtx + `/file/GetPreViewImage?md5=` + e,
            });
          });
            })
          })
        } else {
          ElMessage.error("当前文件已上传,请勿重复操作!");
          ElMessage.error('当前文件已上传,请勿重复操作!')
        }
      })
      .catch((e) => {
        console.error(e);
      });
  });
        console.error(e)
      })
  })
}
// 证件删除
function handleRemove(file) {
  for (let i = 0; i < fileList.value.length; i++) {
    if (fileList.value[i].md5 == file.md5) {
      fileList.value.splice(i, 1);
      fileList.value.splice(i, 1)
    }
  }
}
// 监听文件列表变化,同步修改展示列表
const showFileList = ref([]);
const showFileList = ref([])
watch(
  fileList,
  (newValue) => {
    showFileList.value = newValue.map(
      (item) => config.requestCtx + `/file/GetPreViewImage?md5=` + item.md5
    );
      (item) => config.requestCtx + `/file/GetPreViewImage?md5=` + item.md5,
    )
  },
  { immediate: true, deep: true }
);
  { immediate: true, deep: true },
)
// 关闭弹框,回调父层方法
const emit = defineEmits(["dialogChange"]);
const emit = defineEmits(['dialogChange'])
const closeDialog = (formEl: FormInstance | undefined) => {
  if (!formEl) return;
  formEl.resetFields();
  teacherDialog.value = false;
  emit("dialogChange", teacherDialog.value);
};
  if (!formEl) return
  formEl.resetFields()
  teacherDialog.value = false
  emit('dialogChange', teacherDialog.value)
}
// 教师协议
const dialogVisibleTecher = ref(false);
const protocolTxt = ref("");
const dialogVisibleTecher = ref(false)
const protocolTxt = ref('')
const getAgreement = () => {
  let query = {
    path: "protocol",
    path: 'protocol',
    fields: {
      content: [],
    },
  };
  }
  MG.resource.getItem(query).then((res) => {
    try {
      const data = res.datas.find(
        (e) => e.refCode == "teacherCertificationAgreement"
      );
      protocolTxt.value = data ? data.content : "暂无协议";
      const data = res.datas.find((e) => e.refCode == 'teacherCertificationAgreement')
      protocolTxt.value = data ? data.content : '暂无协议'
    } catch (error) {
      protocolTxt.value = "暂无协议";
      protocolTxt.value = '暂无协议'
    }
  });
};
  })
}
//教师信息
function newGetTeacherInfo() {
  const data = {
    start: 0,
    size: 10,
    topicIdOrRefCode: "teacherRoleApproval",
    topicIdOrRefCode: 'teacherRoleApproval',
    appRefCode: config.appRefCode,
    sort: {
      type: "Desc",
      field: "CreateDate",
      type: 'Desc',
      field: 'CreateDate',
    },
  };
  }
  MG.ugc.getTopicMessageList(data).then((res) => {
    try {
      fileList.value = [];
      const resData = res.datas.find((i) => i.appUserCreator.userId === userId.value);
      fileList.value = []
      const resData = res.datas.find((i) => i.appUserCreator.userId === userId.value)
      if (resData) {
        if (resData.state == "WaitAudit") {
          editState.value = false;
        if (resData.state == 'WaitAudit') {
          editState.value = false
        } else {
          editState.value = true;
          editState.value = true
        }
        let info = getTopicMsgCmsItemFile(worksInfo.value, resData.cmsItemDataList);
        teacherInfo.fullName = info.fullName;
        teacherInfo.schoolName = info.schoolName;
        teacherInfo.positionalTitle = info.positionalTitle;
        teacherInfo.courseName = info.courseName;
        teacherInfo.phone = info.phone;
        teacherInfo.telphone = info.telphone ? info.telphone : "";
        teacherInfo.email = info.email;
        teacherInfo.detailedAddress = info.detailedAddress ? info.detailedAddress : "";
        teacherInfo.relevantCertificates = info.relevantCertificates;
        teacherInfo.agree = true;
        teacherInfo.state = resData.state;
        topicId.value = resData.id;
        topicMessageList.value = resData.cmsItemDataList;
        let info = getTopicMsgCmsItemFile(worksInfo.value, resData.cmsItemDataList)
        teacherInfo.fullName = info.fullName
        teacherInfo.schoolName = info.schoolName
        teacherInfo.positionalTitle = info.positionalTitle
        teacherInfo.courseName = info.courseName
        teacherInfo.phone = info.phone
        teacherInfo.telphone = info.telphone ? info.telphone : ''
        teacherInfo.email = info.email
        teacherInfo.detailedAddress = info.detailedAddress ? info.detailedAddress : ''
        teacherInfo.relevantCertificates = info.relevantCertificates
        teacherInfo.agree = true
        teacherInfo.state = resData.state
        topicId.value = resData.id
        topicMessageList.value = resData.cmsItemDataList
        if (resData.feedBack != null) {
          reasonTxt.value = JSON.parse(resData.feedBack).reason;
          reasonTxt.value = JSON.parse(resData.feedBack).reason
        }
        if (teacherInfo.relevantCertificates.length > 0) {
          if (typeof teacherInfo.relevantCertificates == "object") {
          if (typeof teacherInfo.relevantCertificates == 'object') {
            teacherInfo.relevantCertificates.forEach((ele) => {
              let imgObj = {
                md5: ele.file.md5,
                linkType: "LinkFile",
                linkProtectType: "Public",
                linkType: 'LinkFile',
                linkProtectType: 'Public',
                url: config.requestCtx + `/file/GetPreViewImage?md5=` + ele.file.md5,
              };
              fileList.value.push(imgObj);
            });
              }
              fileList.value.push(imgObj)
            })
          } else {
            let imgObj = {
              md5: teacherInfo.relevantCertificates,
              linkType: "LinkFile",
              linkProtectType: "Public",
              linkType: 'LinkFile',
              linkProtectType: 'Public',
              url:
                config.requestCtx +
                `/file/GetPreViewImage?md5=` +
                teacherInfo.relevantCertificates,
            };
            fileList.value.push(imgObj);
                config.requestCtx + `/file/GetPreViewImage?md5=` + teacherInfo.relevantCertificates,
            }
            fileList.value.push(imgObj)
          }
        }
        loading.value = false;
        loading.value = false
      } else {
        loading.value = false;
        loading.value = false
      }
    } catch (error) {
      loading.value = false;
      loading.value = false
    }
  });
  })
}
//教师认证提交
const submitBtn = async (formEl: FormInstance | undefined) => {
  if (!formEl) return;
  if (!formEl) return
  await formEl.validate((valid, fields) => {
    if (valid) {
      if (teacherInfo.agree) {
        subLoading.value = true;
        subLoading.value = true
        if (topicMessageList.value.length > 0) {
          let dataRequests = tool.UpdateworksDataBytool(
            worksInfo.value,
            topicMessageList.value,
            teacherInfo,
            fileList.value
          );
            fileList.value,
          )
          const data = {
            description: "",
            icon: "",
            description: '',
            icon: '',
            id: topicId.value,
            topicIdOrRefCode: "teacherRoleApproval",
            name: teacherInfo.fullName + "",
            content: "",
            state: "WaitAudit",
            type: "teacherRegister",
            topicIdOrRefCode: 'teacherRoleApproval',
            name: teacherInfo.fullName + '',
            content: '',
            state: 'WaitAudit',
            type: 'teacherRegister',
            newDataRequests: dataRequests.newData,
            updateDataRequests: dataRequests.updateData,
            delDataRequest: {
              ids: [],
            },
          };
          let basicInfo = JSON.parse(JSON.stringify(teacherInfo));
          delete basicInfo.worksInfo;
          delete basicInfo.state;
          }
          let basicInfo = JSON.parse(JSON.stringify(teacherInfo))
          delete basicInfo.worksInfo
          delete basicInfo.state
          const userInfo = {
            requests: [
              {
                data: JSON.stringify(basicInfo),
                name: teacherInfo.fullName + "",
                type: "newTeacherInfo",
                name: teacherInfo.fullName + '',
                type: 'newTeacherInfo',
              },
            ],
          };
          }
          MG.identity.setAppUserInfo(userInfo).then((res) => {
            if (res) {
              MG.ugc.updateTopicMessage(data).then(() => {
                if (res !== false) {
                  ElMessage({
                    message: "提交成功!请等待审核...",
                    type: "success",
                  });
                  teacherDialog.value = false;
                  subLoading.value = false;
                  newGetTeacherInfo();
                    message: '提交成功!请等待审核...',
                    type: 'success',
                  })
                  teacherDialog.value = false
                  subLoading.value = false
                  newGetTeacherInfo()
                } else {
                  subLoading.value = false;
                  subLoading.value = false
                }
              });
              })
            } else {
              subLoading.value = true;
              subLoading.value = true
            }
          });
          })
        } else {
          const data = {
            topicIdOrRefCode: "teacherRoleApproval",
            name: teacherInfo.fullName + "",
            content: "",
            state: "WaitAudit",
            type: "teacherRegister",
            cmsTypeRefCode: "teacherCertification",
            newDataListRequest: tool.worksDataBytool(
              worksInfo.value,
              teacherInfo,
              fileList.value
            ),
          };
            topicIdOrRefCode: 'teacherRoleApproval',
            name: teacherInfo.fullName + '',
            content: '',
            state: 'WaitAudit',
            type: 'teacherRegister',
            cmsTypeRefCode: 'teacherCertification',
            newDataListRequest: tool.worksDataBytool(worksInfo.value, teacherInfo, fileList.value),
          }
          let basicInfo = JSON.parse(JSON.stringify(teacherInfo));
          delete basicInfo.worksInfo;
          delete basicInfo.state;
          let basicInfo = JSON.parse(JSON.stringify(teacherInfo))
          delete basicInfo.worksInfo
          delete basicInfo.state
          const userInfo = {
            requests: [
              {
                data: JSON.stringify(basicInfo),
                name: teacherInfo.fullName + "",
                type: "teacherInfo",
                name: teacherInfo.fullName + '',
                type: 'teacherInfo',
              },
            ],
          };
          }
          MG.identity.setAppUserInfo(userInfo).then((res) => {
            MG.ugc.newTopicMessage(data).then(() => {
              if (res !== false) {
                ElMessage({
                  message: "提交成功!请等待审核...",
                  type: "success",
                });
                teacherDialog.value = false;
                newGetTeacherInfo();
                subLoading.value = false;
                  message: '提交成功!请等待审核...',
                  type: 'success',
                })
                teacherDialog.value = false
                newGetTeacherInfo()
                subLoading.value = false
              } else {
                subLoading.value = false;
                subLoading.value = false
              }
            });
          });
            })
          })
        }
      } else {
        ElMessage({
          message: "请同意《教师认证服务条款》!",
          type: "warning",
        });
          message: '请同意《教师认证服务条款》!',
          type: 'warning',
        })
      }
    }
  });
};
  })
}
//原因查看
const dialogReason = ref(false);
const reasonTxt = ref("");
const dialogReason = ref(false)
const reasonTxt = ref('')
const lookReason = () => {
  dialogReason.value = true;
};
defineExpose({ getUserRole });
  dialogReason.value = true
}
defineExpose({ getUserRole })
</script>
<style lang="less">
.myDialog {
@@ -737,7 +713,7 @@
  }
  .body-box {
    padding: 10px 20px 40px;
    height: 80vh;
    height: 70vh;
    overflow-y: auto;
  }
@@ -760,7 +736,7 @@
    padding: 15px;
    border-top: 1px solid #f4f4f4;
    text-align: right;
    height: 63px;
    box-sizing: border-box;
  }
  .myDialog-footer {
@@ -784,6 +760,7 @@
  .main {
    font-weight: bold;
    text-align: center;
    color: #019e58;
  }
}
@@ -831,7 +808,7 @@
}
.fileList .fileImgBox:hover {
  border-color: #019E58;
  border-color: #019e58;
}
.agree-msg {
@@ -842,10 +819,14 @@
  .agree {
    margin-left: 5px;
    .main {
      text-align: center;
      color: #019e58;
    }
  }
  .term {
    color: #019E58;
    color: #019e58;
  }
}
.reason {
src/views/personalCenter/userInfo.vue
@@ -8,7 +8,7 @@
          <div class="info-box flex">
            <span class="label">用户名:</span>
            <span class="text">{{ userStore?.userInfo.name }}</span>
            <span class="change-info hover" @click="changeUserInfo('password')">修改密码</span>
            <!-- <span class="change-info hover" @click="changeUserInfo('password')">修改密码</span> -->
          </div>
          <div class="info-box flex">
            <span class="label">微信认证:</span>
@@ -28,7 +28,7 @@
              userStore?.userInfo?.phoneNumber ? '更换手机号' : '绑定'
            }}</span>
          </div>
          <div class="info-box flex">
          <!-- <div class="info-box flex">
            <span class="label">邮箱:</span>
            <span class="text">{{
              userStore?.userInfo?.Email ? userStore.userInfo?.Email : '--'
@@ -36,21 +36,9 @@
            <span class="change-info hover" @click="changeUserInfo('email')">{{
              userStore?.userInfo?.Email ? '更换邮箱' : '绑定邮箱'
            }}</span>
          </div>
          </div> -->
        </div>
      </div>
      <!-- <div class="content-item">
        <div class="item-title flex jc-sb">
          <span>用户类型</span>
          <span class="change-info hover" @click="updateUserInfo()">修改</span>
        </div>
        <div class="item-box">
          <div class="info-box flex">
            <span class="label">用户类型:</span>
            <span class="text">{{ userInfo.userType }}</span>
          </div>
        </div>
      </div> -->
      <div class="content-item">
        <div class="item-title flex jc-sb">
          <span>教师认证</span>
@@ -73,24 +61,12 @@
              <span class="text wait" v-if="teacherState == 'WaitAudit'">等待审核</span>
              <span class="text yes" v-else-if="teacherState == 'Normal'">已认证</span>
              <span class="text no" v-else-if="teacherState == 'Reject'">已驳回</span>
              <span class="text wait" v-if="teacherState === ''">待认证</span>
              <span class="text no" v-if="teacherState === ''">待认证</span>
            </div>
            <div v-if="teacherState == 'Reject'">
              <span class="title">驳回原因</span> :
              <span @click="lookReason()" class="wait hover">查看原因</span>
            </div>
          </div>
        </div>
      </div>
      <div class="content-item">
        <div class="item-title flex jc-sb">
          <span>我的积分</span>
          <span class="record hover" @click="recordDialog()">积分记录</span>
        </div>
        <div class="item-box">
          <div class="info-box flex">
            <span class="label">积分:</span>
            <span class="text">{{ userInfo.integral }}</span>
          </div>
        </div>
      </div>
@@ -109,7 +85,7 @@
      class="myDialogs"
      @close="closeUserInfoDialog(userFormRef)"
    >
      <div>
      <div class="dialog-content">
        <el-form
          ref="userFormRef"
          :model="userInfoForm"
@@ -161,22 +137,6 @@
              </el-button>
            </div>
          </el-form-item>
          <el-form-item label="新密码:" prop="password" v-if="changeType == 'password'">
            <el-input
              type="password"
              v-model="userInfoForm.password"
              autocomplete="off"
              placeholder="请输入8-16位新密码,且不能为纯数字"
            />
          </el-form-item>
          <el-form-item label="确认密码:" prop="confirmPassword" v-if="changeType == 'password'">
            <el-input
              type="password"
              v-model="userInfoForm.confirmPassword"
              autocomplete="off"
              placeholder="请输入确认密码"
            />
          </el-form-item>
        </el-form>
      </div>
      <template #footer>
@@ -211,7 +171,7 @@
      </div>
    </el-dialog>
    <!-- 用户类型修改 -->
    <login ref="loginRef"></login>
    <!-- <login ref="loginRef"></login> -->
    <!-- 查看原因 -->
    <el-dialog
      align-center
@@ -272,11 +232,12 @@
<script setup lang="ts">
import { reactive, ref, inject, onMounted, watch } from 'vue'
import type { FormInstance, FormRules } from 'element-plus'
import verify from '@/components/sliderImg/component/verify.vue'
import '@/components/sliderImg/sliderImg.js'
import '@/components/sliderImg/sliderImg.css'
import { ElMessage } from 'element-plus'
import { useUserStore } from '@/store'
// import wxlogin from 'vue-wxlogin'
import teacherCertification from './teacherCertification.vue'
import login from '@/layout/components/login.vue'
const userStore = useUserStore()
import moment from 'moment'
const MG: any = inject('MG')
@@ -1053,6 +1014,11 @@
.myDialogs {
  width: 628px;
  .dialog-content {
    padding: 20px 0;
    box-sizing: border-box;
  }
  .el-dialog__header {
    padding: 15px;
    margin-right: 0;