소스 검색

修改跳转链接为内部路由跳转

yangc 7 년 전
부모
커밋
7ddb93d923

+ 1 - 1
components/mobile/help/HelpHeader.vue

@@ -2,7 +2,7 @@
   <nav id="nav" class="navbar navbar-default">
     <div class="container-fluid">
       <div class="navbar-header">
-        <a class="navbar-brand pull-left" href="/" style="color: #fff; font-size: 16px;">返回首页</a>
+        <nuxt-link class="navbar-brand pull-left" to="/" style="color: #fff; font-size: 16px;">返回首页</nuxt-link>
       </div>
     </div>
   </nav>

+ 1 - 1
components/product/brand/BrandComponent.vue

@@ -18,7 +18,7 @@
       </thead>
       <tbody>
         <tr class="text-center" v-for="item in list.content">
-          <td><a :href="'/product/component/' + item.uuid"><span>{{item.code}}</span></a></td>
+          <td><nuxt-link :to="'/product/component/' + item.uuid"><span>{{item.code}}</span></nuxt-link></td>
           <td><a @click="toAttach(item.attach)"><button class="btn btn-default"  :disabled="!item.attach" :class="{'disabledbtn':!item.attach}">Datasheet手册</button></a></td>
           <td>
             <button class="btn btn-default disabledbtn" :disabled="true">申请样片</button>

+ 3 - 3
components/product/component/ComponentMenu.vue

@@ -2,9 +2,9 @@
   <div class="componentMenu container">
     <div class="menu-com row">
       <div class="menu-title col-md-12">
-        <a href="/product/kind/home">器件选型</a> >
-        <span v-for="item in list">
-					<a :href="`/product/kind/${item.id}`"><span>{{item.nameCn}}</span></a>
+        <nuxt-link to="/product/kind/home">器件选型</nuxt-link> >
+        <span v-for="(item, key) in list">
+					<nuxt-link :to="`/product/kind/${item.id}`" :key="key"><span>{{item.nameCn}}</span></nuxt-link>
           <span> > </span>
 				  </span>
         <span>器件详情</span>

+ 1 - 1
components/search/DetailBrand.vue

@@ -10,7 +10,7 @@
           <div>应用领域:</div><span v-for="(item, index) in applications"><span>{{item}}</span><span v-show="index+1 < applications.length">|</span></span>
         </div>
         <div class="brand-main" v-show="list.brief"><div>品牌介绍:</div><span>{{list.brief}}</span></div>
-        <div class="brand-main" v-show="list.url"><div>官网地址:</div><a class="office-address" :href="list.url">{{list.url}}</a></div>
+        <div class="brand-main" v-show="list.url"><div>官网地址:</div><a class="office-address" :href="list.url" target="_blank">{{list.url}}</a></div>
       </div>
     </div>
     <nuxt-link :to="`/product/brand/${list_brands.uuid}`" class="brand-url">进入品牌中心</nuxt-link>

+ 6 - 6
components/store/BaseInfo.vue

@@ -4,12 +4,12 @@
       <div class="container">
         <div class="menu-com row">
           <div class="menu-title col-md-12">
-            <a href="/">商城首页</a> >
-            <a href="/provider/home" v-if="storeInfo.type == 'AGENCY' || storeInfo.type == 'DISTRIBUTION'" title="代理经销">代理经销</a>
-            <a href="/provider/factories" v-if="storeInfo.type == 'ORIGINAL_FACTORY'" title="原厂专区">原厂专区</a>
-            <a :href="'/store/' + storeInfo.uuid" v-if="storeInfo.type == 'CONSIGNMENT'" title="库存寄售">库存寄售</a>
+            <nuxt-link to="/">商城首页</nuxt-link> >
+            <nuxt-link to="/provider/home" v-if="storeInfo.type == 'AGENCY' || storeInfo.type == 'DISTRIBUTION'" title="代理经销">代理经销</nuxt-link>
+            <nuxt-link to="/provider/factories" v-if="storeInfo.type == 'ORIGINAL_FACTORY'" title="原厂专区">原厂专区</nuxt-link>
+            <nuxt-link :to="'/store/' + storeInfo.uuid" v-if="storeInfo.type == 'CONSIGNMENT'" title="库存寄售">库存寄售</nuxt-link>
             >
-            <span v-if="storeInfo.type != 'CONSIGNMENT'"><a :href="'/store/' + storeInfo.uuid" :title="storeInfo.storeName" v-text="storeInfo.storeName">店铺名称</a>> </span>
+            <span v-if="storeInfo.type != 'CONSIGNMENT'"><nuxt-link :to="'/store/' + storeInfo.uuid" :title="storeInfo.storeName" v-text="storeInfo.storeName">店铺名称</nuxt-link>> </span>
             <span>了解更多</span>
           </div>
         </div>
@@ -17,7 +17,7 @@
           <h3 class="col-xs-2">
             商家介绍
           </h3>
-          <a class="col-xs-10" :href="'/store/' + storeInfo.uuid">返回店铺</a>
+          <nuxt-link class="col-xs-10" :to="'/store/' + storeInfo.uuid">返回店铺</nuxt-link>
         </div>
         <div class="intro-text" v-text="storeInfo.description">店铺简介</div>
       </div>

+ 5 - 5
components/store/CommodityInfo.vue

@@ -2,12 +2,12 @@
   <div>
     <div class="menu-com row">
       <div class="menu-title col-md-12">
-        <a href="/">商城首页</a> >
-        <a href="/provider/home" v-if="storeInfo.type == 'AGENCY' || storeInfo.type == 'DISTRIBUTION'" title="代理经销">代理经销</a>
-        <a href="/provider/factories" v-if="storeInfo.type == 'ORIGINAL_FACTORY'" title="原厂专区">原厂专区</a>
-        <a :href="'/store/' + storeInfo.uuid" v-if="storeInfo.type == 'CONSIGNMENT'" title="库存寄售">库存寄售</a>
+        <nuxt-link to="/">商城首页</nuxt-link> >
+        <nuxt-link to="/provider/home" v-if="storeInfo.type == 'AGENCY' || storeInfo.type == 'DISTRIBUTION'" title="代理经销">代理经销</nuxt-link>
+        <nuxt-link to="/provider/factories" v-if="storeInfo.type == 'ORIGINAL_FACTORY'" title="原厂专区">原厂专区</nuxt-link>
+        <nuxt-link :to="'/store/' + storeInfo.uuid" v-if="storeInfo.type == 'CONSIGNMENT'" title="库存寄售">库存寄售</nuxt-link>
         >
-        <span v-if="storeInfo.type != 'CONSIGNMENT'"><a :href="'/store/' + storeInfo.uuid" :title="storeInfo.storeName" v-text="storeInfo.storeName">storeInfo.storeName</a>> </span>
+        <span v-if="storeInfo.type != 'CONSIGNMENT'"><nuxt-link :to="'/store/' + storeInfo.uuid" :title="storeInfo.storeName" v-text="storeInfo.storeName">storeInfo.storeName</nuxt-link>> </span>
         <span>产品详情</span>
       </div>
     </div>

+ 1 - 1
pages/help/helpDetail/_id.vue

@@ -11,7 +11,7 @@
           <div class="help-center">
             <div class="help-head"><img src="/images/help/help-title.png"></div>
             <div class="help-center-title">
-              <a v-bind:href="'/help/home'" style="font-size: 14px">帮助中心首页<i class="fa fa-angle-right"></i></a>
+              <nuxt-link :to="'/help/home'" style="font-size: 14px">帮助中心首页<i class="fa fa-angle-right"></i></nuxt-link>
               <span>
               <nuxt-link :to="`/help/home`" class="box" style="font-size: 16px">
                 <span>{{helpTitle.item}}</span><i class="fa fa-close"></i></nuxt-link>

+ 1 - 1
pages/help/helpList/_id.vue

@@ -11,7 +11,7 @@
           <div class="help-center">
             <div class="help-head"><img src="/images/help/help-title.png"></div>
             <div class="help-center-title">
-              <a v-bind:href="'/help/home'" style="font-size: 14px">帮助中心首页<i class="fa fa-angle-right"></i></a>
+              <nuxt-link :to="'/help/home'" style="font-size: 14px">帮助中心首页<i class="fa fa-angle-right"></i></nuxt-link>
               <span>
                 <nuxt-link :to="`/help/home`" class="box" style="font-size: 16px"><span>{{helpTitle.item}}</span><i class="fa fa-close"></i></nuxt-link>
               </span>

+ 1 - 1
pages/help/home.vue

@@ -11,7 +11,7 @@
           <div class="help-center">
             <div class="help-head"><img src="/images/help/help-title.png"></div>
             <div class="help-center-title">
-              <a style="font-size: 14px" v-bind:href="'/help/home'">帮助中心首页</a>
+              <nuxt-link style="font-size: 14px" :to="'/help/home'">帮助中心首页</nuxt-link>
             </div>
             <div class="help-center-home">
               <div v-for="nav01 in helpNav">