laosan2382995021@163.com 3 éve
szülő
commit
8905efbf6a

+ 5 - 0
.idea/.gitignore

@@ -0,0 +1,5 @@
+# 默认忽略的文件
+/shelf/
+/workspace.xml
+# 基于编辑器的 HTTP 客户端请求
+/httpRequests/

+ 8 - 0
.idea/modules.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/.idea/products.iml" filepath="$PROJECT_DIR$/.idea/products.iml" />
+    </modules>
+  </component>
+</project>

+ 12 - 0
.idea/products.iml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="WEB_MODULE" version="4">
+  <component name="NewModuleRootManager">
+    <content url="file://$MODULE_DIR$">
+      <excludeFolder url="file://$MODULE_DIR$/temp" />
+      <excludeFolder url="file://$MODULE_DIR$/.tmp" />
+      <excludeFolder url="file://$MODULE_DIR$/tmp" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>

+ 6 - 0
.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
+  </component>
+</project>

+ 1 - 1
uni-shop/components/fill-code/style.scss

@@ -24,7 +24,7 @@
 
 .fill-code-input{
   text-align: center;
-  font-size: 44upx;
+  font-size: 34upx;
   color: #666;
 }
 

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

@@ -3,27 +3,27 @@
     :class="['layout-comment-'+size]"
         @click="triggerGoDetail"
   >
-    <image :src="item.user_avatar" class="comment-avatar"></image>
+    <v-image :src="vItem.user_avatar" class="comment-avatar overflow"></v-image>
     <view class="flex-all-1 layout-comment-content">
       <view class="row">
         <view class="flex-all-1">
           <view v-if="skeleton" class="layout-comment-skeleton layout-comment-skeleton-title"></view>
-          <view v-else class="line-1">{{item.user_nickname}}</view>
+          <view v-else class="line-1">{{vItem.user_nickname}}</view>
 
           <view v-if="skeleton" class="layout-comment-skeleton layout-comment-skeleton-time comment-time"></view>
           <view v-else class="line-1 comment-time">{{item.createtime}}</view>
         </view>
-        <uni-rate v-if="rate" :disabled="true" :value="item.rate"></uni-rate>
+        <uni-rate v-if="vItem.rate" :disabled="true" :value="vItem.rate || 0"></uni-rate>
       </view>
 
       <view v-if="skeleton" class="layout-comment-skeleton layout-comment-skeleton-context layout-comment-context"></view>
-      <view v-else class="layout-comment-context">{{item.comment}}</view>
+      <view v-else class="layout-comment-context">{{vItem.comment}}</view>
       <view v-if="image" class="layout-comment-images row wrap aCenter">
         <view class="layout-comment-image overflow"
-          v-for="(item,index) in skeleton?3:item.images"
-              :key="index"
+          v-for="(cItem,cIndex) in skeleton?3:vItem.images"
+              :key="cIndex"
         >
-          <v-image :src="skeleton?item:''" class="screen_all"></v-image>
+          <v-image :src="skeleton?'':cItem" class="screen_all"></v-image>
         </view>
       </view>
       <view v-if="control" class="layout-comment-control-footer row jEnd">
@@ -60,7 +60,7 @@ export default {
 
   watch:{
     item:function (){
-      this.setVItem();
+      this.setVItem(this.item);
     }
   },
 
@@ -82,9 +82,13 @@ export default {
 
     setVItem(item){
       if (item) {
+
+        item = JSON.parse(JSON.stringify(item));
+
         if (item.is_tutop && item.tutop<=0) {
           item.tutop = 1;
         }
+        console.log(item);
 
         this.vItem = item;
       }

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

@@ -28,7 +28,7 @@
       </flat-list>
 
     </view>
-    <view v-if="typeItem.edit" class="center address-button-container">
+    <view class="center address-button-container">
       <view @click="routerAddAddress" class="address-button center">添加地址</view>
     </view>
 

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

@@ -43,7 +43,7 @@
 
 /* 容器 */
 .address-button-container{
-  margin: 20upx 0;
+  margin: 30upx 0;
 }
 .address-button{
   width: 600upx;

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

@@ -1,6 +1,7 @@
 import notice from "@/utils/notice/index";
 
 import toast from '@/utils/tool/toast';
+import modal from "../../../utils/tool/modal";
 
 export default {
 
@@ -15,7 +16,7 @@ export default {
 
     computed:{
       allSelect(){
-          return this.base_flat_data.data.length === this.selectArray.length;
+          return this.base_flat_data.data.length >0 && this.base_flat_data.data.length === this.selectArray.length;
       },
       total(){
           let price = 0;
@@ -128,28 +129,35 @@ export default {
             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)=>{
+            modal.confirm({
+                title:'移除确认',
+                content:'是否移除选择商品?',
+                confirmText:'移除',
+                confirmColor:'#FC3538',
+                confirm:()=>{
+                    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 = [];
+                        }
 
-                if (data.isSuccess) {
-
-                    this.selectArray.map((item)=>{
-                        this.flatSplice(this.flatIdGETIndex(item));
                     });
-
-                    this.selectObject = {};
-                    this.selectArray = [];
                 }
+            })
 
-            });
 
         },
 

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

@@ -178,9 +178,7 @@ export default {
           next:({status})=> this.receiveCouponStatus = status,
           failMessage:true
         }).then((data)=>{
-          if (data.isSuccess) {
-            this.coupon = undefined;
-          }
+          this.coupon = {};
         });
       })
     },

+ 3 - 2
uni-shop/pages/product/mixins/buy.js

@@ -10,11 +10,12 @@ export default {
         * */
         triggerBuy(type=1){
 
-            this.cancelRuleModal();
+
 
             if(type === 1) {
                 return this.routerBuyOrder();
             } else {
+                this.cancelRuleModal();
                 return this.addCarNumber();
             }
 
@@ -30,7 +31,7 @@ export default {
                     return toast.info('请选择规格');
                 }
             }
-
+            this.cancelRuleModal();
             return this.$router.navigateTo({
                name:'confirm-order',
                params:{

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

@@ -116,6 +116,8 @@ export default {
 
             });
 
+            console.log(this.comment);
+
             this.item = data;
 
             // 设置规格

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

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