Browse Source

Merge branch 'feature_20260211_同城分销店-主营竞品品牌' into uat(dev)

zhujindu 5 days ago
parent
commit
a4d6a51bcb

+ 2 - 4
src/views/storeManagement/storeAdd.vue

@@ -1927,10 +1927,8 @@ export default {
               })
               })
               .then(() => {
               .then(() => {
                 this.toastLoading(0, '上传中...', true);
                 this.toastLoading(0, '上传中...', true);
-                this.fromValue.storeCompetitorList =
-                  this.otherCompetitor != ''
-                    ? this.fromValue.storeCompetitorList.push(this.otherCompetitor)
-                    : this.fromValue.storeCompetitorList;
+                if (this.fromValue.otherCompetitor != '')
+                  this.fromValue.storeCompetitorList.push(this.fromValue.otherCompetitor);
                 this.addStoreFun();
                 this.addStoreFun();
               });
               });
           }
           }

+ 4 - 6
src/views/storeManagement/storeEdit.vue

@@ -423,7 +423,7 @@
                 </van-checkbox-group>
                 </van-checkbox-group>
                 <van-field
                 <van-field
                   class="otherCompetitor"
                   class="otherCompetitor"
-                  v-model="otherCompetitor"
+                  v-model="fromValue.otherCompetitor"
                   label="其他"
                   label="其他"
                   placeholder="请输入" />
                   placeholder="请输入" />
               </div>
               </div>
@@ -1848,7 +1848,7 @@ export default {
           this.$toast('图片未上传');
           this.$toast('图片未上传');
           return;
           return;
         }
         }
-        if (!fromValue.storeCompetitorList.length && this.otherCompetitor == '') {
+        if (!fromValue.storeCompetitorList.length && fromValue.otherCompetitor == '') {
           this.$toast('主营竞品品牌未填写');
           this.$toast('主营竞品品牌未填写');
           return;
           return;
         }
         }
@@ -1874,10 +1874,8 @@ export default {
       this.fromValue.myLat = this.location.lat;
       this.fromValue.myLat = this.location.lat;
       this.fromValue.myLon = this.location.lon;
       this.fromValue.myLon = this.location.lon;
       console.log(this.fromValue);
       console.log(this.fromValue);
-      this.fromValue.storeCompetitorList =
-        this.otherCompetitor != ''
-          ? this.fromValue.storeCompetitorList.push(this.otherCompetitor)
-          : this.fromValue.storeCompetitorList;
+      if (this.fromValue.otherCompetitor != '')
+        this.fromValue.storeCompetitorList.push(this.fromValue.otherCompetitor);
       updateStore(this.fromValue).then((res) => {
       updateStore(this.fromValue).then((res) => {
         loading1.clear();
         loading1.clear();
         if (res.code == 200) {
         if (res.code == 200) {