laosan2382995021@163.com 3 سال پیش
والد
کامیت
008068f129
69فایلهای تغییر یافته به همراه655 افزوده شده و 253 حذف شده
  1. 1 1
      uni-shop/components/dot/style.scss
  2. 12 2
      uni-shop/components/fill-code/fill-code.vue
  3. 5 0
      uni-shop/components/fill-code/mixins/handle.js
  4. 60 16
      uni-shop/components/fill-code/style.scss
  5. 2 2
      uni-shop/components/flat-list/src/main.vue
  6. 2 1
      uni-shop/components/upload/main.vue
  7. 38 22
      uni-shop/layout/layout-button-group/mixins/handle.js
  8. 12 1
      uni-shop/layout/layout-commet/main.vue
  9. 1 1
      uni-shop/layout/layout-commet/style.scss
  10. 1 2
      uni-shop/layout/layout-coupon-list/mixins/handle.js
  11. 6 5
      uni-shop/layout/layout-order/layout-order.vue
  12. 6 5
      uni-shop/layout/layout-refund-order/layout-refund-order.vue
  13. 6 2
      uni-shop/layout/layout-shop-screen/main.vue
  14. 11 4
      uni-shop/layout/layout-ui-shop-item/main.vue
  15. 5 0
      uni-shop/layout/layout-ui-shop-item/props.js
  16. 17 1
      uni-shop/layout/layout-ui-shop-item/style.scss
  17. 10 0
      uni-shop/mixins/global.js
  18. 6 0
      uni-shop/pages.json
  19. 1 1
      uni-shop/pages/address/address.vue
  20. 1 0
      uni-shop/pages/address/mixins/handle.js
  21. 2 2
      uni-shop/pages/apply-after/apply-after.vue
  22. 11 9
      uni-shop/pages/cart/cart.vue
  23. 34 2
      uni-shop/pages/cart/mixins/handle.js
  24. 9 7
      uni-shop/pages/comment-detail/comment-detail.vue
  25. 5 1
      uni-shop/pages/comment-detail/style.scss
  26. 1 1
      uni-shop/pages/comment/mixins/handle.js
  27. 2 1
      uni-shop/pages/confirm-order/mixins/handle.js
  28. 22 9
      uni-shop/pages/confirm-order/mixins/pay.js
  29. 5 3
      uni-shop/pages/distribution/distribution.vue
  30. 67 11
      uni-shop/pages/distribution/mixins/handle.js
  31. 9 0
      uni-shop/pages/distribution/style.scss
  32. 2 1
      uni-shop/pages/feedback/feedback.vue
  33. 1 1
      uni-shop/pages/login/login.vue
  34. 5 0
      uni-shop/pages/my-order/mixins/handle.js
  35. 10 6
      uni-shop/pages/my-order/mixins/updated.js
  36. 6 0
      uni-shop/pages/order-detail/data/cost.js
  37. 39 11
      uni-shop/pages/order-detail/mixins/handle.js
  38. 2 1
      uni-shop/pages/order-detail/mixins/index.js
  39. 1 1
      uni-shop/pages/order-detail/mixins/status.js
  40. 11 6
      uni-shop/pages/order-detail/order-detail.vue
  41. 6 1
      uni-shop/pages/order-detail/style.scss
  42. 2 1
      uni-shop/pages/product/data/product-control.js
  43. 15 10
      uni-shop/pages/product/mixins/buy.js
  44. 22 15
      uni-shop/pages/product/mixins/handle.js
  45. 1 2
      uni-shop/pages/product/mixins/rules.js
  46. 4 0
      uni-shop/pages/product/product.scss
  47. 13 9
      uni-shop/pages/product/product.vue
  48. 4 2
      uni-shop/pages/ranking/mixins/handle.js
  49. 1 1
      uni-shop/pages/ranking/ranking-storage.vue
  50. 2 2
      uni-shop/pages/ranking/ranking.vue
  51. 2 0
      uni-shop/pages/recharge-record/mixins/handle.js
  52. 5 1
      uni-shop/pages/recharge-record/recharge-record.vue
  53. 9 0
      uni-shop/pages/recharge-record/style.scss
  54. 1 1
      uni-shop/pages/recharge/mixins/handle.js
  55. 1 1
      uni-shop/pages/recharge/recharge.vue
  56. 1 1
      uni-shop/pages/recharge/style.scss
  57. 6 3
      uni-shop/pages/shop-list/data/type.js
  58. 3 1
      uni-shop/pages/shop-list/shop-list.vue
  59. 14 2
      uni-shop/pages/user/data/control.js
  60. 2 26
      uni-shop/pages/user/mixins/handle.js
  61. 5 0
      uni-shop/pages/user/style.scss
  62. 12 6
      uni-shop/pages/user/user.vue
  63. 29 22
      uni-shop/pages/withdrawal/withdrawal.vue
  64. 1 1
      uni-shop/store/index.js
  65. 3 1
      uni-shop/store/modules/index.js
  66. 2 0
      uni-shop/store/modules/user.js
  67. 39 3
      uni-shop/utils/controls/order.js
  68. 2 2
      uni-shop/utils/controls/shop.js
  69. 1 0
      uni-shop/utils/request/instructions/plugins/instructions.js

+ 1 - 1
uni-shop/components/dot/style.scss

@@ -12,4 +12,4 @@
 
 .dot-number text{
   transform: scale(0.9);
-}
+}

+ 12 - 2
uni-shop/components/fill-code/fill-code.vue

@@ -2,12 +2,22 @@
   <modal v-model="vValue">
     <view class="screen_all center" @click="closeModal">
       <view class="fill-code center" @click.stop>
-        <view class="fill-code-title">填写邀请码</view>
+        <view class="fill-code-icon-container overflow relative">
+          <view class="absolute fill-code-screen">
+            <view class="fill-code-title">填写好友邀请码</view>
+            <view class="fill-code-info">每个账号仅可绑定一次</view>
+          </view>
+          <image src="/static/images/code.png" class="fill-code-icon"></image>
+        </view>
+
         <view class="fill-code-input-container">
-          <input v-model="content" type="text" class="screen_all fill-code-input" maxlength="8" placeholder="请输入邀请码" />
+          <input v-model="content" confirm-type="done" @confirm="submit" type="text" class="screen_all fill-code-input" maxlength="8" placeholder-class="fill-code-input-placeholder" placeholder="请输入邀请码" />
         </view>
         <view @click="submit" class="fill-code-button center">确定</view>
       </view>
+      <view @click="closeModal" class="fill-code-close center">
+        <text class="iconfont iconfont-close fill-code-close-icon"></text>
+      </view>
     </view>
   </modal>
 

+ 5 - 0
uni-shop/components/fill-code/mixins/handle.js

@@ -48,6 +48,11 @@ export default {
                 }).then((data)=>{
                     if (data.isSuccess) {
                         this.content = '';
+
+                        this.updateUserInfo({
+                            ...data.data,
+                        });
+
                         this.closeModal();
                     }
                 })

+ 60 - 16
uni-shop/components/fill-code/style.scss

@@ -1,36 +1,66 @@
 @import "../../style/common";
 .fill-code{
-  width: 600upx;
-  height: 320upx;
-  border-radius: 10upx;
+  width: 520upx;
+  border-radius: 15upx;
   background-color: #fff;
+  flex-shrink: 0;
 }
-
-.fill-code-title{
-  font-size: 32upx;
-  color: #333;
-  line-height: 40upx;
+.fill-code-icon-container{
+  width: 100%;
+  height: 194upx;
+}
+.fill-code-icon{
+  width: 520upx;
+  height: 242upx;
 }
 
 .fill-code-input-container{
-  box-shadow: 0 2upx 6upx 0 rgba(153, 153, 153, 0.3);
-  background-color: #e1e1e1;
+  background-color: #eee;
   border-radius: 10upx;
-  width: 390upx;
-  height: 78upx;
-  margin-top: 30upx;
+  width: 410upx;
+  height: 77upx;
+  margin: 55upx 0;
   padding: 0 30upx;
 }
 
+.fill-code-screen{
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  color: #fff;
+  padding: 0 35upx;
+}
+
+.fill-code-title{
+  font-size: 36upx;
+  line-height: 40upx;
+  font-weight: bold;
+  margin-top: 50upx;
+}
+
+.fill-code-info{
+  font-size: 20upx;
+  line-height: 30upx;
+  margin-top: 15upx;
+}
+
 .fill-code-input{
   text-align: center;
-  font-size: 34upx;
-  color: #666;
+  font-size: 30upx;
+  color: #333;
+}
+
+.fill-code-input-placeholder{
+  color: #999;
 }
 
+
+
+
 .fill-code-button{
-  margin-top: 45upx;
   background-color: #41AE3C;
+  margin-bottom: 50upx;
   width: 317upx;
   height: 70upx;
   border-radius: 35upx;
@@ -38,4 +68,18 @@
   color: #fff;
   font-family: Source Han Sans CN;
   line-height: 34upx;
+}
+
+.fill-code-close{
+  width: 70upx;
+  height: 70upx;
+  margin-top: 30upx;
+  border-radius: 50%;
+  border: 3upx solid #fff;
+}
+
+.fill-code-close-icon{
+  font-size: 34upx;
+  color: #fff;
+  font-weight: bold;
 }

+ 2 - 2
uni-shop/components/flat-list/src/main.vue

@@ -13,7 +13,7 @@
       </view>
       <!-- 视图为空 -->
       <view
-          class="flat-list-all absolute center"
+          class="flat-list-all absolute flex"
           :style="{'background-color':otherBackground || background}"
           v-else-if="start&&state===3"
       >
@@ -32,7 +32,7 @@
       </view>
       <!-- 网络错误 -->
       <view
-          class="flat-list-all absolute center"
+          class="flat-list-all absolute flex"
           :style="{'background-color':otherBackground || background}"
           v-else-if="start&&state===4"
       >

+ 2 - 1
uni-shop/components/upload/main.vue

@@ -22,7 +22,8 @@
           height:avgWidth+'rpx',
           'margin-top': ((uploadLength < row)?0:margin)+'rpx'
         }"
-        @click="selectImage"
+        @click.stop="selectImage"
+        class="overflow"
         v-show="!hidden"
     >
       <view v-if="!custom" class="select-image upload-item upload-view flex center">

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

@@ -123,36 +123,52 @@ export default {
 
         },
 
+        distribution:function (){
+            return this.$router.navigateTo({
+                name:'distribution',
+                params:{
+                    order_id: this.item.id
+                }
+            });
+        },
+
         /* 点击支付触发 */
         pay:function(item){
 
-            return request({
-                url: 'order/toPay',
-                data:{
-                    order_id: this.item.id
-                },
-                token: true,
-                message:1,
-                failMessage:true,
-                next:({status})=>{
-                    this.buttonStatus = status;
-                },
-                loading:'处理中'
-            }).then((data)=>{
+            modal.confirm({
+                title: '支付确认',
+                content: '是否支付该订单?',
+                confirm:()=>{
+                    return request({
+                        url: 'order/toPay',
+                        data:{
+                            order_id: this.item.id
+                        },
+                        token: true,
+                        message:1,
+                        failMessage:true,
+                        next:({status})=>{
+                            this.buttonStatus = status;
+                        },
+                        loading:'处理中'
+                    }).then((data)=>{
+
+                        if (data.isSuccess) {
+                            notice.trigger('user',{
+                                update:true
+                            });
+                            return this.emitParentStatus('pay',item,data.msg);
+                        } else {
+                            return this.$emit('openPayModal',{
+                                msg:data.msg
+                            });
+                        }
 
-                if (data.isSuccess) {
-                    notice.trigger('user',{
-                        update:true
-                    });
-                    return this.emitParentStatus('pay',item,data.msg);
-                } else {
-                    return this.$emit('openPayModal',{
-                        msg:data.msg
                     });
                 }
-
             });
 
+
         },
 
         // 触发响应事件

+ 12 - 1
uni-shop/layout/layout-commet/main.vue

@@ -21,7 +21,8 @@
       <view v-if="image" class="layout-comment-images row wrap aCenter">
         <view class="layout-comment-image overflow"
           v-for="(cItem,cIndex) in skeleton?3:vItem.images"
-              :key="cIndex"
+          :key="cIndex"
+          @click.stop="previewImage(cIndex)"
         >
           <v-image :src="skeleton?'':cItem" class="screen_all"></v-image>
         </view>
@@ -66,6 +67,16 @@ export default {
 
   methods:{
 
+    previewImage(index){
+      if (!this.skeleton) {
+        return uni.previewImage({
+          urls: this.vItem.images,
+          current: this.vItem.images[index]
+        });
+      }
+
+    },
+
     triggerGoDetail(){
       if (this.goDetail) {
         return this.$router.navigateTo({

+ 1 - 1
uni-shop/layout/layout-commet/style.scss

@@ -70,7 +70,7 @@ $comment-image-size:192upx;
 
 /* 控件 */
 .layout-comment-control-footer{
-  padding-bottom: 15upx;
+  padding: 15upx 0;
 }
 .layout-comment-control-item{
   font-size: 28upx;

+ 1 - 2
uni-shop/layout/layout-coupon-list/mixins/handle.js

@@ -24,8 +24,7 @@ export default {
                     type: this.status
                 },
                 page: obj,
-                token:true,
-                cache:true
+                token:true
             }).then((data)=>{
                 return obj.success((data.data || []).map((item)=>{
 

+ 6 - 5
uni-shop/layout/layout-order/layout-order.vue

@@ -29,13 +29,14 @@
               v-for="(cItem,cIndex) in item.productList"
               :key="cIndex"
               :item="cItem"
-              :number="false"
+              :number="cItem.number > 0"
+              :periods="item.orderDelivery_count"
           ></layout-ui-shop-item>
 
-          <view class="order-shop-refund" v-if="item.refund_status===1">商家审核中</view>
-          <view class="order-shop-refund" v-else-if="item.refund_status===2">待发货给商家</view>
-          <view class="order-shop-refund" v-else-if="item.refund_status===3">退款成功¥{{item.order_price}}</view>
-          <view class="order-shop-refund" v-else-if="item.refund_status===4">退款失败 原因: {{item.refuse_explain || ''}}</view>
+          <view class="order-shop-refund" v-if="item.statusOrder.status==6">商家审核中</view>
+          <view class="order-shop-refund" v-else-if="item.statusOrder.status==7">待发货给商家</view>
+          <view class="order-shop-refund" v-else-if="item.statusOrder.status==8">退款成功¥{{item.order_price}}</view>
+          <view class="order-shop-refund" v-else-if="item.statusOrder.status==9">退款失败 原因: {{item.refuse_explain || ''}}</view>
 
           <view  v-if="item.statusOrder.buttonGroup" class="order-button-group">
             <!--       item.button_group   v-if="item.button_group && item.button_group.length > 0"-->

+ 6 - 5
uni-shop/layout/layout-refund-order/layout-refund-order.vue

@@ -28,13 +28,14 @@
               v-for="(cItem,cIndex) in item.productList"
               :key="cIndex"
               :item="cItem"
-              :number="false"
+              :number="cItem.number > 0"
+              :periods="item.orderDelivery_count"
           ></layout-ui-shop-item>
 
-          <view class="order-shop-refund" v-if="item.refund_status===1">商家审核中</view>
-          <view class="order-shop-refund" v-else-if="item.refund_status===2">待发货给商家</view>
-          <view class="order-shop-refund" v-else-if="item.refund_status===3">退款成功¥{{item.order_price}}</view>
-          <view class="order-shop-refund" v-else-if="item.refund_status===4">退款失败 原因: {{item.refuse_explain || ''}}</view>
+          <view class="order-shop-refund" v-if="item.statusOrder.status==6">商家审核中</view>
+          <view class="order-shop-refund" v-else-if="item.statusOrder.status==7">待发货给商家</view>
+          <view class="order-shop-refund" v-else-if="item.statusOrder.status==8">退款成功¥{{item.order_price}}</view>
+          <view class="order-shop-refund" v-else-if="item.statusOrder.status==9">退款失败 原因: {{item.refuse_explain || ''}}</view>
 
           <view  v-if="item.statusOrder.buttonGroup" class="order-button-group">
             <!--       item.button_group   v-if="item.button_group && item.button_group.length > 0"-->

+ 6 - 2
uni-shop/layout/layout-shop-screen/main.vue

@@ -55,8 +55,11 @@ import layoutShop from '@/layout/layout-shop/main.vue';
 import flatList from '@/components/flat-list/src/main.vue';
 import mixins from './mixins';
 import Throttle from '@/utils/tool/throttle';
+import props from './props';
 export default {
 
+  props,
+
   data(){
     return {
       screenData,
@@ -100,12 +103,13 @@ export default {
       if (item && item.key ) {
         params[item.key] = this.screenOption.value;
       }
-
+      //
       return this.$request({
         url:'product/getProductList',
         data:{
           is_recommend:0,
-          ...params
+          ...params,
+          is_datebuy: this.dateBuy || 0
         },
         page:obj
       }).then((data)=>{

+ 11 - 4
uni-shop/layout/layout-ui-shop-item/main.vue

@@ -4,15 +4,22 @@
       <v-image  :src="item.image" class="screen_all"></v-image>
     </view>
     <view class="flex-all-1 flex shop-item-content overflow">
-      <view class="shop-item-title line-2">{{item.title || '商品名称,商品名称'}}</view>
+      <view class="shop-item-title line-2"
+        :class="[periods>0?'line-1':'line-2',periods>0?'shop-item-title-1':'']"
+      >{{item.title || ''}}</view>
+      <view v-if="periods>0" class="shop-item-label center">周期购</view>
       <view class="flex-all-1"></view>
       <view class="row aCenter">
-        <view class="flex-all-1">
-          <text class="shop-price-group"><text class="shop-price-em">¥</text><text>{{item.price || '48.00'}}</text></text>
+        <view class="flex-all-1 row aCenter">
+          <text class="shop-price-group"><text class="shop-price-em">¥</text><text>{{item.price || ''}}</text></text>
+          <text v-if="periods>0" class="row aCenter shop-periods shop-close-container">
+            <text class="iconfont-close iconfont shop-close"></text>
+            <text>{{ periods }}期</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>{{ item.number || 1 }}</text>
         </text>
       </view>
     </view>

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

@@ -12,6 +12,11 @@ export default {
         default:0
     },
 
+    periods:{
+        type:Number,
+        default:0
+    },
+
     goDetail:{
         type:Boolean,
         default:false

+ 17 - 1
uni-shop/layout/layout-ui-shop-item/style.scss

@@ -54,6 +54,9 @@ $shop-size:130upx;
 .shop-item-title{
   max-height: 76upx;
 }
+.shop-item-title-1{
+  max-height: 38upx !important;
+}
 .shop-price-group{
   font-size: 32upx;
   color: #333;
@@ -69,10 +72,23 @@ $shop-size:130upx;
   line-height: 34upx;
   font-weight: 400;
 }
+.shop-item-label{
+  width: 85rpx;
+  height: 32rpx;
+  margin-top: 5upx;
+  background-color: #FC3538;
+  border-radius: 6upx;
+  font-weight: 400;
+  color: #fff;
+  font-size: 22upx;
+  line-height: 25upx;
+}
 .shop-close{
   font-size: 22upx;
   font-weight: bold;
   position: relative;
-  top: 1upx;
+}
+.shop-periods{
+  margin-left: 6upx;
 }
 /* 商品内容 */

+ 10 - 0
uni-shop/mixins/global.js

@@ -1,5 +1,15 @@
+import car from '@/utils/controls/car';
+import user from '@/user';
 export default {
 
+    onShow(){
+        // 更新针对 购物车的数量角标
+        if (!car.__load && !car.status && user.user && user.isLogin()) {
+            car.getCartNumber(true).then(()=> car.__load = true);
+        }
+        car.checkSet();
+    },
+
     onShareAppMessage(){
 
         let title = '';

+ 6 - 0
uni-shop/pages.json

@@ -59,6 +59,12 @@
 			}
 		},
 		{
+			"path": "pages/consumption-record/consumption-record",
+			"style": {
+				"navigationBarTitleText": "消费记录"
+			}
+		},
+		{
 			"path": "pages/refund/refund",
 			"style": {
 				"navigationBarTitleText": "退款/售后"

+ 1 - 1
uni-shop/pages/address/address.vue

@@ -22,7 +22,7 @@
               <view class="address-info line-1">{{item.province_name}} {{item.city_name}} {{item.area_name}} {{item.address}}</view>
             </view>
             <v-radio :value="checkId==item.id" disabled borderColor="#c3c3c3" activeBorderColor="#41AE3C" activeColor="#41AE3C" class="address-margin" v-if="typeItem.select"></v-radio>
-            <image v-else @click="routerUpdateAddress(item)" src="/static/images/address-edit.png" class="address-edit"></image>
+            <image v-else @click.stop="routerUpdateAddress(item)" src="/static/images/address-edit.png" class="address-edit"></image>
           </view>
         </view>
       </flat-list>

+ 1 - 0
uni-shop/pages/address/mixins/handle.js

@@ -50,6 +50,7 @@ export default {
             });
         },
         checkedAddress(item){
+            if(!this.typeItem.select) return ;
             if (item.id) {
                 notice.trigger('select-address',{
                     item:item

+ 2 - 2
uni-shop/pages/apply-after/apply-after.vue

@@ -20,13 +20,13 @@
             <view class="apply-after-modal apply-after-footer">
               <view class="row aCenter apply-after-footer-title">
                 <view class="apply-after-footer-label">{{introduce.target || ''}}金额:</view>
-                <view class="flex-all-1">
+                <view class="flex-all-1 overflow">
                   <view class="line-1">¥{{item.price}}</view>
                 </view>
               </view>
               <view class="row aCenter apply-after-footer-title">
                 <view class="apply-after-footer-label">商品名称:</view>
-                <view class="flex-all-1">
+                <view class="flex-all-1 overflow">
                   <view class="line-1">{{item.name}}</view>
                 </view>
               </view>

+ 11 - 9
uni-shop/pages/cart/cart.vue

@@ -3,10 +3,12 @@
     <view class="screen_all flex" v-if="isLogin">
       <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 class="flex-all-1 row">
+            <view class="row aCenter" @click="routerHome">
+              <image src="/static/images/shop.png" class="car-header-icon"></image>
+              <view class="car-shop-label">{{config.name}}</view>
+              <text class="iconfont iconfont-more car-header-more"></text>
+            </view>
           </view>
           <view @click="triggerEdit" class="car-header-edit">{{edit?'完成':'编辑'}}</view>
         </view>
@@ -16,7 +18,7 @@
             @changeData="flatChangeData"
             @fetch="fetch"
             :ref="base_flat_id"
-            emptyText="空空如也"
+            emptyText="购物车空空如也"
           >
             <view class="car-padding">
               <view class="car-shop row aCenter"
@@ -38,11 +40,9 @@
               </view>
             </view>
           </flat-list>
-
-
         </view>
       </view>
-      <view class="car-footer row aCenter">
+      <view v-show="!empty" class="car-footer row aCenter">
         <view @click="triggerAllSelect" class="row aCenter">
           <v-radio :value="allSelect" disabled size="small" class="car-footer-radio" borderColor="#999999"  activeBorderColor="#41AE3C" activeColor="#41AE3C"></v-radio>
           <text>全选</text>
@@ -69,6 +69,7 @@ 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';
+import { mapState } from 'vuex';
 export default {
   components:{
     vHeader,
@@ -76,7 +77,8 @@ export default {
     flatList,
     layoutShopItem
   },
-  mixins
+  mixins,
+  computed:mapState(['config'])
 }
 </script>
 

+ 34 - 2
uni-shop/pages/cart/mixins/handle.js

@@ -3,6 +3,8 @@ import notice from "@/utils/notice/index";
 import toast from '@/utils/tool/toast';
 import modal from "../../../utils/tool/modal";
 
+import car from '@/utils/controls/car';
+
 export default {
 
     data(){
@@ -16,8 +18,13 @@ export default {
 
     computed:{
       allSelect(){
-          return this.base_flat_data.data.length >0 && this.base_flat_data.data.length === this.selectArray.length;
+          let data = this.getCarShowData();
+          return !this.empty && data.length === this.selectArray.length;
       },
+    empty(){
+        let data = this.getCarShowData();
+        return data.length <= 0;
+    },
       total(){
           let price = 0;
           this.selectArray.map((item)=>{
@@ -38,6 +45,10 @@ export default {
 
     methods:{
 
+        routerHome(){
+          return this.$router.switchTab('index');
+        },
+
         fetch(obj){
             return this.$request({
                 url:'product/getCartList',
@@ -116,7 +127,7 @@ export default {
                 this.selectObject = {};
                 this.selectArray = [];
             } else {
-                this.base_flat_data.data.map((item,index)=>{
+                this.getCarShowData().map((item,index)=>{
                     this.selectObject[item.id] = 1;
                 });
                 this.selectArray = Object.keys(this.selectObject);
@@ -124,6 +135,22 @@ export default {
 
         },
 
+        getCarShowData(){
+
+            let data = this.base_flat_data.data || [];
+
+            let resultData = [];
+
+            data.map((item)=>{
+                if (!this.base_flat_remove[item.id]) {
+                    resultData.push(item);
+                }
+            })
+
+            return resultData;
+
+        },
+
         deleteCheckShop(){
 
             if (this.loadingStatus) return ;
@@ -147,6 +174,11 @@ export default {
                     }).then((data)=>{
 
                         if (data.isSuccess) {
+
+                            // 设置购物车数量
+                            car.setCartNumber(car.number - this.selectArray.length);
+                            car.getCartNumber();
+
                             this.selectArray.map((item)=>{
                                 this.flatSplice(this.flatIdGETIndex(item));
                             });

+ 9 - 7
uni-shop/pages/comment-detail/comment-detail.vue

@@ -9,15 +9,17 @@
       :refresh="false"
       :skeleton="parentItem.replay >= 10 ? 10: parentItem.replay"
     >
-      <view class="detail-header overflow" slot="header">
-        <layout-comment
-          size="big"
-          :item="parentItem"
-        ></layout-comment>
+      <view slot="header">
+        <view class="detail-header overflow" >
+          <layout-comment
+              size="big"
+              :item="parentItem"
+          ></layout-comment>
+        </view>
+        <view class="detail-list-title">评价回复<text v-if="parentItem.replay">({{parentItem.replay}})</text></view>
       </view>
 
       <view class="detail-list">
-        <view class="detail-list-title">评价回复<text v-if="parentItem.replay">({{parentItem.replay}})</text></view>
         <view class="detail-item"
           v-for="(item,index) in base_flat_data.data"
           :key="index"
@@ -34,7 +36,7 @@
       <!--   底部   -->
       <view class="detail-footer row aCenter" slot="end-footer">
         <view class="flex-all-1 detail-input jCenter">
-          <input v-model="value" type="text" maxlength="200" placeholder="写个评论聊聊" placeholder-class="detail-input-placeholder" class="detail-input-target" />
+          <input v-model="value" confirm-type="send" @confirm="sendMessage" type="text" maxlength="200" placeholder="写个评论聊聊" placeholder-class="detail-input-placeholder" class="detail-input-target" />
         </view>
         <view v-if="isLogin"
               class="detail-button center"

+ 5 - 1
uni-shop/pages/comment-detail/style.scss

@@ -5,11 +5,15 @@
 .detail-list-title,.detail-header,.detail-item,.detail-footer{
   padding: 0 30upx;
 }
+.detail-list-title{
+  padding-top: 30upx;
+  font-size: 28upx;
+  color: #333;
+}
 /* 头部 */
 
 /* 评价列表 */
 .detail-list{
-  padding-top: 30upx;
   font-size: 28upx;
   color: #333;
 }

+ 1 - 1
uni-shop/pages/comment/mixins/handle.js

@@ -42,7 +42,7 @@ export default {
                 let resultData = data.data || [];
 
                 resultData.map((item)=>{
-                    if (typeof item.images === 'string') item.images = item.images.split(',');
+                    if (typeof item.images === 'string'  && item.images) item.images = item.images.split(',');
 
                     item.images = url.handleImage(item.images || []);
                 })

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

@@ -30,7 +30,7 @@ export default {
       count(){
           let count = 0;
           (this.info.productInfo || []).map((item)=>{
-              count += (item.number || 0)
+              count += (parseInt(item.number || 0) || 0)
           });
           return count;
       }
@@ -52,6 +52,7 @@ export default {
                     product_id: this.$params.id || '',
                     cycle:this.$params.cycle || '',
                     per_month:this.$params.per_month || '',
+                    number: this.$params.number || 1,
                     address_id: this.address && this.address.id || '',
                     choose_ids: JSON.stringify((this.$params.choose_ids || '').split(','))
                 },

+ 22 - 9
uni-shop/pages/confirm-order/mixins/pay.js

@@ -1,6 +1,9 @@
 // import test from '@/utils/test/index';
 import toast from '@/utils/tool/toast';
 import notice from '@/utils/notice/index';
+import car from '@/utils/controls/car';
+import modal from "../../../utils/tool/modal";
+
 export default {
 
     data(){
@@ -55,14 +58,20 @@ export default {
                 };
             }));
 
-            this.openPayLoading();
-
-            // 如果存在订单号触发
-            if (this.orderNumber) {
-                return this.payOrder();
-            } else {
-                return this.createdOrder(requestData);
-            }
+            modal.confirm({
+                title: '支付确认',
+                content: '是否支付该订单?',
+                confirm:()=>{
+                    this.openPayLoading();
+
+                    // 如果存在订单号触发
+                    if (this.orderNumber) {
+                        return this.payOrder();
+                    } else {
+                        return this.createdOrder(requestData);
+                    }
+                }
+            });
 
         },
 
@@ -94,6 +103,10 @@ export default {
                       notice.trigger('car',{
                           update:true
                       });
+
+                      // 设置购物车数量
+                      car.getCartNumber(true);
+
                   }
 
                   return this.payOrder();
@@ -111,13 +124,13 @@ export default {
               token:true,
               failMessage:true
           }).then((data)=>{
+              this.closePayLoading();
               if (data.isSuccess) {
                   notice.trigger('user',{
                       update:true
                   });
                   return  this.openPayModal();
               } else {
-                  this.closePayLoading();
                   return  this.openPayModal(data.msg);
               }
           }).catch(()=> this.closePayLoading())

+ 5 - 3
uni-shop/pages/distribution/distribution.vue

@@ -1,12 +1,14 @@
 <template>
-  <v-header title="配送计划" scroll border backgroundColor="#fff">
+  <v-header title="配送计划" :async="async" @fetch="fetch" scroll border backgroundColor="#fff">
     <view v-for="(item,index) in data" :key="index" class="distribution-item row aCenter"
       :class="{
-        'distribution-item-active': item.status
+        'distribution-item-active': item.status === 1
       }"
     >
       <view class="flex-all-1">{{item.date}}</view>
-      <view>{{item.status?'已送达':'未配送'}}</view>
+      <view v-if="!is_refound && item.status === 2" @click="confirm(item)" class="distribution-button center">确认收货</view>
+      <view v-else-if="is_refound && item.status === 2">配送中(退款)</view>
+      <view v-else>{{item.status === 1?'已送达':'未配送'}}</view>
     </view>
   </v-header>
 </template>

+ 67 - 11
uni-shop/pages/distribution/mixins/handle.js

@@ -1,15 +1,42 @@
-import DateParse from '@/utils/tool/date';
+import dateParse from '@/utils/tool/date';
+import modal from "../../../utils/tool/modal";
 export default {
 
     data(){
         return {
-            data:[]
+            data:[],
+            is_refound:0,
+            async:true
         }
     },
 
 
     methods:{
 
+        fetch(obj){
+            return this.$request({
+                url:'order/getPlanList',
+                data:{
+                  order_id: this.$params.order_id
+                },
+                token:true
+            }).then((data)=>{
+                data.data = data.data || {};
+
+                this.is_refound = data.data.is_refound;
+
+                this.data = (data.data.data || []).map((item)=>{
+                    return {
+                        date:dateParse(item.deliver_time,'YYYY-MM-DD'),
+                        status: item.status,
+                        id: item.id
+                    }
+                });
+
+                return obj.success();
+            }).catch(obj.fail);
+        },
+
         installTime(data){
 
             if (data) {
@@ -17,32 +44,61 @@ export default {
             } else {
                 data = [];
                 let intCount = parseInt(this.$params.count || 6);
-                let nowDate = DateParse.createDate(parseInt(this.$params.start));
+                let nowDate = dateParse.createDate(parseInt(this.$params.start));
                 let dateAfter = parseInt(this.$params.date) || 5;
                 let afterFormat = dateAfter < 10 ? '0'+dateAfter:dateAfter;
-                let nowTime = parseInt(this.$params.now) || 0;
                 for (let i=0;i<intCount;i++) {
 
-                    let useToTime = parseInt(nowDate.getTime() / 1000);
-
                     data.push({
-                        date: DateParse(nowDate,'YYYY-MM-'+afterFormat),
-                        status:nowTime >useToTime
+                        date: dateParse(nowDate,'YYYY-MM-'+afterFormat),
+                        status:0,
+                        id:0
                     });
 
-                    nowDate = DateParse.nextMonth(nowDate,afterFormat);
+                    nowDate = dateParse.nextMonth(nowDate,afterFormat);
 
                 }
             }
 
-
             this.data = data;
+        },
+
+        confirm(item){
+
+            if (this.confirmStatus) return;
+
+            modal.confirm({
+                title:'收货确认',
+                content:'是否确认收货',
+                confirm:()=>{
+
+                    this.$request({
+                        url:'order/saveOrderPlan',
+                        loading:'确认中',
+                        token:true,
+                        data:{
+                            plan_id: item.id
+                        },
+                        message:true,
+                        failMessage:true,
+                        next:({status})=> this.confirmStatus = status,
+                    }).then((data)=>{
+                        if (data.isSuccess) {
+                            item.status = 1;
+                        }
+                    });
+                }
+            })
         }
 
     },
 
     onLoad(){
-        this.installTime(this.$memoryParams.data);
+
+        if (this.$params.order_id === undefined) {
+            this.async = false;
+            this.installTime(this.$memoryParams.data);
+        }
     }
 
 }

+ 9 - 0
uni-shop/pages/distribution/style.scss

@@ -12,4 +12,13 @@
 .distribution-item:last-of-type{
   border-bottom: none;
 }
+.distribution-button{
+  width: 120upx;
+  height: 50upx;
+  font-size: 24upx;
+  line-height: 30upx;
+  background-color: #41AE3C;
+  color: #fff;
+  border-radius: 25upx;
+}
 /* 视图 */

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

@@ -11,10 +11,11 @@
             <text class="iconfont iconfont-puls feedback-icon"></text>
           </view>
         </v-upload>
-        <view v-else class="feedback-textarea">
+        <view v-else class="feedback-textarea overflow">
           <textarea :placeholder="item.placeholder"
                     :maxlength="item.maxLength || 400"
                     v-model="item.value"
+                    class="screen_all"
                     placeholder-class="feedback-textarea-placeholder"
           ></textarea>
         </view>

+ 1 - 1
uni-shop/pages/login/login.vue

@@ -69,7 +69,6 @@ export default {
 
         let userInfo = {};
         try {
-          console.log(data);
           userInfo = JSON.parse(data.rawData);
         } catch (e) {
 
@@ -90,6 +89,7 @@ export default {
         }).then((data)=>{
           if (data.isSuccess) {
             this.$store.commit('setUserInfo',data.data);
+            this.$store.dispatch('updateUserInfoPromise',false);
             return this.loginSuccessCallBack();
           }
         });

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

@@ -1,5 +1,7 @@
 import tabsData from "../data/tabs";
 
+import notice from '@/utils/notice';
+
 export default {
 
     data(){
@@ -49,6 +51,9 @@ export default {
 
     created(){
         this.target = {};
+        notice.trigger('user',{
+            update:true
+        });
     }
 
 }

+ 10 - 6
uni-shop/pages/my-order/mixins/updated.js

@@ -10,6 +10,8 @@ export default {
 		/* 触发更新规则 */
 		changeStatus:function(item){
 
+
+
 			if (this.updateStatus[item.name]) {
 
 
@@ -27,12 +29,14 @@ export default {
 							return this.target[target.name].flatSplice(id);
 						} else {
 
-							if (id) {
+							if (id !== undefined) {
 								let useItem = this.target[target.name].flatGetData(id);
-								/* 更新状态值 */
-								useItem.statusOrder = order.getOrderStatus(item.toStatus);
-								/* 更新状态值 */
-								return this.target[target.name].flatSaveData(id,useItem);
+								if (useItem) {
+									/* 更新状态值 */
+									useItem.statusOrder = order.getOrderStatus(item.toStatus);
+									/* 更新状态值 */
+									return this.target[target.name].flatSaveData(id,useItem);
+								}
 							}
 
 						}
@@ -98,7 +102,7 @@ export default {
 
 			/* 如果为售后进入触发 */
 			aftermarket:['all',{
-				name:'goods',
+				name:'received',
 				delete:true
 			}],
 

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

@@ -5,6 +5,12 @@ export default [
         defaultValue:'0.00'
     },
     {
+        label:'优惠价格',
+        key:'discount_price',
+        before:'-',
+        where:true
+    },
+    {
         label:'运费',
         key:'delivery_price',
         defaultValue:'0.00'

+ 39 - 11
uni-shop/pages/order-detail/mixins/handle.js

@@ -7,6 +7,7 @@ import url from '@/utils/tool/url';
 import {
     mapState
 } from 'vuex';
+import modal from "../../../utils/tool/modal";
 export default {
 
     data(){
@@ -54,8 +55,8 @@ export default {
             if (this.loadingStatus) return ;
           return this.$router.navigateTo({
               name:'distribution',
-              memoryParams:{
-                  data: this.item.orderDelivery
+              params:{
+                  order_id: this.$params.id
               }
           });
         },
@@ -67,19 +68,14 @@ export default {
                 productList: item.productList
             };
 
-            if (item.orderDelivery && item.orderDelivery.length > 0) {
-                item.orderDelivery = item.orderDelivery.map((item)=>{
-                    return {
-                        date:dateParse(item.deliver_time,'YYYY-MM-DD'),
-                        status: item.status
-                    }
-                });
+            if (item.orderInfo) {
+                item.orderInfo.discount_price = Math.abs(item.orderInfo.discount_price || 0).toFixed(2);
             }
 
             if (item.orderComment && item.orderComment.length >= 0) {
 
                 item.orderComment.map((item,index)=>{
-                    if (typeof item.images==='string') {
+                    if (typeof item.images==='string' && item.images) {
                         item.images = item.images.split(',');
                     }
                     item.images = url.handleImage(item.images || []);
@@ -91,6 +87,8 @@ export default {
 
             this.setStatus(item.orderInfo || {});
 
+            return this.installPayEnd(item.orderInfo);
+
         },
 
         openPayModal(item){
@@ -98,6 +96,36 @@ export default {
                 this.payModal = true;
                 this.payModalMessage = item.msg;
             }
+        },
+
+        triggerDeleteComment(item,index){
+
+            if (this.deleteCommentStatus) return ;
+
+            return modal.confirm({
+                title:'删除评价确认',
+                content:'是否删除该商品的评价',
+                confirmText:'删除',
+                confirmColor:'#FC3538',
+                confirm:()=>{
+                    return this.$request({
+                        url:'product/delCommond',
+                        loading:'删除中',
+                        token:true,
+                        data:{
+                            commond_id: item.id
+                        },
+                        failMessage:true,
+                        message:true,
+                        next:({status})=> this.deleteCommentStatus = status
+                    }).then((data)=>{
+                        if (data.isSuccess) {
+                            this.item.orderComment.splice(index,1);
+                        }
+                    });
+                }
+            });
+
         }
     },
 
@@ -106,7 +134,7 @@ export default {
         if (this.$memoryParams.item && this.$memoryParams.item.statusOrder) {
             this.item = JSON.parse(JSON.stringify(this.$memoryParams.item));
             this.setTargetStatus(this.$memoryParams.item.statusOrder.status);
-            this.setStatusSpeed(order.createOrderDefaultStatus(this.$memoryParams.item));
+            this.setStatusSpeed(order.createOrderNumberDefaultStatus(this.$memoryParams.item));
         }
 
     }

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

@@ -3,5 +3,6 @@ import params from '@/mixins/params';
 import status from './status';
 import update from './update';
 import globalMixins from '@/mixins/global';
+import payEnd from "./payEnd";
 
-export default [globalMixins,params,handle,status,update];
+export default [globalMixins,params,handle,status,update,payEnd];

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

@@ -13,7 +13,7 @@ export default {
 
         setStatus(item){
             this.setTargetStatus(order.createdOrderStatus(item || {}));
-            this.setStatusSpeed(order.createOrderDefaultStatus(item));
+            this.setStatusSpeed(order.createOrderNumberDefaultStatus(item));
         },
 
         setStatusSpeed(status){

+ 11 - 6
uni-shop/pages/order-detail/order-detail.vue

@@ -13,6 +13,7 @@
               <view class="flex-all-1 overflow">
                 <view class="line-1">{{statusInfo.label}}</view>
               </view>
+              <view v-if="item.orderInfo && statusInfo.status == 1&&payStatus.msg">{{payStatus.msg || ''}}</view>
             </view>
             <!--  收货地址   -->
             <view class="order-modal row aCenter order-detail-address">
@@ -67,14 +68,15 @@
                 <text class="iconfont iconfont-more order-more"></text>
               </view>
               <layout-ui-shop-item number
-                v-for="(item,index) in item.productList"
-                :key="index"
-                :item="item"
+                v-for="(cItem,cIndex) in item.productList"
+                :key="cIndex"
+                :item="cItem"
+                :periods="item.orderDelivery_count || 0"
                 goDetail
               ></layout-ui-shop-item>
             </view>
             <!--  配送计划   -->
-            <view v-if="item.orderDelivery && item.orderDelivery.length>0" @click="triggerRouterDetail" class="order-modal order-distribution row aCenter">
+            <view v-if="item.orderInfo.is_datebuy" @click="triggerRouterDetail" 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>
@@ -85,11 +87,12 @@
               <view class="order-cost-item row aCenter"
                     v-for="(cItem,index) in costData"
                     :key="index"
+                    v-if="cItem.where?item.orderInfo[cItem.key] && item.orderInfo[cItem.key]>0:true"
               >
                 <view class="flex-all-1">{{cItem.label}}</view>
-                <view class="order-cost-value">¥{{item.orderInfo[cItem.key]  || cItem.defaultValue || ''}}</view>
+                <view class="order-cost-value">{{cItem.before || ''}}¥{{item.orderInfo[cItem.key]  || cItem.defaultValue || ''}}</view>
               </view>
-              <view class="order-cost-footer row aCenter jEnd flex-all-1">
+              <view class="order-cost-footer row aCenter jEnd">
                 <view>实付款:</view>
                 <view class="order-cost-price">¥{{item.orderInfo.total_price || '0.00'}}</view>
               </view>
@@ -115,6 +118,8 @@
                 <view class="row aCenter order-comment-introduce">
                   <view class="order-comment-introduce-label">描述相符</view>
                   <v-rate type="comment" :value="item.rate" disabled></v-rate>
+                  <view class="flex-all-1"></view>
+                  <image @click.stop="triggerDeleteComment(item,index)" src="/static/images/delete.png" class="order-comment-delete" />
                 </view>
                 <view class="order-comment-content">{{item.comment}}</view>
                 <view class="order-comment-comment-group row wrap" v-if="item.images && item.images.length > 0">

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

@@ -177,7 +177,7 @@
 
 /* 费用明细 */
 .order-cost{
-  height:327upx;
+  //height:327upx;
 }
 .order-cost-item{
   font-size: 28upx;
@@ -190,6 +190,7 @@
 }
 .order-cost-footer{
   border-top: 1upx solid #EDEDED;
+  height: 104upx;
   font-size: 30upx;
   line-height: 34upx;
   color: #2C2C2C;
@@ -220,6 +221,10 @@
   padding: 0 30upx;
   border-bottom: 1upx solid #EEEEEE;
 }
+.order-comment-delete{
+  width: 30upx;
+  height: 30upx;
+}
 .order-comment-content{
   font-size: 28upx;
   color: #999;

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

@@ -7,7 +7,8 @@ export default [
     {
         label: '购物车',
         icon: require('../images/control/car.png'),
-        trigger:'goCar'
+        trigger:'goCar',
+        carDot:true
     },
     {
         label: '客服',

+ 15 - 10
uni-shop/pages/product/mixins/buy.js

@@ -1,5 +1,6 @@
 import toast from '@/utils/tool/toast';
 import notice from "@/utils/notice/index";
+import car from '@/utils/controls/car';
 export default {
 
     methods:{
@@ -22,15 +23,18 @@ export default {
         },
 
         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('请选择规格');
+            let rules = {};
+            if (this.item.is_datebuy) {
+                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('请选择规格');
+                    }
                 }
             }
+
             this.cancelRuleModal();
             return this.$router.navigateTo({
                name:'confirm-order',
@@ -38,7 +42,7 @@ export default {
                    ...rules,
                    id:this.$params.id,
                    is_cart:0,
-                   number: 1
+                   number: this.buyNumber
                }
             });
 
@@ -48,8 +52,6 @@ export default {
 
             if (this.addCarStatus) return ;
 
-
-
             return this.$request({
                 url:'product/addCart',
                 data:{
@@ -65,6 +67,9 @@ export default {
                     notice.trigger('car',{
                         update:true
                     });
+
+                    car.setCartNumber(data.data);
+
                     this.buyNumber = 1;
                 }
             });

+ 22 - 15
uni-shop/pages/product/mixins/handle.js

@@ -31,6 +31,7 @@ export default {
 
     methods:{
         openShareModal(){
+            if (this.loadingStatus) return;
             if (!this.productShareModal) {
                 this.productShareModal = true;
             }
@@ -61,7 +62,7 @@ export default {
                 this.loadingStatus = false;
 
                 // 处理图片列表
-                this.setShopDetail(data.data);
+                this.setShopDetail(data.data,data.isSuccess);
 
                 return obj.success();
 
@@ -69,7 +70,9 @@ export default {
         },
 
         // 设置商品详情
-        setShopDetail(data){
+        setShopDetail(data,isSuccess){
+
+            data = data || {};
 
             // 处理图片列表
             if (typeof data.images === 'string') data.images = data.images.split(',') || [];
@@ -99,29 +102,32 @@ export default {
             // 设置运费介绍
             this.service.freight = (data.freight || {}).msg;
 
-            // 处理评论列表
-            if (data.evaluate.list && !(data.evaluate.list instanceof Array)) {
-                data.evaluate.list = [data.evaluate.list];
-            }
+            if (isSuccess) {
 
-            this.comment = (data.evaluate.list || []).map((item)=>{
+                data.evaluate = data.evaluate || {};
+                // 处理评论列表
+                if (data.evaluate.list && !(data.evaluate.list instanceof Array)) {
+                    data.evaluate.list = [data.evaluate.list];
+                }
 
-                item = item || {};
+                this.comment = (data.evaluate.list || []).map((item)=>{
 
-                if (typeof item.images==='string') item.images = item.images.split(',');
+                    item = item || {};
 
-                item.images = url.handleImage(item.images || []);
+                    if (typeof item.images==='string' && item.images) item.images = item.images.split(',');
 
-                return item;
+                    item.images = url.handleImage(item.images || []);
 
-            });
+                    return item;
+
+                });
+            }
 
-            console.log(this.comment);
 
             this.item = data;
 
             // 设置规格
-            this.setRule(data.spaces);
+            this.setRule(data.spaces || []);
 
 
         },
@@ -179,9 +185,10 @@ export default {
     },
 
     onShareAppMessage(){
+
         return {
             title:this.item.title || this.$params.title,
-            imageUrl: this.item.image || this.$params.image
+            imageUrl: this.item.image || this.$params.image || undefined
         }
     }
 

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

@@ -18,8 +18,7 @@ export default {
 
             prices = prices.map((item)=>{
 
-              return priceUnit.toFixed(parseFloat(item || 0));
-              // return priceUnit.toFixed(parseFloat(item || 0) * this.buyNumber);
+              return priceUnit.toFixed(parseFloat(item || 0) * this.buyNumber);
             });
 
             return prices.join('-');

+ 4 - 0
uni-shop/pages/product/product.scss

@@ -154,6 +154,10 @@ page{
 /* 商品评论 */
 
 /* 店铺 */
+.control-label-dot{
+  top: -6upx;
+  right: 8upx;
+}
 .shop-store{
   height: 120upx;
 }

+ 13 - 9
uni-shop/pages/product/product.vue

@@ -32,7 +32,7 @@
               <view class="ranking row aCenter" @click.stop="routerRanking">
                 <image src="/static/images/ranking.png" class="ranking-icon"></image>
                 <view class="ranking-title">排行榜</view>
-                <view class="flex-all-1 row ranking-introduce line-1">店铺商品热榜<text v-if="item.rankTexts" :class="{'ranking-prominent':cItem.active}" v-for="(cItem,index) in item.rankTexts" :key="index">{{cItem.label}}</text></view>
+                <view class="flex-all-1 row ranking-introduce line-1">商品热榜<text v-if="item.rankTexts" :class="{'ranking-prominent':cItem.active}" v-for="(cItem,index) in item.rankTexts" :key="index">{{cItem.label}}</text></view>
                 <text class="iconfont iconfont-more ranking-more"></text>
               </view>
               <!--   服务类型   -->
@@ -70,6 +70,7 @@
                     v-for="(item,index) in comment"
                     :key="index"
                     :item="item"
+                    goDetail
                   ></layout-comment>
 
                   <view v-if="!loadingStatus && item.evaluate.count<=0" class="comment-content-empty">此商品暂无评论</view>
@@ -102,7 +103,7 @@
         <view
             v-for="(item,index) in productControl"
             :key="index"
-            class="flex-all-1 center"
+            class="flex-all-1 center relative"
             @click="trigger(item)"
         >
           <button v-if="item.type" :open-type="item.type" class="flex-all-1 clear-button flex center">
@@ -112,13 +113,14 @@
           <template v-else>
             <image :src="item.icon" mode="aspectFit" class="control-icon"></image>
             <view class="control-label">{{item.label}}</view>
+            <dot v-if="item.carDot" class="control-label-dot absolute" :value="car.carNumber"></dot>
           </template>
 
         </view>
         <view v-if="failMessage" class="control-button-group center control-fail-button overflow"><view class="line-1">{{failMessage}}</view></view>
         <view class="control-button-group row overflow" v-else-if="isLogin">
-          <view @click="triggerBuyType(2)" class="control-button control-button-car center">加入购物车</view>
-          <view @click="triggerBuyType(1)" class="control-button center">立即购买</view>
+          <view @click="triggerBuyType(2)" v-if="!item.is_datebuy" class="control-button control-button-car center">加入购物车</view>
+          <view @click="triggerBuyType(1)" :class="{'flex-1': item.is_datebuy}" class="control-button center">立即购买</view>
         </view>
         <view @click="routerLogin" class="control-button-group control-button-group-login center" v-else>授权登录</view>
       </view>
@@ -162,14 +164,14 @@
               <v-image :src="item.image" class="shop-buy-image"></v-image>
               <view class="flex-all-1 shop-buy-content">
                 <view class="shop-buy-title line-2 overflow">{{item.title}}</view>
-                <text class="shop-buy-price-group"><text>¥</text><text>{{buyType===1?rulesPriceNumber:priceNumber}}</text></text>
+                <text class="shop-buy-price-group"><text>¥</text><text>{{buyType===1 && item.is_datebuy?rulesPriceNumber:priceNumber}}</text></text>
               </view>
               <view class="shop-buy-close">
                 <view @click="cancelRuleModal" class="iconfont iconfont-close shop-buy-close-icon"></view>
               </view>
             </view>
             <!--  规格  -->
-            <view v-show="buyType===1" class="flex-all-1 overflow">
+            <view v-show="buyType===1" v-if="item.is_datebuy" class="flex-all-1 overflow">
               <scroll-view
                 scroll-y
                 class="screen_all"
@@ -198,7 +200,7 @@
               </scroll-view>
             </view>
             <!--  数量  -->
-            <view v-show="buyType!==1" class="row aCenter shop-step">
+            <view class="row aCenter shop-step">
               <view class="flex-all-1">数量</view>
               <v-step :value="buyNumber" @input="changeBuyNumber"></v-step>
             </view>
@@ -235,6 +237,7 @@
   import layoutUseCoupon from '@/layout/layout-use-coupon/main.vue';
   import vImage from '@/components/v-image/main';
   import poster from '@/components/poster/poster';
+  import dot from '@/components/dot/main';
 	export default {
     mixins,
 		components: {
@@ -246,10 +249,11 @@
       vImage,
       vStep,
       layoutUseCoupon,
-      poster
+      poster,
+      dot
 		},
 		computed: {
-      ...mapState(['config']),
+      ...mapState(['config','car']),
 		}
 	}
 </script>

+ 4 - 2
uni-shop/pages/ranking/mixins/handle.js

@@ -1,6 +1,7 @@
 import unit from '@/utils/tool/unit';
 import config from "../../../config/config";
 import url from '@/utils/tool/url';
+import shop from '@/utils/controls/shop';
 export default {
 
     data(){
@@ -24,11 +25,12 @@ export default {
                     item.image = url.handleImage(item.image);
                 });
 
-                console.log(data.data);
-
                 this.shopData = data.data;
                 return obj.success();
             }).catch(obj.fail);
+        },
+        goDetail(item){
+            return shop.goShopDetail(item);
         }
     }
 

+ 1 - 1
uni-shop/pages/ranking/ranking-storage.vue

@@ -1,5 +1,5 @@
 <template>
-  <v-header title="店铺热榜" :immersion="true" immersionFixed headerBackgroundColor="transparent" backgroundColor="#fff" headerStyle="white">
+  <v-header title="商品热榜" :immersion="true" immersionFixed headerBackgroundColor="transparent" backgroundColor="#fff" headerStyle="white">
     <view slot="header-background" class="ranking-background absolute">
       <image src="/static/images/ranking-background.png" class="screen_all"></image>
     </view>

+ 2 - 2
uni-shop/pages/ranking/ranking.vue

@@ -1,5 +1,5 @@
 <template>
-  <v-header title="店铺热榜" async @fetch="fetch" scroll transitionScroll immersion headerBackgroundColor="transparent" backgroundColor="#fff" headerStyle="white">
+  <v-header title="商品热榜" async @fetch="fetch" scroll transitionScroll immersion headerBackgroundColor="transparent" backgroundColor="#fff" headerStyle="white">
     <view>
       <view class="ranking-background">
         <image src="/static/images/ranking-background.png" class="screen_all"></image>
@@ -17,7 +17,7 @@
               <text class="ranking-shop-price-group"><text>¥</text><text class="ranking-shop-price">{{item.sales_price}}</text></text>
               <view class="ranking-shop-old-price">¥{{item.market_price}}</view>
               <view class="flex-all-1"></view>
-              <view class="ranking-shop-button center">去购买</view>
+              <view @click="goDetail(item)" class="ranking-shop-button center">去购买</view>
             </view>
 
           </view>

+ 2 - 0
uni-shop/pages/recharge-record/mixins/handle.js

@@ -1,4 +1,5 @@
 import dateParse from '@/utils/tool/date';
+import price from "../../../utils/tool/price";
 export default {
 
     methods:{
@@ -11,6 +12,7 @@ export default {
             }).then((data)=>{
                 return obj.success((data.data || []).map((item)=>{
                     item.createtime = dateParse(item.createtime,'YYYY-MM-DD hh:mm');
+                    item.sumPrice = price.toFixed((parseFloat(item.money) || 0) + (parseFloat(item.give) || 0));
                     return item;
                 }));
             }).catch(obj.fail);

+ 5 - 1
uni-shop/pages/recharge-record/recharge-record.vue

@@ -16,7 +16,11 @@
             <view class="line-1 recharge-item-title">{{item.title || '余额充值'}}</view>
             <view class="line-1 recharge-item-time">{{item.createtime}}</view>
           </view>
-          <view class="recharge-item-price">¥{{item.money}}</view>
+          <view class="recharge-item-price-warp">
+            <view class="recharge-item-price">¥{{item.money}}</view>
+            <view v-if="item.give> 0" class="recharge-item-give-price">赠送:¥{{item.give}}</view>
+          </view>
+
         </view>
       </view>
     </flat-list>

+ 9 - 0
uni-shop/pages/recharge-record/style.scss

@@ -29,4 +29,13 @@
   color: #333;
   margin-left: 20upx;
 }
+.recharge-item-price-warp{
+  text-align: right;
+}
+.recharge-item-give-price{
+  font-size: 22upx;
+  line-height: 26upx;
+  margin-top: 10upx;
+  color: #41AE3C;
+}
 /* 视图 */

+ 1 - 1
uni-shop/pages/recharge/mixins/handle.js

@@ -10,7 +10,7 @@ export default {
       return {
           configData:[],
           payData,
-          type:'',
+          type:'1',
           active:0
       }
     },

+ 1 - 1
uni-shop/pages/recharge/recharge.vue

@@ -8,7 +8,7 @@
         <view @click="triggerRecord" class="absolute recharge-record center">充值记录</view>
       </view>
       <view class="recharge-context">
-        <view class="recharge-content row aCenter wrap">
+        <view class="recharge-content row center wrap">
           <view class="recharge-item jCenter" v-for="(item,index) in configData"
             :key="index"
             :class="{'recharge-item-active': active === index}"

+ 1 - 1
uni-shop/pages/recharge/style.scss

@@ -54,7 +54,7 @@
   margin-top: 20upx;
 }
 .recharge-item{
-  width: 207upx;
+  width: 205upx;
   height: 150upx;
   border: 1upx solid #DFDFDF;
   border-radius: 10upx;

+ 6 - 3
uni-shop/pages/shop-list/data/type.js

@@ -1,15 +1,18 @@
 export default {
 
     '1':{
-        label:'季度购'
+        label:'季度购',
+        dateBuy:3
     },
 
     '2':{
-        label:'半年购'
+        label:'半年购',
+        dateBuy:6
     },
 
     '3':{
-        label:'全年购'
+        label:'全年购',
+        dateBuy:12
     }
 
 }

+ 3 - 1
uni-shop/pages/shop-list/shop-list.vue

@@ -1,6 +1,8 @@
 <template>
   <v-header :title="item.label">
-    <layout-shop-screen></layout-shop-screen>
+    <layout-shop-screen
+      :dateBuy="item.dateBuy"
+    ></layout-shop-screen>
   </v-header>
 </template>
 

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

@@ -8,8 +8,8 @@ export default [
     },
     {
         label:'填写邀请码',
-        key:'pre_invite_no',
-        labelSuccess:'已绑定邀请码',
+        key:'pre_nickname',
+        labelSuccess:'已绑定用户',
         icon:'invitation',
         width:unit(24),
         trigger: {
@@ -19,6 +19,18 @@ export default [
             }
         }
     },
+    // {
+    //     label:'余额记录',
+    //     icon:'consumption',
+    //     width:unit(23),
+    //     trigger:'consumption-record'
+    // },
+    // {
+    //     label:'收益记录',
+    //     icon:'consumption',
+    //     width:unit(23),
+    //     trigger:'profit-record'
+    // },
     {
         label:'收货地址',
         icon:'address',

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

@@ -24,36 +24,12 @@ export default {
           }
         },
 
-        routerIntegral(){
+        routerTarget(name){
             this.routerLogin(()=>{
                 return this.$router.navigateTo({
-                    name:'integral'
+                    name
                 })
             })
-
-        },
-        routerOrder(){
-            this.routerLogin(()=>{
-                return this.$router.navigateTo({
-                    name:'my-order',
-                    params:{
-                        select:0
-                    }
-                });
-            })
-
-        },
-
-        triggerRecharge(){
-            return this.$router.navigateTo({
-               name:'recharge'
-            });
-        },
-
-        triggerRouterPersonal(){
-            return this.$router.navigateTo({
-                name:'personal-user'
-            });
         }
     },
     onShow(){

+ 5 - 0
uni-shop/pages/user/style.scss

@@ -87,6 +87,11 @@ $edit-icon:20upx;
 /* 积分 */
 
 /* 钱包 */
+.user-wallet-record{
+  font-size: 24upx;
+  color: #999;
+  font-weight: 400;
+}
 .user-wallet{
   height: 177upx;
   background-color: #fff;

+ 12 - 6
uni-shop/pages/user/user.vue

@@ -5,7 +5,7 @@
       <view class="user-header" :style="{height:height+'px','padding-top':paddingTop+'px'}">
 
         <view v-if="isLogin" class="screen_all center">
-          <view class="flex user-header-container relative" @click="triggerRouterPersonal">
+          <view class="flex user-header-container relative" @click="routerTarget('personal-user')">
             <v-image class="user-header-avatar overflow" :src="user.avatar"></v-image>
             <view class="absolute user-header-edit center">
               <image src="/static/images/edit.png" class="user-header-edit-icon"></image>
@@ -24,18 +24,24 @@
           <view class="absolute user-integral-container row aCenter">
             <image src="/static/images/gold.png" class="user-integral-gold"></image>
             <view class="flex-all-1">积分返现</view>
-            <view @click.stop="routerIntegral" class="user-integral-button center">去查看</view>
+            <view @click.stop="routerTarget('integral')" class="user-integral-button center">去查看</view>
           </view>
         </view>
       </view>
       <!--   账户余额   -->
       <view class="user-wallet flex">
-        <view class="user-wallet-header jCenter">我的钱包</view>
+        <view class="user-wallet-header row aCenter">
+          <view class="flex-all-1">我的钱包</view>
+          <view @click="routerTarget('consumption-record')" class="row aCenter user-order-more">
+            <view>余额记录</view>
+            <text class=".user-order-more-icon iconfont iconfont-more"></text>
+          </view>
+        </view>
         <view class="flex-all-1 row aCenter">
-          <view>账户余额:</view>
+          <view class="row aCenter">账户余额:</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 @click="triggerRecharge" class="user-wallet-button center">立即充值</view>
+          <view @click="routerTarget('recharge')" class="user-wallet-button center">立即充值</view>
         </view>
       </view>
 
@@ -43,7 +49,7 @@
       <view class="user-order flex">
         <view class="user-wallet-header user-order-header row aCenter">
           <view class="flex-all-1">我的订单</view>
-          <view @click="routerOrder" class="row aCenter user-order-more">
+          <view @click="routerTarget('my-order')" class="row aCenter user-order-more">
             <view>全部订单</view>
             <text class=".user-order-more-icon iconfont iconfont-more"></text>
           </view>

+ 29 - 22
uni-shop/pages/withdrawal/withdrawal.vue

@@ -31,6 +31,7 @@ import vHeader from '@/components/v-header/main.vue';
 import user from '@/mixins/user';
 import toast from '@/utils/tool/toast';
 import globalMixins from '@/mixins/global';
+import modal from '@/utils/tool/modal';
 export default {
   name: "withdrawal",
   mixins:[globalMixins,user],
@@ -85,30 +86,36 @@ export default {
     triggerSubmit(){
 
       if (this.cashStatus) return null;
-
-      if (!this.price) return toast.info('请输入提现金额');
-      else if (this.price <= 0) return  toast.info('金额必须大于零');
-      else if (this.price > this.user.profit) toast.info('超出提现金额');
-
       let price = parseFloat(this.price);
-      return  this.$request({
-        url:'user/profitWithdraw',
-        token:true,
-        data:{
-          money: price
-        },
-        loading:'处理中',
-        message:1,
-        failMessage:true,
-        next:({status})=> this.cashStatus = status
-      }).then((data)=>{
-        if (data.isSuccess) {
-          this.updateUserInfo({
-            profit: (parseFloat(this.user.profit) - price).toFixed(2)
+      if (!price) return toast.info('请输入提现金额');
+      else if (price <= 0) return  toast.info('金额必须大于零');
+      else if (this.user.withdrawLimit && price < parseFloat(this.user.withdrawLimit)) return  toast.info('最少提现'+this.user.withdrawLimit+'元');
+      else if (price > parseFloat(this.user.profit)) return toast.info('超出提现金额');
+
+      modal.confirm({
+        title:'提现确认',
+        content:'是否执行提现操作',
+        confirm:()=>{
+          return  this.$request({
+            url:'user/profitWithdraw',
+            token:true,
+            data:{
+              money: price
+            },
+            loading:'处理中',
+            message:1,
+            failMessage:true,
+            next:({status})=> this.cashStatus = status
+          }).then((data)=>{
+            if (data.isSuccess) {
+              this.updateUserInfo({
+                profit: (parseFloat(this.user.profit) - price).toFixed(2)
+              });
+              this.beforePrice = '';
+              this.$store.dispatch('updateUserInfoPromise',true);
+              this.price = '';
+            }
           });
-          this.beforePrice = '';
-          this.$store.dispatch('updateUserInfoPromise',true);
-          this.price = '';
         }
       });
 

+ 1 - 1
uni-shop/store/index.js

@@ -3,7 +3,7 @@ import Vuex from 'vuex'
 
 import modules from './modules/index';
 
-Vue.use(Vuex)
+Vue.use(Vuex);
 
 const store = new Vuex.Store({
 	modules

+ 3 - 1
uni-shop/store/modules/index.js

@@ -1,7 +1,9 @@
 import config from "./config";
 import user from './user';
+import car from "./car";
 
 export default {
     config,
-    user
+    user,
+    car
 }

+ 2 - 0
uni-shop/store/modules/user.js

@@ -2,6 +2,7 @@
 import storage from '../../utils/tool/storage';
 import user from '../../user/index';
 import $request from '@/utils/request/index';
+import car from '@/utils/controls/car';
 
 export default {
     state: {
@@ -51,6 +52,7 @@ export default {
             user.user = {};
             user.beforeTime = 0;
             user.login = 0;
+            car.setCartNumber(0);
             return storage.removeItem(user.config.storage);
         }
     },

+ 39 - 3
uni-shop/utils/controls/order.js

@@ -17,6 +17,10 @@ export default {
 			fail:true,
 			status:6,  // 发起成功之后的状态
 		},
+		'distribution':{
+			title:'配送计划',
+			main:true,
+		},
 		'comment':{
 			title:'评价',
 			main:true,
@@ -62,7 +66,8 @@ export default {
 		// 待发货
 		'2':{
 			label:'待发货',
-			icon:'deliver'
+			icon:'deliver',
+			buttonGroup:['aftermarket']
 		},
 		// 待收货
 		'3':{
@@ -70,6 +75,12 @@ export default {
 			buttonGroup:['confirm'],
 			icon:'receiving'
 		},
+		// 周期购待收货
+		'a3':{
+			label:'待收货',
+			icon:'receiving',
+			buttonGroup:['distribution']
+		},
 		// 待评价
 		'4':{
 			label:'待评价',
@@ -98,10 +109,9 @@ export default {
 		}
 	},
 
-	createOrderDefaultStatus(item){
+	createOrderNumberDefaultStatus(item){
 		let status = parseInt(item.status);
 
-
 		if (item.have_paid) {
 			status = 2;
 		}
@@ -121,6 +131,32 @@ export default {
 		return status;
 	},
 
+	createOrderDefaultStatus(item){
+		let status = parseInt(item.status);
+
+		if (item.have_paid) {
+			status = 2;
+		}
+
+		if (item.have_delivered) {
+			if (item.is_datebuy) {
+				status = 'a3';
+			} else {
+				status = 3;
+			}
+		}
+
+		if (item.have_received) {
+			status = 4;
+		}
+
+		if (item.have_commented) {
+			status = 5;
+		}
+
+		return status;
+	},
+
 	createdOrderStatus(item){
 
 		let status = this.createOrderDefaultStatus(item);

+ 2 - 2
uni-shop/utils/controls/shop.js

@@ -1,9 +1,9 @@
 import router from '../../router/index';
 export default {
 
-    goShopDetail(item){
+    goShopDetail(item,mode='navigateTo'){
         if (item.id) {
-            return router.navigateTo({
+            return router[mode]({
                 name:'product',
                 params:{
                     id: item.id,

+ 1 - 0
uni-shop/utils/request/instructions/plugins/instructions.js

@@ -54,6 +54,7 @@ exports.default = create_1.default.pushConfig({
             requestData.data = {};
         requestData.data['page'] = requestData.page.page;
         requestData.data['listrow'] = requestData.page.pageSize;
+        requestData.data['pageNum'] = requestData.page.pageSize;
     },
     loading: {
         triggerType: "all",