Authored by 李奇

Merge remote-tracking branch 'origin/release/3.0' into release/3.0

<div class="about-us">
<div id="header">
{{#unless isYohoBuy}}
<div class="blk-header-wrap" class="is-fixed">
<div class="blk-header">
<div class="blk-header-left">
... ... @@ -14,7 +13,6 @@
</div>
<div class="blk-header-gap"></div>
</div>
{{/unless}}
</div>
<div class="icon-container">
<span class="blk-start-icon"></span>
... ...
<div class="yoho-suggest-sub-page yoho-page">
<div id="header">
{{#unless isYohoBuy}}
<div class="blk-header-wrap" class="is-fixed">
<div class="blk-header">
<div class="blk-header-left">
... ... @@ -14,7 +13,6 @@
</div>
<div class="blk-header-gap"></div>
</div>
{{/unless}}
</div>
<div class="suggest-sub-form">
<textarea name="" id="suggest-textarea" placeholder="请写下对于BLK的意见和建议,我们将及时根据您的意见作出改进"></textarea>
... ...
<div class="help">
<div id="header">
{{#unless isYohoBuy}}
<div class="blk-header-wrap" class="is-fixed">
<div class="blk-header">
<div class="blk-header-left">
... ... @@ -14,7 +13,6 @@
</div>
<div class="blk-header-gap"></div>
</div>
{{/unless}}
</div>
<ul>
{{# helpList}}
... ...
<div id="header">
{{#unless isYohoBuy}}
<div class="blk-header-wrap" class="is-fixed">
<div class="blk-header">
<div class="blk-header-left">
... ... @@ -13,7 +12,6 @@
</div>
<div class="blk-header-gap"></div>
</div>
{{/unless}}
</div>
{{#if helpDetail_1}}
{{> helpDetail_1}}
... ...
<div class="vip-privilege-page yoho-page">
{{#unless isYohoBuy}}
<div class="blk-header-wrap">
<div class="blk-header">
<div class="blk-header-left">
... ... @@ -9,7 +8,6 @@
<span class="blk-header-title">VIP特权</span>
</div>
</div>
{{/unless}}
<ul class="privilege-list">
{{#each privilege}}
<li>
... ...
<div class="provisions">
<div id="header">
{{#unless isYohoBuy}}
<div class="blk-header-wrap" class="is-fixed">
<div class="blk-header">
<div class="blk-header-left">
... ... @@ -14,7 +13,6 @@
</div>
<div class="blk-header-gap"></div>
</div>
{{/unless}}
</div>
<section class="detail">
<p>欢迎访问BLK APP!我们以本隐私申明声明对访问者隐私保护的许诺。</p>
... ...
<div id="ssr" class="product-list {{#if isYohoBuy}}no-header{{/if}}" style="position: absolute; top: 0; width: 100%;">
{{#unless isYohoBuy}}
<div id="ssr" class="product-list " style="position: absolute; top: 0; width: 100%;">
<div class="blk-header-wrap" class="is-fixed">
<div class="blk-header">
<div class="blk-header-left">
... ... @@ -13,7 +12,6 @@
</div>
<div class="blk-header-gap"></div>
</div>
{{/unless}}
<div class="top-filter clearfix">
<div class="filter-content">
<ul class="filter-type">
... ...
... ... @@ -254,7 +254,7 @@ const matchHeader = (path, qs, titleMap) => {
};
const intercept = (url) => {
if (yoho.isApp) {
if (yoho.isApp || yoho.isYohoBuy) {
let titleMap = Object.assign({}, defaultTitleMap);
let [path, qs] = url.split('?');
... ...
... ... @@ -15,6 +15,21 @@ import tip from 'common/tip';
/* 空方法 */
const nullFun = () => {};
let isYohoBuy = /YohoBuy/i.test(navigator.userAgent || '');
let $appLink = document.querySelector('#yoho-app-link');
if (isYohoBuy && !$appLink) {
let body = document.querySelector('body');
$appLink = document.createElement('a');
$appLink.id = 'yoho-app-link';
$appLink.href = 'javascript:;';
$appLink.style.display = 'none';
body.appendChild($appLink);
}
/* 提示信息 */
const tipInfo = '暂不支持,请在BLK应用中打开';
const yoho = {
... ... @@ -24,7 +39,7 @@ const yoho = {
isApp: /yh_blk/i.test(navigator.userAgent || '') || /YH_BLK/i.test(navigator.userAgent || ''),
isiOS: /\(i[^;]+;( U;)? CPU.+Mac OS X/i.test(navigator.userAgent || ''),
isAndroid: /Android/i.test(navigator.userAgent || ''),
isYohoBuy: /YohoBuy/i.test(navigator.userAgent || ''),
isYohoBuy: isYohoBuy,
/**
* store
... ... @@ -190,6 +205,24 @@ const yoho = {
method: 'go.newPage',
arguments: args
});
} 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();
} else {
if (args.url) {
window.open(args.url);
... ... @@ -437,4 +470,5 @@ const yoho = {
}
};
export default yoho;
... ...
... ... @@ -25,7 +25,11 @@
title: String,
className: [String, Object, Array],
fixed: Boolean,
scrollFix: Boolean
scrollFix: Boolean,
must: {
type: Boolean,
default: true
}
},
data() {
return {
... ... @@ -39,7 +43,7 @@
},
created() {
if (yoho.isYohoBuy) {
this.showHeader = false;
this.showHeader = this.must; // must为true 必须显示,否则为false
if (this.title) {
document.title = this.title;
}
... ...
<template>
<div class="filter-sub" :class="{'filter-sub-open': isVisible}">
<header-box class="filter-sub-header" :title="filterType">
<header-box class="filter-sub-header" :must="true" :title="filterType">
<i class="icon icon-back" slot="left" @click="hide"></i>
<button class="btn-clear" slot="right" @click="clear">清空</button>
</header-box>
... ...
... ... @@ -157,7 +157,7 @@
created: function() {
const self = this;
this.noheader = yoho.isYohoBuy;
// this.noheader = yoho.isYohoBuy;
bus.$on('list.paging', function() {
self.search();
... ...
... ... @@ -148,7 +148,7 @@
created: function() {
const self = this;
this.noheader = yoho.isYohoBuy;
// this.noheader = yoho.isYohoBuy;
bus.$on('list.paging', function() {
self.search();
... ...
... ... @@ -189,7 +189,7 @@
created() {
const self = this;
this.noheader = yoho.isYohoBuy;
// this.noheader = yoho.isYohoBuy;
this.getShopInfo();
this.search()
... ...