Authored by yyq

layout link

import LayoutApp from './layout/layout-app';
import LayoutHeader from './layout/layout-header';
import LayoutLink from './layout/layout-link';
import Images from './images';
import YohoButton from './button';
export default [
LayoutApp,
LayoutHeader,
LayoutLink,
...Images,
YohoButton
];
... ...
<template>
<a href="javascript:;" class="layout-link" @click="jumpTo">
<slot></slot>
</a>
</template>
<script>
export default {
name: "LayoutLink",
props: {
href: String
},
methods: {
jumpTo() {
if (!this.href) {
return;
}
// TODO url解析
if (this.$yoho.isAliApp && window.WindVane) {
window.WindVane.call('Base', 'openWindow', params, data => {
console.log('open new window success: ' + this.href);
}, e => {
window.open(this.href);
});
} else {
window.open(this.href);
}
}
}
};
</script>
... ...
... ... @@ -32,7 +32,7 @@
<div class="contract-check">
<i class="iconfont" :class="readContract ? 'iconcheck_full checked' : 'iconcheck_default'" @click="changeReadContract"></i>
<span>我已阅读并同意</span>
<a href="//activity.yoho.cn/feature/4049.html?share_id=6729&title=UFO卖家商品质检标准">《UFO卖家商品质检标准》</a>
<LayoutLink href="//activity.yoho.cn/feature/4049.html?share_id=6729&title=UFO卖家商品质检标准">《UFO卖家商品质检标准》</LayoutLink>
</div>
<p v-if="stateCenterAddress.warnTips" class="warn-tip">{{stateCenterAddress.warnTips}}</p>
<CubeButton class="deliver-btn" :disabled="deliverDisable" @click="submitDeliver">发货</CubeButton>
... ...