xuqiang 4 лет назад
Родитель
Сommit
44be140d59
1 измененных файлов с 29 добавлено и 3 удалено
  1. 29 3
      src/pages/store/productEdit.vue

+ 29 - 3
src/pages/store/productEdit.vue

@@ -31,6 +31,7 @@
                         placeholder="请输入卡牌名称"
                     >
                     </van-field>
+                    <div class="tit">福袋封面图</div>
                     <van-uploader
                         style="padding-left:20px"
                         :file-list="images"
@@ -39,7 +40,7 @@
                     />
                 </div>
                 <van-field
-                    label="卡牌售价"
+                    :label="`${time != 4 ? '卡牌售价' : '单个福袋售价'}`"
                     type="digit"
                     :value="form.boxPrice"
                     @input="form.boxPrice = $event.detail"
@@ -229,7 +230,8 @@
                     <p>点击添加</p>
                 </div>
                 <div class="bottom">
-                    <van-button type="primary" block @click="flag = true">完成</van-button>
+                    <van-button type="primary" block @click="addList">完成</van-button>
+                    <van-button type="info" block @click="flag = true">返回</van-button>
                 </div>
             </div>
             <div v-show="!flags">
@@ -260,6 +262,7 @@
                 />
                 <div class="bottom">
                     <van-button type="primary" block @click="submitNum">完成</van-button>
+                    <van-button type="info" block @click="flags = true">返回</van-button>
                 </div>
             </div>
         </div>
@@ -497,6 +500,16 @@ export default {
                     this.$message.error(e.error);
                 });
         },
+        addList() {
+            if (this.cardList.length <= 0) {
+                wx.showToast({
+                    icon: 'none',
+                    title: '福袋不能为空,请添加福袋'
+                });
+                return;
+            }
+            this.flag = true;
+        },
         // canChoose(info) {
         //     return info.sold;
         // },
@@ -806,7 +819,8 @@ export default {
                             // images: res.images
                         };
                         wx.showToast({
-                            title: '商品上架成功'
+                            title: '商品上架成功,审核中',
+                            duration: 2000
                         });
                         setTimeout(() => {
                             this.navigateTo('/pages/store/homePage');
@@ -861,6 +875,13 @@ export default {
             left: 100px !important;
         }
     }
+    .tit {
+        font-size: 13px;
+        margin-left: 20px;
+        font-weight: bold;
+        color: #000;
+        margin-top: 10px;
+    }
 }
 .addorder {
     padding-bottom: 90px;
@@ -1102,6 +1123,8 @@ export default {
             margin: 23px 0 18px 20px;
         }
         .bottom {
+            .flex();
+            justify-content: space-between;
             position: fixed;
             bottom: 0;
             left: 0;
@@ -1109,6 +1132,9 @@ export default {
             padding: 6px 43px;
             background-color: #fff;
             .bottom(6px);
+            /deep/ .van-button {
+                width: 130px;
+            }
         }
     }
 }