提交 caac2f82 authored 作者: 王鹏飞's avatar 王鹏飞

feat: 增加下载资料;知识点增加返回顶部;

上级 cc8ce306
...@@ -13,18 +13,6 @@ module.exports = { ...@@ -13,18 +13,6 @@ module.exports = {
}, },
devServer: { devServer: {
proxy: { proxy: {
// '/api/passport': {
// target: 'https://passport.ezijing.com',
// pathRewrite: {
// '^/api/passport': '/' // 需要rewrite重写的
// }
// },
// '/usercenter': {
// target: 'https://api-usercenter.ezijing.com',
// pathRewrite: {
// '^/usercenter': '/' // 需要rewrite重写的
// }
// }
/* 多个代理 */ /* 多个代理 */
// '/api': { // '/api': {
// target: $GLOBAL.webConf.url, // target: $GLOBAL.webConf.url,
...@@ -45,5 +33,7 @@ module.exports = { ...@@ -45,5 +33,7 @@ module.exports = {
} }
}, },
ProvidePlugin: {}, ProvidePlugin: {},
others: {} others: {
WECHAT_REDIRECT_URL: 'https://passport2.ezijing.com'
}
} }
...@@ -5,18 +5,16 @@ module.exports = { ...@@ -5,18 +5,16 @@ module.exports = {
isUploadStatic: false, isUploadStatic: false,
webpack: { webpack: {
externals: { externals: {
'CKEDITOR': 'window.CKEDITOR', CKEDITOR: 'window.CKEDITOR',
'Base64': 'window.Base64', Base64: 'window.Base64',
'md5': 'window.md5', md5: 'window.md5',
'regeneratorRuntime': 'window.regeneratorRuntime', regeneratorRuntime: 'window.regeneratorRuntime',
'wx': 'window.wx', wx: 'window.wx',
'WeixinJSBridge': 'window.WeixinJSBridge' WeixinJSBridge: 'window.WeixinJSBridge'
} }
}, },
ProvidePlugin: { ProvidePlugin: {},
},
others: { others: {
WECHAT_REDIRECT_URL: 'https://passport.ezijing.com'
} }
} }
...@@ -5,18 +5,16 @@ module.exports = { ...@@ -5,18 +5,16 @@ module.exports = {
isUploadStatic: false, isUploadStatic: false,
webpack: { webpack: {
externals: { externals: {
'CKEDITOR': 'window.CKEDITOR', CKEDITOR: 'window.CKEDITOR',
'Base64': 'window.Base64', Base64: 'window.Base64',
'md5': 'window.md5', md5: 'window.md5',
'regeneratorRuntime': 'window.regeneratorRuntime', regeneratorRuntime: 'window.regeneratorRuntime',
'wx': 'window.wx', wx: 'window.wx',
'WeixinJSBridge': 'window.WeixinJSBridge' WeixinJSBridge: 'window.WeixinJSBridge'
} }
}, },
ProvidePlugin: { ProvidePlugin: {},
},
others: { others: {
WECHAT_REDIRECT_URL: 'https://passport2.ezijing.com'
} }
} }
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
</form> </form>
</div> </div>
</div> </div>
<div class="backtop" @click="scrollTop" v-show="showBacktop"></div>
</div> </div>
</template> </template>
...@@ -47,7 +48,8 @@ export default { ...@@ -47,7 +48,8 @@ export default {
return { return {
detail: { chapters: [] }, detail: { chapters: [] },
messageList: [], // {id:'', type: 1, payload: {}} messageList: [], // {id:'', type: 1, payload: {}}
searchValue: '' searchValue: '',
showBacktop: false
} }
}, },
watch: { watch: {
...@@ -149,10 +151,27 @@ export default { ...@@ -149,10 +151,27 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
window.scrollTo(0, document.body.scrollHeight) window.scrollTo(0, document.body.scrollHeight)
}) })
},
// 滚到到顶部
scrollTop() {
window.scrollTo(0, 0)
},
handleScroll() {
const scrollTop =
window.pageYOffset ||
document.documentElement.scrollTop ||
document.body.scrollTop
this.showBacktop = scrollTop >= 10
} }
}, },
beforeMount() { beforeMount() {
this.getCourseTagList() this.getCourseTagList()
},
mounted() {
window.addEventListener('scroll', this.handleScroll)
},
destroyed() {
window.removeEventListener('scroll', this.handleScroll)
} }
} }
</script> </script>
...@@ -178,4 +197,14 @@ export default { ...@@ -178,4 +197,14 @@ export default {
background-color: #fff; background-color: #fff;
} }
} }
.backtop {
position: fixed;
right: 15px;
bottom: 64px;
width: 46px;
height: 46px;
background: url('../../../assets/images/icon_backtop.png') no-repeat;
background-size: contain;
cursor: pointer;
}
</style> </style>
<template>
<div class="download">
<h2>学习资料</h2>
<h3>请您自行下载</h3>
<p>下载链接:https://pan.baidu.com</p>
<p>提取码:mp91</p>
</div>
</template>
<script>
export default {
metaInfo: { title: '下载资料' },
data() {
return {}
},
methods: {}
}
</script>
<style lang="scss" scoped>
.download {
min-height: 100vh;
padding: 5.04rem 20px 0;
background: url('../../assets/images/download_bg.png') no-repeat center top;
background-size: 100%;
box-sizing: border-box;
h2 {
font-size: 0.3rem;
font-weight: bold;
color: #f7a746;
text-align: center;
}
h3 {
margin-top: 40px;
font-size: 0.3rem;
font-weight: bold;
color: #222;
}
p {
margin-top: 40px;
font-size: 0.3rem;
color: #222;
}
}
</style>
...@@ -137,10 +137,7 @@ export default { ...@@ -137,10 +137,7 @@ export default {
}, },
wechatLogin() { wechatLogin() {
const appId = 'wxc6044475caf2805a' const appId = 'wxc6044475caf2805a'
const wechatRedirectURL = const wechatRedirectURL = webConf.others.WECHAT_REDIRECT_URL
webConf.isDev === 'production'
? 'https://passport.ezijing.com'
: 'https://passport2.ezijing.com'
// 回调地址 // 回调地址
const redirectURI = `${wechatRedirectURL}/rest/wechat/oauth-callback?needCheck=false&identity=transport&redirectUrl=${window.location.href}` const redirectURI = `${wechatRedirectURL}/rest/wechat/oauth-callback?needCheck=false&identity=transport&redirectUrl=${window.location.href}`
// 微信的地址 // 微信的地址
......
...@@ -134,5 +134,10 @@ export default [ ...@@ -134,5 +134,10 @@ export default [
path: '/pay', path: '/pay',
name: 'pay', name: 'pay',
component: () => import('../pages/pay/index.vue') component: () => import('../pages/pay/index.vue')
},
{
path: '/download',
name: 'download',
component: () => import('../pages/download/index.vue')
} }
] ]
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论