Blame view

src/store/modules/myOrder.js 3.53 KB
72d769fb7   范牧   myOrder
1
2
3
4
  import urlAlias from '../url';
  import request from '../request';
  
  const {
9a8f39ae3   BigBoss   订单
5
    myOrderList
72d769fb7   范牧   myOrder
6
  } = urlAlias;
9a8f39ae3   BigBoss   订单
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
60
61
62
63
64
65
66
67
68
69
70
71
72
  // const data = {
  //     data: [
  //         {
  //             finished_time: null,
  //             is_refound: "0",
  //             mch_id: "1436019502",
  //             money_of_dcw: "0",
  //             money_of_partner: "0",
  //             money_of_shop: "0",
  //             orderJudge: false,
  //             order_info: {
  //                 address:{
  //                         cityName: "镇江市",
  //                         countyName: "丹阳市",
  //                         detailInfo: "延陵镇柳茹村卫生室附近秀野堂农业发展有限公司",
  //                         errMsg: "chooseAddress:ok",
  //                         nationalCode: "321181",
  //                         postalCode: "212300",
  //                         provinceName: "江苏省",
  //                         telNumber: "15896379277",
  //                         userName: "点餐汪客服",
  //                     },
  //                 cartinfo:['11', '12'],
  //                 keyname: "1_1587129366",
  //                 lefttime: 179995,
  //                 list:[
  //                     {
  //                         cart_id: "11",
  //                         imgUrl: "https://glass.xiuyetang.com//upload_jk/4/4_0_3FDA03.jpg",
  //                         img_index_url: null,
  //                         memo: "志平防蓝光-防辐射电脑网课眼镜,TR90弹性漆,近视镜,青春潮流,01-8701",
  //                         mp_id: "1",
  //                         nowPrice: 100,
  //                         num: "2",
  //                         oldPrice: "0",
  //                         p_discount: "1",
  //                         p_name: "01-8701志平防蓝光-防辐射电脑网课眼镜,TR90弹性漆,近视镜,青春潮流",
  //                         p_root_index: "1",
  //                         p_sale_price: "0",
  //                         peopleName: "me",
  //                         pics: '',
  //                         pid: "4",
  //                         sk_id: "38",
  //                     },
  //                 ],
  //                 orderDesc: "总共包括有:01-8701志平防蓝光-防辐射电脑网课眼镜,TR90弹性漆,近视镜,青春潮流在内的1件商品",
  //                 total_fee: 100
  //             },
  //             partner_uid: "0",
  //             pay_cate: "2020",
  //             pay_id: "3",
  //             pay_time: "2020-04-17 21:16:12",
  //             pay_wood_desc: "在【非常戴镜】的微信付款凭证",
  //             pay_wood_id: "fcdj-1-1_1587129366",
  //             prepay_id: "wx172116124528226bf1a8adad1662456500",
  //             re_check_staus: "0",
  //             shopid: "0",
  //             split_userid: "0",
  //             status: "1",
  //             total_fee: "100",
  //             uid: "1",
  //         }
  //     ],
  //     msg: "订单列表",
  //     status: 0,
  // }
72d769fb7   范牧   myOrder
73

e2eaa8a22   范牧   请求地址提取
74
  const state = {
72d769fb7   范牧   myOrder
75
    orderList: [],
e2eaa8a22   范牧   请求地址提取
76
77
78
  };
  
  const mutations = {
72d769fb7   范牧   myOrder
79
80
81
    INIT: (state, data) => {
      state.orderList = data;
    },
e2eaa8a22   范牧   请求地址提取
82
83
84
  };
  
  const actions = {
72d769fb7   范牧   myOrder
85
86
    getList({ commit }, param) {
        request({
9a8f39ae3   BigBoss   订单
87
          url: myOrderList,
72d769fb7   范牧   myOrder
88
89
          data: param,
          success: (res) => {
51a5fe4d8   尹聃   镜架和太阳镜功能选构页
90
  <<<<<<< HEAD
72d769fb7   范牧   myOrder
91
92
93
94
            const resData = {
              ...res,
              data,
            }
8fdae7108   尹聃   完成镜框和太阳镜的选购页功能
95
            console.log('data.data',res);
72d769fb7   范牧   myOrder
96
            commit("INIT", resData.data.data);
51a5fe4d8   尹聃   镜架和太阳镜功能选构页
97
  =======
9a8f39ae3   BigBoss   订单
98
99
            // console.log(res.data);
            commit("INIT", res.data.data);
51a5fe4d8   尹聃   镜架和太阳镜功能选构页
100
  >>>>>>> f0cf57997c2438808bb572407021a3e3a18ee0fb
72d769fb7   范牧   myOrder
101
102
103
          },
      })
    }
e2eaa8a22   范牧   请求地址提取
104
105
106
  }
  
  export default {
72d769fb7   范牧   myOrder
107
108
109
110
    namespaced: true,
    state,
    mutations,
    actions,
e2eaa8a22   范牧   请求地址提取
111
  }