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

bug fixes

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