提交 9621eae6 authored 作者: lihuihui's avatar lihuihui

updata

上级 65a2fbaa
......@@ -12,18 +12,18 @@ module.exports = {
},
devServer: {
proxy: {
'/api/passport': {
target: 'https://passport.ezijing.com',
pathRewrite: {
'^/api/passport': '/' // 需要rewrite重写的
}
},
'/usercenter': {
target: 'https://api-usercenter.ezijing.com',
pathRewrite: {
'^/usercenter': '/' // 需要rewrite重写的
}
}
// '/api/passport': {
// target: 'https://passport.ezijing.com',
// pathRewrite: {
// '^/api/passport': '/' // 需要rewrite重写的
// }
// },
// '/usercenter': {
// target: 'https://api-usercenter.ezijing.com',
// pathRewrite: {
// '^/usercenter': '/' // 需要rewrite重写的
// }
// }
/* 多个代理 */
// '/api': {
// target: $GLOBAL.webConf.url,
......
......@@ -94,7 +94,7 @@ export default class API {
const { status, data } = res.response
if (data) {
if (status === 402) {
window.G.$instance_vue.$router.push({
window.G.$instance_vue.$router.replace({
path: '/pay'
})
}
......
......@@ -174,20 +174,19 @@ export default {
methods: {
async submitShowPop() {
const isLogin = await this.$store.dispatch('checkLogin')
console.log(isLogin)
if (!isLogin) {
if (this.isWeapp) {
// 小程序
wx.miniProgram.navigateTo({
url: `/pages/login/index?redirect_uri=${encodeURIComponent(
`/pages/web/index?src=${window.location.origin}/course/learn`
`/exam/result?type=${this.$route.query.type}&is_create=0&papersUrl=${this.$route.query.papersUrl}`
)}`
})
} else {
this.$router.push({
path: '/login',
query: {
redirect_uri: `/exam/answer?type=${this.$route.query.type}&is_create=0&papersUrl=${this.$route.query.papersUrl}`
redirect_uri: `/exam/result?type=${this.$route.query.type}&is_create=0&papersUrl=${this.$route.query.papersUrl}`
}
})
}
......@@ -376,7 +375,7 @@ export default {
},
initData(n) {
const param = this.requestParam
if (window.localStorage.userId) {
if (window.localStorage.userId !== 'undefined') {
param.user_id = window.localStorage.userId
}
Exam.getExam(param, this.requestParam.papersUrl).then(res => {
......
......@@ -115,7 +115,7 @@ export default {
}
},
mounted() {
this.getCourseChapterList()
// this.getCourseChapterList()
this.scrollDom()
this.init()
},
......@@ -128,7 +128,6 @@ export default {
if (isLogin) {
api.getExamStatus(param).then(res => {
if (res.status === '0' || res.status === '3') {
console.log(11111)
this.isExamPopTo = true
}
})
......@@ -193,6 +192,8 @@ export default {
async tab(e) {
const isLogin = await this.$store.dispatch('checkLogin')
console.log(isLogin)
if (e === 1 || e === 2) {
this.getCourseChapterList()
if (!isLogin) {
if (this.isWeapp) {
// 小程序
......@@ -206,6 +207,7 @@ export default {
}
return
}
}
this.tabNav.navIndex = e
this.scrollDom()
},
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论