Browse Source

manage product and test OK

Csy817 6 years ago
parent
commit
a723fac3e0
4 changed files with 583 additions and 289 deletions
  1. 2 1
      src/configs/url.js
  2. 14 2
      src/pages/my/manage/goods/index.css
  3. 564 283
      src/pages/my/manage/goods/index.js
  4. 3 3
      src/utils/gql.js

+ 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 graphqlFC = 'http://ecommerce.ioobot.cn/graphql';      // new schema server mongodb
 const storeFile = `${window.location.protocol}//deploy.ioobot.cn/api/store-file`;
 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;
     font-size: 17px!important;
 }
 }
 
 
+.am-list-header {
+    border-top: 1px solid #f5f5f9;
+}
+
 .list-extra {
 .list-extra {
     display: flex;
     display: flex;
     align-items: center;
     align-items: center;
@@ -39,7 +43,15 @@
 .good-image {
 .good-image {
     height: 100px;
     height: 100px;
     background-repeat: no-repeat;
     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 {
 .all-goods {
@@ -96,7 +108,7 @@
 
 
 .goods-add_button {
 .goods-add_button {
     float: right;
     float: right;
-    margin-right: 20px;
+    margin: 20px;
 }
 }
 
 
 .close-item {
 .close-item {

File diff suppressed because it is too large
+ 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 = `
 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
             result
             category {
             category {
                 id
                 id
@@ -279,7 +279,6 @@ const delete_specificationStock = `
     mutation deletespecificationStock($id: ID) {
     mutation deletespecificationStock($id: ID) {
         deletespecificationStock: delete_specificationStock(id: $id)
         deletespecificationStock: delete_specificationStock(id: $id)
     }
     }
-
 `
 `
 
 
 const update_specificationStock = `
 const update_specificationStock = `
@@ -928,6 +927,7 @@ const update_product = `
 const delete_product_by_id = `
 const delete_product_by_id = `
     mutation deleteproduct($id: ID) {
     mutation deleteproduct($id: ID) {
         deleteproduct: delete_product(id: $id)
         deleteproduct: delete_product(id: $id)
+        deletespecificationStock: delete_specificationStock(product_id: $id)
     }
     }
 `
 `
 
 

Some files were not shown because too many files changed in this diff