Commit 24f035c9 authored by ben.liu's avatar ben.liu

fix:秒杀配置

parent 83ffd2bd
...@@ -16,16 +16,16 @@ ...@@ -16,16 +16,16 @@
<p class="tips"> <p class="tips">
努力返回支付结果中,请留心查看! 努力返回支付结果中,请留心查看!
</p> </p>
<div class="actions"> <div :class="['actions', !isOrder && 'no-order']">
<cr-button <cr-button
class="actions__back" class="actions__back"
:plain="true" :plain="true"
type="primary" type="primary"
shape="circle" shape="circle"
@click="goHome('正在支付')" @click="goHome('正在支付')"
>返回首页</cr-button >{{ returnUrl ? '返回秒杀' : '返回首页' }}</cr-button
> >
<cr-button shape="circle" type="primary" @click="goOrderDetail('正在支付')" <cr-button v-if="isOrder" shape="circle" type="primary" @click="goOrderDetail('正在支付')"
>查看订单</cr-button >查看订单</cr-button
> >
</div> </div>
...@@ -36,6 +36,7 @@ import { queryPayStatus } from '@/api/pay.api'; ...@@ -36,6 +36,7 @@ import { queryPayStatus } from '@/api/pay.api';
import cookies from '@/service/cookieStorage.service'; import cookies from '@/service/cookieStorage.service';
import { goUrlExtends } from './extends'; import { goUrlExtends } from './extends';
import { isApp } from '@/service/validation.service'; import { isApp } from '@/service/validation.service';
import localStorage from '@/service/localStorage.service';
export default { export default {
components: {}, components: {},
extends: goUrlExtends, extends: goUrlExtends,
...@@ -44,7 +45,9 @@ export default { ...@@ -44,7 +45,9 @@ export default {
orderNo: null, orderNo: null,
timer: null, timer: null,
time: 10, time: 10,
init: false init: false,
returnUrl: '',
isOrder: true
}; };
}, },
created() { created() {
...@@ -56,6 +59,7 @@ export default { ...@@ -56,6 +59,7 @@ export default {
} }
}, },
mounted() { mounted() {
this.getQuery();
this.$track.registeredEvents('h5_RechargeResultPageExposure', { this.$track.registeredEvents('h5_RechargeResultPageExposure', {
pay_status: '正在支付' pay_status: '正在支付'
}); });
...@@ -81,6 +85,12 @@ export default { ...@@ -81,6 +85,12 @@ export default {
clearInterval(this.timer); clearInterval(this.timer);
}, },
methods: { methods: {
getQuery() {
this.returnUrl = cookies.get('returnUrl') || '';
if (localStorage.get('hideOrder')) {
this.isOrder = false;
}
},
loop() { loop() {
this.query(); this.query();
this.timer = setInterval(() => { this.timer = setInterval(() => {
...@@ -165,7 +175,9 @@ export default { ...@@ -165,7 +175,9 @@ export default {
flex-direction: row; flex-direction: row;
margin-top: @padding-lg; margin-top: @padding-lg;
justify-content: space-between; justify-content: space-between;
&.no-order {
justify-content: center;
}
&__back { &__back {
color: @cherry-color-error; color: @cherry-color-error;
border: 1px solid @cherry-color-error; border: 1px solid @cherry-color-error;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment