QYF-GitLab1
昨天 547c498d14f0b3bfffe963822ff802646274bde0
loginREAD
4个文件已修改
47 ■■■■ 已修改文件
src/assets/js/config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layout/components/login.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/home/index.vue 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/personalCenter/myApply.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/config.js
@@ -12,7 +12,7 @@
export const goodsStore = `defaultGoodsStore${appId}` // 默认商品库(书城)
export const publicStore = `defaultPublicStore${appId}` // 默认资源开放仓储
export const publicRepository = `defaultPublicRepository${appId}` // 默认资源开放库
export const textBookResourceUrl = 'https://yxjy.pumcp.com/books/resource/'
export const textBookResourceUrl = 'https://yxjy.pumcp.com/testBookReader/#/home'
export const reg_tel =
  /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/ // 电话号正则
src/layout/components/login.vue
@@ -309,7 +309,12 @@
        })
      }
    }
    router.go(0)
    if (localStorage.getItem('loginBack')) {
      window.location.href = localStorage.getItem('loginBack')
      localStorage.removeItem('loginBack')
    } else {
      router.go(0)
    }
  })
}
src/views/home/index.vue
@@ -153,7 +153,27 @@
  }
})
// 获取url参数
const getUrlParams = () => {
  let url = window.location.href
  let params = url.split('?')[1]
  let paramsObj = {}
  if (params) {
    paramsObj = params.split('&').reduce((pre, cur) => {
      pre[cur.split('=')[0]] = cur.split('=')[1]
      return pre
    }, {})
  }
  return paramsObj
}
onMounted(() => {
  // 监听是否来自数字阅读
  const params = getUrlParams()
  if (params.login) {
    localStorage.setItem('loginBack', decodeURIComponent(params.callBackUrl))
    logIn()
  }
  getBanner()
  classifList()
  getInformationList()
src/views/personalCenter/myApply.vue
@@ -195,15 +195,15 @@
}
const read = (pItem: any) => {
  /** 暂无教材阅读器,跳转至详情 */
  // let token = localStorage.getItem(config.tokenKey)
  // const url = config.textBookResourceUrl + '#/home' + '?bookId=' + pItem.id + '&token=' + token
  // window.open(url)
  router.push({
    path: '/bookdetail',
    query: {
      bookId: pItem.id,
    },
  })
  let token = localStorage.getItem(config.tokenKey)
  const url = config.textBookResourceUrl + '#/home' + '?bookId=' + pItem.refCode + '&token=' + token
  window.open(url)
  // router.push({
  //   path: '/bookdetail',
  //   query: {
  //     bookId: pItem.id,
  //   },
  // })
}
const handleSizeChange = (val: number) => {
  paginationData.limit = val