laosan2382995021@163.com 3 tahun lalu
induk
melakukan
1a7bf3094c
100 mengubah file dengan 3034 tambahan dan 232 penghapusan
  1. 32 0
      uni-shop/components/fill-code/fill-code.vue
  2. 59 0
      uni-shop/components/fill-code/mixins/handle.js
  3. 3 0
      uni-shop/components/fill-code/mixins/index.js
  4. 9 0
      uni-shop/components/fill-code/props.js
  5. 40 0
      uni-shop/components/fill-code/style.scss
  6. 1 1
      uni-shop/components/flat-list/export.js
  7. 1 1
      uni-shop/components/flat-list/mixins/status.js
  8. 1 1
      uni-shop/components/pay-modal/data/button.js
  9. 10 0
      uni-shop/components/pay-modal/mixins/handle.js
  10. 88 0
      uni-shop/components/poster/mixins/handle.js
  11. 3 0
      uni-shop/components/poster/mixins/index.js
  12. 33 0
      uni-shop/components/poster/poster.vue
  13. 8 0
      uni-shop/components/poster/props.js
  14. 21 0
      uni-shop/components/poster/style.scss
  15. 13 2
      uni-shop/components/uni-rate/uni-rate.vue
  16. TEMPAT SAMPAH
      uni-shop/components/upload/images/delete.png
  17. TEMPAT SAMPAH
      uni-shop/components/upload/images/upload.png
  18. 54 0
      uni-shop/components/upload/main.vue
  19. 145 0
      uni-shop/components/upload/mixins/handle.js
  20. 4 0
      uni-shop/components/upload/mixins/index.js
  21. 63 0
      uni-shop/components/upload/props.js
  22. 90 0
      uni-shop/components/upload/style.scss
  23. 74 0
      uni-shop/components/v-select/main.vue
  24. 25 0
      uni-shop/components/v-select/props.js
  25. 12 0
      uni-shop/components/v-select/style.scss
  26. 7 6
      uni-shop/components/v-step/mixins/handle.js
  27. 1 1
      uni-shop/layout/layout-button-group/layout-button-group.vue
  28. 63 15
      uni-shop/layout/layout-button-group/mixins/handle.js
  29. 5 0
      uni-shop/layout/layout-button-group/props.js
  30. 15 13
      uni-shop/layout/layout-commet/main.vue
  31. 5 0
      uni-shop/layout/layout-commet/props.js
  32. 26 4
      uni-shop/layout/layout-coupon/index.vue
  33. 3 20
      uni-shop/layout/layout-coupon/props.js
  34. 3 4
      uni-shop/layout/layout-order/layout-order.vue
  35. 3 7
      uni-shop/layout/layout-order/mixins/handle.js
  36. 5 0
      uni-shop/layout/layout-order/props.js
  37. 3 0
      uni-shop/layout/layout-order/style.scss
  38. 12 0
      uni-shop/layout/layout-refund-order/data/data.js
  39. 73 0
      uni-shop/layout/layout-refund-order/layout-refund-order.vue
  40. 75 0
      uni-shop/layout/layout-refund-order/mixins/handle.js
  41. 4 0
      uni-shop/layout/layout-refund-order/mixins/index.js
  42. 1 0
      uni-shop/layout/layout-refund-order/style.scss
  43. 4 2
      uni-shop/layout/layout-shop-item/main.vue
  44. 5 0
      uni-shop/layout/layout-shop-item/props.js
  45. 7 1
      uni-shop/layout/layout-shop-item/style.scss
  46. 9 1
      uni-shop/layout/layout-ui-shop-item/main.vue
  47. 5 0
      uni-shop/layout/layout-ui-shop-item/props.js
  48. 45 0
      uni-shop/mixins/authorize.js
  49. 9 24
      uni-shop/mixins/pay.js
  50. 96 0
      uni-shop/mixins/submit.js
  51. 85 0
      uni-shop/mixins/time.js
  52. 6 0
      uni-shop/mixins/trigger/function.js
  53. 4 1
      uni-shop/mixins/trigger/index.js
  54. 9 0
      uni-shop/mixins/user.js
  55. 48 0
      uni-shop/pages.json
  56. 78 0
      uni-shop/pages/apply-after/apply-after.vue
  57. 46 0
      uni-shop/pages/apply-after/data/input.js
  58. 124 0
      uni-shop/pages/apply-after/mixins/handle.js
  59. 5 0
      uni-shop/pages/apply-after/mixins/index.js
  60. 96 0
      uni-shop/pages/apply-after/style.scss
  61. 33 26
      uni-shop/pages/cart/cart.vue
  62. 143 19
      uni-shop/pages/cart/mixins/handle.js
  63. 3 1
      uni-shop/pages/cart/mixins/index.js
  64. 13 1
      uni-shop/pages/cart/style.scss
  65. 4 2
      uni-shop/pages/comment-detail/comment-detail.vue
  66. 6 5
      uni-shop/pages/comment-detail/mixins/handle.js
  67. 1 0
      uni-shop/pages/comment/comment.vue
  68. 6 5
      uni-shop/pages/confirm-order/mixins/handle.js
  69. 21 4
      uni-shop/pages/confirm-order/mixins/pay.js
  70. 21 15
      uni-shop/pages/distribution/mixins/handle.js
  71. 13 0
      uni-shop/pages/feedback/data/input.js
  72. 55 0
      uni-shop/pages/feedback/feedback.vue
  73. 67 0
      uni-shop/pages/feedback/mixins/handle.js
  74. 5 0
      uni-shop/pages/feedback/mixins/index.js
  75. 49 0
      uni-shop/pages/feedback/style.scss
  76. 26 3
      uni-shop/pages/index/index.vue
  77. 13 4
      uni-shop/pages/integral/integral.vue
  78. 42 6
      uni-shop/pages/my-order/mixins/updated.js
  79. 1 1
      uni-shop/pages/my-order/my-order.vue
  80. 22 0
      uni-shop/pages/order-comment/data/input.js
  81. 92 0
      uni-shop/pages/order-comment/mixins/handle.js
  82. 5 0
      uni-shop/pages/order-comment/mixins/index.js
  83. 70 0
      uni-shop/pages/order-comment/order-comment.vue
  84. 65 0
      uni-shop/pages/order-comment/style.scss
  85. 6 2
      uni-shop/pages/order-detail/data/cost.js
  86. 4 2
      uni-shop/pages/order-detail/data/order.js
  87. 48 5
      uni-shop/pages/order-detail/mixins/handle.js
  88. 2 1
      uni-shop/pages/order-detail/mixins/index.js
  89. 14 4
      uni-shop/pages/order-detail/mixins/status.js
  90. 49 0
      uni-shop/pages/order-detail/mixins/update.js
  91. 44 19
      uni-shop/pages/order-detail/order-detail.vue
  92. 38 0
      uni-shop/pages/order-detail/style.scss
  93. 25 0
      uni-shop/pages/personal-user/data/data.js
  94. 100 0
      uni-shop/pages/personal-user/mixins/handle.js
  95. 4 0
      uni-shop/pages/personal-user/mixins/index.js
  96. 63 0
      uni-shop/pages/personal-user/personal-user.vue
  97. 75 0
      uni-shop/pages/personal-user/style.scss
  98. 2 1
      uni-shop/pages/product/data/product-share.js
  99. 5 1
      uni-shop/pages/product/mixins/buy.js
  100. 5 1
      uni-shop/pages/product/mixins/handle.js

+ 32 - 0
uni-shop/components/fill-code/fill-code.vue

@@ -0,0 +1,32 @@
+<template>
+  <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-input-container">
+          <input v-model="content" type="text" class="screen_all fill-code-input" maxlength="8" placeholder="请输入邀请码" />
+        </view>
+        <view @click="submit" class="fill-code-button center">确定</view>
+      </view>
+    </view>
+  </modal>
+
+</template>
+
+<script>
+import modal from "@/components/modal/main";
+import mixins from './mixins';
+import props from "./props";
+export default {
+name: "fill-code",
+  mixins,
+  props,
+  components:{
+    modal
+  }
+}
+</script>
+
+<style lang="scss" src="./style.scss">
+
+</style>

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

@@ -0,0 +1,59 @@
+import test from '@/utils/test';
+export default {
+    data(){
+        return {
+            vValue:false,
+            content:''
+        }
+    },
+
+    watch:{
+        value(){
+            this.changeValue(this.value);
+        }
+    },
+
+    methods:{
+        changeValue(value){
+            if (this.vValue !== value) {
+                this.vValue = value;
+                if (this.value !== value) {
+                    return this.$emit('input',value);
+                }
+            }
+        },
+        closeModal(){
+            if (this.vValue) {
+                return this.changeValue(false);
+            }
+        },
+
+        submit(){
+            if(this.loadingStatus) return;
+
+            test.verificationPromise({
+                key:'invite_no',
+                value: this.content,
+                rules:'请输入邀请码',
+            },true).then((data)=>{
+
+                return this.$request({
+                    url:'user/bindUser',
+                    data,
+                    loading:'绑定中',
+                    token:true,
+                    message:true,
+                    failMessage:true,
+                    next:({status})=> this.loadingStatus = status
+                }).then((data)=>{
+                    if (data.isSuccess) {
+                        this.closeModal();
+                    }
+                })
+
+            });
+
+        }
+
+    },
+}

+ 3 - 0
uni-shop/components/fill-code/mixins/index.js

@@ -0,0 +1,3 @@
+import handle from "./handle";
+
+export default [handle];

+ 9 - 0
uni-shop/components/fill-code/props.js

@@ -0,0 +1,9 @@
+export default {
+
+
+    value:{
+        type:Boolean,
+        default:false
+    }
+
+}

+ 40 - 0
uni-shop/components/fill-code/style.scss

@@ -0,0 +1,40 @@
+.fill-code{
+  width: 600upx;
+  height: 320upx;
+  border-radius: 10upx;
+  background-color: #fff;
+}
+
+.fill-code-title{
+  font-size: 32upx;
+  color: #333;
+  line-height: 40upx;
+}
+
+.fill-code-input-container{
+  box-shadow: 0 2upx 6upx 0 rgba(153, 153, 153, 0.3);
+  background-color: #e1e1e1;
+  border-radius: 10upx;
+  width: 390upx;
+  height: 78upx;
+  margin-top: 30upx;
+  padding: 0 30upx;
+}
+
+.fill-code-input{
+  text-align: center;
+  font-size: 44upx;
+  color: #666;
+}
+
+.fill-code-button{
+  margin-top: 45upx;
+  background-color: #41AE3C;
+  width: 317upx;
+  height: 70upx;
+  border-radius: 35upx;
+  font-size: 28upx;
+  color: #fff;
+  font-family: Source Han Sans CN;
+  line-height: 34upx;
+}

+ 1 - 1
uni-shop/components/flat-list/export.js

@@ -58,8 +58,8 @@ export default {
                 if (data.data.length <= 0 && this.__base_flat_ref) {
                     this.__base_flat_ref.setStatusApi(true);
                 }
-
                 data.data.map((item,index)=>{
+
                     this.base_flat_keys_unique[item[this.base_flat_key]] = index;
                     if (this.base_flat_keys_collect) {
                         if (!this.base_flat_keys) this.base_flat_keys = {};

+ 1 - 1
uni-shop/components/flat-list/mixins/status.js

@@ -65,7 +65,7 @@ export default {
             }  else if ( state === 2 || state === 3) {
                 this.page = 1;
             } else if (state ===4){
-                this.setPageApi(this.page + 1);
+                // this.setPageApi(this.page + 1);
             }
 
             this._state = 0;

+ 1 - 1
uni-shop/components/pay-modal/data/button.js

@@ -4,7 +4,7 @@ export default {
         {
             label:'查看订单',
             border:true,
-            trigger:''
+            trigger:'viewOrder'
         },
         {
             label:'返回首页',

+ 10 - 0
uni-shop/components/pay-modal/mixins/handle.js

@@ -13,6 +13,16 @@ export default {
             });
         },
 
+        viewOrder(){
+            return this.$router.redirectTo({
+                name:'my-order'
+            });
+        },
+
+        goHome(){
+            return this.$router.switchTab('index');
+        },
+
         closeModal(){
             if (this.vValue) {
                 this.changeValue(false);

+ 88 - 0
uni-shop/components/poster/mixins/handle.js

@@ -0,0 +1,88 @@
+import $toast from "../../../utils/tool/toast";
+
+export default {
+
+    data(){
+        return {
+            vValue:false,
+            poster:''
+        }
+    },
+
+    methods:{
+        preservation(){
+
+            if (this.preservationStatus) return;
+            this.preservationStatus = true;
+
+            this.getImageInfo().then((path)=>{
+                uni.saveImageToPhotosAlbum({
+                    filePath: path,
+                    success:(res)=> {
+                        this.preservationStatus = false;
+                        return $toast.success('保存成功');
+                    },
+                    fail:(fail)=>{
+                        this.preservationStatus = false;
+                        return $toast.success('保存失败');
+                    }
+                });
+            }).catch(()=>{
+                this.preservationStatus = false;
+                return $toast.success('保存失败');
+            })
+
+        },
+
+        getImageInfo(){
+            return new Promise((resolve, reject)=>{
+
+                if (this.posterPath) {
+                    return resolve(this.posterPath);
+                } else {
+                    uni.getImageInfo({
+                        src: this.poster,
+                        success:(res)=>{
+                            this.posterPath = res.path;
+                            resolve(this.posterPath);
+                        },
+                        fail:(fail)=>{
+                            reject();
+                        }
+                    });
+                }
+
+
+            })
+        },
+
+        open(){
+            if (this.vValue ||  this.loaing) return;
+
+            if (this.poster) {
+                this.vValue = true;
+            } else {
+                this.$request({
+                    url:'index/getInviteImg',
+                    token:true,
+                    failMessage:true,
+                    next:({status})=> this.loaing = status,
+                    loading:'加载中',
+                    cache:true
+                }).then((data)=>{
+                    this.poster = data.data;
+                    this.vValue = true;
+                    this.getImageInfo();
+                });
+            }
+        },
+
+        close(){
+            if (this.vValue) {
+                this.vValue = false;
+            }
+        }
+
+    }
+
+}

+ 3 - 0
uni-shop/components/poster/mixins/index.js

@@ -0,0 +1,3 @@
+import handle from "./handle";
+
+export default [handle];

+ 33 - 0
uni-shop/components/poster/poster.vue

@@ -0,0 +1,33 @@
+<template>
+  <modal v-model="vValue">
+    <view class="screen_all center" @click="close">
+      <view @click.stop class="center overflow">
+        <view class="poster-image overflow" @longtap="preservation">
+          <v-image class="poster-image overflow" :src="poster"></v-image>
+        </view>
+        <view v-if="authorize" class="poster-title">长按保存到相册</view>
+        <button v-else open-type="openSetting" @click="$emit('openSetting')" class="clear-button poster-button center">授权相册</button>
+      </view>
+    </view>
+  </modal>
+</template>
+
+<script>
+import modal from '@/components/modal/main.vue';
+import vImage from '@/components/v-image/main.vue';
+import mixins from './mixins';
+import props from './props';
+export default {
+  name: "poster",
+  mixins,
+  props,
+  components:{
+    modal,
+    vImage
+  }
+}
+</script>
+
+<style lang="scss" src="./style.scss">
+
+</style>

+ 8 - 0
uni-shop/components/poster/props.js

@@ -0,0 +1,8 @@
+export default {
+
+    authorize:{
+        type:Boolean,
+        default:true
+    }
+
+}

+ 21 - 0
uni-shop/components/poster/style.scss

@@ -0,0 +1,21 @@
+.poster-image{
+  width: 630upx;
+  height: 840upx;
+  border-radius: 20upx;
+}
+
+.poster-title{
+  margin-top: 50upx;
+  font-size: 36upx;
+  line-height: 46upx;
+  color: #fff;
+}
+
+.poster-button{
+  width: 250upx !important;
+  height: 70upx !important;
+  margin-top: 50upx;
+  background-color: #41AE3C !important;
+  border-radius: 35upx;
+  color: #fff;
+}

+ 13 - 2
uni-shop/components/uni-rate/uni-rate.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="uni-rate">
+	<view class="uni-rate" :class="['uni-rate-'+type]">
 		<view :key="index" :style="{ marginLeft: margin + 'px' }" @click="_onClick(index)" class="uni-rate__icon" v-for="(star, index) in stars">
       <image class="uni-rate-icon" :src="valueSync>index?checkIcon:icon"></image>
 		</view>
@@ -48,7 +48,11 @@
 				// 是否可点击
 				type: [Boolean, String],
 				default: false
-			}
+			},
+      type:{
+			  type:String,
+        default:'default'
+      },
 		},
 		data() {
 			return {
@@ -93,6 +97,7 @@
 					return;
 				}
 				this.valueSync = index + 1;
+        this.$emit("input", this.valueSync);
 				this.$emit("change", {
 					value: this.valueSync
 				});
@@ -115,6 +120,12 @@
     width: 22upx;
     height: 22upx;
   }
+
+  .uni-rate-comment .uni-rate-icon{
+    width: 30upx;
+    height: 30upx;
+  }
+
   .uni-rate-icon:first-child{
     margin-left: 0 !important;
   }

TEMPAT SAMPAH
uni-shop/components/upload/images/delete.png


TEMPAT SAMPAH
uni-shop/components/upload/images/upload.png


+ 54 - 0
uni-shop/components/upload/main.vue

@@ -0,0 +1,54 @@
+<template>
+  <view class="upload-model flex row wrap">
+    <view
+        v-for="(item,index) in uploadData"
+        :key="index"
+        class="upload-item relative"
+        :style="{
+          width:avgWidth+'rpx',
+          height:avgWidth+'rpx',
+          'margin-right':((index + 1)%row===0?0:margin)+'rpx',
+          'margin-top': ((index < row)?0:margin)+'rpx'
+        }"
+    >
+      <image :src="item.src" class="upload-image" mode="aspectFill"></image>
+      <view class="img-close center" >
+        <image @click.stop="deleteImage(index)" mode="aspectFill" :src="require('./images/delete.png')" class="img-close-icon"></image>
+      </view>
+    </view>
+    <view
+        :style="{
+          width:avgWidth+'rpx',
+          height:avgWidth+'rpx',
+          'margin-top': ((uploadLength < row)?0:margin)+'rpx'
+        }"
+        @click="selectImage"
+        v-show="!hidden"
+    >
+      <view v-if="!custom" class="select-image upload-item upload-view flex center">
+        <image :src="require('./images/upload.png')" class="select-upload"></image>
+        <text class="select-title">添加图片</text>
+        <text class="select-number">(最多{{max}}张)</text>
+      </view>
+      <slot v-else>
+
+      </slot>
+
+    </view>
+
+  </view>
+
+</template>
+
+<script>
+import props from "./props";
+import mixins from './mixins';
+export default {
+  props,
+  mixins
+}
+</script>
+
+<style scoped lang="scss" src="./style.scss">
+
+</style>

+ 145 - 0
uni-shop/components/upload/mixins/handle.js

@@ -0,0 +1,145 @@
+import toast from "../../../utils/tool/toast";
+
+export default {
+
+    data(){
+        return {
+
+            /*
+            * 	status 1 上传中 2 上传成功 4上传失败
+            * 	url  上传后的路径
+            *   src  展示的路径
+            *   type 类型后缀
+            *   other 其他参数配置
+            * */
+            uploadData:[],
+
+            uploadLength:0,
+
+            avgWidth: 0,
+
+            hidden:false
+
+        }
+    },
+
+
+    methods:{
+
+        updateUpdateLength(){
+            let length = this.uploadData && this.uploadData.length || 0;
+            if (length !== this.uploadLength) {
+                this.uploadLength = length;
+            }
+        },
+
+        /* 计算宽度 */
+        countAvgWidth:function () {
+            this.avgWidth = !this.size ? ((this.width - (this.padding * 2)) - (this.row - 1 ) * this.margin) / this.row : this.size;
+        },
+
+        createdData:function (data) {
+
+
+            this.uploadData = data.map((item)=>{
+
+                if (typeof item === 'string') {
+                    item ={url:item,src:item,is_del:true};
+                } else {
+                    item ={url:item.url,src:item.url,is_del:item.is_del};
+                }
+
+                return {
+                    status: 2,
+                    ...item
+                };
+
+            });
+
+            if (this.uploadData.length > 0) {
+                this.uploadData.push(...this.uploadData);
+            }
+
+            this.hidden = this.uploadData.length >= this.max;
+
+            return this.changeData();
+        },
+
+        // 选择图片
+        selectImage:function () {
+
+            return uni.chooseImage({
+
+                count: this.max - this.uploadData.length,
+                sizeType:'compressed',
+                success: (e)=> {
+
+                    // 执行处理文件
+                    let status = false;
+                    let i = 0;
+                    let count = this.uploadData.length;
+                    e.tempFiles.map((item)=>{
+
+                        let type = item.path.substr(item.path.lastIndexOf('.') + 1);
+
+                        if (this.fileType.indexOf(type) < 0) {
+                            status = true;
+                        } else {
+
+                            this.uploadData[count+i] = {
+                                src: item.path,
+                                url:'',
+                                status:1,
+                                size: item.size,
+                                type
+                            };
+
+                            count++;
+                        }
+
+                    });
+                    this.hidden = count >= this.max;
+
+                    if (status) {
+                        if (e.tempFiles.length <= 1) {
+                            return toast.fail('图片格式有误');
+                        } else {
+                            toast.fail('部分图片格式有误');
+                        }
+
+                    }
+
+
+                    return this.changeData();
+
+                }
+
+            });
+
+        },
+
+        // 删除一个被选中的文件
+        deleteImage:function(index){
+            if (this.uploadData[index]) {
+                this.uploadData.splice(index,1);
+
+                this.hidden = this.uploadData.length >= this.max;
+
+                return this.changeData();
+            }
+        },
+
+        // change的时候触发
+        changeData(){
+            this.updateUpdateLength();
+            return this.$emit('input',this.uploadData.map((item)=> item.src));
+        }
+
+    },
+
+    mounted(){
+        this.countAvgWidth();
+        return this.createdData(this.value);
+    }
+
+}

+ 4 - 0
uni-shop/components/upload/mixins/index.js

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

+ 63 - 0
uni-shop/components/upload/props.js

@@ -0,0 +1,63 @@
+export default {
+
+	/* 预设置 */
+	value:{
+		type: Array,
+		default:[]
+	},
+
+	/* 最多上传多少张图片 */
+	max:{
+		type: Number,
+		default: 3
+	},
+
+	/* 是否自定义上传tab */
+	custom:{
+		type: Boolean,
+		default: false
+	},
+
+	/* 一行个数 */
+	row:{
+		type: Number,
+		default: 4
+	},
+
+	width:{
+		type: Number,
+		default: 750
+	},
+
+	padding:{
+		type: Number,
+		default: 30
+	},
+
+	// 自定义size
+	size:{
+		type:Number,
+		default:0
+	},
+
+	/* 间距 */
+	margin:{
+		type:Number,
+		default: 15
+	},
+
+	/* fileType */
+	fileType:{
+		type: Array,
+		default:['jpeg','png','jpg']
+	},
+
+	/* 监听上传完成 多久轮询检查一次 默认一秒 检查五次 */
+	poll:{
+		type: Number,
+		default: 200
+	}
+
+
+
+}

+ 90 - 0
uni-shop/components/upload/style.scss

@@ -0,0 +1,90 @@
+
+
+.upload-screen{
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+}
+.upload-item,.select-image {
+    border-radius: 8upx;
+    overflow: hidden;
+}
+.wrap{
+    flex-wrap: wrap;
+}
+.select-image{
+    //background-color: #f5f5f5;
+    background-color: #fff;
+    border: 1upx dotted #BFBFBF;
+}
+.flex{
+    display: flex;
+    flex-direction: column;
+}
+.row{
+    flex-direction: row;
+}
+.jCenter,.center{
+    justify-content: center;
+}
+.aCenter,.center{
+    align-items: center;
+}
+.select-title{
+    color: #BFBFBF;
+    line-height: 30upx;
+    font-size: 24upx;
+}
+.upload-image{
+    width: 100%;
+    height: 100%;
+}
+.relative{
+    position: relative;
+}
+.img-screen{
+    position: absolute;
+    top: 0;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    background-color: rgba(0,0,0,0.5);
+}
+.img-screen-text{
+    color: #fff;
+    font-size: 28upx;
+}
+.select-number{
+    font-size: 20upx;
+    color: #BFBFBF;
+}
+
+.select-upload{
+    width: 60upx;
+    height: 48upx;
+    margin-bottom: 12upx;
+}
+.img-close{
+    position: absolute;
+    right: 0;
+    bottom: 0;
+    width: 56upx;
+    height: 56upx;
+    background-color: rgba(51, 51, 51, 0.55);
+    border-radius: 8upx 0 8upx 0;
+
+}
+.img-close-icon{
+    width: 36upx;
+    height: 36upx;
+}
+.upload-view{
+    width: 100%;
+    height: 100%;
+}
+.iconfont-upload-icon{
+    font-size: 60upx;
+    color: #DCDAE1;
+    margin-bottom: 6upx;
+}

+ 74 - 0
uni-shop/components/v-select/main.vue

@@ -0,0 +1,74 @@
+<template>
+  <modal v-model="vValue">
+    <view class="screen_all center" @click="closeModal">
+      <view class="select-modal" @click.stop>
+        <view class="select-modal-item row aCenter"
+          v-for="(item,index) in data"
+          :key="index"
+              @click="triggerSelect(index)"
+        >
+          <view class="flex-all-1">
+            <view class="line-1">{{item.label}}</view>
+          </view>
+          <v-radio disabled :value="select===index" color="#fff" borderColor="#7A7A7A" activeBorderColor="#41AE3C" activeColor="#41AE3C"></v-radio>
+        </view>
+      </view>
+    </view>
+  </modal>
+</template>
+
+<script>
+import modal from '@/components/modal/main';
+import vRadio from '@/components/v-radio/main';
+import props from './props';
+export default {
+
+  data(){
+    return {
+      vValue:false
+    }
+  },
+
+  watch:{
+    value(){
+      this.changeValue(this.value);
+    }
+  },
+
+  methods:{
+    changeValue(value){
+      if (this.vValue !== value) {
+        this.vValue = value;
+        if (this.value !== value) {
+          return this.$emit('input',value);
+        }
+      }
+    },
+    closeModal(){
+      if (this.vValue) {
+        return this.changeValue(false);
+      }
+    },
+    triggerSelect(index){
+      this.closeModal();
+      if (this.select !== index) {
+        return this.$emit('change',{
+          index,
+          item: this.data[index]
+        })
+      }
+
+    }
+  },
+
+  props,
+  components:{
+    modal,
+    vRadio
+  }
+}
+</script>
+
+<style scoped src="./style.scss" lang="scss">
+
+</style>

+ 25 - 0
uni-shop/components/v-select/props.js

@@ -0,0 +1,25 @@
+export default {
+
+    data:{
+        type:Array,
+        default:[
+            {
+                label:'我要退款'
+            },
+            {
+                label: '我要退款退货'
+            }
+        ]
+    },
+
+    value:{
+        type:Boolean,
+        default:0
+    },
+
+    select:{
+        type:[Number,String],
+        default:0
+    }
+
+}

+ 12 - 0
uni-shop/components/v-select/style.scss

@@ -0,0 +1,12 @@
+.select-modal{
+  background-color: #fff;
+  width: 580upx;
+  border-radius: 10upx;
+  padding: 0 40upx;
+}
+
+.select-modal-item{
+  height: 90upx;
+  font-size: 30upx;
+  color: #333;
+}

+ 7 - 6
uni-shop/components/v-step/mixins/handle.js

@@ -109,20 +109,21 @@ export default {
 
     mounted(){
         if (this.throttle) {
-            this.throttle = throttle({
+            this.createThrottle = new throttle({
                 handle: this.changeEvent,
-                target: this,
-                time: this.throttle
+                call: this,
+                delay: this.throttle,
+                first:false
             });
-            this.changeEvent = this.throttle.supper;
+            this.changeEvent = this.createThrottle.supper;
         }
 
         return this.setValue(this.value,true);
     },
 
     beforeDestroy(){
-        this.throttle && this.throttle.destroy();
-        this.throttle = null;
+        this.createThrottle && this.createThrottle.destroy();
+        this.createThrottle = null;
     }
 
 }

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

@@ -5,7 +5,7 @@
         :class="[buttonGroupData[item].main?'button-main':'']"
         v-for="(item,index) in buttonGroup"
         :key="index"
-        @click="pressButton(item)"
+        @click.stop="pressButton(item)"
     >{{buttonGroupData[item].title}}</view>
   </view>
 </template>

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

@@ -4,6 +4,8 @@ import modal from "../../../utils/tool/modal";
 import request from "../../../utils/request";
 import toast from "../../../utils/tool/toast";
 
+import notice from '@/utils/notice/index';
+
 export default {
 
     data(){
@@ -22,30 +24,68 @@ export default {
             }
         },
 
+        /* 确认收货 */
+        confirm(item){
+            modal.confirm({
+                title:'确认收货',
+                content:'是否确认收货?',
+                confirm:()=>{
+                    return request({
+                        url:'order/changeOrderStatus',
+                        data:{
+                            order_id: this.item.id,
+                            status:3
+                        },
+                        message:this.toast ? true : 2,
+                        next:({status})=>{
+                            this.buttonStatus = status;
+                        },
+                        token:true,
+                        loading:'取消中',
+                        failMessage:true
+                    }).then((data)=>{
+                        if (data.isSuccess) {
+                            return this.emitParentStatus('confirm',item,data.msg);
+                        }
+                    });
+                }
+            })
+        },
+
         /* 点击评价 */
         comment:function(){
-            // 设置商品数据
-            config.storageOrder = this.data.item || [];
-            // 跳转到售后页面
+
+            // 跳转到评价页面
             return this.$router.navigateTo({
-                url:'comment',
+                name:'order-comment',
                 params:{
-                    id: this.data.item.order_id,
-                    type: this.data.type
+                  id:this.item.id,
+                  index: this.index,
+                  page:this.page
+                },
+                memoryParams:{
+                    data: this.item.productList,
+                    item: this.item
                 }
             });
         },
 
         /* 点击售后触发 */
         aftermarket:function(item){
-            // 设置商品数据
-            config.storageOrder = this.data.item || [];
-            // 跳转到售后页面
-            return router.navigateTo({
-                url:'customer',
+
+            // 跳转到评价页面
+            return this.$router.navigateTo({
+                name:'apply-after',
                 params:{
-                    id: this.data.item.order_id,
-                    type: this.data.type
+                    id:this.item.id,
+                    index: this.index,
+                    page:this.page,
+                    price: this.item.order_price,
+                    status: order.createOrderDefaultStatus(this.item)
+                },
+                memoryParams:{
+                    item: this.item,
+                    name: (this.item.productList || []).map((item)=> item.title).join(',')
                 }
             });
         },
@@ -69,9 +109,12 @@ export default {
                         },
                         token:true,
                         loading:'取消中',
-                        fail:true
+                        failMessage:true
                     }).then((data)=>{
                         if (data.isSuccess) {
+                            notice.trigger('user',{
+                                update:true
+                            });
                             return this.emitParentStatus('cancel',item,data.msg);
                         }
                     });
@@ -90,7 +133,7 @@ export default {
                 },
                 token: true,
                 message:1,
-                fail:true,
+                failMessage:true,
                 next:({status})=>{
                     this.buttonStatus = status;
                 },
@@ -98,6 +141,9 @@ export default {
             }).then((data)=>{
 
                 if (data.isSuccess) {
+                    notice.trigger('user',{
+                        update:true
+                    });
                     return this.emitParentStatus('pay',item,data.msg);
                 } else {
                     return this.$emit('openPayModal',{
@@ -112,6 +158,8 @@ export default {
         // 触发响应事件
         emitParentStatus:function (name,item,msg) {
 
+            notice.trigger('order',order.createdUpdateObj(name,this.item,this.index,msg));
+
             return this.$emit('changeStatus',order.createdUpdateObj(name,this.item,this.index,msg));
 
         },

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

@@ -35,6 +35,11 @@ export default {
 		default:''
 	},
 
+	page:{
+		type:String,
+		default:''
+	},
+
 	size:{
 		type:String,
 		default:''

+ 15 - 13
uni-shop/layout/layout-commet/main.vue

@@ -1,6 +1,7 @@
 <template>
   <view class="layout-comment-container row"
     :class="['layout-comment-'+size]"
+        @click="triggerGoDetail"
   >
     <image :src="item.user_avatar" class="comment-avatar"></image>
     <view class="flex-all-1 layout-comment-content">
@@ -65,6 +66,20 @@ export default {
 
   methods:{
 
+    triggerGoDetail(){
+      if (this.goDetail) {
+        return this.$router.navigateTo({
+          name:'comment-detail',
+          params:{
+            id: this.item.id
+          },
+          memoryParams:{
+            item:this.item
+          }
+        });
+      }
+    },
+
     setVItem(item){
       if (item) {
         if (item.is_tutop && item.tutop<=0) {
@@ -107,19 +122,6 @@ export default {
           token:true
         });
       }
-    },
-
-    goDetail(){
-      if (this.item.id) {
-        return this.$router.navigateTo({
-          name:'product',
-          params:{
-            id:this.item.id,
-            title:this.item.title
-          }
-        })
-      }
-
     }
   },
 

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

@@ -17,6 +17,11 @@ export default {
         default:false
     },
 
+    goDetail:{
+        type:Boolean,
+        default:false
+    },
+
     rate:{
         type:Boolean,
         default: true

+ 26 - 4
uni-shop/layout/layout-coupon/index.vue

@@ -4,19 +4,41 @@
     <!--  优惠券内容部分  -->
     <view class="absolute layout-coupon-content row aCenter">
       <view class="center price-group row">
-        <text><text>¥</text><text class="price-int">10</text></text>
+        <text><text>¥</text><text class="price-int">{{price}}</text></text>
       </view>
       <view class="flex-1 center">
-        <view class="line-1 layout-coupon-message">新人优惠券满88元可用</view>
-        <view class="coupon-button center">立即领取</view>
+        <view class="line-1 layout-coupon-message">{{item.title}}</view>
+        <view class="coupon-button center" @click="$emit('receive')">立即领取</view>
       </view>
     </view>
   </view>
 </template>
 
 <script>
+import props from './props';
 export default {
-  name: "layout-coupon"
+  name: "layout-coupon",
+  computed:{
+    price(){
+      if (this.item.value) {
+
+        let price = parseFloat(this.item.value);
+
+        let intPrice = Math.floor(this.item.value);
+
+        if (price === intPrice) {
+          return  intPrice;
+        } else {
+          return  price;
+        }
+
+      } else {
+        return 0;
+      }
+    },
+
+  },
+  props
 }
 </script>
 

+ 3 - 20
uni-shop/layout/layout-coupon/props.js

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

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

@@ -19,16 +19,14 @@
           <view class="row aCenter order-title-model">
             <view class="flex-all-1 row aCenter">
               <image src="/static/images/shop.png" class="order-shop-icon"></image>
-              <view class="line-1 order-title-container">镇江鑫天鸿粮油店</view>
+              <view class="line-1 order-title-container">{{item.shopName}}</view>
               <text class="iconfont iconfont-more order-more"></text>
             </view>
             <text class="order-info">{{item.statusOrder.label}}</text>
-            <!--        <view class="flex-all-1 order-title">订单编号:{{item.id}}</view>-->
-            <!--          <text class="order-sub-title">{{item.status_name}}</text>-->
           </view>
           <layout-ui-shop-item
               bindrouter="goOrderDetail"
-              v-for="(cItem,cIndex) in item.shops"
+              v-for="(cItem,cIndex) in item.productList"
               :key="cIndex"
               :item="cItem"
               :number="false"
@@ -41,6 +39,7 @@
                 @openPayModal="openPayModal"
                 :item="item"
                 :index="index"
+                :page="page"
                 :type="type"
             ></layout-button-group>
           </view>

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

@@ -11,19 +11,15 @@ export default {
                     status: this.status
                 },
                 page: obj,
-                token:true,
-                cache:true
+                token:true
             }).then((data)=>{
                 return obj.success((data.data || []).map((item)=>{
 
-                    item.shops = [
-                        {
-                            ...item
-                        }
-                    ];
+                    item.productList = item.productList || [];
 
                     item.statusOrder = order.getOrderStatus(order.createdOrderStatus(item));
 
+
                     return item;
 
                 }));

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

@@ -20,6 +20,11 @@ export default {
 	type:{
 		type: String,
 		default:''
+	},
+
+	page:{
+		type:String,
+		default:''
 	}
 
 }

+ 3 - 0
uni-shop/layout/layout-order/style.scss

@@ -1,6 +1,9 @@
 .order_screen_padding{
   padding:0 30upx;
 }
+.order-item:last-of-type{
+  margin-bottom: 30upx;
+}
 .order-item{
   font-size: 24upx;
   border-radius: 20upx;

+ 12 - 0
uni-shop/layout/layout-refund-order/data/data.js

@@ -0,0 +1,12 @@
+export default {
+
+    'apply':{
+        url:'order/getCanbeRefound',
+        buttonGroup:['aftermarket'],
+    },
+
+    'application':{
+        url:'order/getOrderRefundList'
+    }
+
+}

+ 73 - 0
uni-shop/layout/layout-refund-order/layout-refund-order.vue

@@ -0,0 +1,73 @@
+<template>
+  <view class="screen_all flex">
+    <FlatList
+        @changeData="flatChangeData"
+        @fetch="fetch"
+        :ref="base_flat_id"
+        :emptyText="emptyText"
+        background="transparent"
+    >
+      <!-- 订单 -->
+      <view class="order_screen_padding">
+        <view
+            class="order-item"
+            v-for="(item,index) in base_flat_data.data"
+            :key="index"
+            v-if="!base_flat_remove[item.id]"
+            @click="goOrderDetail(item)"
+        >
+          <view class="row aCenter order-title-model">
+            <view class="flex-all-1 row aCenter">
+              <image src="/static/images/shop.png" class="order-shop-icon"></image>
+              <view class="line-1 order-title-container">{{item.shopName}}</view>
+              <text class="iconfont iconfont-more order-more"></text>
+            </view>
+          </view>
+          <layout-ui-shop-item
+              bindrouter="goOrderDetail"
+              v-for="(cItem,cIndex) in item.productList"
+              :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"-->
+            <layout-button-group
+                :buttonGroup="item.statusOrder.buttonGroup"
+                @changeStatus="changeStatus"
+                @openPayModal="openPayModal"
+                :item="item"
+                :index="index"
+                :page="page"
+                :type="type"
+            ></layout-button-group>
+          </view>
+
+        </view>
+      </view>
+    </FlatList>
+  </view>
+
+</template>
+
+<script>
+import FlatList from '@/components/flat-list/src/main.vue';
+import layoutButtonGroup from '../layout-button-group/layout-button-group';
+import layoutUiShopItem from '../layout-ui-shop-item/main';
+import mixins from './mixins';
+import props from "../layout-order/props";
+export default {
+  name: "layout-order",
+  mixins,
+  props,
+  components:{
+    FlatList,
+    layoutButtonGroup,
+    layoutUiShopItem
+  }
+}
+</script>
+
+<style scoped lang="scss" src="./style.scss">
+
+</style>

+ 75 - 0
uni-shop/layout/layout-refund-order/mixins/handle.js

@@ -0,0 +1,75 @@
+import order from '@/utils/controls/order';
+import typeData from '../data/data';
+export default {
+
+    computed:{
+      typeConfig(){
+          return typeData[this.type] || {}
+      }
+    },
+
+    methods:{
+
+        fetch:function (obj) {
+
+            return this.$request({
+                url:this.typeConfig.url,
+                page: obj,
+                token:true
+            }).then((data)=>{
+                return obj.success((data.data || []).map((item)=>{
+
+                    item.productList = item.productList || [];
+
+                    item.statusOrder = order.getOrderStatus(order.createdOrderStatus(item));
+
+                    item.statusOrder.buttonGroup = this.typeConfig.buttonGroup;
+
+                    return item;
+
+                }));
+            }).catch(obj.fail);
+
+        },
+
+        /* 跳转到订单详情 */
+        goOrderDetail:function (item) {
+
+            if (item.id) {
+                return this.$router.navigateTo({
+                    name: 'order-detail',
+                    params:{
+                        id: item.id
+                    },
+                    memoryParams:{
+                        item:item
+                    }
+                });
+            }
+
+        },
+
+        /* 修改状态 */
+        changeStatus:function (e) {
+
+            // 触发更新规则
+            return this.$emit('changeStatus',e);
+        },
+
+        openPayModal(e){
+            // 触发更新规则
+            return this.$emit('openPayModal',e);
+        },
+
+    },
+
+    mounted(){
+
+        this.$emit('use-target',{
+            target: this,
+            index: this.index,
+            type: this.type
+        });
+    }
+
+}

+ 4 - 0
uni-shop/layout/layout-refund-order/mixins/index.js

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

+ 1 - 0
uni-shop/layout/layout-refund-order/style.scss

@@ -0,0 +1 @@
+@import "../layout-order/style";

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

@@ -1,5 +1,5 @@
 <template>
-  <view class="shop-item row">
+  <view class="shop-item row" :class="['layout-shop-item-'+type]">
     <view class="layout-shop-image relative">
       <image src="/static/images/shop-background.png" class="layout-shop-background relative"></image>
       <view class="absolute row aCenter shop-logo-warp">
@@ -16,7 +16,9 @@
       <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>
-        <v-step @input="input" @change="change" v-model="number" color="#666666" textColor="#666" v-if="numberEdit" type="shop"></v-step>
+        <view v-if="numberEdit" @click.stop>
+          <v-step @input="input" @change="change" :throttle="300" v-model="number" color="#666666" textColor="#666"  type="shop"></v-step>
+        </view>
         <text v-else class="row aCenter shop-close-container">
           <text class="iconfont-close iconfont shop-close"></text>
           <text>{{item.number}}</text>

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

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

+ 7 - 1
uni-shop/layout/layout-shop-item/style.scss

@@ -71,4 +71,10 @@ $shop-size:150upx;
   position: relative;
   top: 1upx;
 }
-/* 商品内容 */
+/* 商品内容 */
+
+/* 购物车特殊配置 */
+.layout-shop-item-car .shop-price-group{
+  color: #FE4545;
+}
+/* 购物车特殊配置 */

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

@@ -1,5 +1,5 @@
 <template>
-  <view class="shop-item row">
+  <view class="shop-item row" @click="triggerGoDetail">
     <view class="layout-shop-image relative overflow">
       <v-image  :src="item.image" class="screen_all"></v-image>
     </view>
@@ -23,6 +23,7 @@
 import vImage from '@/components/v-image/main.vue';
 import { mapState } from 'vuex';
 import props from './props';
+import shop from '@/utils/controls/shop';
 export default {
   name: "layout-ui-shop-item",
   computed:{
@@ -31,6 +32,13 @@ export default {
   props,
   components:{
     vImage
+  },
+  methods:{
+    triggerGoDetail(){
+      if (this.goDetail) {
+        return shop.goShopDetail(this.item);
+      }
+    }
   }
 }
 </script>

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

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

+ 45 - 0
uni-shop/mixins/authorize.js

@@ -0,0 +1,45 @@
+import $toast from "../utils/tool/toast";
+
+export default {
+    data:function () {
+        return {
+            authorize:false, // 用户是否授权
+        }
+    },
+
+    methods:{
+        openSetting(){
+            this.buttonAuthorize = true;
+        },
+
+        openPoster(){
+            this.$refs.poster && this.$refs.poster.open();
+        }
+    },
+
+    onShow(){
+
+        if (this.buttonAuthorize) {
+
+            this.buttonAuthorize = false;
+            // 获取授权
+            uni.authorize({
+                scope:'scope.writePhotosAlbum',
+                success: (res) =>{
+                    this.authorize= true;
+                },
+                fail:() => {
+                    this.authorize= false;
+                }
+            });
+
+        }
+
+    },
+
+    created(){
+
+        this.buttonAuthorize = true;
+
+    }
+}

+ 9 - 24
uni-shop/mixins/pay.js

@@ -7,35 +7,20 @@ export default {
 		* 		 confirmOrder
 		*
 		* */
-		pay:function (data,callbak,msg = false) {
-			// appId: {0: "wx7879e2c6e0c74131"}
-			// nonceStr: "aoIwXFswwfeQepbrRFliuoNHlyOgUoFS"
-			// package: "prepay_id=wx181423132587811ade44e10a7505d60000"
-			// paySign: "1DDF580EED0D81B2F8D1053EA27B8954"
-			// signType: "MD5"
-			// timeStamp: "1616048593"
-
-
-			data.jsConfig = data.jsConfig || {};
-
-			// if (msg) {
-			// 	toast.success('支付成功');
-			// }
-			//
-			// return callbak(true);
-
-			return wx.requestPayment({
-				'timeStamp': data.jsConfig.timeStamp,
-				'nonceStr': data.jsConfig.nonceStr,
-				'package': data.jsConfig.package,
-				'signType': data.jsConfig.signType,
-				'paySign': data.jsConfig.paySign,
+		wxPay:function (data,callback,msg = false) {
+
+			return uni.requestPayment({
+				'timeStamp': data.timeStamp,
+				'nonceStr': data.nonceStr,
+				'package': data.package,
+				'signType': data.signType,
+				'paySign': data.paySign,
 				'complete': (res)=>{
 					let status = res.errMsg === 'requestPayment:ok';
 					if (msg && !status) {
 						toast.info('支付取消');
 					}
-					return callbak(status);
+					return callback && callback(status);
 				},
 				'success':(res) => {
 					if (msg) {

+ 96 - 0
uni-shop/mixins/submit.js

@@ -0,0 +1,96 @@
+import toast from '@/utils/tool/toast/index';
+export default {
+
+    methods:{
+
+        openSubmitLoading(value){
+            this.submitStatus = true;
+            clearTimeout(this.submitTimeUse);
+            this.submitTimeUse = setTimeout(()=>{
+                toast.loading(value || '提交中');
+            },300);
+        },
+
+        closeSubmitLoading(value,type='fail'){
+            this.submitStatus = false;
+            clearTimeout(this.submitTimeUse);
+            toast.hideLoading();
+            value && toast[type](value);
+        },
+
+        // 上传所有图片
+        uploadImageAll(imageKeys){
+            let uploadImages = [];
+            for (let key in imageKeys) {
+                if (imageKeys.hasOwnProperty(key)) {
+                    if (typeof imageKeys[key] ==='string') { // @ts-ignore
+                        imageKeys[key] = [imageKeys[key]];
+                    }
+                    uploadImages.push(...imageKeys[key].map((item)=> this.uploadImage(item,key)));
+                }
+            }
+
+            return new Promise(function (resolve,reject){
+
+                Promise.all(uploadImages).then((data)=>{
+                    let imageKeyObject = {};
+                    data.map((item)=>{
+                        if (imageKeyObject[item.key] === undefined) {
+                            imageKeyObject[item.key] = [item.value];
+                        } else {
+                            imageKeyObject[item.key].push(item.value);
+                        }
+                    });
+
+                    for (let key in imageKeyObject) {
+                        if (imageKeyObject.hasOwnProperty(key)) {
+                            // @ts-ignore
+                            imageKeyObject[key] = imageKeyObject[key].join(',');
+                        }
+                    }
+
+                    resolve(imageKeyObject);
+
+                }).catch(reject);
+            });
+        },
+
+        uploadImage(url,key){
+
+            return new Promise((resolve,reject)=>{
+
+                if (this.imageCache[url]) return resolve({
+                    value:this.imageCache[url],
+                    key
+                });
+
+                this.$request({
+                    url:'common/upload',
+                    filePath:url,
+                    name:'file',
+                    token:true
+                }).then((data)=>{
+                    if (data.isSuccess) {
+                        // 获取路径
+                        let path = data.data.url;
+                        // 植入缓存
+                        this.imageCache[url] = path;
+                        resolve({
+                            value:path,
+                            key
+                        });
+                    } else {
+                        reject();
+                    }
+                }).catch(reject);
+
+            });
+
+        },
+    },
+
+    created(){
+        this.imageCache = {};
+    }
+
+}

+ 85 - 0
uni-shop/mixins/time.js

@@ -0,0 +1,85 @@
+import verification from '@/utils/test';
+
+export default {
+
+    data(){
+        return {
+            timeConfig:{
+                default:'获取验证码',
+                format:'还剩',
+                afterFormat:'s',
+                time:60
+            },
+            timeFormat:''
+        }
+    },
+
+    methods:{
+
+        // 获取验证码
+        triggerTimeDate(item,data){
+
+            if (this.timeFormat) return;
+
+            let resultData = undefined;
+            for (let i=0,count=data.length;i<count;i++) {
+                    if (item.code === data[i].key) {
+                        resultData = {
+                        ...data[i]
+                    };
+                    break;
+                }
+            }
+
+            if (resultData) {
+                resultData.key = 'mobile';
+                verification.verificationPromise(resultData,true).then((data)=>{
+                    data.type = item.codeType;
+                    this.$request({
+                        url:'login/send_sms',
+                        data,
+                        message:2,
+                        failMessage:true
+                    }).catch(()=>{
+                        // 如果发生错误触发
+                        this.endTimeDate = 0
+                    });
+
+                    return this.triggerTimeType();
+                });
+
+            }
+
+        },
+
+        // 触发倒计时
+        triggerTimeType(){
+            clearTimeout(this._time_format);
+
+            if (this.endTimeDate === undefined) {
+                this.endTimeDate = this.getTimeDate() + this.timeConfig.time;
+            }
+
+            let diff = this.endTimeDate - this.getTimeDate();
+
+            if (diff <= 0) {
+                this.timeFormat = '';
+                this.endTimeDate = undefined;
+            } else {
+                this.timeFormat = this.timeConfig.format + diff + this.timeConfig.afterFormat;
+
+                this._time_format = setTimeout(()=> this.triggerTimeType(),1000);
+            }
+
+        },
+
+        // 获取时间
+        getTimeDate(){
+            return Math.ceil(new Date().getTime() / 1000);
+        }
+
+    },
+    beforeUnmount() {
+        clearTimeout(this._time_format);
+    }
+}

+ 6 - 0
uni-shop/mixins/trigger/function.js

@@ -0,0 +1,6 @@
+export default {
+    trigger: function (item, wx, data) {
+
+        return wx[item.trigger](data);
+    }
+}

+ 4 - 1
uni-shop/mixins/trigger/index.js

@@ -2,6 +2,8 @@ import user from '../../user/index';
 
 import router from './router';
 
+import targetFunction from './function';
+
 export default {
     methods:{
         trigger: function (item,login=false) {
@@ -28,7 +30,8 @@ export default {
     },
     created(){
         this.triggers = {
-            router
+            router,
+            function:targetFunction
         }
     }
 }

+ 9 - 0
uni-shop/mixins/user.js

@@ -8,6 +8,15 @@ export default {
             user:(state)=> state.user.user,
             isLogin:(state)=> !!state.user.user.token
         }),
+    },
+
+    methods:{
+        updateUserInfo(user){
+            this.$store.commit('setUserInfo',{
+                ...this.user,
+                ...user
+            });
+        }
     }
 
 }

+ 48 - 0
uni-shop/pages.json

@@ -59,6 +59,54 @@
 			}
 		},
 		{
+			"path": "pages/refund/refund",
+			"style": {
+				"navigationBarTitleText": "退款/售后"
+			}
+		},
+		{
+			"path": "pages/apply-after/apply-after",
+			"style": {
+				"navigationBarTitleText": "申请售后"
+			}
+		},
+		{
+			"path": "pages/personal-user/personal-user",
+			"style": {
+				"navigationBarTitleText": "我的信息"
+			}
+		},
+		{
+			"path": "pages/order-comment/order-comment",
+			"style": {
+				"navigationBarTitleText": "发布评价"
+			}
+		},
+		{
+			"path": "pages/update-mobile/update-mobile",
+			"style": {
+				"navigationBarTitleText": "修改手机号"
+			}
+		},
+		{
+			"path": "pages/recharge-record/recharge-record",
+			"style": {
+				"navigationBarTitleText": "充值记录"
+			}
+		},
+		{
+			"path": "pages/withdrawal-record/withdrawal-record",
+			"style": {
+				"navigationBarTitleText": "提现记录"
+			}
+		},
+		{
+			"path": "pages/feedback/feedback",
+			"style": {
+				"navigationBarTitleText": "意见反馈"
+			}
+		},
+		{
 			"path": "pages/recharge/recharge",
 			"style": {
 				"navigationBarTitleText": "会员充值"

+ 78 - 0
uni-shop/pages/apply-after/apply-after.vue

@@ -0,0 +1,78 @@
+<template>
+  <v-header title="申请售后" backgroundColor="#fff">
+
+    <view class="screen_all flex">
+      <view class="flex-all-1 overflow apply-after-container">
+        <scroll-view class="screen_all" scroll-y>
+          <view class="apply-after-screen">
+            <view class="apply-after-header apply-after-modal">
+              <view class="apply-after-header-item row aCenter"
+                v-for="(item,index) in inputData"
+                :key="index"
+                    @click="openSelectModal(item)"
+              >
+                <view class="flex-all-1">{{item.label}}</view>
+                <view class="line-1 apply-after-header-value">{{item.data[item.value] ? item.data[item.value].label : ''}}</view>
+                <text class="iconfont iconfont-more apply-after-header-more"></text>
+              </view>
+            </view>
+
+            <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="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="line-1">{{item.name}}</view>
+                </view>
+              </view>
+              <view class="apply-after-footer-title">{{introduce.target || ''}}说明:</view>
+              <view class="apply-after-textarea">
+                <textarea class="screen_all" v-model="textarea" maxlength="300" :placeholder="'请说明'+(introduce.targetLabel || introduce.target || '')+'原因'"></textarea>
+              </view>
+              <view class="apply-after-footer-title">相关图片:</view>
+              <view class="apply-after-upload-wrap">
+                <upload custom :max="5" :row="4" :padding="60"  v-model="images">
+                  <view class="screen_all center apply-after-upload relative">
+                    <text class="iconfont iconfont-puls apply-after-upload-puls"></text>
+                    <view class="center absolute apply-after-upload-number">{{images.length}}/5</view>
+                  </view>
+                </upload>
+              </view>
+            </view>
+          </view>
+        </scroll-view>
+      </view>
+      <view class="apply-after-button-wrap">
+        <view @click="submit" class="apply-after-button center">提交申请</view>
+      </view>
+    </view>
+
+    <v-select v-model="select" :data="useSelectItem.data" @change="changeSelect" :select="useSelectItem.value"></v-select>
+
+  </v-header>
+</template>
+
+<script>
+import mixins from './mixins';
+import vHeader from '@/components/v-header/main';
+import vSelect from '@/components/v-select/main';
+import upload from '@/components/upload/main';
+export default {
+  name: "apply-after",
+  mixins,
+  components:{
+    vHeader,
+    vSelect,
+    upload
+  }
+}
+</script>
+
+<style src="./style.scss" lang="scss">
+
+</style>

+ 46 - 0
uni-shop/pages/apply-after/data/input.js

@@ -0,0 +1,46 @@
+export default function (status=0) {
+    return [
+        {
+            label:'货物状态',
+            value:status>=2 ? 1: 0,
+            key:'receiving_status',
+            data:[
+                {
+                    label:'未收到',
+                    value:0
+                },
+                {
+                    label:'已收到',
+                    value:1
+                }
+            ]
+        },
+        {
+            label: '服务类型',
+            value:status>=2 ? 1 : 0,
+            key:'service_type',
+            data:[
+                {
+                    label:'我要退款(无需退货)',
+                    target:'退款',
+                    value:0,
+                    key:'refund_explain'
+                },
+                {
+                    label: '我要退货退款',
+                    target:'退款',
+                    targetLabel:'退货退款',
+                    value:1,
+                    key:'refund_explain'
+                },
+                {
+                    label: '换货',
+                    target:'换货',
+                    value:2,
+                    key:'reason_type'
+                }
+            ]
+        }
+    ]
+
+}

+ 124 - 0
uni-shop/pages/apply-after/mixins/handle.js

@@ -0,0 +1,124 @@
+import inputData from '../data/input';
+import test from '@/utils/test';
+import order from "../../../utils/controls/order";
+import notice from '@/utils/notice/index';
+export default {
+
+    data(){
+        return {
+            inputData:[],
+            useSelectItem:{},
+            select:false,
+            images:[],
+            textarea:'',
+            item:{
+                price:'0.00',
+                name:''
+            }
+        }
+    },
+
+    computed:{
+      introduce(){
+        let item = this.inputData[1] || {};
+
+        let data = item.data || [];
+
+        return data[item.value] || {};
+      }
+    },
+
+    methods:{
+
+        openSelectModal(item){
+            this.useSelectItem = item;
+            if (!this.select) {
+                this.select = true;
+            }
+        },
+
+        changeSelect(item){
+            this.useSelectItem.value = item.index;
+        },
+
+        submit(){
+
+            if (this.submitStatus) return ;
+
+            let inputData = [
+                ...this.inputData,
+                {
+                    value: this.textarea,
+                    key:'content',
+                    rules:'请说明原因'
+                },
+                {
+                    value: this.images,
+                    key:'images',
+                    rules: '请上传相关图片'
+                }
+            ];
+
+            return test.verificationPromise(inputData,true).then((data)=>{
+
+                this.openSubmitLoading('申请中');
+
+                this.uploadImageAll({
+                    images:data.images
+                }).then((resultData)=>{
+                    data = {
+                        ...data,
+                        ...resultData
+                    }
+
+                    data[this.introduce.key] = data.content;
+
+                    delete data.content;
+
+                    this.submitTarget(data);
+                }).catch(()=>{
+                    this.closeSubmitLoading('图片上传失败');
+                })
+
+            });
+
+        },
+
+        submitTarget(data){
+
+            this.$request({
+                url:'order/addRefund',
+                data:{
+                    ...data,
+                    order_id: this.$params.id
+                },
+                token:true,
+                message:2,
+                failMessage:true
+            }).then((data)=>{
+                this.closeSubmitLoading();
+                if (data.isSuccess) {
+
+                    notice.trigger('user',{
+                        update:true
+                    });
+
+                    notice.trigger('order',order.createdUpdateObj('aftermarket',this.$memoryParams.item,this.$params.index,data.msg,this.$params.page));
+
+                    return this.$router.navigateBack();
+                }
+            }).catch(()=>{
+                this.closeSubmitLoading();
+            });
+        }
+    },
+
+    onLoad(){
+        this.item = {
+            price: this.$params.price,
+            name: this.$memoryParams.name
+        }
+        this.inputData = inputData(parseInt(this.$params.status) || 0);
+    }
+
+}

+ 5 - 0
uni-shop/pages/apply-after/mixins/index.js

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

+ 96 - 0
uni-shop/pages/apply-after/style.scss

@@ -0,0 +1,96 @@
+/* 容器 */
+.apply-after-container{
+  background-color: #f6f6f6;
+}
+/* 容器 */
+
+/* 内容 */
+.apply-after-screen{
+  padding: 30upx;
+}
+.apply-after-modal{
+  background-color: #fff;
+  border-radius: 10upx;
+  font-size: 30upx;
+  line-height: 34upx;
+  color: #0C0C0C;
+}
+.apply-after-header{
+  padding: 0 30upx;
+}
+.apply-after-header-item{
+  height: 90upx;
+  border-top: 1upx solid #EEEEEE;
+}
+.apply-after-header-more{
+  font-size: 30upx;
+  color: #999999;
+  margin-left: 10upx;
+}
+.apply-after-header-item:first-child{
+  border-top: none;
+}
+/* 内容 */
+
+/* 底部 */
+.apply-after-footer{
+  margin-top: 30upx;
+  padding: 30upx;
+}
+.apply-after-footer-title,.apply-after-textarea{
+  margin-bottom: 30upx;
+}
+.apply-after-footer-label{
+  margin-right: 30upx;
+}
+.apply-after-textarea{
+  background-color: #FAFAFA;
+  border: 1upx dotted #c1c1c1;
+  height: 200upx;
+  border-radius: 10upx;
+  margin-top: 2upx;
+  padding: 20upx 25upx;
+}
+.apply-after-textarea textarea{
+  font-size: 24upx;
+  line-height: 30upx;
+  color: #333;
+}
+.apply-after-textarea textarea::placeholder{
+  color: #999;
+}
+.apply-after-upload{
+  border: 1upx dotted #c1c1c1;
+  background-color: #F5F5F5;
+  border-radius: 10upx;
+}
+.apply-after-upload-number{
+  font-size: 20upx;
+  color: #999;
+  font-family: Source Han Sans CN;
+  bottom: -40upx;
+  left: 0;
+  right: 0;
+}
+.apply-after-upload-puls{
+  color: #aaa;
+  font-size: 55upx;
+  line-height: 60upx;
+}
+.apply-after-upload-wrap{
+  margin-bottom: 45upx;
+}
+/* 底部 */
+
+/* 按钮 */
+.apply-after-button-wrap{
+  padding: 30upx;
+}
+.apply-after-button{
+  height: 80upx;
+  background-color: #41AE3C;
+  font-size: 28upx;
+  color: #fff;
+  border-radius: 40upx;
+}
+/* 按钮 */

+ 33 - 26
uni-shop/pages/cart/cart.vue

@@ -1,6 +1,6 @@
 <template>
   <v-header title="购物车" mode="">
-    <view class="screen_all flex">
+    <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">
@@ -11,47 +11,54 @@
           <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>
+          <flat-list
+            background="transparent"
+            @changeData="flatChangeData"
+            @fetch="fetch"
+            :ref="base_flat_id"
+          >
+            <view class="car-padding">
+              <view class="car-shop row aCenter"
+                    v-for="(item,index) in base_flat_data.data"
+                    :key="index"
+                    @click.stop="triggerSelect(item)"
+                    v-if="!base_flat_remove[item.id]"
+              >
+                <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
+                      type="car"
+                      @input="triggerInput"
+                      @change="triggerChange"
+                  ></layout-shop-item>
+                </view>
               </view>
             </view>
-          </view>
+          </flat-list>
+
 
         </view>
       </view>
       <view class="car-footer row aCenter">
-        <view class="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>
         </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 class="car-footer-price">¥{{total}}</view>
         </view>
-        <view v-if="edit" class="car-footer-button center">删除</view>
-        <view v-else class="car-footer-button center">结算</view>
+        <view v-if="edit" class="car-footer-button center" @click="deleteCheckShop">删除</view>
+        <view v-else class="car-footer-button center" @click="triggerOrder">结算</view>
 
       </view>
     </view>
+    <view class="screen_all center" v-else>
+      <view @click="routerLogin" class="cart-button center">授权登录</view>
+    </view>
   </v-header>
 </template>
 

+ 143 - 19
uni-shop/pages/cart/mixins/handle.js

@@ -1,25 +1,13 @@
+import notice from "@/utils/notice/index";
+
+import toast from '@/utils/tool/toast';
+
 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:[]
         }
@@ -27,12 +15,56 @@ export default {
 
     computed:{
       allSelect(){
-          return this.data.length === this.selectArray.length;
+          return this.base_flat_data.data.length === this.selectArray.length;
+      },
+      total(){
+          let price = 0;
+          this.selectArray.map((item)=>{
+
+              let index = this.flatIdGETIndex(item);
+              if (index !== undefined) {
+                  item = this.flatGetData(index);
+                  if (item) {
+                      price += item.sales_price * item.number;
+                  }
+
+              }
+          });
+
+          return price.toFixed(2);
       }
     },
 
     methods:{
 
+        fetch(obj){
+            return this.$request({
+                url:'product/getCartList',
+                token:true,
+                page:obj
+            }).then((data)=>{
+                obj.success(data.data);
+                return this.installSelectObject();
+            }).catch(obj.fail);
+        },
+
+        // 设置安装
+        installSelectObject(){
+            let selectObject = {};
+            this.selectArray.map((item)=>{
+                if (this.flatIdGETIndex(item) !== undefined) {
+                    selectObject[item] = 1;
+                }
+            });
+
+            let selectArray = Object.keys(selectObject);
+            if (selectArray !== this.selectArray) {
+                this.selectArray = selectArray;
+                this.selectObject = selectObject;
+            }
+
+        },
+
         triggerEdit(){
 
             if (this.loadingStatus) return null;
@@ -43,8 +75,10 @@ export default {
 
         triggerSelect(item){
 
+            if (this.loadingStatus) return ;
+
             if (this.selectObject[item.id] === undefined) {
-                this.$set(this.selectObject,item.id,item);
+                this.$set(this.selectObject,item.id,1);
             } else {
                 this.$set(this.selectObject,item.id,undefined);
                 delete this.selectObject[item.id];
@@ -56,10 +90,100 @@ export default {
 
         triggerInput(item){
 
-            console.log(item);
+           let index = this.flatIdGETIndex(item.item.id);
+
+            item.item.number = item.value;
+
+            this.flatSaveData(index,item.item);
+
+        },
+
+        triggerChange(item){
+            this.$request({
+                url:'product/editCartInfo',
+                data:{
+                    cart_id: item.item.id,
+                    number: item.value
+                },
+                token:true
+            })
+        },
+
+        triggerAllSelect(){
+
+            if (this.allSelect) {
+                this.selectObject = {};
+                this.selectArray = [];
+            } else {
+                this.base_flat_data.data.map((item,index)=>{
+                    this.selectObject[item.id] = 1;
+                });
+                this.selectArray = Object.keys(this.selectObject);
+            }
+
+        },
+
+        deleteCheckShop(){
+
+            if (this.loadingStatus) return ;
+            if (this.selectArray.length <= 0) return toast.info('请选择商品');
+
+            return  this.$request({
+                url:'product/delCart',
+                data:{
+                    cart_ids: this.selectArray.join(',')
+                },
+                token:true,
+                message:true,
+                failMessage:true,
+                next:({status})=> this.loadingStatus = status
+            }).then((data)=>{
+
+                if (data.isSuccess) {
+
+                    this.selectArray.map((item)=>{
+                        this.flatSplice(this.flatIdGETIndex(item));
+                    });
+
+                    this.selectObject = {};
+                    this.selectArray = [];
+                }
+
+            });
+
+        },
+
+        triggerOrder(){
+            if (this.loadingStatus) return ;
+            if (this.selectArray.length <= 0) return toast.info('请选择商品');
+
+            return this.$router.navigateTo({
+                name:'confirm-order',
+                params:{
+                    is_cart:1,
+                    choose_ids: this.selectArray.join(',')
+                }
+            });
+
 
         }
 
+    },
+
+    onShow(){
+        if (this.useNoticeItem && this.useNoticeItem.update) {
+            this.useNoticeItem = undefined;
+            this.selectObject = {};
+            this.selectArray = [];
+            return this.flatReload(1,true);
+        }
+    },
+
+    created(){
+        notice.on('car',(item)=>{
+            console.log(item);
+            this.useNoticeItem = item;
+        },'car');
     }
 
 }

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

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

+ 13 - 1
uni-shop/pages/cart/style.scss

@@ -71,4 +71,16 @@
 .car-footer-radio{
   margin-right: 21upx;
 }
-/* 底部 */
+/* 底部 */
+
+/* 登录 */
+.cart-button{
+  width: 250upx;
+  height:70upx;
+  border-radius: 35upx;
+  background-color: #41AE3C;
+  color: #fff;
+  font-size: 30upx;
+  line-height: 34upx;
+}
+/* 登录 */

+ 4 - 2
uni-shop/pages/comment-detail/comment-detail.vue

@@ -6,16 +6,18 @@
       :ref="base_flat_id"
       @fetch="fetch"
       mode="skeleton"
-      :skeleton="0"
+      :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>
 
       <view class="detail-list">
-        <view class="detail-list-title">评价回复<text>(2)</text></view>
+        <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"

+ 6 - 5
uni-shop/pages/comment-detail/mixins/handle.js

@@ -6,7 +6,8 @@ export default {
     data(){
       return {
           value:'',
-          loading:true
+          loading:true,
+          parentItem:{}
       }
     },
 
@@ -35,6 +36,8 @@ export default {
 
                 this.flatUnshift(resultParams);
 
+                this.parentItem.replay++;
+
                 this.$request({
                     url:'product/addCommondReplay',
                     data:{
@@ -60,7 +63,7 @@ export default {
                 },
                 next:({status})=> this.loading = status,
                 token:true,
-                cache:true
+                page:obj
             }).then((data)=>{
 
                let resultData = data.data || [];
@@ -73,8 +76,6 @@ export default {
                     delete item.content;
                 });
 
-                console.log(resultData);
-
                return obj.success(resultData);
             }).catch(obj.fail);
         },
@@ -83,7 +84,7 @@ export default {
 
     onLoad(){
 
-
+        this.parentItem = this.$memoryParams.item;
 
     }
 

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

@@ -32,6 +32,7 @@
                   :item="item"
                   size="big"
                   control
+                  goDetail
               ></layout-comment>
             </view>
 

+ 6 - 5
uni-shop/pages/confirm-order/mixins/handle.js

@@ -49,10 +49,11 @@ export default {
                 url:'product/getConfirmOrderInfo',
                 data:{
                     is_cart:this.$params.is_cart,
-                    product_id: this.$params.id,
-                    cycle:this.$params.cycle,
-                    per_month:this.$params.per_month,
-                    address_id: this.address && this.address.id
+                    product_id: this.$params.id || '',
+                    cycle:this.$params.cycle || '',
+                    per_month:this.$params.per_month || '',
+                    address_id: this.address && this.address.id || '',
+                    choose_ids: JSON.stringify((this.$params.choose_ids || '').split(','))
                 },
                 loading:this.uploadOrder ? '加载中':undefined,
                 token:true,
@@ -91,7 +92,7 @@ export default {
     },
 
     onLoad(){
-        let count = this.$params.is_cart === '1' ? 2: 1;
+        let count = this.$params.is_cart === '1' ? (this.$params.choose_ids || '').split(',').length: 1;
         let skeletonData = [];
         for (let i=0;i<count;i++) {
             skeletonData.push({

+ 21 - 4
uni-shop/pages/confirm-order/mixins/pay.js

@@ -1,5 +1,6 @@
 // import test from '@/utils/test/index';
 import toast from '@/utils/tool/toast';
+import notice from '@/utils/notice/index';
 export default {
 
     data(){
@@ -70,7 +71,10 @@ export default {
 
           return this.$request({
               url:'order/createOrder',
-              data,
+              data:{
+                  ...data,
+                  cart_id: this.$params.choose_ids ? JSON.stringify((this.$params.choose_ids || '').split(',')) : ''
+              },
               token:true,
               next:({status}) => {
                   this.submitStatus = status;
@@ -78,11 +82,21 @@ export default {
               message:2,
               failMessage:true
           }).then((data)=>{
+              this.closePayLoading();
               if (data.isSuccess) {
                   this.orderNumber = data.data;
+
+                  notice.trigger('user',{
+                      update:true
+                  });
+
+                  if (this.$params.is_cart === '1') {
+                      notice.trigger('car',{
+                          update:true
+                      });
+                  }
+
                   return this.payOrder();
-              } else {
-                  return this.closePayLoading();
               }
           }).catch(()=> this.closePayLoading());
         },
@@ -98,7 +112,10 @@ export default {
               failMessage:true
           }).then((data)=>{
               if (data.isSuccess) {
-                  console.log(data);
+                  notice.trigger('user',{
+                      update:true
+                  });
+                  return  this.openPayModal();
               } else {
                   this.closePayLoading();
                   return  this.openPayModal(data.msg);

+ 21 - 15
uni-shop/pages/distribution/mixins/handle.js

@@ -10,33 +10,39 @@ export default {
 
     methods:{
 
-        installTime(){
-            let data = [];
-            let intCount = parseInt(this.$params.count || 6);
-            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++) {
+        installTime(data){
 
-                let useToTime = parseInt(nowDate.getTime() / 1000);
+            if (data) {
 
-                data.push({
-                    date: DateParse(nowDate,'YYYY-MM-'+afterFormat),
-                    status:nowTime >useToTime
-                });
+            } else {
+                data = [];
+                let intCount = parseInt(this.$params.count || 6);
+                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++) {
 
-                nowDate = DateParse.nextMonth(nowDate,afterFormat);
+                    let useToTime = parseInt(nowDate.getTime() / 1000);
 
+                    data.push({
+                        date: DateParse(nowDate,'YYYY-MM-'+afterFormat),
+                        status:nowTime >useToTime
+                    });
+
+                    nowDate = DateParse.nextMonth(nowDate,afterFormat);
+
+                }
             }
 
+
             this.data = data;
         }
 
     },
 
     onLoad(){
-        this.installTime();
+        this.installTime(this.$memoryParams.data);
     }
 
 }

+ 13 - 0
uni-shop/pages/feedback/data/input.js

@@ -0,0 +1,13 @@
+export default function () {
+    return [
+        {
+            placeholder:'请输入您的意见反馈',
+            rules:'请输入意见反馈',
+            key:'content'
+        },
+        {
+            component:'upload',
+            key:'images'
+        }
+    ]
+}

+ 55 - 0
uni-shop/pages/feedback/feedback.vue

@@ -0,0 +1,55 @@
+<template>
+  <v-header title="意见反馈" scroll backgroundColor="#fff">
+    <view class="feedback-container flex">
+
+      <view
+        v-for="(item,index) in inputData"
+        :key="index"
+      >
+        <v-upload v-model="item.value" v-if="item.component === 'upload'" custom>
+          <view class="screen_all center feedback-upload">
+            <text class="iconfont iconfont-puls feedback-icon"></text>
+          </view>
+        </v-upload>
+        <view v-else class="feedback-textarea">
+          <textarea :placeholder="item.placeholder"
+                    :maxlength="item.maxLength || 400"
+                    v-model="item.value"
+                    placeholder-class="feedback-textarea-placeholder"
+          ></textarea>
+        </view>
+      </view>
+
+      <view class="flex-all-1"></view>
+
+      <view class="feedback-button-wrap center">
+        <view @click="submit" class="feedback-button center">提交</view>
+      </view>
+
+    </view>
+  </v-header>
+</template>
+
+<script>
+import vHeader from '@/components/v-header/main.vue';
+import vUpload from '@/components/upload/main.vue';
+import inputData from './data/input';
+import mixins from './mixins';
+export default {
+  name: "feedback",
+  data(){
+    return {
+      inputData:inputData()
+    }
+  },
+  components:{
+    vHeader,
+    vUpload
+  },
+  mixins
+}
+</script>
+
+<style lang="scss" src="./style.scss">
+
+</style>

+ 67 - 0
uni-shop/pages/feedback/mixins/handle.js

@@ -0,0 +1,67 @@
+import test from '@/utils/test';
+import notice from "@/utils/notice/index";
+export default {
+
+    methods:{
+
+        submit(){
+            if (this.submitStatus) return ;
+            this.routerLogin(()=>{
+                if (this.submitStatus) return null;
+
+                test.verificationPromise(this.inputData,true).then((data)=>{
+
+                    let imageObject = {};
+                    this.inputData.map((item)=>{
+                        if (item.component==='upload' && data[item.key] && data[item.key].length >= 0) {
+                            imageObject[item.key] = data[item.key];
+                        }
+                    });
+
+                    this.openSubmitLoading();
+                    if (Object.keys(imageObject).length > 0 ) {
+                        this.uploadImageAll(imageObject).then((imageData)=>{
+                            data = {
+                                ...data,
+                                ...imageData
+                            }
+                            return this.submitTarget(data);
+                        }).catch(()=> this.closeSubmitLoading('图片上传失败'));
+                    } else {
+                        this.submitTarget(data);
+                    }
+
+                });
+            });
+
+        },
+
+        submitTarget(data){
+
+
+
+            return this.$request({
+                url:'user/feedback',
+                data,
+                token:true,
+                message:2,
+                failMessage:true,
+                loading:'提交中',
+                next:({status})=> this.submitStatus = status
+            }).then((data)=>{
+                if (data.isSuccess) {
+                    notice.trigger('setup',{
+                        toast:data.msg
+                    });
+
+                    this.$router.navigateBack();
+                }
+            })
+
+        }
+
+
+
+    }
+
+}

+ 5 - 0
uni-shop/pages/feedback/mixins/index.js

@@ -0,0 +1,5 @@
+import handle from "./handle";
+import submit from '@/mixins/submit';
+import login from '@/mixins/login';
+
+export default [handle,submit,login];

+ 49 - 0
uni-shop/pages/feedback/style.scss

@@ -0,0 +1,49 @@
+/* 容器 */
+.feedback-container{
+  min-height: 100%;
+  padding: 30upx;
+}
+/* 容器 */
+
+/* 文本域 */
+.feedback-textarea{
+  height: 226upx;
+  background-color: #f6f6f6;
+  border: 1upx solid #EEEEEE;
+  border-radius: 10upx;
+  padding: 25upx 30upx;
+  margin-bottom: 30upx;
+}
+.feedback-textarea textarea {
+  font-size: 30upx;
+  line-height: 40upx;
+  color: #333;
+}
+.feedback-textarea-placeholder{
+  color: #999;
+}
+.feedback-upload{
+  background-color: #F6F6F6;
+  border: 1upx dotted #BBB;
+}
+.feedback-icon{
+  color: #BBBBBB;
+  font-size: 60upx;
+  line-height: 60upx;
+}
+/* 文本域 */
+
+/* 按钮 */
+.feedback-button-wrap{
+  margin: 30upx 0 70upx;
+}
+.feedback-button{
+  width: 615upx;
+  height: 80upx;
+  background-color: #41AE3C;
+  border-radius: 40upx;
+  font-size: 30upx;
+  line-height: 36upx;
+  color:#fff;
+}
+/* 按钮 */

+ 26 - 3
uni-shop/pages/index/index.vue

@@ -20,7 +20,7 @@
 
         <!-- 新人赠送优惠券 -->
         <view v-if="coupon && coupon.id" class="coupon-container center">
-          <layout-coupon></layout-coupon>
+          <layout-coupon :item="coupon" @receive="receiveCoupon"></layout-coupon>
         </view>
         <!-- 新人赠送优惠券 -->
 
@@ -94,12 +94,14 @@ import trigger from '@/mixins/trigger/index';
 
 import shop from '@/utils/controls/shop';
 
+import login from '@/mixins/login';
+
 import {
   mapState
 } from 'vuex';
 export default {
 	components: {uniCountdown,layoutCoupon,vHeader,refreshView,vImage},
-  mixins:[trigger],
+  mixins:[trigger,login],
 	data() {
 		return {
 			titleNViewBackground: '',
@@ -153,6 +155,27 @@ export default {
 
     },
 
+    receiveCoupon(){
+	    if (this.receiveCouponStatus) return;
+	    this.routerLogin(()=>{
+	      this.$request({
+          url:'product/receiveCoupon',
+          data:{
+            coupon_id: this.coupon.id
+          },
+          token:true,
+          message:true,
+          loading:'领取中',
+          next:({status})=> this.receiveCouponStatus = status,
+          failMessage:true
+        }).then((data)=>{
+          if (data.isSuccess) {
+            this.coupon = undefined;
+          }
+        });
+      })
+    },
+
     refresh(stop){
 	    this.refreshStop = stop;
 	    if (this.$refs.header) {
@@ -171,7 +194,7 @@ export default {
     },
 
     setCoupon(data){
-      this.coupon = data.data[0];
+      this.coupon = data.data;
     },
 
     setProduct(data){

+ 13 - 4
uni-shop/pages/integral/integral.vue

@@ -5,7 +5,7 @@
         <view class="integral-header-item row">
           <view class="flex-all-1 flex jCenter">
             <view class="integral-header-title">我的收益</view>
-            <view class="integral-header-price">32.00</view>
+            <view class="integral-header-price">{{user.profit || '0.00'}}</view>
           </view>
           <view @click.stop="routerWith" class="integral-hash row center">
             <image src="/static/images/hash.png" class="integral-hash-icon"></image>
@@ -14,7 +14,7 @@
           </view>
         </view>
         <view class="flex-all-1 integral-content jCenter">
-          我的邀请人数:8
+          我的邀请人数:{{user.inviteCount || 0}}
         </view>
         <image src="/static/images/decorate.png" class="absolute integral-decorate"></image>
       </view>
@@ -28,18 +28,24 @@
       </view>
       <view class="flex-all-1"></view>
       <view class="center">
-        <button open-type="share" class="clear-button integral-button center">分享给好友</button>
+        <view @click="openPoster" class="integral-button center">分享给好友</view>
       </view>
     </view>
+    <poster ref="poster" :authorize="authorize" @openSetting="openSetting"></poster>
   </v-header>
 </template>
 
 <script>
 import vHeader from '@/components/v-header/main.vue';
+import poster from '@/components/poster/poster';
+import authorize from '@/mixins/authorize';
+import user from '@/mixins/user';
 export default {
   name: "integral",
+  mixins:[authorize,user],
   components:{
-    vHeader
+    vHeader,
+    poster
   },
   methods:{
     routerWith(){
@@ -47,6 +53,9 @@ export default {
         name:'withdrawal'
       });
     }
+  },
+  created(){
+    this.$store.dispatch('updateUserInfoPromise',true);
   }
 }
 </script>

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

@@ -1,6 +1,8 @@
 import toast from '../../../utils/tool/toast';
 import order from "../../../utils/controls/order";
 
+import notice from '@/utils/notice/index';
+
 export default {
 
 
@@ -24,10 +26,15 @@ export default {
 						}  else if (target.delete === undefined?item.delete:target.delete) {
 							return this.target[target.name].flatSplice(id);
 						} else {
-							/* 更新状态值 */
-							item.item.statusOrder = order.getOrderStatus(item.toStatus);
-							/* 更新状态值 */
-							return this.target[target.name].flatSaveData(id,item.item);
+
+							if (id) {
+								let useItem = this.target[target.name].flatGetData(id);
+								/* 更新状态值 */
+								useItem.statusOrder = order.getOrderStatus(item.toStatus);
+								/* 更新状态值 */
+								return this.target[target.name].flatSaveData(id,useItem);
+							}
+
 						}
 
 					}
@@ -51,6 +58,15 @@ export default {
 	//
 	// },
 
+	onShow(){
+		if (this.storageMsg) {
+			toast.success(this.storageMsg);
+			this.storageMsg = null;
+		}
+	},
+
+
+
 	created(){
 		/* 更新规则 */
 		this.updateStatus = {
@@ -70,6 +86,16 @@ export default {
 				'received'
 			],
 
+			/* 如果为确认收货触发 */
+			confirm:[
+				'all',
+				{
+					name:'goods',
+					delete:true
+				},
+				'comment'
+			],
+
 			/* 如果为售后进入触发 */
 			aftermarket:['all',{
 				name:'goods',
@@ -82,8 +108,7 @@ export default {
 				{
 					name:'comment',
 					delete:true
-				},
-				'success'
+				}
 			],
 
 			/* 如果为删除 */
@@ -106,6 +131,17 @@ export default {
 			}],
 
 		}
+
+		notice.on('my-order',(item)=>{
+			if(item.page === 'order' && item.msg) {
+				this.storageMsg = item.msg;
+			}
+			return this.changeStatus(item);
+		},'order');
+	},
+
+	beforeDestroy(){
+		return notice.off('my-order','order');
 	}
 
 

+ 1 - 1
uni-shop/pages/my-order/my-order.vue

@@ -16,12 +16,12 @@
             :key="index"
             v-if="loadings[index]"
             :type="item.type"
+            page="order"
             :status="item.status"
             :emptyText="item.emptyText"
             @useTarget="bindTarget"
             :index="index"
             :slot="'tab-'+index"
-            @changeStatus="changeStatus"
             @openPayModal="openPayModal"
         ></layout-order>
       </tab>

+ 22 - 0
uni-shop/pages/order-comment/data/input.js

@@ -0,0 +1,22 @@
+export default function () {
+    return [
+        {
+            label:'描述相符',
+            component:'rate',
+            rules: '请打分',
+            key:'rate'
+        },
+        {
+            placeholder:'宝贝满足你的期待吗?说说你对它的评价,分享给想买的他们吧',
+            rules:'请填写评价',
+            component:'textarea',
+            maxLength:500,
+            key:'comment'
+        },
+        {
+            component: 'upload',
+            max:9,
+            key:'images'
+        }
+    ]
+}

+ 92 - 0
uni-shop/pages/order-comment/mixins/handle.js

@@ -0,0 +1,92 @@
+import inputData from "../data/input";
+import test from '@/utils/test';
+import order from "../../../utils/controls/order";
+import notice from '@/utils/notice/index';
+export default {
+
+    data(){
+        return {
+            inputShopData:[]
+        }
+    },
+
+    methods:{
+        submit(){
+
+            if (this.submitStatus) return;
+
+            this.verificationData().then((data)=>{
+
+                let imageAllPromise = data.map((item,index)=>{
+                    item.product_id = this.inputShopData[index].id;
+                    return this.uploadImageAll({
+                        images:item.images
+                    });
+                });
+
+                this.openSubmitLoading('评价中');
+
+                Promise.all(imageAllPromise).then((imagesData)=>{
+                    imagesData.map((item,index)=>{
+                       data[index] = {
+                           ...data[index],
+                           ...item
+                       };
+                    });
+
+                    return this.submitComment(data);
+                }).catch(()=>{
+                    this.closeSubmitLoading('图片上传错误');
+                });
+
+
+            });
+
+        },
+
+        submitComment(data){
+
+            let resultData = data.map((item)=> this.$request({
+                url:'product/addCommond',
+                data:{
+                    ...item,
+                    order_id: this.$params.id
+                },
+                token:true,
+                failMessage:true
+            }));
+
+            Promise.all(resultData).then((data)=>{
+                this.closeSubmitLoading();
+
+                notice.trigger('user',{
+                    update:true
+                });
+
+                notice.trigger('order',order.createdUpdateObj('comment',this.$memoryParams.item,this.$params.index,'评价成功',this.$params.page));
+
+                return this.$router.navigateBack();
+
+            }).catch(()=>this.closeSubmitLoading());
+
+        },
+
+        verificationData(){
+            return Promise.all(this.inputShopData.map((item)=> test.verificationPromise(item.inputData,true)));
+        },
+
+        install(data){
+
+            this.inputShopData = data.map((item)=>{
+                item.inputData = inputData();
+                return item;
+            });
+
+        }
+    },
+
+    onLoad(){
+        this.install(this.$memoryParams.data || []);
+    }
+
+}

+ 5 - 0
uni-shop/pages/order-comment/mixins/index.js

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

+ 70 - 0
uni-shop/pages/order-comment/order-comment.vue

@@ -0,0 +1,70 @@
+<template>
+  <v-header scroll title="发布评价" backgroundColor="#fff">
+    <view class="order-comment-screen flex">
+      <view
+        v-for="(item,index) in inputShopData"
+        :key="index"
+      >
+        <view class="order-comment-padding order-comment-shop">
+          <layout-ui-shop-item :item="item" :number="true"></layout-ui-shop-item>
+        </view>
+        <view class="order-comment-margin"></view>
+        <view
+            v-for="(cItem,cIndex) in item.inputData"
+            :key="cIndex"
+        >
+          <view v-if="cItem.component==='rate'" class="order-comment-padding order-comment-rate row aCenter">
+            <view class="comment-rate-label">{{cItem.label}}</view>
+            <uni-rate type="comment" :margin="5" v-model="cItem.value"></uni-rate>
+          </view>
+          <view v-else-if="cItem.component === 'textarea'" class="order-comment-padding order-comment-textarea-wrap">
+          <textarea class="order-comment-textarea" placeholder-class="comment-textarea-placeholder"
+                    :placeholder="cItem.placeholder"
+                    v-model="cItem.value"
+                    :maxlength="cItem.maxLength"
+          ></textarea>
+          </view>
+          <view v-else-if="cItem.component==='upload'" class="order-comment-padding">
+            <upload
+                v-model="cItem.value"
+                :max="cItem.max"
+            ></upload>
+          </view>
+
+        </view>
+      </view>
+
+
+      <view class="flex-all-1"></view>
+
+      <view class="center comment-button-group">
+        <view @click="submit" class="comment-button center">发布</view>
+      </view>
+
+    </view>
+  </v-header>
+</template>
+
+<script>
+import vHeader from '@/components/v-header/main';
+import layoutUiShopItem from '@/layout/layout-ui-shop-item/main';
+import uniRate from '@/components/uni-rate/uni-rate';
+import upload from '@/components/upload/main';
+import mixins from './mixins/index';
+export default {
+  name: "order-comment",
+
+  mixins,
+
+  components:{
+    vHeader,
+    layoutUiShopItem,
+    uniRate,
+    upload
+  }
+}
+</script>
+
+<style lang="scss" src="./style.scss">
+
+</style>

+ 65 - 0
uni-shop/pages/order-comment/style.scss

@@ -0,0 +1,65 @@
+/* 容器 */
+.order-comment-screen{
+  min-height: 100%;
+}
+.order-comment-padding{
+  padding: 0 30upx;
+}
+.order-comment-margin{
+  background-color: #F6F6F6;
+  height: 10upx;
+}
+/* 容器 */
+
+/* 商品 */
+.order-comment-shop{
+  padding-bottom: 30upx;
+}
+/* 商品 */
+
+/* 评分 */
+.order-comment-rate{
+  height: 120upx;
+  border-bottom: 1upx solid #eee;
+  font-size: 30upx;
+  line-height: 40upx;
+  color: #333333;
+}
+.comment-rate-label{
+  margin-right:20upx;
+}
+/* 评分 */
+
+/* 文本域 */
+.order-comment-textarea-wrap,.order-comment-textarea{
+  height: 190upx;
+  margin-bottom: 20upx;
+}
+.order-comment-textarea,.comment-textarea-placeholder{
+  font-size: 28upx;
+  line-height: 40upx !important;
+}
+.comment-textarea-placeholder{
+  color: #999;
+}
+.order-comment-textarea{
+  color: #333;
+  width: 100%;
+  padding: 15upx 0;
+}
+/* 文本域 */
+
+/* 按钮 */
+.comment-button-group{
+  margin: 30upx;
+}
+.comment-button{
+  height: 80upx;
+  background-color: #41AE3C;
+  border-radius: 40upx;
+  width: 100%;
+  font-size: 28upx;
+  color: #fff;
+  line-height: 32upx;
+}
+/* 按钮 */

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

@@ -1,8 +1,12 @@
 export default [
     {
-        label:'商品金额'
+        label:'商品金额',
+        key:'order_price',
+        defaultValue:'0.00'
     },
     {
-        label:'运费'
+        label:'运费',
+        key:'delivery_price',
+        defaultValue:'0.00'
     }
 ]

+ 4 - 2
uni-shop/pages/order-detail/data/order.js

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

+ 48 - 5
uni-shop/pages/order-detail/mixins/handle.js

@@ -1,6 +1,11 @@
 import logisticsData from '../data/logistics-status';
 import costData from '../data/cost';
 import orderData from '../data/order';
+import order from "../../../utils/controls/order";
+import dateParse from '@/utils/tool/date';
+import {
+    mapState
+} from 'vuex';
 export default {
 
     data(){
@@ -12,12 +17,19 @@ export default {
             firstLoadingStatus:true,
             payModal:false,
             payModalMessage:'',
-            item:{}
+            item:{},
+            buttonItem:{}
         }
     },
 
+    computed:{
+      ...mapState(['config'])
+    },
+
     methods:{
         fetch(obj){
+            let useUpdateLoading = this.useUpdateLoading;
+            this.useUpdateLoading = false;
             this.loadingStatus = true;
             return this.$request({
                 url:'order/getOrderDetail',
@@ -25,6 +37,7 @@ export default {
                     order_id: this.$params.id
                 },
                 token:true,
+                loading: useUpdateLoading ? '加载中' :false,
                 message:2
             }).then((data)=>{
                 if (data.isSuccess) {
@@ -36,12 +49,36 @@ export default {
             }).catch(obj.fail);
         },
 
-        initOrderDetail(item){
+        triggerRouterDetail(){
+            if (this.loadingStatus) return ;
+          return this.$router.navigateTo({
+              name:'distribution',
+              memoryParams:{
+                  data: this.item.orderDelivery
+              }
+          });
+        },
+
+        initOrderDetail(item = {}){
+
+            this.buttonItem = {
+                ...item.orderInfo,
+                productList: item.productList
+            };
 
-            this.item = {
-                id: this.$params.id
+            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
+                    }
+                });
             }
 
+            this.item = item || {};
+
+            this.setStatus(item.orderInfo || {});
+
         },
 
         openPayModal(item){
@@ -53,7 +90,13 @@ export default {
     },
 
     onLoad(){
-        this.initOrderDetail();
+
+        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));
+        }
+
     }
 }
 

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

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

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

@@ -9,10 +9,20 @@ export default {
         }
     },
 
-    onLoad(){
-        this.statusInfo = order.getOrderStatus(order.createdOrderStatus({
-            status:1
-        }));
+    methods:{
+
+        setStatus(item){
+            this.setTargetStatus(order.createdOrderStatus(item || {}));
+            this.setStatusSpeed(order.createOrderDefaultStatus(item));
+        },
+
+        setStatusSpeed(status){
+            this.statusSpeed = status - 1;
+        },
+
+        setTargetStatus(status){
+            this.statusInfo = order.getOrderStatus(status);
+        }
     }
 
 }

+ 49 - 0
uni-shop/pages/order-detail/mixins/update.js

@@ -0,0 +1,49 @@
+import notice from '@/utils/notice/index';
+import order from "../../../utils/controls/order";
+import toast from "../../../utils/tool/toast";
+export default {
+
+    methods:{
+      changeStatus(item) {
+
+          let target = this.updateStatus[item.name] || {};
+
+          if (item.reload || target.reload) {
+              this.useUpdateLoading = true;
+              return this.$refs.header && this.$refs.header.reload(2,true);
+          }  else if (item.delete) {
+              return this.$router.navigateBack();
+          } else {
+              this.setTargetStatus(item.toStatus);
+          }
+      }
+    },
+
+    onShow(){
+        if (this.storageMsg) {
+            toast.success(this.storageMsg);
+            this.storageMsg = null;
+        }
+    },
+
+    created(){
+
+        this.updateStatus = {
+          'comment':{
+              reload:true
+          }
+        };
+
+        notice.on('order-detail',(item)=>{
+            if(item.page === 'order-detail' && item.msg) {
+                this.storageMsg = item.msg;
+            }
+            this.changeStatus(item);
+        },'order')
+    },
+
+    beforeDestroy(){
+        notice.off('order-detail','order');
+    }
+
+}

+ 44 - 19
uni-shop/pages/order-detail/order-detail.vue

@@ -1,6 +1,7 @@
 <template>
   <v-header backgroundColor="#fff" title="订单详情"
     async
+    ref="header"
     @fetch="fetch"
   >
     <view class="screen_all flex">
@@ -20,10 +21,10 @@
               </view>
               <view class="flex-all-1 overflow">
                 <view class="row aCenter">
-                  <view class="order-address-name line-1">收货人</view>
-                  <view>12345678910</view>
+                  <view class="order-address-name line-1">{{item.addressInfo.name}}</view>
+                  <view>{{item.addressInfo.mobile}}</view>
                 </view>
-                <view class="line-1 order-address-info">山东省 临沂市 河东区 临沂市开发区管委会</view>
+                <view class="line-1 order-address-info">{{item.addressInfo.province_name ||''}}{{item.addressInfo.city_name||''}}{{item.addressInfo.area_name||''}}{{item.addressInfo.address||''}}</view>
               </view>
             </view>
             <!--  物流信息   -->
@@ -48,7 +49,7 @@
                     >
                       <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' }"
+                            :style="{'right':index===statusSpeed && statusSpeed !== 3?'50%':'0' }"
                       >
                         <view></view>
                       </view>
@@ -59,48 +60,67 @@
               </view>
             </view>
             <!--  商品   -->
-            <view class="order-modal order-shop">
+            <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>
+                <view class="line-1 order-title-container">{{config.name}}</view>
                 <text class="iconfont iconfont-more order-more"></text>
               </view>
-              <layout-ui-shop-item number></layout-ui-shop-item>
+              <layout-ui-shop-item number
+                v-for="(item,index) in item.productList"
+                :key="index"
+                :item="item"
+                goDetail
+              ></layout-ui-shop-item>
             </view>
             <!--  配送计划   -->
-            <view class="order-modal order-distribution row aCenter">
+            <view v-if="item.orderDelivery && item.orderDelivery.length>0" @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>
             </view>
             <!--  费用明细   -->
-            <view class="order-modal flex overflow order-cost">
+            <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"
+                    v-for="(cItem,index) in costData"
                     :key="index"
               >
-                <view class="flex-all-1">{{item.label}}</view>
-                <view class="order-cost-value">¥48.00</view>
+                <view class="flex-all-1">{{cItem.label}}</view>
+                <view class="order-cost-value">¥{{item.orderInfo[cItem.key]  || cItem.defaultValue || ''}}</view>
               </view>
               <view class="order-cost-footer row aCenter jEnd flex-all-1">
                 <view>实付款:</view>
-                <view class="order-cost-price">¥48.00</view>
+                <view class="order-cost-price">¥{{item.orderInfo.total_price || '0.00'}}</view>
               </view>
             </view>
             <!--  订单信息   -->
-            <view class="order-modal flex overflow">
+            <view class="order-modal flex overflow"  >
               <view class="order-title">订单信息</view>
               <view class="order-cost-item row aCenter"
-                    v-for="(item,index) in orderData"
+                    v-for="(cItem,index) in orderData"
                     :key="index"
               >
-                <view class="flex-all-1">{{item.label}}</view>
-                <view class="order-cost-value">20181111051523458</view>
+                <view class="flex-all-1">{{cItem.label}}</view>
+                <view class="order-cost-value">{{item.orderInfo[cItem.key] || ''}}</view>
+              </view>
+            </view>
+
+            <!--  我的评价   -->
+            <view class="order-comment" v-if="item.orderComment">
+              <view class="order-comment-title">我的评价</view>
+              <view class="row aCenter order-comment-introduce">
+                <view class="order-comment-introduce-label">描述相符</view>
+                <v-rate type="comment"></v-rate>
+              </view>
+              <view class="order-comment-content">这是一条评价,这是一条评价,这是一条评价,这是一 条评价。</view>
+              <view class="order-comment-comment-group row wrap">
+                <v-image class="order-comment-image"></v-image>
               </view>
             </view>
 
           </view>
+
         </scroll-view>
       </view>
       <view class="order-footer order-modal row aCenter">
@@ -111,9 +131,10 @@
         <view class="flex-all-1 overflow jEnd">
           <layout-button-group
               :buttonGroup="statusInfo.buttonGroup"
-              :item="item"
+              :item="buttonItem"
               size="big"
               type="order-detail"
+              page="order-detail"
               @openPayModal="openPayModal"
           ></layout-button-group>
         </view>
@@ -129,13 +150,17 @@ 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';
+import vRate from '@/components/uni-rate/uni-rate';
+import vImage from '@/components/v-image/main';
 export default {
   name: "order-detail",
   components:{
     vHeader,
     layoutUiShopItem,
     layoutButtonGroup,
-    payModal
+    payModal,
+    vRate,
+    vImage
   },
   mixins
 }

+ 38 - 0
uni-shop/pages/order-detail/style.scss

@@ -199,6 +199,44 @@
 }
 /* 费用明细 */
 
+/* 我的评价 */
+.order-comment{
+  padding: 30upx;
+  background-color: rgba(255,255,255,0.5);
+}
+.order-comment-title{
+  font-size: 30upx;
+  color: #2C2C2C;
+  font-weight: bold;
+}
+.order-comment-introduce-label{
+  margin-right: 30upx;
+}
+.order-comment-introduce{
+  height: 110upx;
+  color: #999;
+  font-size: 28upx;
+  margin: 0 -30upx;
+  padding: 0 30upx;
+  border-bottom: 1upx solid #EEEEEE;
+}
+.order-comment-content{
+  font-size: 28upx;
+  color: #999;
+  line-height: 36upx;
+  margin: 15upx 0;
+}
+.order-comment-image{
+  width: 160upx;
+  height: 160upx;
+  margin-right: 15upx;
+  margin-top: 15upx;
+}
+.order-comment-image:nth-of-type(4n){
+  margin-right: 0;
+}
+/* 我的评价 */
+
 /* 底部 */
 .order-footer{
   height: 100upx;

+ 25 - 0
uni-shop/pages/personal-user/data/data.js

@@ -0,0 +1,25 @@
+export default [
+    {
+        label:'头像',
+        type:'avatar',
+        key:'avatar',
+        trigger:'uploadAvatar'
+    },
+    {
+        label: '姓名',
+        key:'nickname',
+        trigger:'openModal'
+    },
+    {
+        label: '手机号',
+        key:'mobile',
+        type:'number',
+        maxLength:11,
+        rules:{
+          empty:'请输入手机号',
+          mobile:'格式不正确'
+        },
+        placeholder:'未设置手机号',
+        trigger: 'openModal'
+    }
+]

+ 100 - 0
uni-shop/pages/personal-user/mixins/handle.js

@@ -0,0 +1,100 @@
+import test from '@/utils/test';
+
+export default {
+
+    data(){
+      return {
+          modal:false,
+          useItem:{}
+      }
+    },
+
+    methods:{
+        trigger(item){
+            return this[item.trigger] && this[item.trigger](item);
+        },
+
+        updateMobile(){
+            return this.$router.navigateTo({
+                name:'update-mobile'
+            })
+        },
+
+        openModal(item){
+
+            this.useItem = {
+                ...item,
+                value: this.user[item.key],
+                placeholder:'请输入'+item.label,
+                label: '修改'+item.label,
+                rules: item.rules || ''
+            };
+
+            if (!this.modal) {
+                this.modal = true;
+            }
+
+        },
+
+        closeModal(){
+            if (this.modal) {
+                this.modal = false;
+            }
+        },
+
+        triggerSubmit(){
+
+            test.verificationPromise(this.useItem,true).then((data)=>{
+                this.closeModal();
+
+                if(this.user[this.useItem.key] !== data[this.useItem.key]){
+                    this.update(data);
+                }
+
+            });
+
+        },
+
+        // 上传头像
+        uploadAvatar(){
+            if (this.uploadStatus) return;
+            uni.chooseImage({
+                count: 1,
+                sizeType:'compressed',
+                success: (e)=> {
+                    this.$request({
+                        url:'common/upload',
+                        filePath:e.tempFilePaths[0],
+                        name:'file',
+                        token:true,
+                        loading:'更换中',
+                        message:2,
+                        failMessage:true,
+                        next:({status})=> this.uploadStatus = status
+                    }).then((data)=>{
+                        if (data.isSuccess) {
+                            this.update({
+                               avatar:data.data.url
+                            },{
+                                avatar:data.data.fullurl
+                            });
+                        }
+                    });
+                }
+            });
+        },
+
+        update(data,userData){
+
+            this.updateUserInfo(userData || data);
+
+            return this.$request({
+                url:'user/profile',
+                data,
+                token:true
+            })
+        }
+
+    }
+
+}

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

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

+ 63 - 0
uni-shop/pages/personal-user/personal-user.vue

@@ -0,0 +1,63 @@
+<template>
+  <v-header title="我的信息" backgroundColor="#fff">
+    <view>
+      <view
+        v-for="(item,index) in data"
+        :key="index"
+        class="personal-item row aCenter"
+        :class="['personal-item-'+item.type]"
+      >
+        <view class="flex-all-1">{{item.label}}</view>
+        <view @click.stop="trigger(item)"  v-if="item.type==='avatar'" class="personal-item-use-avatar overflow">
+          <v-image  class="personal-item-use-avatar overflow" :src="user[item.key]"></v-image>
+        </view>
+        <view v-else class="person-item-value line-1"
+              @click.stop="trigger(item)"
+          :class="{'person-item-placeholder':!user[item.key]}"
+        >{{user[item.key] || item.placeholder || ''}}</view>
+        <text class="iconfont iconfont-more person-more"></text>
+      </view>
+    </view>
+
+    <modal v-model="modal">
+      <view class="screen_all center">
+        <view class="personal-modal flex">
+          <view class="personal-modal-header center">{{ useItem.label }}</view>
+          <view class="personal-modal-input-wrap jCenter">
+            <input :placeholder="useItem.placeholder" :type="useItem.type || 'text'" :maxlength="useItem.maxLength || 10" v-model="useItem.value" />
+          </view>
+          <view class="row flex-all-1 overflow personal-modal-footer">
+            <view @click="closeModal" class="flex-all-1 center">取消</view>
+            <view class="flex-all-1 center" @click="triggerSubmit">确定</view>
+          </view>
+        </view>
+      </view>
+    </modal>
+  </v-header>
+</template>
+
+<script>
+import data from './data/data';
+import vHeader from '@/components/v-header/main';
+import mixins from './mixins';
+import VImage from "../../components/v-image/main";
+import Modal from "../../components/modal/main";
+export default {
+  name: "personal",
+  data(){
+    return {
+      data
+    }
+  },
+  mixins,
+  components:{
+    Modal,
+    VImage,
+    vHeader
+  }
+}
+</script>
+
+<style src="./style.scss" lang="scss">
+
+</style>

+ 75 - 0
uni-shop/pages/personal-user/style.scss

@@ -0,0 +1,75 @@
+.personal-item{
+  height:85upx;
+  border-bottom: 1upx solid #eee;
+  padding: 0 30upx;
+  font-size: 26upx;
+  color: #333;
+  line-height: 30upx;
+  font-weight: bold;
+}
+
+.personal-item-avatar {
+  height: 120upx;
+}
+.personal-item-use-avatar{
+  border-radius: 50%;
+  width:60upx;
+  height:60upx;
+}
+.person-item-value{
+  max-width: 70%;
+  color: #333;
+  font-weight: 400;
+}
+
+.personal-item-use-avatar,.person-item-value{
+  margin-right: 10upx;
+}
+.person-item-placeholder{
+  color: #999;
+}
+
+.person-more{
+  color: #999999;
+  font-size: 26upx;
+  line-height: 34upx;
+}
+
+.personal-modal{
+  width: 650upx;
+  height: 300upx;
+  border-radius: 20upx;
+  background-color: #fff;
+}
+.personal-modal-header{
+  height: 90upx;
+  font-size: 30upx;
+  line-height: 40upx;
+  color: #333;
+}
+.personal-modal-input-wrap{
+  margin: 0 30upx;
+  border: 2upx solid #eee;
+  height: 80upx;
+  margin-bottom: 30upx;
+}
+
+.personal-modal-input-wrap input {
+  width: 100%;
+  padding: 20upx;
+  font-size: 30upx;
+  line-height: 30upx;
+  height: 50upx;
+  color: #333;
+}
+
+.personal-modal-footer{
+  border-top: 1upx solid #EEEEEE;
+  font-size: 30upx;
+  line-height: 34upx;
+  color: #999999;
+}
+.personal-modal-footer view:last-of-type{
+  color: #028748;
+  border-left: 1upx solid #EEEEEE;
+}

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

@@ -5,6 +5,7 @@ export default [
         openType:'share'
     },
     {
-        label: '生成海报'
+        label: '生成海报',
+        trigger: 'openPoster'
     }
 ]

+ 5 - 1
uni-shop/pages/product/mixins/buy.js

@@ -1,4 +1,5 @@
 import toast from '@/utils/tool/toast';
+import notice from "@/utils/notice/index";
 export default {
 
     methods:{
@@ -36,7 +37,7 @@ export default {
                    ...rules,
                    id:this.$params.id,
                    is_cart:0,
-                   number: this.$params.number
+                   number: 1
                }
             });
 
@@ -60,6 +61,9 @@ export default {
                 failMessage:true
             }).then((data)=>{
                 if (data.isSuccess) {
+                    notice.trigger('car',{
+                        update:true
+                    });
                     this.buyNumber = 1;
                 }
             });

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

@@ -36,7 +36,11 @@ export default {
             }
         },
         triggerProduct(item){
-            console.log(item);
+            if (item.trigger) {
+                this.routerLogin(()=>{
+                   this[item.trigger] && this[item.trigger]();
+                });
+            }
         },
 
         fetch(obj){

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini