Authored by 陈峰

有货去头

... ... @@ -26,6 +26,7 @@ if (isYohoBuy && !$appLink) {
$appLink.id = 'yoho-app-link';
$appLink.href = 'javascript:;';
$appLink.style.display = 'none';
$appLink.className = 'no-intercept';
body.appendChild($appLink);
}
... ... @@ -208,21 +209,21 @@ const yoho = {
} if (this.isYohoBuy) {
let url = args.url;
// if (url.indexOf('openby:') < 0) {
// delete args.url;
// url += '&openby:yohobuy=' + JSON.stringify({
// action: 'go.h5',
// params: {
// islogin: 'N',
// type: 0,
// updateflag: Date.now() + '',
// url: args.url,
// param: args
// }
// });
// }
$appLink.attr('href', url);
$appLink[0].click();
if (url.indexOf('openby:') < 0) {
delete args.url;
url += (url.indexOf('?') >= 0 ? '&' : '?') + 'openby:yohobuy=' + JSON.stringify({
action: 'go.h5',
params: {
islogin: 'N',
type: 0,
updateflag: Date.now() + '',
url: url,
param: args
}
});
}
$appLink.href = url;
$appLink.click();
} else {
if (args.url) {
window.open(args.url);
... ...
<template>
<div v-infinite-scroll="getNewsList">
<div v-for="editorial in editorialList" :key="editorial.id" class="editorial-box">
<div class="img">
<a :href='"/editorial/" + editorial.id + ".html"'>
<img v-img-src="{src: editorial.src, width: 750, height: 469}" alt="" />
</a>
</div>
<div class="title">
<a class="line-clamp-2" :href='"/editorial/" + editorial.id + ".html"'>{{editorial.title}}</a>
</div>
<div class="bottom clearfix">
<span class="time-month">
<i class="month-num">{{formatTime(editorial.publish_time_long, 'month')}}</i>
<i>{{formatTime(editorial.publish_time_long, 'monthEn')}}</i>
</span>
<span class="time-day">/{{formatTime(editorial.publish_time_long, 'day')}}</span>
<div>
<header-box title="资讯" class="list-header">
<i slot="left"></i>
</header-box>
<div v-infinite-scroll="getNewsList">
<div v-for="editorial in editorialList" :key="editorial.id" class="editorial-box">
<div class="img">
<a :href='"/editorial/" + editorial.id + ".html"'>
<img v-img-src="{src: editorial.src, width: 750, height: 469}" alt="" />
</a>
</div>
<div class="title">
<a class="line-clamp-2" :href='"/editorial/" + editorial.id + ".html"'>{{editorial.title}}</a>
</div>
<div class="bottom clearfix">
<span class="time-month">
<i class="month-num">{{formatTime(editorial.publish_time_long, 'month')}}</i>
<i>{{formatTime(editorial.publish_time_long, 'monthEn')}}</i>
</span>
<span class="time-day">/{{formatTime(editorial.publish_time_long, 'day')}}</span>
</div>
</div>
<div v-if="!scrollDisabled" class="is-loading">loading...</div>
</div>
<div v-if="!scrollDisabled" class="is-loading">loading...</div>
</div>
</template>
<style>
... ... @@ -124,6 +129,7 @@
import tip from 'common/tip';
import yoho from 'yoho';
import bus from 'common/vue-bus';
import HeaderBox from 'component/header.vue';
export default {
data() {
... ... @@ -202,7 +208,8 @@
}
},
components: {
resources
resources,
HeaderBox
},
created() {
this.getNewsList();
... ...