Browse Source

router history

lyn7568 6 years ago
parent
commit
c61b2a72c5

+ 1 - 1
src/utils/validator.js

@ -38,7 +38,7 @@ export function checkPhoneV(rule, value, callback) {
38 38
// 邮编,限制只能输入数字,20个字
39 39
export function checkInterNum(rule, value, callback) {
40 40
  const reg = /^[0-9]*$/
41
  if (!value && !reg.test(value)) {
41
  if (value && !reg.test(value)) {
42 42
    return callback(new Error('请输入正确邮编'))
43 43
  } else {
44 44
    callback()

+ 0 - 9
src/views/companyCen/noactive/compInfo.vue

@ -2,9 +2,6 @@
2 2
  <div class="app-container">
3 3
    <div class="box-container">
4 4
      <div class="contain-title">企业信息</div>
5
      <div class="contian-operate" v-if="companyId">
6
        <el-button type="primary" @click="queryCompanyProduct">企业产品</el-button>
7
      </div>
8 5
    </div>
9 6
    <div class="content-container">
10 7
      <div class="main-info">
@ -382,12 +379,6 @@
382 379
          }
383 380
        })
384 381
      },
385
      queryCompanyProduct() {
386
        this.$router.replace({
387
          name: 'compProduct',
388
          query: { cid: this.companyId }
389
        })
390
      },
391 382
      turnIndustryTags(msg) {
392 383
        this.formObj.industry = msg
393 384
      },

+ 3 - 3
src/views/companyCen/noactive/compProduct.vue

@ -168,13 +168,13 @@ export default {
168 168
      })
169 169
    },
170 170
    addProductInfo() {
171
      this.$router.replace({
171
      this.$router.push({
172 172
        name: 'productInfo',
173 173
        query: { cid: this.companyId }
174 174
      })
175 175
    },
176 176
    handelEdit(row) {
177
      this.$router.replace({
177
      this.$router.push({
178 178
        name: 'productInfo',
179 179
        query: { id: row.id, cid: row.companyId }
180 180
      })
@ -227,7 +227,7 @@ export default {
227 227
      }
228 228
    },
229 229
    compChanged(val) {
230
      this.$router.replace({
230
      this.$router.push({
231 231
        name: 'compProduct',
232 232
        query: { cid: val }
233 233
      })

+ 3 - 3
src/views/companyCen/noactive/noactiveList.vue

@ -217,16 +217,16 @@ export default {
217 217
      })
218 218
    },
219 219
    queryCompanyInfo() {
220
      this.$router.replace({ name: 'compInfo' })
220
      this.$router.push({ name: 'compInfo' })
221 221
    },
222 222
    handelEdit(id) {
223
      this.$router.replace({
223
      this.$router.push({
224 224
        name: 'compInfo',
225 225
        query: { id: id }
226 226
      })
227 227
    },
228 228
    handelProduct(id) {
229
      this.$router.replace({
229
      this.$router.push({
230 230
        name: 'compProduct',
231 231
        query: { cid: id }
232 232
      })

+ 1 - 1
src/views/demandCen/preview.vue

@ -353,7 +353,7 @@
353 353
                    type: 'success'
354 354
                  })
355 355
                  setTimeout(function() {
356
                    that.$router.replace({ name: 'publishedList' })
356
                    that.$router.push({ name: 'publishedList' })
357 357
                  }, 0)
358 358
                }
359 359
              })

+ 1 - 1
src/views/layout/components/Sidebar/SidebarItem.vue

@ -23,7 +23,7 @@
23 23
            <!-- </router-link>
24 24
          </div> -->
25 25
26
          <router-link v-else :to="resolvePath(child.path)" :key="child.name" replace>
26
          <router-link v-else :to="resolvePath(child.path)" :key="child.name">
27 27
            <el-menu-item :index="resolvePath(child.path)">
28 28
              <svg-icon v-if="child.meta&&child.meta.icon" :icon-class="child.meta.icon"></svg-icon>
29 29
              <span v-if="child.meta&&child.meta.title" slot="title">{{child.meta.title}}</span>

+ 1 - 1
src/views/layout/components/TopNavbar.vue

@ -24,7 +24,7 @@ export default {
24 24
  },
25 25
  methods: {
26 26
    toHome() {
27
      this.$router.replace({ path: '/' })
27
      this.$router.push({ path: '/' })
28 28
    },
29 29
    logout() {
30 30
      MessageBox.confirm('您确认要退出登录吗?', '提示', {