Kaynağa Gözat

manage product and test OK

Csy817 6 yıl önce
ebeveyn
işleme
a723fac3e0

+ 2 - 1
src/configs/url.js

@@ -5,5 +5,6 @@ const graphqlFC = window.location.hostname !== 'localhost' ? window.location.ori
 // const graphqlFC = 'http://ecommerce.ioobot.cn/graphql';      // new schema server mongodb
 const storeFile = `${window.location.protocol}//deploy.ioobot.cn/api/store-file`;
 
-export {graphqlFC, storeFile}
+const storePrefix = 'https://case-1254337200.cos.ap-beijing.myqcloud.com/'
+export {graphqlFC, storeFile, storePrefix}
 

+ 14 - 2
src/pages/my/manage/goods/index.css

@@ -14,6 +14,10 @@
     font-size: 17px!important;
 }
 
+.am-list-header {
+    border-top: 1px solid #f5f5f9;
+}
+
 .list-extra {
     display: flex;
     align-items: center;
@@ -39,7 +43,15 @@
 .good-image {
     height: 100px;
     background-repeat: no-repeat;
-    background-size: cover;
+    background-size: contain;
+}
+
+.good-name {
+    overflow: hidden;
+    text-overflow: ellipsis;
+    display: -webkit-box;
+    -webkit-box-orient: vertical;
+    -webkit-line-clamp: 3;
 }
 
 .all-goods {
@@ -96,7 +108,7 @@
 
 .goods-add_button {
     float: right;
-    margin-right: 20px;
+    margin: 20px;
 }
 
 .close-item {

Dosya farkı çok büyük olduğundan ihmal edildi
+ 564 - 283
src/pages/my/manage/goods/index.js


+ 3 - 3
src/utils/gql.js

@@ -147,8 +147,8 @@ const category_by_props = `
 `
 
 const update_category = `
-    mutation updatecategory($id: ID, $img: String, $order: Int, $status: String, $updatedAt: String) {
-        updatecategory: update_category(id: $id img: $img order: $order status: $status updatedAt: $updatedAt) {
+    mutation updatecategory($id: ID, $name:String, $img: String, $order: Int, $status: String, $updatedAt: String) {
+        updatecategory: update_category(id: $id name:$name, img: $img order: $order status: $status updatedAt: $updatedAt) {
             result
             category {
                 id
@@ -279,7 +279,6 @@ const delete_specificationStock = `
     mutation deletespecificationStock($id: ID) {
         deletespecificationStock: delete_specificationStock(id: $id)
     }
-
 `
 
 const update_specificationStock = `
@@ -928,6 +927,7 @@ const update_product = `
 const delete_product_by_id = `
     mutation deleteproduct($id: ID) {
         deleteproduct: delete_product(id: $id)
+        deletespecificationStock: delete_specificationStock(product_id: $id)
     }
 `
 

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor