Commit 9a8f39ae36b7710f3efff4550ebe9c1bfe9d68d3

Authored by BigBoss
1 parent 600d4968f3
Exists in master

订单

1 1 {
2 2 "pages" : [
3 3 {
4   - "path" : "pages/index/index",
  4 + "path" : "pages/user/user",
5 5 "style" : {
6   - "navigationBarTitleText" : "商城一览"
  6 + "navigationBarTitleText" : "我的"
7 7 }
8 8 },
9 9 {
10   - "path" : "pages/myOrder/myOrder",
  10 + "path" : "pages/detailsChoiceArgs/detailsChoiceArgs",
11 11 "style" : {
12   - "navigationBarTitleText" : "我的订单"
  12 + "navigationBarTitleText" : "镜片名称名称"
13 13 }
14 14 },
15 15 {
16   - "path" : "pages/cart/cart",
  16 + "path" : "pages/purchaseLenses/purchaseLenses",
17 17 "style" : {
18   - "navigationBarTitleText" : "购物车"
  18 + "navigationBarTitleText" : "产品选购"
19 19 }
20 20 },
21 21 {
22   - "path" : "pages/frameDetail/frameDetail",
  22 + "path" : "pages/lensDetails/lensDetails",
23 23 "style" : {
24 24 "navigationBarTitleText" : "产品详情"
25 25 }
26 26 },
27 27 {
28   - "path" : "pages/lensDetails/lensDetails",
  28 + "path" : "pages/myOrderPaying/myOrderPaying",
29 29 "style" : {
30   - "navigationBarTitleText" : "产品详情"
  30 + "navigationBarTitleText" : "我的订单"
31 31 }
32 32 },
33 33 {
34   - "path" : "pages/purchaseLenses/purchaseLenses",
  34 + "path" : "pages/myOrder/myOrder",
35 35 "style" : {
36   - "navigationBarTitleText" : "产品选购"
  36 + "navigationBarTitleText" : "我的订单"
37 37 }
38 38 },
39 39 {
40   - "path" : "pages/refundProgress/refundProgress",
  40 + "path" : "pages/index/index",
41 41 "style" : {
42   - "navigationBarTitleText" : "申请退款"
  42 + "navigationBarTitleText" : "商城一览"
43 43 }
44 44 },
45 45 {
46   - "path" : "pages/addAddress/addAddress",
  46 + "path" : "pages/cart/cart",
47 47 "style" : {
48   - "navigationBarTitleText" : "新增地址"
  48 + "navigationBarTitleText" : "购物车"
49 49 }
50 50 },
51 51 {
52   - "path" : "pages/confirmOrder/confirmOrder",
  52 + "path" : "pages/frameDetail/frameDetail",
53 53 "style" : {
54   - "navigationBarTitleText" : "确认订单"
  54 + "navigationBarTitleText" : "产品详情"
55 55 }
56 56 },
57 57 {
58   - "path" : "pages/user/user",
  58 + "path" : "pages/refundProgress/refundProgress",
59 59 "style" : {
60   - "navigationBarTitleText" : "我的"
  60 + "navigationBarTitleText" : "申请退款"
61 61 }
62 62 },
63 63 {
64   - "path" : "pages/refundment/refundWays"
  64 + "path" : "pages/addAddress/addAddress",
  65 + "style" : {
  66 + "navigationBarTitleText" : "新增地址"
  67 + }
65 68 },
66 69 {
67   - "path" : "pages/refundment/refundment"
  70 + "path" : "pages/confirmOrder/confirmOrder",
  71 + "style" : {
  72 + "navigationBarTitleText" : "确认订单"
  73 + }
68 74 },
69 75 {
70   - "path" : "pages/predelivery/predelivery"
  76 + "path" : "pages/refundment/refundWays",
  77 + "style" : {
  78 + "navigationBarTitleText" : "退款方式"
  79 + }
71 80 },
72 81 {
73   - "path" : "pages/customerService/customerService",
  82 + "path" : "pages/refundment/refundment",
74 83 "style" : {
75   - "navigationBarTitleText" : "在线客服"
  84 + "navigationBarTitleText" : "申请退款"
76 85 }
77 86 },
78 87 {
79   - "path" : "pages/myOrderPaying/myOrderPaying",
  88 + "path" : "pages/predelivery/predelivery",
80 89 "style" : {
81   - "navigationBarTitleText" : "我的订单"
  90 + "navigationBarTitleText" : "待发货"
82 91 }
83 92 },
84 93 {
85   - "path" : "pages/detailsChoiceArgs/detailsChoiceArgs",
  94 + "path" : "pages/customerService/customerService",
86 95 "style" : {
87   - "navigationBarTitleText" : "镜片名称名称"
  96 + "navigationBarTitleText" : "在线客服"
88 97 }
89 98 },
90 99 {
... ... @@ -98,7 +107,12 @@
98 107 "style" : {
99 108 "navigationBarTitleText" : "镜框选购页"
100 109 }
101   - }
  110 + }
  111 + ,{
  112 + "path" : "pages/addOpticsData/addOpticsData",
  113 + "style" : {
  114 + "navigationBarTitleText" : "验光数据"}
  115 + }
102 116 ],
103 117 "globalStyle" : {
104 118 "navigationBarTextStyle" : "black",
... ...
src/pages/addOpticsData/addOpticsData.vue
... ... @@ -0,0 +1,19 @@
  1 +<template>
  2 + <view>
  3 +
  4 + </view>
  5 +</template>
  6 +
  7 +<script>
  8 + export default {
  9 + data() {
  10 + return {
  11 +
  12 + };
  13 + }
  14 + }
  15 +</script>
  16 +
  17 +<style lang="scss">
  18 +
  19 +</style>
... ...
src/pages/myOrder/components/OrderCard.vue
1 1 <template>
2 2 <view>
3   - <view class="card" v-if="current === order.orderType" >
  3 + <view class="card" v-if="current == status" @click="toOrderInfo(status,order.pay_id)">
4 4 <view class="cardHeader">
5   - <text class="orderId">订单号:{{order.orderId}}</text>
6   - <text class="orderType" v-if="order.orderType===1">待付款</text>
7   - <text class="orderType" v-if="order.orderType===2">待发货</text>
8   - <text class="orderType" v-if="order.orderType === 3">待收货</text>
9   - <text class="orderType" v-if="order.orderType === 4">退款售后</text>
10   - <text class="orderType" v-if="order.orderType === 5">已完成</text>
  5 + <text class="orderId" v-if="status == '0'||status == '1'">订单号:{{order.mch_id}}</text>
  6 + <text class="orderId" v-if="status == '2'||status == '3'">下单时间:{{order.pay_time}}</text>
  7 + <text class="orderType" v-if="status=='0'">待付款</text>
  8 + <text class="orderType" v-if="status=='1'">待收货</text>
  9 + <text class="orderType" v-if="status == '2'||status == '3'">已完成</text>
  10 + <!-- <text class="orderType" v-if="status == '3'">已评价</text> -->
11 11 </view>
12   - <view class="orderCardInfo">
13   - <image :src="order.img" mode="aspectFill"></image>
  12 + <view class="orderCardInfo" v-for="(orderInfo) in orderInfoList.list" :key="orderInfo">
  13 + <image :src="orderInfo.imgUrl" mode="aspectFill"></image>
14 14 <view class="infoText">
15   - <view class="orderName">{{order.name}}</view>
16   - <view class="orderDescrib">规格:玫瑰金 / 钛合金 / 防日光防紫外线</view>
  15 + <view class="orderName">{{orderInfo.p_name}}</view>
  16 + <view class="orderDescrib">{{orderInfo.p_name}}</view>
17 17 <view class="infoText-bottom">
18   - <view class="markPrice">{{order.price}}</view>
19   - <view class="buy-num">X{{order.buyNum}}</view>
  18 + <view class="markPrice">{{orderInfo.nowPrice}}</view>
  19 + <view class="buy-num">X {{orderInfo.num}}</view>
20 20 </view>
21 21 </view>
22 22 </view>
23   - <view class="payPrice">实付:<text class="priceNum">{{order.price}}</text> </view>
24   - <view class="btns" v-if="order.orderType === 1">
25   - <view class="btn-type1">申请退款</view>
  23 + <view class="payPrice">实付:<text class="priceNum">{{order.total_fee}}</text> </view>
  24 + <!-- 0待付款 1 已付款 待收货 2 已收货待评价 3 已评价 -->
  25 + <view class="btns" v-if="status == '0'">
  26 + <view class="btn-type1" >取消订单</view>
26 27 <view class="btn-type2">去支付</view>
27 28 </view>
28   - <view class="btns" v-if="order.orderType === 0">
29   - <view class="btn-type1">再次购买</view>
  29 + <view class="btns" v-if="status == '1'">
  30 + <view class="btn-type2">确认收货</view>
30 31 </view>
  32 + <view class="btns" v-if="status == '2'">
  33 + <view class="btn-type2">再次购买</view>
  34 + </view>
  35 + <!-- <view class="btns" v-if="status == '3'">
  36 + <view class="btn-type2">再次购买</view>
  37 + </view> -->
31 38 </view>
32   - <view class="card" v-if="current === 0" >
  39 + <view class="card" v-if="current == '10'" @click="toOrderInfo(status,order.pay_id)">
33 40 <view class="cardHeader">
34   - <text class="orderId">订单号:{{order.orderId}}</text>
35   - <text class="orderType" v-if="order.orderType===1">待付款</text>
36   - <text class="orderType" v-if="order.orderType===2">待发货</text>
37   - <text class="orderType" v-if="order.orderType === 3">待收货</text>
38   - <text class="orderType" v-if="order.orderType === 4">退款售后</text>
  41 + <text class="orderId" v-if="status == '0'||status == '1'">订单号:{{order.mch_id}}</text>
  42 + <text class="orderId" v-if="status == '2'||status == '3'">下单时间:{{order.pay_time}}</text>
  43 + <text class="orderType" v-if="status=='0'">待付款</text>
  44 + <text class="orderType" v-if="status=='1'">待收货</text>
  45 + <text class="orderType" v-if="status == '2'||status == '3'">已完成</text>
  46 + <!-- <text class="orderType" v-if="status == '3'">已评价</text> -->
39 47 </view>
40   - <view class="orderCardInfo">
41   - <image :src="order.img" mode="aspectFill"></image>
  48 + <view class="orderCardInfo" v-if v-for="(orderInfo) in orderInfoList.list" :key="orderInfo">
  49 + <image :src="orderInfo.imgUrl" mode="aspectFill"></image>
42 50 <view class="infoText">
43   - <view class="orderName">{{order.name}}</view>
44   - <view class="orderDescrib">规格:玫瑰金 / 钛合金 / 防日光防紫外线</view>
  51 + <view class="orderName">{{orderInfo.p_name}}</view>
  52 + <view class="orderDescrib">{{orderInfo.p_name}}</view>
45 53 <view class="infoText-bottom">
46   - <view class="markPrice">{{order.price}}</view>
47   - <view class="buy-num">X{{order.buyNum}}</view>
  54 + <view class="markPrice">{{orderInfo.nowPrice}}</view>
  55 + <view class="buy-num">X {{orderInfo.num}}</view>
48 56 </view>
49 57 </view>
50 58 </view>
51   - <view class="payPrice">实付:<text class="priceNum">{{order.price}}</text> </view>
52   - <view class="btns" v-if="order.orderType === 1">
53   - <view class="btn-type1" @click="toRefundment">申请退款</view>
  59 + <view class="payPrice">实付:<text class="priceNum">{{order.total_fee}}</text> </view>
  60 + <view class="btns" v-if="status == '0'">
  61 + <view class="btn-type1" >取消订单</view>
54 62 <view class="btn-type2">去支付</view>
55 63 </view>
56   - <view class="btns" v-if="order.orderType === 0">
57   - <view class="btn-type1">再次购买</view>
  64 + <view class="btns" v-if="status == '1'">
  65 + <view class="btn-type2">确认收货</view>
  66 + </view>
  67 + <view class="btns" v-if="status == '2'">
  68 + <view class="btn-type2">再次购买</view>
58 69 </view>
  70 + <!-- <view class="btns" v-if="status == '3'">
  71 + <view class="btn-type2">再次购买</view>
  72 + </view> -->
59 73 </view>
60 74 </view>
61 75 </template>
... ... @@ -67,13 +81,72 @@
67 81 * 订单数据
68 82 */
69 83 order: {
70   - orderId: Number,
71   - img: String,
72   - name: String,
73   - originCost:String,
74   - price: String,
75   - orderType:Number,
76   - buyNum:Number
  84 + // orderId: Number,
  85 + // img: String,
  86 + // name: String,
  87 + // originCost:String,
  88 + // price: String,
  89 + // orderType:Number,
  90 + // buyNum:Number,
  91 + finished_time: null,
  92 + is_refound: String,
  93 + mch_id: String,
  94 + money_of_dcw: String,
  95 + money_of_partner: String,
  96 + money_of_shop: String,
  97 + orderJudge: Boolean,
  98 + order_info: {
  99 + address:{
  100 + cityName: String,
  101 + countyName: String,
  102 + detailInfo: String,
  103 + errMsg: String,
  104 + nationalCode: String,
  105 + postalCode: String,
  106 + provinceName: String,
  107 + telNumber: String,
  108 + userName: String,
  109 + },
  110 + cartinfo: ["127"],
  111 + keyname: "330_1588911391",
  112 + lefttime: Number,
  113 + list:[
  114 + {
  115 + cart_id: "127",
  116 + imgUrl: String,
  117 + img_index_url: null,
  118 + memo: String,
  119 + mp_id: String,
  120 + nowPrice: String,
  121 + num: String,
  122 + oldPrice: Number,
  123 + p_discount: String,
  124 + p_name: String,
  125 + p_root_index: String,
  126 + p_sale_price: String,
  127 + peopleName: String,
  128 + pics: ["79_0_D122D2.jpg","79_1_E0A1ED.jpg","79_2_B00B3D.jpg","79_3_B2CF21.jpg","79_4_33AD1B.jpg"],
  129 + pid: String,
  130 + sk_id: String,
  131 + }
  132 + ],
  133 + orderDesc: String,
  134 + total_fee: Number,
  135 + },
  136 + partner_uid: String,
  137 + pay_cate: String,
  138 + pay_id: String,
  139 + pay_time: String,
  140 + pay_wood_desc: String,
  141 + pay_wood_id: String,
  142 + prepay_id: String,
  143 + re_check_staus: String,
  144 + shopid: String,
  145 + split_userid: String,
  146 + status: String,
  147 + // status0待付款 1已付款 待收货 2 已收货待评价 3 已评价
  148 + total_fee: String,
  149 + uid: String,
77 150 },
78 151 /**
79 152 * 当前选择
... ... @@ -81,9 +154,18 @@
81 154 current:Number
82 155  
83 156 },
84   - onLoad() {
85   - // console.log('dd');
86   - console.log('order', this.props.order);
  157 + created() {
  158 + console.log(this.order);
  159 + // console.log(this.order.status );
  160 + // console.log(this.current);
  161 + },
  162 + computed:{
  163 + status(){
  164 + return this.order.status
  165 + },
  166 + orderInfoList(){
  167 + return this.order.order_info[0]
  168 + }
87 169 },
88 170 data() {
89 171 return {
... ... @@ -97,6 +179,43 @@
97 179 fail: () => {},
98 180 complete: () => {}
99 181 });
  182 + },
  183 + toOrderInfo(status,payId){
  184 + console.log(status,payId)
  185 + switch(status){
  186 + // 0待付款 1待收货 2已收货 3 已评价
  187 + case '0':
  188 + uni.navigateTo({
  189 + url:`../myOrderPaying/myOrderPaying?status=`+status+`&payId=`+payId,
  190 + fail(errMsg) {
  191 + console.log(errMsg)
  192 + }
  193 + })
  194 + break;
  195 + case '1':
  196 + uni.navigateTo({
  197 + url:`../myOrderPaying/myOrderPaying?status=`+status+`&payId=`+payId,
  198 + fail(errMsg) {
  199 + console.log(errMsg)
  200 + }
  201 + })
  202 +
  203 + break;
  204 + case '2 || 3':
  205 + uni.navigateTo({
  206 + url:`../myOrderPaying/myOrderPaying?status=`+status+`&payId=`+payId,
  207 + fail(errMsg) {
  208 + console.log(errMsg)
  209 + }
  210 + })
  211 +
  212 + break;
  213 +
  214 +
  215 + default:
  216 + break;
  217 +
  218 + }
100 219 }
101 220 }
102 221 }
... ... @@ -147,24 +266,34 @@
147 266 justify-content: space-between;
148 267 align-items: flex-start;
149 268 height: 188rpx;
  269 + width: 368rpx;
150 270 }
151 271 .orderName{
152 272 font-size: 14px;
153 273 color: #333333;
  274 + display: -webkit-box;
  275 + overflow: hidden;
  276 + -webkit-box-orient: vertical;
  277 + -webkit-line-clamp: 2;
154 278 }
155 279 .orderDescrib{
156 280 font-size: 12px;
157 281 color: #999999;
  282 + display: -webkit-box;
  283 + overflow: hidden;
  284 + -webkit-box-orient: vertical;
  285 + -webkit-line-clamp: 2;
158 286 }
159 287 .infoText-bottom{
160 288 display: flex;
161 289 flex-direction: row;
162   - justify-content: space-between;
  290 + justify-content: flex-start;
163 291 align-items: center;
164 292 width: 100%;
165 293 .markPrice{
166 294 font-size: 14px;
167 295 color: #FF6B4A;
  296 + margin-right: 20rpx;
168 297 }
169 298 .buy-num{
170 299 font-size: 12px;
... ...
src/pages/myOrder/myOrder.vue
... ... @@ -2,10 +2,10 @@
2 2 <view class="content">
3 3 <view class="header">
4 4 <!-- 搜索-->
5   - <view class="searchBar">
  5 + <!-- <view class="searchBar">
6 6 <icon class="searchIcon" type="search" size="14"></icon>
7 7 <input class="searchIpt" placeholder="搜索订单关键字..." confirm-type="search"/>
8   - </view>
  8 + </view> -->
9 9 <view class="screenBar">
10 10 <view v-for="item in screenItems" :key="item.current" @click="onClickItem(item.current)" >
11 11 <view class="screenItem" v-bind:class="{ active: current === item.current }">{{ item.text }}</view>
... ... @@ -20,7 +20,7 @@
20 20 <OrderCard :order = "order" :current="current"></OrderCard>
21 21 </view>
22 22 </view>
23   - <view class="footer">已显示全部</view>
  23 + <view class="footer" >没有更多订单了,去商城看看吧~</view>
24 24 </view>
25 25 </template>
26 26 <script>
... ... @@ -33,47 +33,43 @@
33 33 },
34 34 data() {
35 35 return {
  36 + //顶部筛选项
36 37 screenItems: [
37   - {current:0,text:'全部'},
38   - {current:1,text:'待付款'},
39   - {current:2,text:'待发货'},
40   - {current:3,text:'待收货'},
41   - {current:4,text:'退款售后'},
  38 + {current:"10",text:'全部'},
  39 + {current:"0",text:'待付款'},
  40 + {current:"1",text:'待收货'},
  41 + {current:"2",text:'已完成'},
  42 + // {current:"3",text:'已评价'},
  43 + // {current:"4",text:'退款'},
42 44 ],
43   - current: 0,
44   - //订单数据
45   - // orderList:[
46   - // { orderId: 0, img: '/static/img/goods/p1.jpg', name: '商品名称',originCost:'¥198',price: '¥168', orderType:1 ,buyNum:1},
47   - // { orderId: 2, img: '/static/img/goods/p3.jpg', name: '商品名称',originCost:'¥198',price: '¥168', orderType:1 ,buyNum:1},
48   - // { orderId: 3, img: '/static/img/goods/p4.jpg', name: '商品名称',originCost:'¥198',price: '¥168', orderType:2 ,buyNum:1},
49   - // { orderId: 4, img: '/static/img/goods/p5.jpg', name: '商品名称',originCost:'¥198',price: '¥168', orderType:3 ,buyNum:1},
50   - // { orderId: 5, img: '/static/img/goods/p6.jpg', name: '商品名称',originCost:'¥198',price: '¥168', orderType:3 ,buyNum:1},
51   - // { orderId: 6, img: '/static/img/goods/p7.jpg', name: '商品名称',originCost:'¥198',price: '¥168', orderType:4 ,buyNum:1},
52   - // { orderId: 7, img: '/static/img/goods/p8.jpg', name: '商品名称',originCost:'¥198',price: '¥168', orderType:4 ,buyNum:1},
53   - // { orderId: 8, img: '/static/img/goods/p9.jpg', name: '商品名称',originCost:'¥198',price: '¥168', orderType:5 ,buyNum:1},
54   - // { orderId: 9, img: '/static/img/goods/p10.jpg', name: '商品名称',originCost:'¥198',price: '¥168', orderType:5 ,buyNum:1}
55   - // ],
  45 + //当前所在item 默认10-->全部
  46 + current: "10",
56 47 };
57 48 },
58 49  
59   - onLoad: function() {
  50 + onLoad: function(option) {
  51 + //获取订单列表
60 52 store.dispatch('myOrder/getList', {
61 53 uid: "1",
62   - way: "0",
63   - });
  54 + way: "",
  55 + });
  56 + //从user过来传的status,给current,以显示对应item
  57 + this.current = option.status
64 58 },
65 59 computed: {
66 60 orderList() {
67   - console.log('orderList', this.$store.state.myOrder.orderlist);
68   - return this.$store.state.myOrder.orderlist;
  61 + // console.log('orderList', this.$store.state.myOrder.orderList);
  62 + return this.$store.state.myOrder.orderList;
69 63 }
70 64 },
71 65 methods:{
  66 + //tab点击事件
72 67 onClickItem(e) {
73 68 if (this.current !== e) {
74 69 this.current = e;
75 70 }
76 71 }
  72 +
77 73 }
78 74 }
79 75 </script>
... ... @@ -88,27 +84,28 @@
88 84 .header{
89 85 background-color: #ffffff;
90 86 width: 100%;
91   - height: 232rpx;
92   - padding: 40rpx 40rpx 36rpx 40rpx;
  87 + // height: 232rpx;
  88 + padding: 20rpx 40rpx 16rpx 40rpx;
93 89 box-sizing: border-box;
94 90 position: fixed;
95 91 top: 0;
96 92 left: 0;
97   - .searchBar {
98   - width: 670rpx;
99   - display: flex;
100   - justify-content: center;
101   - align-items: center;
102   - box-sizing: border-box;
103   - padding: 0rpx 16rpx;
104   - border: 1px solid #FF6B4A;
105   - border-radius: 8rpx;
106   - background-color: #ffffff;
107   - }
  93 + // .searchBar {
  94 + // width: 670rpx;
  95 + // display: flex;
  96 + // justify-content: center;
  97 + // align-items: center;
  98 + // box-sizing: border-box;
  99 + // padding: 0rpx 16rpx;
  100 + // border: 1px solid #FF6B4A;
  101 + // border-radius: 8rpx;
  102 + // background-color: #ffffff;
  103 + // }
108 104  
109 105 .screenBar{
110 106 width: 670rpx;
111   - height: 110rpx;
  107 + // height: 110rpx;
  108 + height: 70rpx;
112 109 display: flex;
113 110 flex-direction: row;
114 111 justify-content: space-between;
... ... @@ -138,7 +135,8 @@
138 135 }
139 136 }
140 137 .orderList{
141   - margin-top: 232rpx;
  138 + // margin-top: 232rpx;
  139 + margin-top: 132rpx;
142 140 }
143 141 .footer{
144 142 font-size: 14px;
... ...
src/pages/myOrderPaying/myOrderPaying.vue
  1 +<!-- 订单待付款 待收货 -->
1 2 <template>
2   -
3   - <view class="content">
4   - <view class="order-hr"></view>
5   - <view class="order-time">
  3 + <view class="content">
  4 + <!-- 待付款 -->
  5 + <view class="order-time" v-if="status == '0'">
6 6 <text>请在</text>
7   - <!-- <text class="p2"></text> -->
8 7 <uni-countdown color="#EC5D3B" splitor-color="#EC5D3B" :show-day="false"
9   - :hour="0" :minute="59" :second="58" style="margin: 36rpx 20rpx 0 20rpx"></uni-countdown>
  8 + :hour="0" :second="getTime" @timeup=timeup ></uni-countdown>
10 9 <text>内完成付款</text>
  10 + </view>
  11 + <!-- 待收货 -->
  12 + <view class="headerBanner" v-if="status == '1'">
  13 + <view class="bannerLeft">
  14 + <view class="T1">卖家已发货</view>
  15 + <view class="T2">还剩 确认收货</view>
  16 + </view>
  17 + <image src="../../static/car.png" mode="aspectFill"></image>
11 18 </view>
12 19 <view class="order">
13 20 <view class="order-user">
14 21 <view class="order-user-head">
15   - <text class="p1">钱大大</text>
16   - <text class="p2">18823749843</text>
  22 + <text class="p1">{{orderAddressInfo.userName}}</text>
  23 + <text class="p2">{{orderAddressInfo.telNumber}}</text>
17 24 </view>
18 25 <view class="order-user-body">
19 26 <image src="../../static/myorder-paying-location.png"></image>
20   - <text class="p3">四川省 德阳市 旌阳区\n黄河西路碧桂园3期 4单元 202</text>
  27 + <text class="p3">{{orderAddressInfo.provinceName}} {{orderAddressInfo.cityName}} {{orderAddressInfo.countyName}}\n{{orderAddressInfo.detailInfo}}</text>
21 28 </view>
22 29 </view>
23 30 <view class="order-info">
24   - <view class="order-info-head">
25   - <image src="../../static/myorder-paying-pic.png"></image>
  31 + <view class="order-info-head" v-for="(orderInfoListItem,index) in orderInfoList" :key="index" >
  32 + <image :src="orderInfoListItem.imgUrl" mode="aspectFill"></image>
26 33 <view class="order-info-head-r">
27   - <text class="p1">眼镜名称眼镜名称眼镜名称眼镜名称…</text>
  34 + <text class="p1">{{orderInfoListItem.p_name}}</text>
28 35 <view class="p2" style="margin: 0;">
29 36 规格:玫瑰金 / 钛合金 / 防日光防紫外线 / 超薄超轻
30 37 <!-- <view class="arrow"></view> -->
  38 + </view>
  39 + <view class="infoText-bottom">
  40 + <view class="markPrice">{{orderInfoListItem.nowPrice}}</view>
  41 + <view class="buy-num">X {{orderInfoListItem.num}}</view>
31 42 </view>
32   - <text class="p3"><span>¥180</span><span class="p4">X1</span></text>
33 43 </view>
34 44 </view>
35 45 <!-- <view class="order-info-goodsnum">
... ... @@ -37,21 +47,21 @@
37 47 </view> -->
38 48 <text class="order-info-freight">
39 49 <text class="p1">运费</text>
40   - <text class="p2">0.00</text>
  50 + <text class="p2">{{orderInfo.trans_price}}</text>
41 51 </text>
42 52 <text class="order-info-discount">
43 53 <text class="p1">优惠</text>
44   - <text class="p2">-¥70.00</text>
  54 + <text class="p2">-¥{{totalDiscount}}</text>
45 55 </text>
46 56 <text class="order-info-price">
47 57 <text class="p1">实付</text>
48   - <text class="p2">¥110</text>
  58 + <text class="p2">¥{{orderInfo.order_info.total_fee}}</text>
49 59 </text>
50 60 <text class="order-info-num">
51   - <text>订单号:203486795859605849</text>
  61 + <text>订单号:{{orderInfo.prepay_id}}</text>
52 62 </text>
53 63 <text class="order-info-time">
54   - <text>下单时间:2020-10-22 14:32:42</text>
  64 + <text>下单时间:{{orderInfo.pay_time}}</text>
55 65 </text>
56 66 <view class="order-info-hr"></view>
57 67 <view class="order-info-contact">
... ... @@ -60,59 +70,158 @@
60 70 </view>
61 71 </view>
62 72 </view>
63   - <view class="order-confim">
64   - <button class="b1">取消订单</button>
65   - <button class="b2">立即支付</button>
  73 + <view class="order-confim" v-if="status == '0'">
  74 + <button class="b1" @click="cancleOrder">取消订单</button>
  75 + <button class="b2" @click="paylog">立即支付</button>
  76 + </view>
  77 +
  78 + <view class="order-confim" v-if="status == '1'">
  79 + <!-- <button class="b1">取消订单</button> -->
  80 + <button class="b2" @click="confirmOrder">确认收货</button>
66 81 </view>
67 82 </view>
68 83 </template>
69 84  
70   -<script>
  85 +<script>
  86 + import store from '@/store';
71 87 import UniCountdown from '../../components/UniCountdown/UniCountdown.vue'
72 88 export default {
73 89 components: {
74 90 UniCountdown
75 91 },
76 92 data() {
77   - return {
78   - scrollHeight: false,
  93 + return {
  94 + // orderInfo:{},
  95 + payId:'',
  96 + status:'',
  97 + uid:'',
  98 + openid:'',
  99 + lefttime:0,
  100 +
79 101 }
  102 + },
  103 + onLoad: function(option) {
  104 + console.log(option);
  105 + this.payId = option.payId;
  106 + this.status = option.status
  107 + const openid = uni.getStorageSync('openid');
  108 + const uid = this.$store.state.user.uid
  109 + this.uid = uid
  110 + this.openid = openid
  111 + store.dispatch('orderRead/getOrderInfo',{
  112 + pay_id:this.payId,
  113 + uid:'1',
  114 + openid:openid
  115 + })
  116 +
  117 +
  118 +
  119 + // this.orderInfo = this.$store.state.orderRead.orderInfo
  120 + },
  121 + computed: {
  122 + //获取订单详细信息
  123 + orderInfo() {
  124 + console.log(this.$store.state.orderRead.orderInfo)
  125 + return this.$store.state.orderRead.orderInfo || {}
  126 + },
  127 + orderInfoList(){
  128 + const orderInfoList =this.orderInfo.order_info[0].list
  129 + return orderInfoList
  130 + },
  131 + //获取订单地址信息
  132 + orderAddressInfo(){
  133 + return this.orderInfo.order_info[0].address
  134 + },
  135 + //订单付款时间
  136 + getTime(){
  137 + return this.orderInfo.order_info[0].lefttime
  138 + },
  139 + // 计算总优惠额
  140 + totalDiscount(){
  141 + const discountInfoList = this.orderInfo.discount_info
  142 + let totalDiscount = 0;
  143 + if(discountInfoList){
  144 + discountInfoList.map((discountItem,index)=>{
  145 + totalDiscount += Number(discountItem.value)
  146 + })
  147 + }
  148 + // console.log(totalDiscount)
  149 + return totalDiscount
  150 + },
80 151 },
81   - methods: {
82   -
  152 + methods: {
  153 + //取消订单
  154 + timeup(){
  155 + this.cancleOrder()
  156 + },
  157 + cancleOrder(){
  158 + const uid = this.uid
  159 + const openid = this.openid
  160 + uni.showModal({
  161 + title: '提示',
  162 + content: '现在取消,订单不可恢复哦,确认取消吗?',
  163 + success: function (res) {
  164 + if (res.confirm) {
  165 + store.dispatch('cancelOrder/cancel',{
  166 + keyname:'1',
  167 + uid:uid,
  168 + openid:openid
  169 + })
  170 + } else if (res.cancel) {
  171 + console.log('用户点击取消');
  172 + }
  173 + }
  174 + })
  175 + },
  176 + paylog(){
  177 +
  178 + },
  179 + confirmOrder(){
  180 + store.dispatch('statusConfirm/confirm',{
  181 + uid:this.uid,
  182 + openid:this.openid,
  183 + oldway:'1',
  184 + way:'2',
  185 + pay_id:this.payId,
  186 + judgeContent:'',
  187 + orderInfo:this.orderInfo.order_info,
  188 + })
  189 + }
83 190 }
84 191 }
85 192 </script>
86 193  
87 194 <style lang="scss" scoped>
88   - .content{
  195 + .content{
  196 + min-height: 100vh;
89 197 display: flex;
90 198 flex-direction: column;
91   - justify-content: center;
  199 + justify-content: flex-start;
92 200 align-items: center;
93 201 background-color: #f2f2f2;
94 202 }
95 203  
96 204  
97 205 .order {
98   - min-height: 1196rpx;
99 206 margin-bottom: 112rpx;
100   - background: #F2F2F2;
101   - }
102   - .order-hr {
103   - width: 100%;
104   - height: 1px;
105   - background-color: #E9E9E9;
  207 + background: #F2F2F2;
  208 + margin-top: 140rpx;
  209 + width: 670rpx;
106 210 }
  211 +
107 212 .order-time {
108 213 width: 100%;
109 214 height: 140rpx;
110 215 background-color: #fff;
111 216 display: flex;
112   - justify-content: center;
  217 + justify-content: center;
  218 + align-items: center;
  219 + position: fixed;
  220 + top: 0 ;
  221 + left: 0;
113 222 text {
114 223 // font-family: PingFangSC-Regular;
115   - margin-top: 48rpx;
  224 + // margin-top: 48rpx;
116 225 font-size: 14px;
117 226 color: #333333;
118 227 letter-spacing: -0.26px;
... ... @@ -125,9 +234,36 @@
125 234 letter-spacing: -0.34px;
126 235 }
127 236 }
128   -
  237 + .headerBanner{
  238 + width: 100%;
  239 + height: 140rpx;
  240 + background: #4A90E2;
  241 + padding: 26rpx 60rpx 24rpx 60rpx;
  242 + box-sizing: border-box;
  243 + color: #FFFFFF;
  244 + display: flex;
  245 + justify-content: space-between;
  246 + align-items: center;
  247 + position: fixed;
  248 + top: 0 ;
  249 + left: 0;
  250 + .bannerLeft{
  251 + font-size: 36rpx;
  252 + display: flex;
  253 + flex-direction: column;
  254 + justify-content: center;
  255 + align-items: center;
  256 + .T2{
  257 + font-size: 24rpx;
  258 + }
  259 + }
  260 + image{
  261 + height: 56rpx;
  262 + width: 72rpx;
  263 + }
  264 + }
  265 +
129 266 .order-user {
130   - width: 670rpx;
131 267 height: 228rpx;
132 268 background: #FFFFFF;
133 269 border-radius: 14rpx;
... ... @@ -137,7 +273,6 @@
137 273 .order-user-head {
138 274 display: flex;
139 275 height: 108rpx;
140   - width: 100%;
141 276 align-items: center;
142 277 margin-left: 126rpx;
143 278 .p1 {
... ... @@ -172,7 +307,6 @@
172 307 }
173 308  
174 309 .order-info {
175   - width: 670rpx;
176 310 background-color: #fff;
177 311 box-shadow: 0 0 20rpx 0 rgba(177,128,128,0.06);
178 312 border-radius: 16rpx;
... ... @@ -236,19 +370,24 @@
236 370 font-size: 12px;
237 371 color: #999999;
238 372 letter-spacing: -0.23px;
239   - }
240   - .p3 {
241   - height: 20px;
242   - // font-family: PingFangSC-Regular;
243   - font-size: 14px;
244   - color: #FF6B4A;
245   - letter-spacing: -0.26px;
246   - }
247   - .p4{
248   - font-size: 12px;
249   - color: #999999;
250   - letter-spacing: -0.23px;
251   - margin-left: 10px;
  373 + }
  374 + .infoText-bottom{
  375 + display: flex;
  376 + flex-direction: row;
  377 + justify-content: flex-start;
  378 + align-items: center;
  379 + width: 100%;
  380 + margin-left: 0;
  381 + .markPrice{
  382 + font-size: 14px;
  383 + color: #FF6B4A;
  384 + margin-right: 20rpx;
  385 + margin-left: 0rpx;
  386 + }
  387 + .buy-num{
  388 + font-size: 12px;
  389 + color: #999999;
  390 + }
252 391 }
253 392 }
254 393  
... ... @@ -369,8 +508,9 @@
369 508  
370 509 .order-confim {
371 510 display: flex;
372   - align-items: center;
373   - z-index: 999;
  511 + align-items: center;
  512 + justify-content: flex-end;
  513 + // z-index: 999;
374 514 width: 100%;
375 515 height: 112rpx;
376 516 position: fixed;
... ... @@ -388,7 +528,7 @@
388 528 .b1 {
389 529 // font-family: PingFangSC-Regular;
390 530 color: #FF6B4A;
391   -
  531 + background-color: #FFFFFF;
392 532 }
393 533 .b2 {
394 534 // font-family: PingFangSC-Regular;
... ...
src/pages/predelivery/predelivery.vue
  1 +<!-- 待发货 尹聃-->
1 2 <template>
2 3 <view class="container">
3 4 <view v-for="(items) in form" :key="items.key" class="order">
... ...
src/pages/user/user.vue
... ... @@ -8,35 +8,72 @@
8 8 <text class="userName">{{nickName}}</text>
9 9 </view>
10 10 </view>
11   - <view class="service">
  11 + <!-- <view class="service">
12 12 <image src="../../static/serviceLogo.png" mode="aspectFill"></image>
  13 + </view> -->
  14 + </view>
  15 + <view class="myOpticsData">
  16 + <view class="left">
  17 + <image src="../../static/img/user/dataWrite.png" mode="aspectFit"></image>
  18 + <text>验光数据</text>
13 19 </view>
  20 + <image src="../../static/right.png" mode="aspectFit"></image>
14 21 </view>
15 22 <view class="myOrder">
16 23 <view class="orderHeader">
17 24 <text>全部订单</text>
18   - <view class="btn" @click="toMyOrder">
  25 + <view class="btn" @click="toMyOrder('10')">
19 26 全部
20   - <image src="../../static/right.png" mode="aspectFill"></image>
  27 + <image src="../../static/right.png" mode="aspectFit"></image>
21 28 </view>
22 29 </view>
23 30 <view class="orderBody">
24   - <view class="item waitPay" @click="toMyOrderPaying">
25   - <image src="../../static/waitDeliver.png" mode="aspectFill"></image>
  31 + <view class="item waitPay" @click="toMyOrder('0')">
  32 + <image src="../../static/img/user/waitDeliver.png" mode="aspectFit"></image>
26 33 <text>待付款</text>
27 34 </view>
28   - <view class="item waitDeliver" @click="toPredelivery" >
29   - <image src="../../static/waitPay.png" mode="aspectFill"></image>
30   - <text>待发货</text>
31   - </view>
32   - <view class="item waitReceive" @click="torefunProgress">
33   - <image src="../../static/waitReceive.png" mode="aspectFill"></image>
  35 + <view class="item waitDeliver" @click="toMyOrder('1')" >
  36 + <image src="../../static/img/user/waitPay.png" mode="aspectFit"></image>
34 37 <text>待收货</text>
35 38 </view>
36   - <view class="item service" @click="torefundment">
37   - <image src="../../static/service.png" mode="aspectFill"></image>
38   - <text>退换/售后</text>
  39 + <view class="item waitReceive" @click="toMyOrder('2')">
  40 + <image src="../../static/img/user/waitReceive.png" mode="aspectFit"></image>
  41 + <text>已完成</text>
39 42 </view>
  43 + <!-- <view class="item service" @click="toMyOrder('3')">
  44 + <image src="../../static/img/user/refound.png" mode="aspectFit"></image>
  45 + <text>已评价</text>
  46 + </view> -->
  47 + </view>
  48 + </view>
  49 + <view class="someItem">
  50 + <view class="item">
  51 + <view class="left">
  52 + <image src="../../static/img/user/shouyi.png" mode="aspectFit"></image>
  53 + <text>推广记录与收益</text>
  54 + </view>
  55 + <image src="../../static/right.png" mode="aspectFit"></image>
  56 + </view>
  57 + <view class="item">
  58 + <view class="left">
  59 + <image src="../../static/img/user/introduce.png" mode="aspectFit"></image>
  60 + <text>系统介绍</text>
  61 + </view>
  62 + <image src="../../static/right.png" mode="aspectFit"></image>
  63 + </view>
  64 + <view class="item">
  65 + <view class="left">
  66 + <image src="../../static/img/user/joinUs.png" mode="aspectFit"></image>
  67 + <text>加入我们</text>
  68 + </view>
  69 + <image src="../../static/right.png" mode="aspectFit"></image>
  70 + </view>
  71 + <view class="item">
  72 + <view class="left">
  73 + <image src="../../static/img/user/service.png" mode="aspectFit"></image>
  74 + <text>联系客服</text>
  75 + </view>
  76 + <image src="../../static/right.png" mode="aspectFit"></image>
40 77 </view>
41 78 </view>
42 79 <view class="recommend">
... ... @@ -139,40 +176,14 @@
139 176 this.isAuth = true
140 177 }
141 178 },
142   - toMyOrder(){
143   - uni.navigateTo({
144   - url: '../myOrder/myOrder?current=0',
145   - success: res => {},
146   - fail: () => {},
147   - complete: () => {}
148   - });
149   - },
150   - toPredelivery(){
  179 + toMyOrder(status){
151 180 uni.navigateTo({
152   - url: '../myOrder/myOrder?current=2',
  181 + url: `../myOrder/myOrder?status=`+status,
153 182 success: res => {},
154 183 fail: () => {},
155 184 complete: () => {}
156 185 });
157 186 },
158   - toMyOrderPaying(){
159   - uni.navigateTo({
160   - url: '../myOrder/myOrder?current=1',
161   - success: res => {},
162   - fail: () => {},
163   - complete: () => {}
164   - });
165   - },
166   - torefundment(){
167   - uni.navigateTo({
168   - url:'../refundment/refundment',
169   - })
170   - },
171   - torefunProgress(){
172   - uni.navigateTo({
173   - url:'../refundProgress/refundProgress'
174   - })
175   - }
176 187 }
177 188 }
178 189 </script>
... ... @@ -228,18 +239,47 @@
228 239 }
229 240 }
230 241 }
231   - .service{
232   - margin-top: 20rpx;
  242 + // .service{
  243 + // margin-top: 20rpx;
  244 + // image{
  245 + // height: 36rpx;
  246 + // width: 36rpx;
  247 + // }
  248 + // }
  249 + }
  250 + .myOpticsData{
  251 + width: 670rpx;
  252 + height: 120rpx;
  253 + background-color: #FFFFFF;
  254 + border-radius: 6px;
  255 + box-shadow: 1px 1px 7px 0 rgba(133,107,107,0.10);
  256 + position: relative;
  257 + bottom: 44rpx;
  258 + padding: 40rpx;
  259 + box-sizing: border-box;
  260 + display: flex;
  261 + justify-content: space-between;
  262 + align-items: center;
  263 + .left{
  264 + font-size: 14px;
  265 + color: #333333;
  266 + display: flex;
  267 + align-items: center;
233 268 image{
234   - height: 36rpx;
235   - width: 36rpx;
  269 + margin-right: 32rpx;
  270 + width: 30rpx;
  271 + height: 34rpx;
236 272 }
237 273 }
  274 + image{
  275 + height: 16px;
  276 + width: 8px;
  277 + }
238 278 }
239 279 .myOrder{
240 280 width: 100%;
241 281 height: 296rpx;
242   - margin-top: 20rpx;
  282 + // margin-top: 116rpx;
243 283 margin-bottom: 20rpx;
244 284 padding: 0 40rpx;
245 285 box-sizing: border-box;
... ... @@ -265,10 +305,12 @@
265 305 .btn{
266 306 font-size: 12px;
267 307 color: #999999;
  308 + display: flex;
  309 + align-items: center;
268 310 image{
269 311 margin-left: 20rpx;
270   - height: 16rpx;
271   - width: 8rpx;
  312 + height: 32rpx;
  313 + width: 16rpx;
272 314 }
273 315 }
274 316 }
... ... @@ -276,14 +318,14 @@
276 318 width: 100%;
277 319 display: flex;
278 320 flex-direction: row;
279   - justify-content: space-between;
  321 + justify-content: space-around;
280 322 align-items: center;
281 323 .item{
282 324 display: flex;
283 325 flex-direction: column;
284 326 align-items: center;
285 327 image{
286   - width: 46rpx;
  328 + width: 62rpx;
287 329 height: 46rpx;
288 330 }
289 331 text{
... ... @@ -294,6 +336,46 @@
294 336 }
295 337 }
296 338 }
  339 + .someItem{
  340 + width: 100%;
  341 + height: 336rpx;
  342 + background: #FFFFFF;
  343 + box-shadow: 0 0 4px 0 rgba(133,107,107,0.10);
  344 + border-radius: 6px;
  345 + border-radius: 6px;
  346 + margin-bottom: 18rpx;
  347 + box-sizing: border-box;
  348 + padding: 21rpx 48rpx 21rpx 42rpx;
  349 + box-sizing: border-box;
  350 + display: flex;
  351 + flex-direction: column;
  352 + justify-content: space-between;
  353 + align-items: center;
  354 + .item{
  355 + display: flex;
  356 + justify-content: space-between;
  357 + border-bottom: 1px solid #F2F2F2;;
  358 + align-items: center;
  359 + height: 72rpx;
  360 + width: 100%;
  361 + .left{
  362 + font-size: 14px;
  363 + color: #333333;
  364 + display: flex;
  365 + align-items: center;
  366 + image{
  367 + margin-right: 32rpx;
  368 + width: 30rpx;
  369 + height: 34rpx;
  370 + }
  371 + }
  372 + image{
  373 + height: 16px;
  374 + width: 8px;
  375 + }
  376 + }
  377 +
  378 + }
297 379 .recommend{
298 380 background: #FFFFFF;
299 381 box-shadow: 0 0 4px 0 rgba(133,107,107,0.10);
... ...
src/static/car.png

1.56 KB

src/static/img/user/dataWrite.png

382 Bytes

src/static/img/user/introduce.png

488 Bytes

src/static/img/user/joinUs.png

1.97 KB

src/static/img/user/refound.png

3.38 KB

src/static/img/user/service.png

1.17 KB

src/static/img/user/shouyi.png

1.51 KB

src/static/img/user/waitDeliver.png

1.91 KB

src/static/img/user/waitPay.png

2.19 KB

src/static/img/user/waitReceive.png

2.01 KB

src/static/joinUs (2).png

488 Bytes

src/static/joinUs (3).png

1.17 KB

src/static/joinUs.png

1.97 KB

src/static/shouyi.png

1.51 KB

src/static/waitReceive.png

789 Bytes | W: | H:

2.01 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
src/store/modules/cancelOrder.js
... ... @@ -0,0 +1,36 @@
  1 +import urlAlias from '../url';
  2 +import request from '../request';
  3 +
  4 +const {
  5 + cancelOrder
  6 +} = urlAlias;
  7 +
  8 +const state = {
  9 + orderList: [],
  10 +};
  11 +
  12 +const mutations = {
  13 + INIT: (state, data) => {
  14 + state.orderList = data;
  15 + },
  16 +};
  17 +
  18 +const actions = {
  19 + cancel({ commit }, param) {
  20 + request({
  21 + url: cancelOrder,
  22 + data: param,
  23 + success: (res) => {
  24 + console.log(res.data);
  25 + // commit("INIT", res.data.data);
  26 + },
  27 + })
  28 + }
  29 +}
  30 +
  31 +export default {
  32 + namespaced: true,
  33 + state,
  34 + mutations,
  35 + actions,
  36 +}
0 37 \ No newline at end of file
... ...
src/store/modules/myOrder.js
... ... @@ -2,98 +2,94 @@ import urlAlias from &#39;../url&#39;;
2 2 import request from '../request';
3 3  
4 4 const {
5   - orderList
  5 + myOrderList
6 6 } = urlAlias;
7 7  
8   -const data = {
9   - data: [
10   - {
11   - finished_time: null,
12   - is_refound: "0",
13   - mch_id: "1436019502",
14   - money_of_dcw: "0",
15   - money_of_partner: "0",
16   - money_of_shop: "0",
17   - orderJudge: false,
18   - order_info: {
19   - address:{
20   - cityName: "镇江市",
21   - countyName: "丹阳市",
22   - detailInfo: "延陵镇柳茹村卫生室附近秀野堂农业发展有限公司",
23   - errMsg: "chooseAddress:ok",
24   - nationalCode: "321181",
25   - postalCode: "212300",
26   - provinceName: "江苏省",
27   - telNumber: "15896379277",
28   - userName: "点餐汪客服",
29   - },
30   - cartinfo:['11', '12'],
31   - keyname: "1_1587129366",
32   - lefttime: 179995,
33   - list:[
34   - {
35   - cart_id: "11",
36   - imgUrl: "https://glass.xiuyetang.com//upload_jk/4/4_0_3FDA03.jpg",
37   - img_index_url: null,
38   - memo: "志平防蓝光-防辐射电脑网课眼镜,TR90弹性漆,近视镜,青春潮流,01-8701",
39   - mp_id: "1",
40   - nowPrice: 100,
41   - num: "2",
42   - oldPrice: "0",
43   - p_discount: "1",
44   - p_name: "01-8701志平防蓝光-防辐射电脑网课眼镜,TR90弹性漆,近视镜,青春潮流",
45   - p_root_index: "1",
46   - p_sale_price: "0",
47   - peopleName: "me",
48   - pics: '',
49   - pid: "4",
50   - sk_id: "38",
51   - },
52   - ],
53   - orderDesc: "总共包括有:01-8701志平防蓝光-防辐射电脑网课眼镜,TR90弹性漆,近视镜,青春潮流在内的1件商品",
54   - total_fee: 100
55   - },
56   - partner_uid: "0",
57   - pay_cate: "2020",
58   - pay_id: "3",
59   - pay_time: "2020-04-17 21:16:12",
60   - pay_wood_desc: "在【非常戴镜】的微信付款凭证",
61   - pay_wood_id: "fcdj-1-1_1587129366",
62   - prepay_id: "wx172116124528226bf1a8adad1662456500",
63   - re_check_staus: "0",
64   - shopid: "0",
65   - split_userid: "0",
66   - status: "1",
67   - total_fee: "100",
68   - uid: "1",
69   - }
70   - ],
71   - msg: "订单列表",
72   - status: 0,
73   -}
  8 +// const data = {
  9 +// data: [
  10 +// {
  11 +// finished_time: null,
  12 +// is_refound: "0",
  13 +// mch_id: "1436019502",
  14 +// money_of_dcw: "0",
  15 +// money_of_partner: "0",
  16 +// money_of_shop: "0",
  17 +// orderJudge: false,
  18 +// order_info: {
  19 +// address:{
  20 +// cityName: "镇江市",
  21 +// countyName: "丹阳市",
  22 +// detailInfo: "延陵镇柳茹村卫生室附近秀野堂农业发展有限公司",
  23 +// errMsg: "chooseAddress:ok",
  24 +// nationalCode: "321181",
  25 +// postalCode: "212300",
  26 +// provinceName: "江苏省",
  27 +// telNumber: "15896379277",
  28 +// userName: "点餐汪客服",
  29 +// },
  30 +// cartinfo:['11', '12'],
  31 +// keyname: "1_1587129366",
  32 +// lefttime: 179995,
  33 +// list:[
  34 +// {
  35 +// cart_id: "11",
  36 +// imgUrl: "https://glass.xiuyetang.com//upload_jk/4/4_0_3FDA03.jpg",
  37 +// img_index_url: null,
  38 +// memo: "志平防蓝光-防辐射电脑网课眼镜,TR90弹性漆,近视镜,青春潮流,01-8701",
  39 +// mp_id: "1",
  40 +// nowPrice: 100,
  41 +// num: "2",
  42 +// oldPrice: "0",
  43 +// p_discount: "1",
  44 +// p_name: "01-8701志平防蓝光-防辐射电脑网课眼镜,TR90弹性漆,近视镜,青春潮流",
  45 +// p_root_index: "1",
  46 +// p_sale_price: "0",
  47 +// peopleName: "me",
  48 +// pics: '',
  49 +// pid: "4",
  50 +// sk_id: "38",
  51 +// },
  52 +// ],
  53 +// orderDesc: "总共包括有:01-8701志平防蓝光-防辐射电脑网课眼镜,TR90弹性漆,近视镜,青春潮流在内的1件商品",
  54 +// total_fee: 100
  55 +// },
  56 +// partner_uid: "0",
  57 +// pay_cate: "2020",
  58 +// pay_id: "3",
  59 +// pay_time: "2020-04-17 21:16:12",
  60 +// pay_wood_desc: "在【非常戴镜】的微信付款凭证",
  61 +// pay_wood_id: "fcdj-1-1_1587129366",
  62 +// prepay_id: "wx172116124528226bf1a8adad1662456500",
  63 +// re_check_staus: "0",
  64 +// shopid: "0",
  65 +// split_userid: "0",
  66 +// status: "1",
  67 +// total_fee: "100",
  68 +// uid: "1",
  69 +// }
  70 +// ],
  71 +// msg: "订单列表",
  72 +// status: 0,
  73 +// }
74 74  
75 75 const state = {
76   - orderList: [],
  76 + orderList: [],
77 77 };
78 78  
79 79 const mutations = {
80 80 INIT: (state, data) => {
81   - state.orderList = data;
  81 + state.orderList = data;
82 82 },
83 83 };
84 84  
85 85 const actions = {
86 86 getList({ commit }, param) {
87 87 request({
88   - url: orderList,
  88 + url: myOrderList,
89 89 data: param,
90 90 success: (res) => {
91   - const resData = {
92   - ...res,
93   - data,
94   - }
95   - console.log('data.data', resData.data.data);
96   - commit("INIT", resData.data.data);
  91 + // console.log(res.data);
  92 + commit("INIT", res.data.data);
97 93 },
98 94 })
99 95 }
... ...
src/store/modules/orderRead.js
... ... @@ -0,0 +1,35 @@
  1 + import urlAlias from '../url';
  2 + import request from '../request';
  3 +
  4 + const {
  5 + orderRead
  6 + } = urlAlias;
  7 +
  8 +const state = {
  9 + orderInfo: {},
  10 +};
  11 +
  12 +const mutations = {
  13 + INIT: (state, orderInfo) => {
  14 + state.orderInfo = orderInfo;
  15 + },
  16 +};
  17 +
  18 +const actions = {
  19 + getOrderInfo({ commit }, param) {
  20 + request({
  21 + url: orderRead,
  22 + data: param,
  23 + success: (res) => {
  24 + commit("INIT", res.data.data);
  25 + },
  26 + })
  27 + },
  28 +};
  29 +
  30 +export default {
  31 + namespaced: true,
  32 + state,
  33 + mutations,
  34 + actions,
  35 +};
... ...
src/store/modules/payLog.js
... ... @@ -0,0 +1,27 @@
  1 +import urlAlias from '../url';
  2 +import request from '../request';
  3 +
  4 +const {
  5 + payLog
  6 +} = urlAlias;
  7 +
  8 +
  9 +const actions = {
  10 + payLog({ commit }, param) {
  11 + request({
  12 + url: payLog,
  13 + data: param,
  14 + success: (res) => {
  15 + // console.log(res.data);
  16 + commit("INIT", res.data.data);
  17 + },
  18 + })
  19 + }
  20 +}
  21 +
  22 +export default {
  23 + namespaced: true,
  24 + // state,
  25 + // mutations,
  26 + actions,
  27 +}
0 28 \ No newline at end of file
... ...
src/store/modules/statusConfirm.js
... ... @@ -0,0 +1,37 @@
  1 +import urlAlias from '../url';
  2 +import request from '../request';
  3 +
  4 +const {
  5 + statusConfirm
  6 +} = urlAlias;
  7 +
  8 +// const openid = uni.getStorageSync('openid');
  9 +const actions = {
  10 + confirm({ commit }, param) {
  11 + request({
  12 + url: statusConfirm,
  13 + data: param|| { },
  14 + success: (res) => {
  15 + console.log(res.data);
  16 + if(res.data.code === 1){
  17 + uni.showToast({
  18 + title:'已确认',
  19 + mask:true,
  20 + duration:1500,
  21 + icon:'success'
  22 + })
  23 + }else{
  24 + uni-uni.showToast({
  25 + title: '服务器错误,确认失败!',
  26 + mask:true
  27 + });
  28 + }
  29 + },
  30 + })
  31 + }
  32 +}
  33 +
  34 +export default {
  35 + namespaced: true,
  36 + actions,
  37 +}
0 38 \ No newline at end of file
... ...
... ... @@ -15,8 +15,12 @@ const urlAlias = {
15 15 login: '/app/glass/getOpenId', // 登陆
16 16 getUserInfo: '/app/glass/userinfo', // 获取用户信息
17 17  
18   - // 我的订单
19   - orderList: '/app/order/list', // 获取订单列表
  18 + // 我的订单
  19 + myOrderList: '/app/order/list3', // 获取订单列表
  20 + orderRead: '/app/order/read', // 获取订单详情
  21 + cancelOrder: '/app/order/wait/del',//取消订单
  22 + statusConfirm: '/app/order/statusConfirm',//订单操作
  23 + payLog:'/app/pay/log',//调起支付
20 24  
21 25 // 购物车
22 26 cartList: '/app/cart/list', // 获取购物车列表
... ...