Browse Source

no message

laosan2382995021@163.com 3 years ago
parent
commit
c148ef3739
68 changed files with 1102 additions and 589 deletions
  1. 1 0
      uni-shop/components/v-radio/main.vue
  2. 5 0
      uni-shop/components/v-radio/props.js
  3. 9 0
      uni-shop/components/v-radio/style.scss
  4. 1 1
      uni-shop/components/v-step/main.vue
  5. 5 0
      uni-shop/components/v-step/props.js
  6. 28 0
      uni-shop/components/v-step/style.scss
  7. 1 1
      uni-shop/layout/layout-button-group/layout-button-group.vue
  8. 1 1
      uni-shop/layout/layout-button-group/mixins/handle.js
  9. 10 0
      uni-shop/layout/layout-button-group/props.js
  10. 8 0
      uni-shop/layout/layout-button-group/style.scss
  11. 17 0
      uni-shop/layout/layout-coupon-list/data/data.js
  12. 44 0
      uni-shop/layout/layout-coupon-list/layout-coupon-list.vue
  13. 53 0
      uni-shop/layout/layout-coupon-list/mixins/handle.js
  14. 4 0
      uni-shop/layout/layout-coupon-list/mixins/index.js
  15. 14 0
      uni-shop/layout/layout-coupon-list/props.js
  16. 4 0
      uni-shop/layout/layout-coupon-list/style.scss
  17. 25 0
      uni-shop/layout/layout-coupon/props.js
  18. 3 1
      uni-shop/layout/layout-order/layout-order.vue
  19. 7 7
      uni-shop/layout/layout-order/mixins/handle.js
  20. 47 2
      uni-shop/layout/layout-shop-item/main.vue
  21. 5 0
      uni-shop/layout/layout-shop-item/props.js
  22. 2 10
      uni-shop/layout/layout-shop/main.vue
  23. 7 1
      uni-shop/layout/layout-ui-shop-item/main.vue
  24. 5 0
      uni-shop/layout/layout-ui-shop-item/props.js
  25. 3 3
      uni-shop/layout/layout-ui-shop-item/style.scss
  26. 3 2
      uni-shop/layout/layout-use-coupon/main.vue
  27. 9 0
      uni-shop/layout/layout-use-coupon/props.js
  28. 19 2
      uni-shop/layout/layout-use-coupon/style.scss
  29. 4 0
      uni-shop/mixins/params.js
  30. 6 1
      uni-shop/pages.json
  31. 69 473
      uni-shop/pages/cart/cart.vue
  32. 65 0
      uni-shop/pages/cart/mixins/handle.js
  33. 4 0
      uni-shop/pages/cart/mixins/index.js
  34. 74 0
      uni-shop/pages/cart/style.scss
  35. 1 0
      uni-shop/pages/comment/comment.vue
  36. 13 2
      uni-shop/pages/index/index.vue
  37. 1 0
      uni-shop/pages/index/style.scss
  38. 14 0
      uni-shop/pages/my-coupon/data/tabs.js
  39. 37 0
      uni-shop/pages/my-coupon/mixins/handle.js
  40. 4 0
      uni-shop/pages/my-coupon/mixins/index.js
  41. 44 0
      uni-shop/pages/my-coupon/my-coupon.vue
  42. 0 0
      uni-shop/pages/my-coupon/style.scss
  43. 1 1
      uni-shop/pages/my-order/mixins/handle.js
  44. 8 0
      uni-shop/pages/order-detail/data/cost.js
  45. 8 0
      uni-shop/pages/order-detail/data/order.js
  46. 51 2
      uni-shop/pages/order-detail/mixins/handle.js
  47. 3 1
      uni-shop/pages/order-detail/mixins/index.js
  48. 18 0
      uni-shop/pages/order-detail/mixins/status.js
  49. 117 57
      uni-shop/pages/order-detail/order-detail.vue
  50. 51 1
      uni-shop/pages/order-detail/style.scss
  51. 71 0
      uni-shop/pages/product/mixins/buy.js
  52. 4 1
      uni-shop/pages/product/mixins/handle.js
  53. 2 1
      uni-shop/pages/product/mixins/index.js
  54. 2 1
      uni-shop/pages/product/product.vue
  55. 2 1
      uni-shop/pages/user/data/control.js
  56. 28 4
      uni-shop/pages/user/data/order.js
  57. 22 2
      uni-shop/pages/user/mixins/handle.js
  58. 3 2
      uni-shop/pages/user/user.vue
  59. BIN
      uni-shop/static/images/coupon-expired.png
  60. BIN
      uni-shop/static/images/coupon-use.png
  61. BIN
      uni-shop/static/images/order-icon/comment.png
  62. 0 0
      uni-shop/static/images/order-icon/deliver.png
  63. BIN
      uni-shop/static/images/order-icon/receiving.png
  64. BIN
      uni-shop/static/images/order-icon/refund.png
  65. BIN
      uni-shop/static/images/order-icon/wallet.png
  66. BIN
      uni-shop/static/images/service.png
  67. 16 8
      uni-shop/utils/controls/order.js
  68. 19 0
      uni-shop/utils/controls/shop.js

+ 1 - 0
uni-shop/components/v-radio/main.vue

@@ -4,6 +4,7 @@
         'border-color':vValue ? activeBorderColor : borderColor,
         'background-color': vValue ? activeColor : color
       }"
+        :class="['v-radio-'+size]"
         @click="toggle"
   >
     <text v-show="vValue" class="iconfont iconfont-check v-radio-check"></text>

+ 5 - 0
uni-shop/components/v-radio/props.js

@@ -28,6 +28,11 @@ export default {
     disabled:{
         type:Boolean,
         default:false
+    },
+
+    size:{
+        type:String,
+        default:''
     }
 
 }

+ 9 - 0
uni-shop/components/v-radio/style.scss

@@ -11,4 +11,13 @@
   color: #fff;
   font-weight: bold;
 }
+.v-radio-small{
+  width: 24upx;
+  height: 24upx;
+}
+
+.v-radio-small .v-radio-check {
+  font-size: 20upx;
+  line-height: 24upx;
+}
 /* 单选 */

+ 1 - 1
uni-shop/components/v-step/main.vue

@@ -1,6 +1,6 @@
 <template>
   <view class="step-model"
-    :class="[small?'step-model-small':'',disabled&&disablesStyle?'step-disabled':'']"
+    :class="[small?'step-model-small':'',disabled&&disablesStyle?'step-disabled':'','step-modal-'+type]"
   >
     <view class="step-control center"
           :style="{color: color}"

+ 5 - 0
uni-shop/components/v-step/props.js

@@ -62,6 +62,11 @@ export default {
 	small:{
 		type: Boolean,
 		default: false
+	},
+
+	type:{
+		type:String,
+		default:''
 	}
 
 }

+ 28 - 0
uni-shop/components/v-step/style.scss

@@ -47,3 +47,31 @@
     background-color: #f7f7f7;
     color: #bebebe !important;
 }
+
+/* 商品 */
+.step-modal-shop {
+    width: 138upx;
+    height: 44upx;
+    border: 1upx solid #BBBBBB;
+    border-radius: 6upx;
+}
+.step-modal-shop .step-control{
+    width: 44upx;
+}
+
+.step-modal-shop .iconfont-sign,
+.step-modal-shop .iconfont-puls{
+    font-size: 20upx;
+    color: #666666;
+    line-height: 24upx;
+}
+.step-modal-shop .step-input{
+    width: 52upx;
+    font-size: 28upx;
+    color: #666666;
+    line-height: 32upx;
+    border-color: #BBBBBB !important;
+    padding: 0;
+    font-family: Source Han Sans CN;
+}
+/* 商品 */

+ 1 - 1
uni-shop/layout/layout-button-group/layout-button-group.vue

@@ -1,5 +1,5 @@
 <template>
-  <view class="button-group">
+  <view class="button-group" :class="['button-group-'+size]">
     <view
         class="button button-class center"
         :class="[buttonGroupData[item].main?'button-main':'']"

+ 1 - 1
uni-shop/layout/layout-button-group/mixins/handle.js

@@ -16,7 +16,7 @@ export default {
 
         /* 点击按钮触发 */
         pressButton:function (item) {
-            if (this.buttonStatus)  return;
+            if (this.buttonStatus || this.disabled)  return;
             if (this[item]) {
                 return this[item](this.buttonGroupData[item]);
             }

+ 10 - 0
uni-shop/layout/layout-button-group/props.js

@@ -12,6 +12,11 @@ export default {
 		default:{}
 	},
 
+	disabled:{
+		type:Boolean,
+		default:false
+	},
+
 	/* 标示 */
 	index:{
 		type: Number,
@@ -28,6 +33,11 @@ export default {
 	type:{
 		type: String,
 		default:''
+	},
+
+	size:{
+		type:String,
+		default:''
 	}
 
 };

+ 8 - 0
uni-shop/layout/layout-button-group/style.scss

@@ -25,3 +25,11 @@
 .button:active{
   opacity: 0.8;
 }
+
+.button-group-big .button{
+  width: 150upx;
+  height: 60upx;
+  border-radius: 30upx;
+  font-size: 28upx;
+  line-height: 32upx;
+}

+ 17 - 0
uni-shop/layout/layout-coupon-list/data/data.js

@@ -0,0 +1,17 @@
+export default {
+
+    '1':{
+        type:'notUse'
+    },
+
+    '-1':{
+        type:'use',
+        icon:'coupon-use'
+    },
+
+    '3':{
+        type:'expired',
+        icon:'coupon-expired'
+    }
+
+}

+ 44 - 0
uni-shop/layout/layout-coupon-list/layout-coupon-list.vue

@@ -0,0 +1,44 @@
+<template>
+  <view class="screen_all flex">
+
+    <FlatList
+        @changeData="flatChangeData"
+        @fetch="fetch"
+        :ref="base_flat_id"
+        :emptyText="emptyText"
+        background="transparent"
+    >
+      <!-- 订单 -->
+      <view class="order_screen_padding">
+        <layout-use-coupon
+          v-for="(item,index) in base_flat_data.data"
+          :key="index"
+          :item="item"
+          :type="info.type"
+          :icon="info.icon"
+        ></layout-use-coupon>
+      </view>
+    </FlatList>
+  </view>
+
+</template>
+
+<script>
+import FlatList from '@/components/flat-list/src/main.vue';
+import mixins from './mixins';
+import props from "./props";
+import LayoutUseCoupon from "../layout-use-coupon/main";
+export default {
+  name: "layout-coupon-list",
+  mixins,
+  props,
+  components:{
+    LayoutUseCoupon,
+    FlatList
+  }
+}
+</script>
+
+<style scoped lang="scss" src="./style.scss">
+
+</style>

+ 53 - 0
uni-shop/layout/layout-coupon-list/mixins/handle.js

@@ -0,0 +1,53 @@
+import data from '../data/data';
+import dateParse from '@/utils/tool/date';
+export default {
+
+    data(){
+      return {
+          data
+      }
+    },
+
+    computed:{
+      info(){
+          return data[this.status] || data['1'];
+      }
+    },
+
+    methods:{
+
+        fetch:function (obj) {
+
+            return this.$request({
+                url:'user/getMyCouponList',
+                data: {
+                    type: this.status
+                },
+                page: obj,
+                token:true,
+                cache:true
+            }).then((data)=>{
+                return obj.success((data.data || []).map((item)=>{
+
+                    item.starttime =  dateParse(item.starttime,'YYYY.MM.DD');
+                    item.endtime =  dateParse(item.endtime,'YYYY.MM.DD');
+
+                    return item;
+
+                }));
+            }).catch(obj.fail);
+
+        }
+
+    },
+
+    mounted(){
+
+        this.$emit('use-target',{
+            target: this,
+            index: this.index,
+            type: this.type
+        });
+    }
+
+}

+ 4 - 0
uni-shop/layout/layout-coupon-list/mixins/index.js

@@ -0,0 +1,4 @@
+import handle from "./handle";
+import flatListMixins from '@/components/flat-list/export';
+
+export default [handle,flatListMixins];

+ 14 - 0
uni-shop/layout/layout-coupon-list/props.js

@@ -0,0 +1,14 @@
+export default {
+
+	/**/
+	emptyText:{
+		type: String,
+		default: '暂无此类优惠券信息'
+	},
+
+	status:{
+		type:String,
+		default:'1'
+	}
+
+}

+ 4 - 0
uni-shop/layout/layout-coupon-list/style.scss

@@ -0,0 +1,4 @@
+.order_screen_padding{
+  padding:0 30upx;
+  margin-top: 30upx;
+}

+ 25 - 0
uni-shop/layout/layout-coupon/props.js

@@ -0,0 +1,25 @@
+export default {
+
+	/* 默认是全部 */
+	status:{
+		type: [Number,String],
+		default:''
+	},
+
+	/**/
+	emptyText:{
+		type: String,
+		default: '暂无订单信息'
+	},
+
+	index:{
+		type:Number,
+		default: 0
+	},
+
+	type:{
+		type: String,
+		default:''
+	}
+
+}

+ 3 - 1
uni-shop/layout/layout-order/layout-order.vue

@@ -13,7 +13,8 @@
             class="order-item"
             v-for="(item,index) in base_flat_data.data"
             :key="index"
-            v-if="!base_flat_remove[item.order_id]"
+            v-if="!base_flat_remove[item.id]"
+            @click="goOrderDetail(item)"
         >
           <view class="row aCenter order-title-model">
             <view class="flex-all-1 row aCenter">
@@ -30,6 +31,7 @@
               v-for="(cItem,cIndex) in item.shops"
               :key="cIndex"
               :item="cItem"
+              :number="false"
           ></layout-ui-shop-item>
           <view  v-if="item.statusOrder.buttonGroup" class="order-button-group">
             <!--       item.button_group   v-if="item.button_group && item.button_group.length > 0"-->

+ 7 - 7
uni-shop/layout/layout-order/mixins/handle.js

@@ -32,16 +32,16 @@ export default {
         },
 
         /* 跳转到订单详情 */
-        goOrderDetail:function (e) {
+        goOrderDetail:function (item) {
 
-            let item = e.currentTarget.dataset.item;
-
-
-            if (item.order_id) {
+            if (item.id) {
                 return this.$router.navigateTo({
-                    url: 'order-detail',
+                    name: 'order-detail',
                     params:{
-                        id: item.order_id
+                        id: item.id
+                    },
+                    memoryParams:{
+                        item:item
                     }
                 });
             }

+ 47 - 2
uni-shop/layout/layout-shop-item/main.vue

@@ -16,7 +16,8 @@
       <view class="row aCenter">
         <text class="shop-price-group"><text class="shop-price-em">¥</text><text>{{item.sales_price}}</text></text>
         <view class="flex-all-1"></view>
-        <text class="row aCenter shop-close-container">
+        <v-step @input="input" @change="change" v-model="number" color="#666666" textColor="#666" v-if="numberEdit" type="shop"></v-step>
+        <text v-else class="row aCenter shop-close-container">
           <text class="iconfont-close iconfont shop-close"></text>
           <text>{{item.number}}</text>
         </text>
@@ -27,6 +28,7 @@
 
 <script>
 import vImage from '@/components/v-image/main.vue';
+import vStep from '@/components/v-step/main.vue';
 import { mapState } from 'vuex';
 import props from './props';
 export default {
@@ -34,9 +36,52 @@ export default {
   computed:{
     ...mapState(['config'])
   },
+  data(){
+    return {
+      number:1
+    }
+  },
+
+  watch:{
+    item(){
+      if (this.item.id) {
+        return this.setNumber(this.item.number);
+      }
+    }
+  },
+
+  methods:{
+    setNumber(number){
+      if (this.number !== number) {
+        this.number = number;
+      }
+    },
+
+    input(item){
+      return this.$emit('input',{
+        ...item,
+        item:this.item
+      });
+    },
+
+    change(item){
+      return this.$emit('change',{
+        ...item,
+        item:this.item
+      });
+    }
+  },
+
+  created(){
+    if (this.item.id) {
+      return this.setNumber(this.item.number);
+    }
+  },
+
   props,
   components:{
-    vImage
+    vImage,
+    vStep
   }
 }
 </script>

+ 5 - 0
uni-shop/layout/layout-shop-item/props.js

@@ -5,6 +5,11 @@ export default {
         default:function () {
             return{};
         }
+    },
+
+    numberEdit:{
+        type:Boolean,
+        default: false
     }
 
 }

+ 2 - 10
uni-shop/layout/layout-shop/main.vue

@@ -22,6 +22,7 @@ import {
   mapState
 } from 'vuex';
 import props from './props';
+import shop from '@/utils/controls/shop';
 export default {
   name: "layout-shop",
   computed:{
@@ -30,16 +31,7 @@ export default {
   props,
   methods:{
     goDetail(){
-      if (this.item.id) {
-        return this.$router.navigateTo({
-          name:'product',
-          params:{
-            id:this.item.id,
-            title:this.item.title
-          }
-        })
-      }
-
+      shop.goShopDetail(this.item);
     }
   }
 }

+ 7 - 1
uni-shop/layout/layout-ui-shop-item/main.vue

@@ -7,7 +7,13 @@
       <view class="shop-item-title line-2">{{item.title || '商品名称,商品名称'}}</view>
       <view class="flex-all-1"></view>
       <view class="row aCenter">
-        <text class="shop-price-group"><text class="shop-price-em">¥</text><text>{{item.price || '48.00'}}</text></text>
+        <view class="flex-all-1">
+          <text class="shop-price-group"><text class="shop-price-em">¥</text><text>{{item.price || '48.00'}}</text></text>
+        </view>
+        <text v-if="number" class="row aCenter shop-close-container">
+          <text class="iconfont-close iconfont shop-close"></text>
+          <text>1</text>
+        </text>
       </view>
     </view>
   </view>

+ 5 - 0
uni-shop/layout/layout-ui-shop-item/props.js

@@ -5,6 +5,11 @@ export default {
         default:function () {
             return{};
         }
+    },
+
+    number:{
+        type:Number,
+        default:false
     }
 
 }

+ 3 - 3
uni-shop/layout/layout-ui-shop-item/style.scss

@@ -62,9 +62,9 @@ $shop-size:130upx;
   margin-right: 6upx;
 }
 .shop-close-container{
-  color: #999999;
-  font-size: 28upx;
-  line-height: 32upx;
+  color: #333;
+  font-size: 30upx;
+  line-height: 34upx;
   font-weight: 400;
 }
 .shop-close{

+ 3 - 2
uni-shop/layout/layout-use-coupon/main.vue

@@ -2,13 +2,13 @@
   <view
       class="coupon-item row aCenter relative"
       @click="triggerRadio"
-      :class="{'coupon-item-available': type === 'available'}"
+      :class="[type === 'available'?'coupon-item-available':'','coupon-item-'+type]"
   >
     <view class="coupon-item-left">
       <text class="coupon-item-price-group"><text>¥</text><text class="coupon-item-price">{{price}}</text></text>
       <view class="coupon-introduce">抵扣券</view>
     </view>
-    <view class="flex-all-1">
+    <view class="flex-all-1 overflow">
       <view class="coupon-item-title line-1">{{item.title || ''}}</view>
       <view class="coupon-item-time line-1">{{item.starttime || ''}}-{{item.endtime || ''}}</view>
     </view>
@@ -19,6 +19,7 @@
     <view v-else-if="type === 'available'" class="absolute coupon-available-footer jCenter">
       <view class="line-1">订单商品未满{{item.least}}元</view>
     </view>
+    <image v-if="icon" class="coupon-item-icon" :src="'/static/images/'+icon+'.png'"></image>
   </view>
 </template>
 

+ 9 - 0
uni-shop/layout/layout-use-coupon/props.js

@@ -11,12 +11,21 @@ export default {
     *   receive  领取
     *   radio    选择
     *   available 不可用
+    *   notUse   未使用
+    *   use      已使用
+    *   expired  已过期
+    *
     * */
     type:{
         type:String,
         default:'receive'
     },
 
+    icon:{
+      type:String,
+      default:''
+    },
+
     value:{
         type:Boolean,
         default:false

+ 19 - 2
uni-shop/layout/layout-use-coupon/style.scss

@@ -50,10 +50,17 @@
   color: #999999;
   margin-top: 16upx;
 }
+.coupon-item-icon{
+  width: 74upx;
+  height: 74upx;
+  margin-left: 30upx;
+}
 
 /* 不可用 */
-.coupon-item-available{
+.coupon-item-available,.coupon-item-notUse,.coupon-item-use,.coupon-item-expired{
   background-color: #fff;
+}
+.coupon-item-available{
   height: 200upx;
   padding-bottom: 60upx;
 }
@@ -67,4 +74,14 @@
   color: #333;
   line-height: 30upx;
 }
-/* 不可用 */
+/* 不可用 */
+
+/* 已使用 和 已过期 */
+.coupon-item-use .coupon-item-title,
+.coupon-item-expired .coupon-item-title,
+.coupon-item-use .coupon-item-price-group,
+.coupon-item-expired .coupon-item-price-group
+{
+  color: #999999;
+}
+/* 已使用 和 已过期 */

+ 4 - 0
uni-shop/mixins/params.js

@@ -60,6 +60,10 @@ export default {
                 this.$params[key] = decodeURIComponent(this.$params[key]);
             }
         }
+    },
+
+    created(){
+        this.$params = {};
     }
 
 }

+ 6 - 1
uni-shop/pages.json

@@ -89,6 +89,12 @@
 			}
 		},
 		{
+			"path": "pages/my-coupon/my-coupon",
+			"style": {
+				"navigationBarTitleText": "优惠券"
+			}
+		},
+		{
 			"path": "pages/order-detail/order-detail",
 			"style": {
 				"navigationBarTitleText": "订单详情"
@@ -115,7 +121,6 @@
 		}, {
 			"path": "pages/cart/cart",
 			"style": {
-				"enablePullDownRefresh": true,
 				"navigationBarTitleText": "购物车"
 			}
 		}, {

+ 69 - 473
uni-shop/pages/cart/cart.vue

@@ -1,481 +1,77 @@
 <template>
-	<view class="container">
-		<!-- 空白页 -->
-		<view v-if="(!hasLogin || empty===true) && state != 'load'" class="empty">
-			<image src="/static/emptyCart.jpg" mode="aspectFit"></image>
-			<view v-if="hasLogin" class="empty-tips">
-				空空如也
-				<navigator class="navigator" v-if="hasLogin" url="../index/index" open-type="switchTab">随便逛逛></navigator>
-			</view>
-			<view v-else class="empty-tips">
-				空空如也
-				<view class="navigator" @click="navToLogin">去登陆></view>
-			</view>
-		</view>
-		<view v-else>
-			<!-- 列表 -->
-			<view class="cart-list">
-				<block v-for="(item, index) in cartList" :key="item.id">
-					<view class="cart-item" :class="{'b-b': index!==cartList.length-1}" :style="{'background':item.isset?'':'#f5f5f5'}" 
-						@click="navTo(`/pages/product/product?id=${item.product_id}&flash=0`)"
-					>
-						<view class="image-wrapper">
-							<image :src="item.image" class="loaded" mode="aspectFill"></image>
-							<view v-if="item.isset == true" class="yticon icon-xuanzhong checkbox" :class="{checked: item.choose}" @click.stop="check('item', index)"></view>
-						</view>
-						<view class="item-right">
-							<text class="clamp title">{{item.title}}</text>
-							<text class="attr" v-if="item.spec">{{item.spec}}</text>
-							<text class="price">¥{{item.nowPrice}} <text style="color:red"> {{cartPrice(item.oldPrice, item.nowPrice)}}</text></text>
-							<uni-number-box class="step" :min="1" :max="item.stock" :disabled="item.number>=item.stock" :value="cartList[index].number"
-							 :isMax="item.number>=item.stock?true:false" :isMin="item.number===1" :index="index" @eventChange="numberChange"></uni-number-box>
-						</view>
-						<text class="del-btn yticon icon-lajitong" @click.stop="deleteCartItem(index)"></text>
-						<text class="invalid" v-if="item.isset == false">失效</text>
-						<text class="invalid" v-if="item.stock == 0 && item.isset == true">库存不足</text>
-					</view>
-				</block>
-			</view>
-			<!-- 底部菜单栏 -->
-			<view class="action-section" v-if="state != 'load'">
-				<view class="checkbox">
-					<image :src="allChoose?'/static/selected.png':'/static/select.png'" mode="aspectFit" @click="check('all')"></image>
-					<view class="clear-btn" :class="{show: allChoose}" @click="clearCart">
-						清空
-					</view>
-				</view>
-				<view class="total-box">
-					<text class="price">¥{{total}}</text>
-				</view>
-				<button type="primary" class="no-border confirm-btn" @click="createOrder">去结算</button>
-			</view>
-		</view>
-	</view>
+  <v-header title="购物车" mode="">
+    <view class="screen_all flex">
+      <view class="flex-all-1 overflow flex">
+        <view class="car-header row aCenter">
+          <view class="flex-all-1 row aCenter">
+            <image src="/static/images/shop.png" class="car-header-icon"></image>
+            <view class="car-shop-label">沣胜食品商城</view>
+            <text class="iconfont iconfont-more car-header-more"></text>
+          </view>
+          <view @click="triggerEdit" class="car-header-edit">{{edit?'完成':'编辑'}}</view>
+        </view>
+        <view class="flex-all-1 overflow">
+<!--          <flat-list-->
+<!--            background="transparent"-->
+<!--            @changeData="flatChangeData"-->
+<!--            @fetch="fetch"-->
+<!--          >-->
+
+<!--          </flat-list>-->
+          <view class="car-padding">
+            <view class="car-shop row aCenter"
+              v-for="(item,index) in data"
+              :key="index"
+              @click.stop="triggerSelect(item)"
+            >
+              <v-radio disabled :value="!!selectObject[item.id]" borderColor="#999999" class="car-shop-radio"  activeBorderColor="#41AE3C" activeColor="#41AE3C"></v-radio>
+              <view class="flex-all-1 overflow">
+                <layout-shop-item
+                  :item="item"
+                  numberEdit
+                  @input="triggerInput"
+                ></layout-shop-item>
+              </view>
+            </view>
+          </view>
+
+        </view>
+      </view>
+      <view class="car-footer row aCenter">
+        <view class="row aCenter">
+          <v-radio :value="allSelect" disabled size="small" class="car-footer-radio" borderColor="#999999"  activeBorderColor="#41AE3C" activeColor="#41AE3C"></v-radio>
+          <text>全选</text>
+        </view>
+        <view class="flex-all-1"></view>
+        <view v-if="!edit" class="car-footer-right row aCenter">
+          <view>合计:</view>
+          <view class="car-footer-price">¥128.00</view>
+        </view>
+        <view v-if="edit" class="car-footer-button center">删除</view>
+        <view v-else class="car-footer-button center">结算</view>
+
+      </view>
+    </view>
+  </v-header>
 </template>
 
 <script>
-	import {
-		mapState
-	} from 'vuex';
-	import uniNumberBox from '@/components/uni-number-box.vue'
-	export default {
-		components: {
-			uniNumberBox
-		},
-		data() {
-			return {
-				total: 0, //总价格
-				allChoose: false, //全选状态  true|false
-				empty: false, //空白页现实  true|false
-				cartList: [],
-				state : 'load'
-			};
-		},
-		onLoad() {
-			
-		},
-		onPullDownRefresh() {
-			this.state = 'load';
-			this.cartList = [];
-			this.getCart();
-		},
-		onShow() {
-			this.state = 'load';
-			this.cartList = [];
-			this.getCart();
-		},
-		watch: {
-			//显示空白页
-			cartList(e) {
-				let empty = e.length === 0 ? true : false;
-				if (this.empty !== empty) {
-					this.empty = empty;
-				}
-			}
-		},
-		computed: {
-			...mapState(['hasLogin'])
-		},
-		methods: {
-			async getCart() {
-				let login = await this.$api.checkLogin();
-				if (login) {
-					let data = await this.$api.request('/cart');
-					uni.stopPullDownRefresh();
-					this.state = 'loaded';
-					if (data){
-						this.cartList = data;
-						this.calcTotal();
-					}
-					
-				}
-			},
-			cartPrice(oldPrice, nowPrice) {
-				let string = '';
-				if (oldPrice < nowPrice) {
-					let number = (nowPrice - oldPrice).toFixed(2);
-					string = ' ↑涨价 ' + number + '元';
-				} else if (oldPrice > nowPrice) {
-					let number = (oldPrice - nowPrice).toFixed(2);
-					string = ' ↓降价 ' + number + '元';
-				}
-				return string;
-			},
-			navToLogin() {
-				uni.navigateTo({
-					url: '/pages/public/login'
-				})
-			},
-			//选中状态处理
-			async check(type, index) {
-				
-				let trueArr = [];
-				let falseArr = [];
-				let oldChoose = [];
-				const list = this.cartList;
-				//保存旧的数据
-				list.forEach(item => {
-					if(item.choose){
-						oldChoose.push(item.cart_id);
-					}
-				})
-				
-				//本地处理
-				if (type === 'item') {
-					this.cartList[index].choose = !this.cartList[index].choose;
-					if (this.cartList[index].choose) {
-						trueArr.push(this.cartList[index].cart_id);
-					} else {
-						falseArr.push(this.cartList[index].cart_id);
-					}
-				} else {
-					const choose = !this.allChoose
-					list.forEach(item => {
-						item.choose = choose;
-						if (item.isset) {
-							if (choose) {
-								trueArr.push(item.cart_id);
-							} else {
-								falseArr.push(item.cart_id);
-							}
-						}
-					})
-					this.allChoose = choose;
-				}
-				this.calcTotal(type);
-				
-				//远程处理
-				let result = await this.$api.request('/cart/choose_change', 'POST', {trueArr,falseArr});
-				if (!result) {
-					//恢复原来勾选的状态
-					list.forEach(item => {
-						if (oldChoose.indexOf(item.cart_id) >= 0) {
-							item.choose = 1;
-						} else {
-							item.choose = 0;
-						}
-					})
-					this.calcTotal(type);
-				}
-				
-			},
-			//数量
-			async numberChange(data) {
-				let oldNumber = this.cartList[data.index].number;
-				let newNumber = data.number;
-				this.cartList[data.index].number = newNumber;
-				this.calcTotal();
-				
-				let cart_id = this.cartList[data.index].cart_id;
-				let result = await this.$api.request('/cart/number_change?id='+cart_id, 'GET', {number:newNumber}, false);
-				if (!result) {
-					this.cartList[data.index].number = oldNumber;
-					this.calcTotal();
-				}
-				
-			},
-			//删除
-			async deleteCartItem(index) {
-				let list = this.cartList;
-				let row = list[index];
-				let id = row.cart_id;
-								
-				uni.showModal({
-					content: '确认删除 ' + list[index].title + '?' ,
-					success: async (e) => {
-						if (e.confirm) {
-							let result = await this.$api.request('/cart/delete?', 'POST', {id:id});
-							if (result) {
-								let tempCart = this.cartList.splice(index, 1);
-								this.calcTotal();
-							}
-						}
-					}
-				})
-
-			},
-			//清空
-			async clearCart() {
-				let [error, res] = await uni.showModal({
-					title: '确认清空?'
-				});
-				if (res.confirm) {
-					let id = [];
-					this.cartList.forEach(item=>{
-						id.push(item.cart_id);
-					});
-					let data = this.$api.request('/cart/delete', 'POST',{id:id});
-					let that = this;
-					if (data) {
-						setTimeout(function(){
-							that.state = 'load';
-							that.cartList = [];
-							that.getCart();
-						},300);
-					}
-				}
-			},
-			//计算总价
-			calcTotal() {
-				let list = this.cartList;
-				if (list.length === 0) {
-					this.empty = true;
-					return;
-				}
-				let total = 0;
-				let choose = true;
-				list.forEach(item => {
-					if (item.isset) {
-						if (item.choose == 1) {
-							total += item.nowPrice * item.number;
-						} else if (choose === true) {
-							choose = false;
-						}
-					}
-				})
-				this.allChoose = choose;
-				this.total = total.toFixed(2);
-			},
-			//创建订单
-			createOrder() {
-				let list = this.cartList;
-				let cartId = [];
-				list.forEach(item => {
-					if (item.choose) {
-						cartId.push(item.cart_id);
-					}
-				})
-				if (cartId.length == 0) {
-					this.$api.msg('没有选中商品');
-					return;
-				}
-				this.$api.navTo(`/pages/order/createOrder?cart=${cartId.join(',')}`);
-			},
-			navTo(url){
-				this.$api.navTo(url);
-			}
-		}
-	}
+import vHeader from '@/components/v-header/main';
+import vRadio from '@/components/v-radio/main';
+import flatList from '@/components/flat-list/src/main';
+import mixins from './mixins';
+import layoutShopItem from '../../layout/layout-shop-item/main';
+export default {
+  components:{
+    vHeader,
+    vRadio,
+    flatList,
+    layoutShopItem
+  },
+  mixins
+}
 </script>
 
-<style lang='scss'>
-	.container {
-		padding-bottom: 134upx;
-		
-		/* 空白页 */
-		.empty {
-			position: fixed;
-			left: 0;
-			top: 0;
-			width: 100%;
-			height: 100vh;
-			padding-bottom: 100upx;
-			display: flex;
-			justify-content: center;
-			flex-direction: column;
-			align-items: center;
-			background: #fff;
-
-			image {
-				width: 240upx;
-				height: 160upx;
-				margin-bottom: 30upx;
-			}
-
-			.empty-tips {
-				display: flex;
-				font-size: $font-sm+2upx;
-				color: $font-color-disabled;
-
-				.navigator {
-					color: $uni-color-primary;
-					margin-left: 16upx;
-				}
-			}
-		}
-	}
-
-	/* 购物车列表项 */
-	.cart-item {
-		display: flex;
-		position: relative;
-		padding: 30upx 40upx;
-
-		.image-wrapper {
-			width: 230upx;
-			height: 230upx;
-			flex-shrink: 0;
-			position: relative;
-
-			image {
-				border-radius: 8upx;
-			}
-		}
-
-		.checkbox {
-			position: absolute;
-			left: -16upx;
-			top: -16upx;
-			z-index: 8;
-			font-size: 44upx;
-			line-height: 1;
-			padding: 4upx;
-			color: $font-color-disabled;
-			background: #fff;
-			border-radius: 50px;
-		}
-
-		.item-right {
-			display: flex;
-			flex-direction: column;
-			flex: 1;
-			overflow: hidden;
-			position: relative;
-			padding-left: 30upx;
-
-			.title,
-			.price {
-				font-size: $font-base + 2upx;
-				color: $font-color-dark;
-				height: 40upx;
-				line-height: 40upx;
-			}
-
-			.attr {
-				font-size: $font-sm + 2upx;
-				color: $font-color-light;
-				height: 50upx;
-				line-height: 50upx;
-			}
-
-			.price {
-				height: 50upx;
-				line-height: 50upx;
-			}
-		}
-
-		.del-btn {
-			padding: 4upx 10upx;
-			font-size: 34upx;
-			height: 50upx;
-			color: $font-color-light;
-		}
-
-		.invalid {
-			position: absolute;
-			right: 0;
-			bottom: 0;
-			background: #999999;
-			color: #ffffff;
-			padding: 6upx 12upx;
-			border-radius: 10upx;
-			font-size: 26upx;
-			margin-right: 50upx;
-			margin-bottom: 32upx;
-		}
-	}
-
-	/* 底部栏 */
-	.action-section {
-		/* #ifdef H5 */
-		margin-bottom: 100upx;
-		/* #endif */
-		position: fixed;
-		left: 30upx;
-		bottom: 30upx;
-		z-index: 95;
-		display: flex;
-		align-items: center;
-		width: 690upx;
-		height: 100upx;
-		padding: 0 30upx;
-		background: rgba(255, 255, 255, .9);
-		box-shadow: 0 0 20upx 0 rgba(0, 0, 0, .5);
-		border-radius: 16upx;
-
-		.checkbox {
-			height: 52upx;
-			position: relative;
-
-			image {
-				width: 52upx;
-				height: 100%;
-				position: relative;
-				z-index: 5;
-			}
-		}
-
-		.clear-btn {
-			position: absolute;
-			left: 26upx;
-			top: 0;
-			z-index: 4;
-			width: 0;
-			height: 52upx;
-			line-height: 52upx;
-			padding-left: 38upx;
-			font-size: $font-base;
-			color: #fff;
-			background: $font-color-disabled;
-			border-radius: 0 50px 50px 0;
-			opacity: 0;
-			transition: .2s;
-
-			&.show {
-				opacity: 1;
-				width: 120upx;
-			}
-		}
-
-		.total-box {
-			flex: 1;
-			display: flex;
-			flex-direction: column;
-			text-align: right;
-			padding-right: 40upx;
-
-			.price {
-				font-size: $font-lg;
-				color: $font-color-dark;
-			}
-
-		}
-
-		.confirm-btn {
-			padding: 0 38upx;
-			margin: 0;
-			border-radius: 100px;
-			height: 76upx;
-			line-height: 76upx;
-			font-size: $font-base + 2upx;
-			background: $uni-color-primary;
-			box-shadow: 1px 2px 5px rgba(217, 60, 93, 0.72)
-		}
-	}
+<style lang='scss' scoped src="./style.scss">
 
-	/* 复选框选中状态 */
-	.action-section .checkbox.checked,
-	.cart-item .checkbox.checked {
-		color: $uni-color-primary;
-	}
 </style>

+ 65 - 0
uni-shop/pages/cart/mixins/handle.js

@@ -0,0 +1,65 @@
+export default {
+
+    data(){
+        return {
+            edit:false,
+            loadingStatus:false,
+
+            data:[
+                {
+                    title:'123123',
+                    id:1,
+                    number:1,
+                    sales_price:'1.00'
+                },
+                {
+                    title:'123123',
+                    id:2,
+                    number:2,
+                    sales_price:'2.00'
+                }
+            ],
+
+            selectObject:{},
+            selectArray:[]
+        }
+    },
+
+    computed:{
+      allSelect(){
+          return this.data.length === this.selectArray.length;
+      }
+    },
+
+    methods:{
+
+        triggerEdit(){
+
+            if (this.loadingStatus) return null;
+
+            this.edit = !this.edit;
+
+        },
+
+        triggerSelect(item){
+
+            if (this.selectObject[item.id] === undefined) {
+                this.$set(this.selectObject,item.id,item);
+            } else {
+                this.$set(this.selectObject,item.id,undefined);
+                delete this.selectObject[item.id];
+            }
+
+            this.selectArray = Object.keys(this.selectObject);
+
+        },
+
+        triggerInput(item){
+
+            console.log(item);
+
+        }
+
+    }
+
+}

+ 4 - 0
uni-shop/pages/cart/mixins/index.js

@@ -0,0 +1,4 @@
+import flatListMixins from '@/components/flat-list/export';
+import handle from "./handle";
+
+export default [flatListMixins,handle];

+ 74 - 0
uni-shop/pages/cart/style.scss

@@ -0,0 +1,74 @@
+/* 头部 */
+.car-padding,.car-header,.car-footer{
+  padding: 0 30upx;
+}
+.car-header,.car-footer{
+  height: 80upx;
+  background-color: #fff;
+  font-size: 28upx;
+  line-height: 32upx;
+  color: #333333;
+}
+.car-header-icon{
+  width: 28upx;
+  height: 25upx;
+}
+.car-shop-label{
+  margin: 0 10upx;
+}
+.car-header-more{
+  font-size: 24upx;
+  color: #999;
+  line-height: 26upx;
+  font-weight: bold;
+}
+.car-header-edit{
+  color: #666;
+}
+/* 头部 */
+
+/* 商品 */
+.car-padding{
+  margin-top: 20upx;
+}
+.car-shop{
+  margin-bottom: 20upx;
+  background-color: #fff;
+  padding: 30upx 20upx;
+  border-radius: 10upx;
+}
+.car-shop-radio{
+  margin-right: 20upx;
+}
+/* 商品 */
+
+/* 底部 */
+.car-footer{
+  height: 90upx;
+  border-top: 1upx solid #eee;
+  font-size: 26upx;
+  line-height: 30upx;
+  color: #666;
+  font-family: Source Han Sans CN;
+}
+.car-footer-right{
+  font-size: 24upx;
+}
+.car-footer-price{
+  color:#FE4646;
+  margin-left: 5upx;
+}
+.car-footer-button{
+  margin-left: 22upx;
+  width: 140upx;
+  height: 62upx;
+  border-radius: 31upx;
+  background-color: #41AE3C;
+  font-size: 30upx;
+  color: #fff;
+  line-height: 34upx;
+}
+.car-footer-radio{
+  margin-right: 21upx;
+}
+/* 底部 */

+ 1 - 0
uni-shop/pages/comment/comment.vue

@@ -10,6 +10,7 @@
             :class="{
               'comment-tab-active': active === index
             }"
+                v-if="count[item.key] && count[item.key]>0"
             @click="switchActive(index)"
           >{{item.label}}<text v-if="count[item.key] && count[item.key]>0">({{count[item.key] >99?'99+':count[item.key]}})</text></view>
         </view>

+ 13 - 2
uni-shop/pages/index/index.vue

@@ -60,14 +60,14 @@
                 <text class="shop-item-price">{{item.price}}</text>
                 <text>/1瓶</text>
               </text>
-              <view class="shop-item-buy-button center" v-if="item.id">立即购买</view>
+              <view class="shop-item-buy-button relative center" @click="goShopDetail(item)" v-if="item.id">立即购买</view>
             </view>
           </view>
         </view>
 
         <!-- 查看更多产品 -->
         <view class="center">
-          <view class="shop-button row center">
+          <view @click="goShopMore" class="shop-button row center">
             <text>查看更多商品</text>
             <image mode="aspectFill" :src="require('./images/more.png')"></image>
           </view>
@@ -92,6 +92,8 @@ import vImage from '@/components/v-image/main.vue';
 
 import trigger from '@/mixins/trigger/index';
 
+import shop from '@/utils/controls/shop';
+
 import {
   mapState
 } from 'vuex';
@@ -182,6 +184,15 @@ export default {
       });
     },
 
+    goShopDetail(item){
+	    console.log(item);
+	    return shop.goShopDetail(item);
+    },
+
+    goShopMore(){
+	    return this.$router.switchTab('category');
+    }
+
 	},
 };
 </script>

+ 1 - 0
uni-shop/pages/index/style.scss

@@ -82,6 +82,7 @@
   font-size: 28upx;
   line-height: 36upx;
   color: #fff;
+  z-index: 999;
   margin-top: 25upx;
 }
 .shop-item-price-em{

+ 14 - 0
uni-shop/pages/my-coupon/data/tabs.js

@@ -0,0 +1,14 @@
+export default [
+	{
+		label:'未使用',
+		status:1
+	},
+	{
+		label: '已使用',
+		status: -1
+	},
+	{
+		label: '已过期',
+		status: 3
+	}
+]

+ 37 - 0
uni-shop/pages/my-coupon/mixins/handle.js

@@ -0,0 +1,37 @@
+import tabsData from "../data/tabs";
+
+export default {
+
+    data(){
+        return {
+            tabsData:tabsData,
+            loadings:[],
+            value:0,
+            first:false
+        }
+    },
+
+    onLoad:function(){
+
+        if (this.$params.select) {
+            this.value = parseInt(this.$params.select);
+        } else {
+            this.first = true;
+        }
+
+    },
+
+    methods:{
+
+        /* change的时候触发 */
+        change:function(detail){
+            if (detail.loading) {
+                setTimeout(()=>{
+                    this.$set(this.loadings,detail.index,true)
+                },300);
+            }
+
+        }
+    }
+
+}

+ 4 - 0
uni-shop/pages/my-coupon/mixins/index.js

@@ -0,0 +1,4 @@
+import handle from './handle';
+import params from '@/mixins/params';
+
+export default [params,handle];

+ 44 - 0
uni-shop/pages/my-coupon/my-coupon.vue

@@ -0,0 +1,44 @@
+<template>
+  <v-header
+      title="优惠券"
+      backgroundColor="#fff"
+  >
+    <view class="screen_all">
+      <tab
+          :tabs="tabsData"
+          @change="change"
+          :value="value"
+          :first="true"
+          color="#028748"
+      >
+        <layout-coupon-list
+            v-for="(item,index) in tabsData"
+            :key="index"
+            v-if="loadings[index]"
+            :status="item.status"
+            :slot="'tab-'+index"
+        ></layout-coupon-list>
+      </tab>
+    </view>
+  </v-header>
+</template>
+
+<script>
+import vHeader from '@/components/v-header/main';
+import tab from '@/components/tab/main';
+import layoutCouponList from '@/layout/layout-coupon-list/layout-coupon-list';
+import mixins from './mixins';
+export default {
+  name: "my-coupon",
+  mixins,
+  components:{
+    vHeader,
+    tab,
+    layoutCouponList
+  }
+}
+</script>
+
+<style scoped lang="scss" src="./style.scss">
+
+</style>

+ 0 - 0
uni-shop/pages/my-coupon/style.scss


+ 1 - 1
uni-shop/pages/my-order/mixins/handle.js

@@ -7,7 +7,7 @@ export default {
             tabsData:tabsData,
             loadings:[],
             value:0,
-            first:true,
+            first:false,
             payModal:false,
             payModalMessage:''
         }

+ 8 - 0
uni-shop/pages/order-detail/data/cost.js

@@ -0,0 +1,8 @@
+export default [
+    {
+        label:'商品金额'
+    },
+    {
+        label:'运费'
+    }
+]

+ 8 - 0
uni-shop/pages/order-detail/data/order.js

@@ -0,0 +1,8 @@
+export default [
+    {
+        label:'订单编号'
+    },
+    {
+        label:'下单时间'
+    }
+]

+ 51 - 2
uni-shop/pages/order-detail/mixins/handle.js

@@ -1,10 +1,59 @@
 import logisticsData from '../data/logistics-status';
+import costData from '../data/cost';
+import orderData from '../data/order';
 export default {
 
     data(){
         return {
-            logisticsData
+            logisticsData,
+            costData,
+            orderData,
+            loadingStatus:true,
+            firstLoadingStatus:true,
+            payModal:false,
+            payModalMessage:'',
+            item:{}
         }
+    },
+
+    methods:{
+        fetch(obj){
+            this.loadingStatus = true;
+            return this.$request({
+                url:'order/getOrderDetail',
+                data:{
+                    order_id: this.$params.id
+                },
+                token:true,
+                message:2
+            }).then((data)=>{
+                if (data.isSuccess) {
+                    this.firstLoadingStatus =false;
+                    this.loadingStatus = false;
+                    this.initOrderDetail(data.data);
+                }
+                return obj.success();
+            }).catch(obj.fail);
+        },
+
+        initOrderDetail(item){
+
+            this.item = {
+                id: this.$params.id
+            }
+
+        },
+
+        openPayModal(item){
+            if (!this.payModal) {
+                this.payModal = true;
+                this.payModalMessage = item.msg;
+            }
+        }
+    },
+
+    onLoad(){
+        this.initOrderDetail();
     }
+}
 
-}

+ 3 - 1
uni-shop/pages/order-detail/mixins/index.js

@@ -1,3 +1,5 @@
 import handle from "./handle";
+import params from '@/mixins/params';
+import status from './status';
 
-export default [handle];
+export default [params,handle,status];

+ 18 - 0
uni-shop/pages/order-detail/mixins/status.js

@@ -0,0 +1,18 @@
+import order from "../../../utils/controls/order";
+
+export default {
+
+    data(){
+        return {
+            statusInfo:{},
+            statusSpeed:0
+        }
+    },
+
+    onLoad(){
+        this.statusInfo = order.getOrderStatus(order.createdOrderStatus({
+            status:1
+        }));
+    }
+
+}

+ 117 - 57
uni-shop/pages/order-detail/order-detail.vue

@@ -1,68 +1,124 @@
 <template>
-  <v-header scroll title="订单详情">
-    <view class="order-detail-container">
-      <view class="order-detail-header row aCenter">
-        <image mode="heightFix" src="/static/images/order-icon/received.png" class="order-detail-icon"></image>
-        <view class="flex-all-1 overflow">
-          <view class="line-1">待发货</view>
-        </view>
-      </view>
-      <!--  收货地址   -->
-      <view class="order-modal row aCenter order-detail-address">
-        <view class="order-address-icon-wrap">
-          <image src="/static/images/address.png" class="order-detail-address-icon"></image>
-        </view>
-        <view class="flex-all-1 overflow">
-          <view class="row aCenter">
-            <view class="order-address-name line-1">收货人</view>
-            <view>12345678910</view>
-          </view>
-          <view class="line-1 order-address-info">山东省 临沂市 河东区 临沂市开发区管委会</view>
-        </view>
-      </view>
-      <!--  物流信息   -->
-      <view class="order-modal order-logistics jCenter">
-        <view class="order-logistics-header row aCenter">
-          <image src="/static/images/logistics.png" class="order-logistics-header-icon"></image>
-          <view>物流信息</view>
-        </view>
-        <view class="order-logistics-line row">
-          <view v-for="(item,index) in logisticsData" :key="index"
-            class="flex-all-1 center relative order-logistics-active"
-          >
-            <view class="row aCenter">
-              <view class="order-logistics-circular center">
-                <view class="order-logistics-active-circular relative"></view>
+  <v-header backgroundColor="#fff" title="订单详情"
+    async
+    @fetch="fetch"
+  >
+    <view class="screen_all flex">
+      <view class="flex-all-1 overflow">
+        <scroll-view class="screen_all" scroll-y>
+          <view class="order-detail-container">
+            <view class="order-detail-header row aCenter">
+              <image mode="heightFix" v-if="statusInfo.icon" :src="'/static/images/order-icon/'+statusInfo.icon+'.png'" class="order-detail-icon"></image>
+              <view class="flex-all-1 overflow">
+                <view class="line-1">{{statusInfo.label}}</view>
               </view>
-              <view class="absolute jCenter order-logistics-circular-line"
-                    :style="{'left':index===0?'50%':'0',right:item.last?'50%':'0'}"
-              >
-                <view class="circular-line-target"></view>
-                <view class="absolute jCenter circular-line-active">
-                  <view></view>
+            </view>
+            <!--  收货地址   -->
+            <view class="order-modal row aCenter order-detail-address">
+              <view class="order-address-icon-wrap">
+                <image src="/static/images/address.png" class="order-detail-address-icon"></image>
+              </view>
+              <view class="flex-all-1 overflow">
+                <view class="row aCenter">
+                  <view class="order-address-name line-1">收货人</view>
+                  <view>12345678910</view>
+                </view>
+                <view class="line-1 order-address-info">山东省 临沂市 河东区 临沂市开发区管委会</view>
+              </view>
+            </view>
+            <!--  物流信息   -->
+            <view class="order-modal order-logistics jCenter">
+              <view class="order-logistics-header row aCenter">
+                <image src="/static/images/logistics.png" class="order-logistics-header-icon"></image>
+                <view>物流信息</view>
+              </view>
+              <view class="order-logistics-line row">
+                <view v-for="(item,index) in logisticsData" :key="index"
+                      class="flex-all-1 center relative"
+                      :class="{
+                        'order-logistics-active': index <= statusSpeed
+                      }"
+                >
+                  <view class="row aCenter">
+                    <view class="order-logistics-circular center">
+                      <view v-if="index <= statusSpeed" class="order-logistics-active-circular relative"></view>
+                    </view>
+                    <view class="absolute jCenter order-logistics-circular-line"
+                          :style="{'left':index===0?'50%':'0',right:item.last?'50%':'0'}"
+                    >
+                      <view class="circular-line-target"></view>
+                      <view v-if="index <= statusSpeed && statusSpeed>0" class="absolute jCenter circular-line-active"
+                            :style="{'right':index===statusSpeed?'50%':'0' }"
+                      >
+                        <view></view>
+                      </view>
+                    </view>
+                  </view>
+                  <view class="order-logistics-label">{{item.label}}</view>
                 </view>
               </view>
             </view>
-            <view class="order-logistics-label">{{item.label}}</view>
+            <!--  商品   -->
+            <view class="order-modal order-shop">
+              <view class="row aCenter order-title-model row aCenter">
+                <image src="/static/images/shop.png" class="order-shop-icon"></image>
+                <view class="line-1 order-title-container">镇江鑫天鸿粮油店</view>
+                <text class="iconfont iconfont-more order-more"></text>
+              </view>
+              <layout-ui-shop-item number></layout-ui-shop-item>
+            </view>
+            <!--  配送计划   -->
+            <view class="order-modal order-distribution row aCenter">
+              <view class="flex-all-1 order-label">配送计划</view>
+              <text class="order-distribution-info">查看详情</text>
+              <text class="iconfont iconfont-more order-distribution-more"></text>
+            </view>
+            <!--  费用明细   -->
+            <view class="order-modal flex overflow order-cost">
+              <view class="order-title">费用明细</view>
+              <view class="order-cost-item row aCenter"
+                    v-for="(item,index) in costData"
+                    :key="index"
+              >
+                <view class="flex-all-1">{{item.label}}</view>
+                <view class="order-cost-value">¥48.00</view>
+              </view>
+              <view class="order-cost-footer row aCenter jEnd flex-all-1">
+                <view>实付款:</view>
+                <view class="order-cost-price">¥48.00</view>
+              </view>
+            </view>
+            <!--  订单信息   -->
+            <view class="order-modal flex overflow">
+              <view class="order-title">订单信息</view>
+              <view class="order-cost-item row aCenter"
+                    v-for="(item,index) in orderData"
+                    :key="index"
+              >
+                <view class="flex-all-1">{{item.label}}</view>
+                <view class="order-cost-value">20181111051523458</view>
+              </view>
+            </view>
+
           </view>
-        </view>
+        </scroll-view>
       </view>
-      <!--  商品   -->
-      <view class="order-modal order-shop">
-        <view class="row aCenter order-title-model row aCenter">
-            <image src="/static/images/shop.png" class="order-shop-icon"></image>
-            <view class="line-1 order-title-container">镇江鑫天鸿粮油店</view>
-            <text class="iconfont iconfont-more order-more"></text>
+      <view class="order-footer order-modal row aCenter">
+        <button  open-type="contact" class="clear-button center order-footer-service">
+          <image src="/static/images/service.png" class="order-service"></image>
+          <view>客服</view>
+        </button>
+        <view class="flex-all-1 overflow jEnd">
+          <layout-button-group
+              :buttonGroup="statusInfo.buttonGroup"
+              :item="item"
+              size="big"
+              type="order-detail"
+              @openPayModal="openPayModal"
+          ></layout-button-group>
         </view>
-        <layout-ui-shop-item></layout-ui-shop-item>
-      </view>
-      <!--  配送计划   -->
-      <view class="order-modal order-distribution row aCenter">
-        <view class="flex-all-1 order-label">配送计划</view>
-        <text class="order-distribution-info">查看详情</text>
-        <text class="iconfont iconfont-more order-distribution-more"></text>
+        <pay-modal v-model="payModal" type="order" :message="payModalMessage"></pay-modal>
       </view>
-
     </view>
   </v-header>
 </template>
@@ -71,11 +127,15 @@
 import vHeader from '@/components/v-header/main';
 import mixins from './mixins';
 import layoutUiShopItem from '@/layout/layout-ui-shop-item/main';
+import layoutButtonGroup from '@/layout/layout-button-group/layout-button-group';
+import payModal from '@/components/pay-modal/pay-modal';
 export default {
   name: "order-detail",
   components:{
     vHeader,
-    layoutUiShopItem
+    layoutUiShopItem,
+    layoutButtonGroup,
+    payModal
   },
   mixins
 }

+ 51 - 1
uni-shop/pages/order-detail/style.scss

@@ -1,6 +1,7 @@
 /* 容器 */
 .order-detail-container{
   min-height: 100%;
+  background-color: rgba(238, 238, 238, 0.5);
 }
 .order-modal{
   background-color: #fff;
@@ -12,6 +13,14 @@
   line-height: 34upx;
   color: #2B2B2B;
 }
+.order-title{
+  font-size:30upx;
+  line-height: 40upx;
+  color: #2C2C2C;
+  margin-top: 30upx;
+  font-weight: bold;
+  margin-bottom: 30upx;
+}
 /* 容器 */
 
 /* 头部 */
@@ -164,4 +173,45 @@
   margin-left: 10upx;
   color: #B7B7B7;
 }
-/* 配送计划 */
+/* 配送计划 */
+
+/* 费用明细 */
+.order-cost{
+  height:327upx;
+}
+.order-cost-item{
+  font-size: 28upx;
+  color: #6B6B6B;
+  line-height: 32upx;
+  margin-bottom: 30upx;
+}
+.order-cost-value{
+  color: #2C2C2C;
+}
+.order-cost-footer{
+  border-top: 1upx solid #EDEDED;
+  font-size: 30upx;
+  line-height: 34upx;
+  color: #2C2C2C;
+}
+.order-cost-price{
+  color: #FF1A1A;
+}
+/* 费用明细 */
+
+/* 底部 */
+.order-footer{
+  height: 100upx;
+  box-shadow: 0 -3upx 6upx 0 rgba(176, 176, 176, 0.1);
+}
+.order-service{
+  width: 39upx;
+  height: 38upx;
+  margin-bottom: 10upx;
+}
+.order-footer-service{
+  font-size: 26upx;
+  color: #666666;
+  line-height: 30upx;
+}
+/* 底部 */

+ 71 - 0
uni-shop/pages/product/mixins/buy.js

@@ -0,0 +1,71 @@
+import toast from '@/utils/tool/toast';
+export default {
+
+    methods:{
+
+        /*
+        *   2 为加入购物车
+        *   1 为立即购买
+        * */
+        triggerBuy(type=1){
+
+            this.cancelRuleModal();
+
+            if(type === 1) {
+                return this.routerBuyOrder();
+            } else {
+                return this.addCarNumber();
+            }
+
+        },
+
+        routerBuyOrder(){
+
+            let rules = this.rules;
+
+            for (let i=0,count=this.rulesOption.length;i<count;i++) {
+                let item = this.rulesOption[i];
+                if (rules[item.key] === undefined) {
+                    return toast.info('请选择规格');
+                }
+            }
+
+            return this.$router.navigateTo({
+               name:'confirm-order',
+               params:{
+                   ...rules,
+                   id:this.$params.id,
+                   is_cart:0,
+                   number: this.$params.number
+               }
+            });
+
+        },
+
+        addCarNumber(){
+
+            if (this.addCarStatus) return ;
+
+
+
+            return this.$request({
+                url:'product/addCart',
+                data:{
+                    product_id: this.$params.id,
+                    number: this.buyNumber || 1
+                },
+                next:({status})=> this.addCarStatus = status,
+                token:true,
+                message:true,
+                failMessage:true
+            }).then((data)=>{
+                if (data.isSuccess) {
+                    this.buyNumber = 1;
+                }
+            });
+        }
+    }
+
+
+
+}

+ 4 - 1
uni-shop/pages/product/mixins/handle.js

@@ -96,11 +96,14 @@ export default {
             this.service.freight = (data.freight || {}).msg;
 
             // 处理评论列表
-            if ( !(data.evaluate.list instanceof Array)) {
+            if (data.evaluate.list && !(data.evaluate.list instanceof Array)) {
                 data.evaluate.list = [data.evaluate.list];
             }
+
             this.comment = (data.evaluate.list || []).map((item)=>{
 
+                item = item || {};
+
                 if (typeof item.images==='string') item.images = item.images.split(',');
 
                 item.images = url.handleImage(item.images || []);

+ 2 - 1
uni-shop/pages/product/mixins/index.js

@@ -4,5 +4,6 @@ import rules from './rules';
 import params from '@/mixins/params';
 import user from '@/mixins/user';
 import login from '@/mixins/login';
+import buy from './buy';
 
-export default [params,handle,coupon,rules,user,login];
+export default [params,handle,coupon,rules,user,login,buy];

+ 2 - 1
uni-shop/pages/product/product.vue

@@ -59,7 +59,7 @@
               <view class="comment">
                 <view class="comment-header row aCenter">
                   <view class="flex-all-1 row">商品评论<text v-if="item.evaluate && item.evaluate.count >0" class="comment-header-margin">({{item.evaluate.count}})</text></view>
-                  <view @click="routerRankingList" class="row aCenter">
+                  <view v-if="loadingStatus || item.evaluate.count>0" @click="routerRankingList" class="row aCenter">
                     <text class="comment-more-title">查看全部</text>
                     <text class="iconfont iconfont-more ranking-more"></text>
                   </view>
@@ -207,6 +207,7 @@
               <view v-if="failMessage" class="shop-buy-button control-button center control-fail-button overflow"><view class="line-1">{{failMessage}}</view></view>
               <view v-else-if="isLogin" class="shop-buy-button center control-button"
                 :class="{'control-button-car':buyType===2}"
+                    @click="triggerBuy(buyType)"
               >{{buyType===2?'加入购物车':'立即购买'}}</view>
               <view v-else @click="routerLogin" class="shop-buy-button control-button control-button-group-login center" >授权登录</view>
             </view>

+ 2 - 1
uni-shop/pages/user/data/control.js

@@ -3,7 +3,8 @@ export default [
     {
         label:'优惠券',
         icon:'coupon',
-        width:unit(29)
+        width:unit(29),
+        trigger: 'my-coupon'
     },
     {
         label:'收货地址',

+ 28 - 4
uni-shop/pages/user/data/order.js

@@ -1,19 +1,43 @@
 export default [
     {
         label:'待付款',
-        key:'nopay'
+        key:'nopay',
+        trigger:{
+            name:'my-order',
+            params:{
+                select:1
+            }
+        }
     },
     {
         label: '待发货',
-        key:'nodelivery'
+        key:'nodelivery',
+        trigger:{
+            name:'my-order',
+            params:{
+                select:2
+            }
+        }
     },
     {
         label: '待收货',
-        key:'norecive'
+        key:'norecive',
+        trigger:{
+            name:'my-order',
+            params:{
+                select:3
+            }
+        }
     },
     {
         label: '评价',
-        key:'nocommond'
+        key:'nocommond',
+        trigger:{
+            name:'my-order',
+            params:{
+                select:4
+            }
+        }
     },
     {
         label: '退款/售后',

+ 22 - 2
uni-shop/pages/user/mixins/handle.js

@@ -15,9 +15,29 @@ export default {
 
     methods:{
         routerIntegral(){
-            return this.$router.navigateTo({
-                name:'integral'
+            this.routerLogin(()=>{
+                return this.$router.navigateTo({
+                    name:'integral'
+                })
+            })
+
+        },
+        routerOrder(){
+            this.routerLogin(()=>{
+                return this.$router.navigateTo({
+                    name:'my-order',
+                    params:{
+                        select:0
+                    }
+                });
             })
+
+        },
+
+        triggerRecharge(){
+            return this.$router.navigateTo({
+               name:'recharge'
+            });
         }
     },
 

+ 3 - 2
uni-shop/pages/user/user.vue

@@ -35,7 +35,7 @@
           <view>账户余额:</view>
           <text class="user-wallet-price"><text>{{user.money || '0.00'}}</text><text class="user-wallet-em">(元)</text></text>
           <view class="flex-all-1"></view>
-          <view class="user-wallet-button center">立即充值</view>
+          <view @click="triggerRecharge" class="user-wallet-button center">立即充值</view>
         </view>
       </view>
 
@@ -43,7 +43,7 @@
       <view class="user-order flex">
         <view class="user-wallet-header user-order-header row aCenter">
           <view class="flex-all-1">我的订单</view>
-          <view class="row aCenter user-order-more">
+          <view @click="routerOrder" class="row aCenter user-order-more">
             <view>全部订单</view>
             <text class=".user-order-more-icon iconfont iconfont-more"></text>
           </view>
@@ -53,6 +53,7 @@
             v-for="(item,index) in orderData"
             :key="index"
             class="flex-all-1 center relative"
+            @click="trigger(item)"
           >
             <dot class="user-order-dot absolute" :value="user[item.key]"></dot>
             <image mode="heightFix" :src="'/static/images/order/'+(index+1)+'.png'" class="user-order-icon"></image>

BIN
uni-shop/static/images/coupon-expired.png


BIN
uni-shop/static/images/coupon-use.png


BIN
uni-shop/static/images/order-icon/comment.png


+ 0 - 0
uni-shop/static/images/order-icon/received.png → uni-shop/static/images/order-icon/deliver.png


BIN
uni-shop/static/images/order-icon/receiving.png


BIN
uni-shop/static/images/order-icon/refund.png


BIN
uni-shop/static/images/order-icon/wallet.png


BIN
uni-shop/static/images/service.png


+ 16 - 8
uni-shop/utils/controls/order.js

@@ -54,39 +54,47 @@ export default {
 		// 待付款
 		'1':{
 			label:'待付款',
-			buttonGroup:['cancel','pay']
+			buttonGroup:['cancel','pay'],
+			icon:'wallet'
 		},
 		// 待发货
 		'2':{
 			label:'待发货',
-			buttonGroup:['aftermarket','confirm']
+			buttonGroup:['aftermarket','confirm'],
+			icon:'deliver'
 		},
 		// 待收货
 		'3':{
 			label:'待收货',
-			buttonGroup:['aftermarket','confirm']
+			buttonGroup:['aftermarket','confirm'],
+			icon:'receiving'
 		},
 		// 待评价
 		'4':{
 			label:'待评价',
-			buttonGroup:['comment']
+			buttonGroup:['comment'],
+			icon:'comment'
 		},
 		// 已完成
 		'5':{
 			label:'已完成'
 		},
 		'6':{
-			label:'申请中'
+			label:'申请中',
+			icon:'refund'
 		},
 		'7':{
-			label:'待发货给商家'
+			label:'待发货给商家',
+			icon:'refund'
 		},
 		'8':{
-			label:'售后完成'
+			label:'售后完成',
+			icon:'refund'
 		},
 		'9':{
 			label:'售后拒绝',
-			buttonGroup:['aftermarket']
+			buttonGroup:['aftermarket'],
+			icon:'refund'
 		}
 	},
 

+ 19 - 0
uni-shop/utils/controls/shop.js

@@ -0,0 +1,19 @@
+import router from '../../router/index';
+export default {
+
+    goShopDetail(item){
+        if (item.id) {
+            return router.navigateTo({
+                name:'product',
+                params:{
+                    id: item.id,
+                    sales_price: item.sales_price,
+                    image: item.image,
+                    title: item.title
+                }
+            });
+        }
+
+    }
+
+}