Browse Source

修改测试bug

shenjj 7 years ago
parent
commit
0d73b1365b

+ 24 - 21
components/mobile/staffManagement/StaffList.vue

@@ -45,7 +45,7 @@
           </div>
           <empty-status :type="'collect'" :showLink="true" :text="'抱歉,没有相关信息'" v-else></empty-status>
           <pull-up :fixId="'mobile-staff-center'" :isValid="activeTab == 0 && switchType === 'info'" :searchMore="fetching" :allPage="allPage" :page="page" @pullUpAction="onPullUpAction"></pull-up>
-          <nuxt-link class="staff-add" :to="'/mobile/user/staff/add'"><i class="iconfont icon-add"></i>新增用户</nuxt-link>
+
         </div>
         <div class="staff-record" v-if="switchType === 'Audit'">
           <div class="search-content">
@@ -90,6 +90,7 @@
         </div>
       </div>
     </div>
+    <nuxt-link v-if="activeTab === 0 && switchType === 'info'" class="staff-add" :to="'/mobile/user/staff/add'"><i class="iconfont icon-add"></i>新增用户</nuxt-link>
     <!--删除员工弹框-->
     <div class="deleteKuang" v-if="showDelete">
       <div class="kuangContent">
@@ -549,27 +550,9 @@
           }
         }
       }
-      .staff-add {
-        display: inline-block;
-        position: fixed;
-        bottom: 1.2rem;
-        left: 50%;
-        margin-left: -3.29rem;
-        width: 6.59rem;
-        height: .77rem;
-        line-height: .77rem;
-        text-align: center;
-        font-size: .32rem;
-        color: #fff;
-        background-color: #3f84f6;
-        border-radius: 0.08rem;
-        i{
-          margin-right: .1rem;
-          font-size: .32rem;
-          color: #fff;
-        }
-      }
+
     }
+
     /*编辑角色*/
     .staff-role{
       margin: .2rem auto 0;
@@ -672,6 +655,26 @@
       }
     }
   }
+  .staff-add {
+    display: inline-block;
+    position: fixed;
+    bottom: 1.2rem;
+    left: 50%;
+    margin-left: -3.29rem;
+    width: 6.59rem;
+    height: .77rem;
+    line-height: .77rem;
+    text-align: center;
+    font-size: .32rem;
+    color: #fff;
+    background-color: #3f84f6;
+    border-radius: 0.08rem;
+    i{
+      margin-right: .1rem;
+      font-size: .32rem;
+      color: #fff;
+    }
+  }
   /*删除弹框*/
   .deleteKuang {
     position: fixed;

+ 11 - 11
pages/mobile/center/user/collect/store.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="mobile-center">
     <div class="com-mobile-header mobile-center-header">
-      <a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>
+      <a @click="goBack()"><i class="iconfont icon-fanhui"></i></a>
       <p>店铺关注</p>
       <p class="en-name"><img :src="`/images/mobile/center/${user.data.enterprise.uu ? 'en' : 'self'}.png`" alt="">{{currentEnName}}</p>
     </div>
@@ -129,17 +129,20 @@
       SearchHeader
     },
     methods: {
+      async goBack() {
+        if (this.searchShow === true) {
+          this.searchShow = false
+          this.keyword = ''
+          let { data } = await this.$http.get(`/trade/storeFocus/page`, {params: { count: 10, page: 1 }})
+          this.storeList = data
+        } else {
+          this.goLastPage()
+        }
+      },
       onSearch(keyObj) {
         if (keyObj.keyword === '') {
           this.onRemind('请输入搜索关键字')
           return
-          if (this.searchShow === true) {
-            this.searchShow = false
-            this.storeList = {}
-            this.page = 1
-            this.reloadList()
-          }
-          return
         }
         this.searchShow = true
         this.keyword = keyObj.keyword
@@ -201,8 +204,6 @@
       async reloadList() {
         if (this.searchShow) {
           let { data } = await this.$http.get('/api/store-service/stores', {params: { page: this.page, count: this.count, type: 'ORIGINAL_FACTORY-DISTRIBUTION-AGENCY-CONSIGNMENT', keyword: this.keyword || null, field: this.field, op: 'similar' }})
-
-
           let _pull = []
           for (let i = 0; i < data.content.length; i++) {
             _pull.push(findStoreFocusInMobil({id: data.content[i].id}))
@@ -216,7 +217,6 @@
               }
             })
           this.storeList.content = [...this.storeList.content, ...data.content]
-
         } else {
           let { data } = await axios.get(`/trade/storeFocus/page`, {params: {count: 10, page: this.page}})
           this.storeList.content = [...this.storeList.content, ...data.content]