Sfoglia il codice sorgente

Merge branch 'dev' of https://git.citupro.com/zhengnaiwen_citu/menduner into dev

Xiao_123 4 mesi fa
parent
commit
b146aad7ad

+ 7 - 2
src/views/mall/cart/index.vue

@@ -3,6 +3,7 @@
   <v-card class="default-width card-box mb-5 pa-5 resume-box">
     <div class="resume-header">
       <div class="resume-title">我的购物车</div>
+      <v-btn color="primary" size="small" variant="text" @click="getCartList"><v-icon>mdi-refresh</v-icon>刷新购物车</v-btn>
     </div>
     <div v-if="cartList.length" class="mt-3">
       <v-data-table
@@ -21,7 +22,7 @@
           <v-checkbox v-model="item.selected" hide-details color="primary" @update:modelValue="val => handleSelect(val, item.id)"></v-checkbox>
         </template>
         <template v-slot:[`item.spuName`]="{ item }">
-          <GoodsItem :item="{ ...item.sku, ...item.spu, spuName: item.spu.name }" :showLine="false" :showPriceCount="false" class="mb-1" />
+          <GoodsItem :item="{ ...item.sku, ...item.spu, spuName: item.spu.name, picUrl: item.sku?.picUrl || item.spu?.picUrl }" :showLine="false" :showPriceCount="false" class="mb-1" />
         </template>
         <template v-slot:[`item.count`]="{ item }">
           <v-number-input 
@@ -42,7 +43,11 @@
       </v-data-table>
       <v-divider></v-divider>
       <div class="d-flex align-center justify-space-between py-4">
-        <v-btn :disabled="!selectedData.length" color="error" variant="outlined" @click.stop="handleDelete(true)">删除选中的商品</v-btn>
+        <div class="d-flex align-center">
+          <!-- <v-checkbox v-model="selectAll" hide-details color="primary" @update:modelValue="handleSelectAll"></v-checkbox>
+          <span class="mr-5" style="color: #777;">全选</span> -->
+          <v-btn :disabled="!selectedData.length" color="error" variant="outlined" @click.stop="handleDelete(true)">删除选中的商品</v-btn>
+        </div>
         <div class="d-flex align-center">
           <div class="color-666 mr-8">共{{ totalCount }}件商品,合计:¥{{ fen2yuan(totalPrice) }}</div>
           <v-btn :disabled="!totalCount" color="primary" @click.stop="handleSettlement">结算<span v-if="totalCount > 0">({{ totalCount }})</span></v-btn>

+ 5 - 5
src/views/mall/components/details/order/confirm.vue

@@ -4,7 +4,7 @@
     <AddressSelection v-model="addressState" class="addressBox" />
     
     <!-- 购买的商品信息 -->
-    <div class="goodsListBox mb-3">
+    <v-card class="goodsListBox mb-3 pa-3">
       <s-goods-item
         v-for="(item, index) in state.orderInfo.items"
         :key="item.skuId"
@@ -13,9 +13,9 @@
         :skuText="item.properties.map((property) => property.valueName).join(' ')"
         :price="item.price"
         :num="item.count"
-        :marginTop="index ? '0' : '12'"
+        :style="{'marginTop': index ? '8px' : '0px'}"
       />
-    </div>
+    </v-card>
 
     <!-- 价格信息 -->
     <div>
@@ -310,8 +310,8 @@
   }
   .goodsListBox {
     // background: linear-gradient(to bottom, #e93323 0%, #e93323 100%);
-    background: linear-gradient(to bottom, var(--v-primary-base) 0%, var(--v-primary-base) 100%);
-    border-radius: 1px;
+    // background: linear-gradient(to bottom, var(--v-primary-base) 0%, var(--v-primary-base) 100%);
+    border-radius: 4px;
   }
   .order-item {
     color: #7a7a7a;

+ 3 - 5
src/views/mall/components/s-goods-item/index.vue

@@ -1,9 +1,6 @@
 <template>
   <div class="box">
-    <div
-      class="d-flex"
-      :style="[{ borderRadius: radius + 'px', marginTop: marginTop + 'px' }]"
-    >
+    <div class="d-flex">
       <div style="width: 80px; height: 80px;" class="mr-3">
         <v-img :src="img" :aspect-ratio="1" style="border-radius: 8px;"></v-img>
       </div>
@@ -99,7 +96,8 @@
 
 <style lang="scss" scoped>
 .box {
-  background-color: var(--default-bgc);
+  // background-color: var(--default-bgc);
+  background-color: #e9e9e9;
   border-radius: 8px;
   padding: 12px;
   // border: 1px dashed #000000;