1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
| <template>
| <view>
| <CheckOrder :order_no="code_id" v-if="code_type=='order'"></CheckOrder>
| <CheckCoupon :user_coupon_id="code_id" v-if="code_type=='coupon'"></CheckCoupon>
| <CheckUser :user_id="code_id" v-if="code_type=='user'"></CheckUser>
| </view>
| </template>
|
| <script>
| import CheckOrder from './part/clerkorder.vue';
| import CheckCoupon from './part/clerkcoupon.vue';
| import CheckUser from './part/clerkuser.vue';
| import utils from '@/common/utils.js';
| export default {
| components: {
| CheckOrder,
| CheckCoupon,
| CheckUser
| },
| data() {
| return {
| params: '',
| /*订单id*/
| code_id: 0,
| code_type: ''
| };
| },
| onLoad(e) {
| this.params = e.params;
| console.log(this.params);
| },
| mounted() {
| this.getCodeType();
| this.getData();
| },
| methods: {
| getCodeType() {
| let self = this;
| if (self.params.indexOf('-')>-1) {
| let params_arr = self.params.split('-');
| self.code_type = params_arr[0];
| self.code_id = params_arr[1];
| } else {
| self.code_type = 'order';
| self.code_id = self.params;
| }
| },
| /*获取数据*/
| getData() {
| let self = this;
|
| },
| }
| };
| </script>
|
| <style scoped>
|
| </style>
|
|