Browse Source

添加店铺首页产品列表返回上一页效果

huxz 8 years ago
parent
commit
0348d4ad71
1 changed files with 4 additions and 1 deletions
  1. 4 1
      components/store/CommodityList.vue

+ 4 - 1
components/store/CommodityList.vue

@@ -102,7 +102,7 @@
                 </div>
                 <div class="col-xs-4 txt-info">
                   <p class="grey f16">暂无器件信息</p>
-                  <i class="iconfont">&#xe610;</i>&nbsp;<a href="javascript:history.go(-1)">返回上一页</a>
+                  <i class="iconfont">&#xe610;</i>&nbsp;<a @click="goBack()">返回上一页</a>
                 </div>
               </div>
             </td>
@@ -200,6 +200,9 @@ export default {
     handleCurrentChange (page) {
       this.pageParams.page = page
       this.pageCommodity(this.pageParams, this.ids, this.searchCode)
+    },
+    goBack () {
+      this.$router.back(-1)
     }
   }
 }