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

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

上级 cc8ce306
......@@ -13,18 +13,6 @@ 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': {
// target: $GLOBAL.webConf.url,
......@@ -45,5 +33,7 @@ module.exports = {
}
},
ProvidePlugin: {},
others: {}
others: {
WECHAT_REDIRECT_URL: 'https://passport2.ezijing.com'
}
}
......@@ -5,18 +5,16 @@ module.exports = {
isUploadStatic: false,
webpack: {
externals: {
'CKEDITOR': 'window.CKEDITOR',
'Base64': 'window.Base64',
'md5': 'window.md5',
'regeneratorRuntime': 'window.regeneratorRuntime',
'wx': 'window.wx',
'WeixinJSBridge': 'window.WeixinJSBridge'
CKEDITOR: 'window.CKEDITOR',
Base64: 'window.Base64',
md5: 'window.md5',
regeneratorRuntime: 'window.regeneratorRuntime',
wx: 'window.wx',
WeixinJSBridge: 'window.WeixinJSBridge'
}
},
ProvidePlugin: {
},
ProvidePlugin: {},
others: {
WECHAT_REDIRECT_URL: 'https://passport.ezijing.com'
}
}
......@@ -5,18 +5,16 @@ module.exports = {
isUploadStatic: false,
webpack: {
externals: {
'CKEDITOR': 'window.CKEDITOR',
'Base64': 'window.Base64',
'md5': 'window.md5',
'regeneratorRuntime': 'window.regeneratorRuntime',
'wx': 'window.wx',
'WeixinJSBridge': 'window.WeixinJSBridge'
CKEDITOR: 'window.CKEDITOR',
Base64: 'window.Base64',
md5: 'window.md5',
regeneratorRuntime: 'window.regeneratorRuntime',
wx: 'window.wx',
WeixinJSBridge: 'window.WeixinJSBridge'
}
},
ProvidePlugin: {
},
ProvidePlugin: {},
others: {
WECHAT_REDIRECT_URL: 'https://passport2.ezijing.com'
}
}
......@@ -31,6 +31,7 @@
</form>
</div>
</div>
<div class="backtop" @click="scrollTop" v-show="showBacktop"></div>
</div>
</template>
......@@ -47,7 +48,8 @@ export default {
return {
detail: { chapters: [] },
messageList: [], // {id:'', type: 1, payload: {}}
searchValue: ''
searchValue: '',
showBacktop: false
}
},
watch: {
......@@ -149,10 +151,27 @@ export default {
this.$nextTick(() => {
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() {
this.getCourseTagList()
},
mounted() {
window.addEventListener('scroll', this.handleScroll)
},
destroyed() {
window.removeEventListener('scroll', this.handleScroll)
}
}
</script>
......@@ -178,4 +197,14 @@ export default {
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>
<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 {
},
wechatLogin() {
const appId = 'wxc6044475caf2805a'
const wechatRedirectURL =
webConf.isDev === 'production'
? 'https://passport.ezijing.com'
: 'https://passport2.ezijing.com'
const wechatRedirectURL = webConf.others.WECHAT_REDIRECT_URL
// 回调地址
const redirectURI = `${wechatRedirectURL}/rest/wechat/oauth-callback?needCheck=false&identity=transport&redirectUrl=${window.location.href}`
// 微信的地址
......
......@@ -134,5 +134,10 @@ export default [
path: '/pay',
name: 'pay',
component: () => import('../pages/pay/index.vue')
},
{
path: '/download',
name: 'download',
component: () => import('../pages/download/index.vue')
}
]
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论