|
|
@@ -37,7 +37,7 @@
|
|
|
<span class="name">类 目</span>:<span v-text="commodity.kindNameCn"></span>
|
|
|
</div>
|
|
|
<div class="com-info">
|
|
|
- <span class="name">下 载</span>:<a target="_blank" :href="component.attach">{{component.attach ? '规格书' : '暂无信息'}}</a>
|
|
|
+ <span class="name">下 载</span>:<a @click="toAttach(component.attach)" v-if="component.attach">规格书</a><span v-if="!component.attach">暂无信息</span>
|
|
|
</div>
|
|
|
<div class="com-info">
|
|
|
<span class="name">包 装</span>:<span v-text="commodity.packaging || '无包装信息'"></span>
|
|
|
@@ -456,6 +456,17 @@ export default {
|
|
|
}
|
|
|
return encryptStr
|
|
|
}
|
|
|
+ },
|
|
|
+ toAttach: function (url) {
|
|
|
+ if (url === '1') {
|
|
|
+ this.$http.get('/login/page', {params: {returnUrl: window.location.href}}).then(response => {
|
|
|
+ if (response.data) {
|
|
|
+ window.location.href = response.data.content + '&baseUrl=' + encodeURIComponent(window.location.protocol + '//' + window.location.host + response.data.baseUrl)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ window.open(url)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|