|
@@ -2,7 +2,15 @@
|
2
|
2
|
<div class="Page">
|
3
|
3
|
<MainPageContainer :ShowMainHeader="true" :ShowMainHeaderBack="true" MainHeaderTitle="订单状态">
|
4
|
4
|
<div class="PageContainer">
|
5
|
|
- 订单支付状态
|
|
5
|
+ <div class="centerLabel">
|
|
6
|
+ <i class="iconfont iconshibai" v-if="OrderStatus === 'Error'"></i>
|
|
7
|
+ <span v-if="OrderStatus === 'Error'">支付失败</span>
|
|
8
|
+ <i class="iconfont iconchenggong active" v-if="OrderStatus === 'Success'"></i>
|
|
9
|
+ <span v-if="OrderStatus === 'Success'">支付成功</span>
|
|
10
|
+ <a v-if="OrderStatus === 'Error'" :href="`/api/app/order/alipay/buylottery?orderId=${$route.query.id}&returlURL=${LocationOrigin}&token=${Jwt}`">重新支付</a>
|
|
11
|
+ <router-link :to="{ name: 'index' }">返回首页</router-link>
|
|
12
|
+ <a @click="$router.go(-1)">继续投注</a>
|
|
13
|
+ </div>
|
6
|
14
|
</div>
|
7
|
15
|
</MainPageContainer>
|
8
|
16
|
</div>
|
|
@@ -10,21 +18,18 @@
|
10
|
18
|
|
11
|
19
|
<script>
|
12
|
20
|
import MainPageContainer from '../../../components/common/MainPageContainer'
|
13
|
|
-import { mapState, mapActions, createNamespacedHelpers } from 'vuex'
|
14
|
|
-const { mapState: mapIndexState, mapActions: mapIndexActions, mapMutations: mapIndexMutations } = createNamespacedHelpers('index')
|
|
21
|
+import { createNamespacedHelpers } from 'vuex'
|
|
22
|
+const { mapActions: mapUserActions } = createNamespacedHelpers('user')
|
15
|
23
|
export default {
|
16
|
24
|
name: 'index',
|
17
|
25
|
data () {
|
18
|
26
|
return {
|
|
27
|
+ OrderStatus: null,
|
|
28
|
+ LocationOrigin: encodeURIComponent(`${window.location.origin}/#/index/DingDanZhiFuZhuangTai?orderId=${this.$route.query.id}`),
|
|
29
|
+ Jwt: window.localStorage.Jwt
|
19
|
30
|
}
|
20
|
31
|
},
|
21
|
32
|
computed: {
|
22
|
|
- ...mapState({
|
23
|
|
- AllLotteryType: x => x.AllLotteryType // 所有彩种类型
|
24
|
|
- }),
|
25
|
|
- ...mapIndexState({
|
26
|
|
- NewstLotteryRes: x => x.NewstLotteryRes // 最新数字彩开奖结果列表
|
27
|
|
- })
|
28
|
33
|
},
|
29
|
34
|
components: {
|
30
|
35
|
MainPageContainer
|
|
@@ -37,19 +42,15 @@ export default {
|
37
|
42
|
})
|
38
|
43
|
},
|
39
|
44
|
methods: {
|
40
|
|
- ...mapActions([
|
41
|
|
- 'GetAllLotteryType'
|
42
|
|
- ]),
|
43
|
|
- ...mapIndexActions([
|
44
|
|
- 'GetBanner',
|
45
|
|
- 'GetLotteryRes',
|
46
|
|
- 'GetNewstLotteryRes'
|
47
|
|
- ]),
|
48
|
|
- ...mapIndexMutations([
|
49
|
|
- 'EmptyBanner'
|
|
45
|
+ ...mapUserActions([
|
|
46
|
+ 'GetAliPayStatus'
|
50
|
47
|
]),
|
51
|
48
|
Init () { // 初始化
|
52
|
|
-
|
|
49
|
+ if (this.$route.query.id !== undefined) {
|
|
50
|
+ this.GetAliPayStatus({ urlData: { id: this.$route.query.id } }).then((res) => {
|
|
51
|
+ this.OrderStatus = res.data.data === 1 ? 'Success' : 'Error'
|
|
52
|
+ })
|
|
53
|
+ }
|
53
|
54
|
}
|
54
|
55
|
}
|
55
|
56
|
}
|