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

bug fixes

上级 728d0874
...@@ -78,7 +78,6 @@ ...@@ -78,7 +78,6 @@
"core-js": "^3.8.0", "core-js": "^3.8.0",
"cross-env": "^7.0.2", "cross-env": "^7.0.2",
"element-ui": "^2.15.6", "element-ui": "^2.15.6",
"jquery": "^3.5.1",
"js-cookie": "^2.2.1", "js-cookie": "^2.2.1",
"js-md5": "^0.7.3", "js-md5": "^0.7.3",
"lodash": "^4.17.20", "lodash": "^4.17.20",
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
<script src="https://zws-imgs-pub.ezijing.com/static/build/learn-mba/static/compatible/es5-shim.min.js"></script> <script src="https://zws-imgs-pub.ezijing.com/static/build/learn-mba/static/compatible/es5-shim.min.js"></script>
<script src="https://zws-imgs-pub.ezijing.com/static/build/learn-mba/static/compatible/es5-sham.min.js"></script> <script src="https://zws-imgs-pub.ezijing.com/static/build/learn-mba/static/compatible/es5-sham.min.js"></script>
<!-- 三方插件引入 --> <!-- 三方插件引入 -->
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.js" async></script>
<script src="https://zws-imgs-pub.ezijing.com/static/build/learn-mba/static/convertString/base64-new.js"></script> <script src="https://zws-imgs-pub.ezijing.com/static/build/learn-mba/static/convertString/base64-new.js"></script>
<script src="https://zws-imgs-pub.ezijing.com/static/build/learn-mba/static/common/runtime.js"></script> <script src="https://zws-imgs-pub.ezijing.com/static/build/learn-mba/static/common/runtime.js"></script>
......
...@@ -94,11 +94,14 @@ export default { ...@@ -94,11 +94,14 @@ export default {
}, },
methods: { methods: {
pointScroll(){ pointScroll(){
console.log($(`#point${this.$route.query.point}`), '123')
if (this.$route.query.point !== undefined) { if (this.$route.query.point !== undefined) {
$('html, body').animate({ const element = document.getElementById(`point${this.$route.query.point}`);
scrollTop: $(`#point${this.$route.query.point}`).offset().top if (element) {
}, 300) element.scrollIntoView({
behavior: 'smooth',
block: 'start'
});
}
} }
}, },
goPage(path, n) { goPage(path, n) {
......
...@@ -141,12 +141,13 @@ export default { ...@@ -141,12 +141,13 @@ export default {
methods: { methods: {
pointScroll() { pointScroll() {
if (this.$route.query.point !== undefined) { if (this.$route.query.point !== undefined) {
$('html, body').animate( const target = document.getElementById(`point${this.$route.query.point}`);
{ if (target) {
scrollTop: $(`#point${this.$route.query.point}`).offset().top target.scrollIntoView({
}, behavior: 'smooth',
500 block: 'start'
) });
}
} }
}, },
goPage(path, n) { goPage(path, n) {
......
...@@ -133,12 +133,13 @@ export default { ...@@ -133,12 +133,13 @@ export default {
methods: { methods: {
pointScroll() { pointScroll() {
if (this.$route.query.point !== undefined) { if (this.$route.query.point !== undefined) {
$('html, body').animate( const target = document.getElementById(`point${this.$route.query.point}`);
{ if (target) {
scrollTop: $(`#point${this.$route.query.point}`).offset().top target.scrollIntoView({
}, behavior: 'smooth',
500 block: 'start'
) });
}
} }
}, },
goPage(path, n) { goPage(path, n) {
......
...@@ -171,10 +171,14 @@ export default { ...@@ -171,10 +171,14 @@ export default {
return false return false
} }
if (n.id) { if (n.id) {
$('html, body').animate({ const target = document.getElementById(n.id);
scrollTop: $('#' + n.id).offset().top if (target) {
}) target.scrollIntoView({
return false behavior: 'smooth',
block: 'start'
});
}
return false;
} }
if (n.path) { if (n.path) {
this.$router.push(n) this.$router.push(n)
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
</div> </div>
<div class="tips-cen mar-t-20"> <div class="tips-cen mar-t-20">
<div class="name">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;用:</div> <div class="name">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;用:</div>
<div class="money">3800<span></span></div> <div class="money">{{ price }}<span></span></div>
</div> </div>
<div class="tips-top"> <div class="tips-top">
<div class="name">支付方式:</div> <div class="name">支付方式:</div>
...@@ -45,16 +45,20 @@ import action from '@action' ...@@ -45,16 +45,20 @@ import action from '@action'
import QrcodeVue from 'qrcode.vue' import QrcodeVue from 'qrcode.vue'
export default { export default {
components: { components: {
QrcodeVue QrcodeVue,
}, },
props: { props: {
formData: { formData: {
type: Object type: Object,
}, },
periods: { periods: {
type: Number, type: Number,
default: '1' default: '1',
} },
price: {
type: Number,
default: 3800,
},
}, },
data() { data() {
return { return {
...@@ -62,7 +66,7 @@ export default { ...@@ -62,7 +66,7 @@ export default {
isCodeShow: false, isCodeShow: false,
product_id: '6787934443077107712', product_id: '6787934443077107712',
payInfo: {}, payInfo: {},
time: null time: null,
} }
}, },
methods: { methods: {
...@@ -73,15 +77,15 @@ export default { ...@@ -73,15 +77,15 @@ export default {
const param = { const param = {
pay_type: this.payMethod, pay_type: this.payMethod,
product_id: this.product_id, product_id: this.product_id,
form_id: this.formData.id && this.formData.id.toString() form_id: this.formData.id && this.formData.id.toString(),
} }
const loading = this.$loading({ const loading = this.$loading({
lock: true, lock: true,
text: 'Loading', text: 'Loading',
spinner: 'el-icon-loading', spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)' background: 'rgba(0, 0, 0, 0.7)',
}) })
action.articleAction.getOrder(param).then(res => { action.articleAction.getOrder(param).then((res) => {
if (res.code === 200) { if (res.code === 200) {
this.payInfo = res.data this.payInfo = res.data
this.isCodeShow = true this.isCodeShow = true
...@@ -98,13 +102,13 @@ export default { ...@@ -98,13 +102,13 @@ export default {
}) })
}, },
checkPay(id, order_no) { checkPay(id, order_no) {
action.articleAction.checkPay(id).then(res => { action.articleAction.checkPay(id).then((res) => {
if (res.code === 0) { if (res.code === 0) {
const [order = {}] = res.data const [order = {}] = res.data
if (order.status === 1) { if (order.status === 1) {
this.$message({ this.$message({
message: '支付成功', message: '支付成功',
type: 'success' type: 'success',
}) })
this.payEnd(order_no) this.payEnd(order_no)
this.$emit('payStatus') this.$emit('payStatus')
...@@ -119,19 +123,19 @@ export default { ...@@ -119,19 +123,19 @@ export default {
closeClear() { closeClear() {
this.isCodeShow = false this.isCodeShow = false
this.$emit('closePayPop') this.$emit('closePayPop')
// clearInterval() clearInterval(this.time)
}, },
payEnd(orderOn) { payEnd(orderOn) {
const param = { const param = {
order_no: orderOn, order_no: orderOn,
form_id: this.formData.id.toString() form_id: this.formData.id.toString(),
} }
action.articleAction.payEnd(param).then(res => {}) action.articleAction.payEnd(param).then((res) => {})
} },
}, },
beforeDestroy() { beforeDestroy() {
// clearInterval(this.time) // clearInterval(this.time)
} },
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -14,6 +14,7 @@ export default [ ...@@ -14,6 +14,7 @@ export default [
contact_number: '18500913837', contact_number: '18500913837',
desc: '', desc: '',
payment: '1280元/人', payment: '1280元/人',
price: 1280,
content: `<p style="text-align: center"><strong>直播课程</strong></p> content: `<p style="text-align: center"><strong>直播课程</strong></p>
<div align="center"> <div align="center">
<table style="width: 100%;" border="1" cellspacing="0" cellpadding="0"> <table style="width: 100%;" border="1" cellspacing="0" cellpadding="0">
......
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论