|
|
@@ -104,9 +104,9 @@
|
|
|
</td>
|
|
|
<td>
|
|
|
<div v-if="commodity.attach">
|
|
|
- <a :href="commodity.attach && commodity.attach !== '1'" target="_blank"><img src="/images/store/common/pdf.png" alt=""/></a>
|
|
|
+ <a @click="goAttach(commodity.attach, $event)" target="_blank"><img src="/images/store/common/pdf.png" alt=""/></a>
|
|
|
</div>
|
|
|
- <div v-show="!commodity.attach || commodity.attach == '1'">—</div>
|
|
|
+ <div v-if="!commodity.attach">—</div>
|
|
|
</td>
|
|
|
<td>
|
|
|
<buy :item="commodity" :disabledFlag="commodity.status === 602"></buy>
|
|
|
@@ -227,6 +227,22 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ goAttach: function (url, event) {
|
|
|
+ event.stopPropagation()
|
|
|
+ if (this.user.logged) {
|
|
|
+ if (url && url !== '1') {
|
|
|
+ window.open(url)
|
|
|
+ } else {
|
|
|
+ this.$message.error('规格书地址错误')
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ 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)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
isSpecificPriceTag: function (tag) {
|
|
|
return tag && tag.indexOf('特价') !== -1
|
|
|
},
|