Authored by huangyi

guochao

module.exports = {
routerPath : '/html5/2018/09/guochao',
domain:'https://action.yoho.cn'
domain:'//action.yoho.cn'
}
\ No newline at end of file
... ...
import React, {PureComponent} from 'react';
import './index.scss'
import {collectApi ,checkFavApi} from '../../api/guochaoApi'
import {getQueryObj,linkToMiniApp, invokeMethod,getEnv} from '../../../../../common/utils';
import { Link } from 'react-router-dom'
import {collectApi, checkFavApi} from '../../api/guochaoApi'
import {getQueryObj, linkToMiniApp, invokeMethod, parseUrl} from '../../../../../common/utils';
import {Link} from 'react-router-dom'
import wx from 'weixin-js-sdk';
import config from '../../config'
import config from '../../config';
import cookie from 'react-cookies';
import LazyLoad from 'react-lazy-load'
export default class guochaoHome extends PureComponent {
constructor(props) {
super(props);
this.state = {
env:'',
storage : {},
display:false,
env: '',
storage: {},
display: false,
url: ''
}
this.scrollTop = this.scrollTop.bind(this);
this.init();
document.title = "中西碰撞";
}
init = async () =>{
await this.wxReady();
let result = await checkFavApi({uid:getQueryObj().uid,sessionKey:getQueryObj().session_key });
init = async () => {
let result = await checkFavApi({
uid: cookie.load('app_uid') || getQueryObj().uid || 0,
sessionKey: cookie.load('app_session_key') || getQueryObj().session_key || '',
sessionType: cookie.load('app_client_type') || '',
appVersion: cookie.load('app_version') || ''
});
this.setState({
storage: result.data
})
}
collect = async (id) => {
//判断是否是clicked
if(this.state.storage[id]){
if (this.state.storage[id]) {
return;
}else{
} else {
//判断用户登陆 未登陆跳登陆
if(!parseInt(getQueryObj().uid)) {
if(this.state.env === 'miniprogram'){
if (!parseInt(getQueryObj().uid)) {
if (this.state.env === 'miniprogram') {
return wx.miniProgram.switchTab({url: '/pages/userCenter/userCenter'});
}else{
return invokeMethod('go.login');
}
else {
return this.goLogin('http://ad.yoho.cn/html5/2018/09/guochao/guochao.html')
}
}
//发送请求
let result = await collectApi({id:id,uid:getQueryObj().uid,sessionKey:getQueryObj().session_key });
if(!result.result)
let result = await collectApi({
id: id,
uid: cookie.load('app_uid') || getQueryObj().uid || 0,
sessionKey: cookie.load('app_session_key') || getQueryObj().session_key || '',
sessionType: cookie.load('app_client_type') || '',
appVersion: cookie.load('app_version') || ''
});
if (!result.result)
return;
//替换图标 本地存储
//替换图标
let storage = this.state.storage;
storage[id] = true;
this.setState({
... ... @@ -51,29 +68,77 @@ export default class guochaoHome extends PureComponent {
this.forceUpdate();
}
};
goLogin = (refer, data) => {
let url;
if (refer.indexOf('//') === 0) {
refer = location.protocol + refer;
}
componentDidMount= ()=> {
window.addEventListener('scroll',this.handleScroll);
url = 'http://m.yohobuy.com/signin.html?refer=' + encodeURIComponent(refer);
refer = parseUrl(refer || location.href);
if (this.state.env == 'app') {
if (/Android/i.test(navigator.userAgent || '')) {
if (url.indexOf('?') < 0) {
url += '?appLogin=1';
}
if (location.href.indexOf('&openby') >= 0) {
url = url.substring(0, url.indexOf('&openby'));
}
url += '&';
} else {
if (location.href.indexOf('#openby') >= 0) {
url = url.substring(0, url.indexOf('#openby'));
}
url += '#';
}
url += 'openby:yohobuy=' + (data || JSON.stringify({
action: 'go.weblogin',
params: {
priority: 'N',
jumpurl: {
url: refer.path,
param: refer.query
},
needlogout: 'Y'
}
}));
}
this.setState({url: url}, () => {
document.getElementById('url').click();
});
return false;
};
componentDidMount = () => {
window.addEventListener('scroll', this.handleScroll);
this.wxReady();
};
componentWillUnmount= ()=> {
window.removeEventListener('scroll',this.handleScroll);
componentWillUnmount = () => {
window.removeEventListener('scroll', this.handleScroll);
};
handleScroll=()=> {
let _this = this;
if (window.pageYOffset >100) {
_this.setState({ display: true });
}else {
_this.setState({ display: false });
handleScroll = () => {
let _this = this;
if (window.pageYOffset > 100) {
_this.setState({display: true});
} else {
_this.setState({display: false});
}
};
wxReady= async ()=> {
let envFlag = await getEnv();
if (!envFlag && navigator.userAgent.match(/miniProgram/i)) {
this.setState({env:"miniprogram"});
wxReady = async () => {
let envFlag = window.__wxjs_environment;
if (!envFlag && navigator.userAgent.match(/yohobuy/i)) {
document.addEventListener('deviceready', function () {
});
this.setState({env: "app"});
} else if (!envFlag && navigator.userAgent.match(/miniProgram/i)) {
this.setState({env: "miniprogram"});
envFlag = true
} else {
this.setState({env: 'h5'})
}
if (envFlag) {
if (wx.miniProgram.postMessage) {
... ... @@ -83,188 +148,354 @@ export default class guochaoHome extends PureComponent {
}
});
}
this.setState({env:"miniprogram"});
this.setState({env: "miniprogram"});
}
};
scrollTop= ()=> {
scrollTop = () => {
let _this = this;
let timer = setTimeout(function() {
let timer = setTimeout(function () {
window.scrollBy(0, -100);
if (window.pageYOffset <= 0) {
clearTimeout(timer);
}else{
} else {
_this.scrollTop();
}
}, 20);
};
render (){
let env = this.state.env;
return(
render() {
let {env, url} = this.state;
return (
<div className='wrap'>
<Link to={config.routerPath+'/top40.html'} className='top40'></Link>
<div onClick={this.scrollTop} className={this.state.display?'toTop':''}></div>
<a id='url' href={url}></a>
<a href={config.routerPath + '/top40.html'} className='top40'></a>
<div onClick={this.scrollTop} className={this.state.display ? 'toTop' : ''}></div>
<div className='header'>
</div>
<div className='part1'>
<div className={this.state.storage[1292]?'item_1_1 clicked':'item_1_1 unclick'} onClick={()=>{this.collect(1292)}}></div>
<a className='block_1_1'
data-url='/pages/goodsList/brandStore?shop_id=1292&shop_name=Stussy' onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=1292&openby:yohobuy={"action":"go.shop","params":{"shop_id":"1292","shop_template_type":"1","shop_name":"Stussy","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[282]?'item_1_2 clicked':'item_1_2 unclick'} onClick={()=>{this.collect(282)}}></div>
<a className='block_1_2'
data-url='/pages/goodsList/brandStore?shop_id=282&shop_name=Randomevent' onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=282&openby:yohobuy={"action":"go.shop","params":{"shop_id":"282","shop_template_type":"1","shop_name":"Randomevent","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[3082]?'item_1_3 clicked':'item_1_3 unclick'} onClick={()=>{this.collect(3082)}}></div>
<a className='block_1_3'
data-url='/pages/goodsList/brandStore?shop_id=3082&shop_name=MYGE' onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=3082&openby:yohobuy={"action":"go.shop","params":{"shop_id":"3082","shop_template_type":"1","shop_name":"MYGE","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[3372]?'item_1_4 clicked':'item_1_4 unclick'} onClick={()=>{this.collect(3372)}}></div>
<a className='block_1_4'
data-url='/pages/goodsList/brandStore?shop_id=3372&shop_name=ripndip' onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=3372&openby:yohobuy={"action":"go.shop","params":{"shop_id":"3372","shop_template_type":"1","shop_name":"ripndip","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[3548]?'item_1_5 clicked':'item_1_5 unclick'} onClick={()=>{this.collect(3548)}}></div>
<a className='block_1_5'
data-url='/pages/goodsList/brandStore?shop_id=3548&shop_name=FMACM' onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=3548&openby:yohobuy={"action":"go.shop","params":{"shop_id":"3548","shop_template_type":"1","shop_name":"FMACM","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[25]?'item_1_6 clicked':'item_1_6 unclick'} onClick={()=>{this.collect(25)}}></div>
<a className='block_1_6'
data-url='/pages/goodsList/brandStore?shop_id=25&shop_name=kissfunk' onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=25&openby:yohobuy={"action":"go.shop","params":{"shop_id":"25","shop_template_type":"1","shop_name":"kissfunk","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[3350]?'item_1_8 clicked':'item_1_8 unclick'} onClick={()=>{this.collect(3350)}}></div>
<a className='block_1_8'
data-url='/pages/goodsList/brandStore?shop_id=3350&shop_name=CarrotsbyAnwar' onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=3350&openby:yohobuy={"action":"go.shop","params":{"shop_id":"3350","shop_template_type":"1","shop_name":"CarrotsbyAnwar","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[1898]?'item_1_7 clicked':'item_1_7 unclick'} onClick={()=>{this.collect(1898)}}></div>
<a className='block_1_7'
data-url='/pages/goodsList/brandStore?shop_id=1898&shop_name=Diamond SUPPLY CO.' onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=1898&openby:yohobuy={"action":"go.shop","params":{"shop_id":"1898","shop_template_type":"1","shop_name":"Diamond SUPPLY CO.","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[1330]?'item_1_9 clicked':'item_1_9 unclick'} onClick={()=>{this.collect(1330)}}></div>
<a className='block_1_9'
data-url='/pages/goodsList/brandStore?shop_id=1330&shop_name=THETHING'
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=1330&openby:yohobuy={"action":"go.shop","params":{"shop_id":"1330","shop_template_type":"1","shop_name":"THETHING","is_red_shop":"1"}}'}></a>
<a className="bottom_1" data-url="/pages/goodsList/productPool?productPool=26498&title=街头" onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" :'http://search.m.yohobuy.com/?filter_poolId=26498&title=街头&openby:yohobuy={"action":"go.poollist","params":{"title":"街头","productPool":"26498"}}'}></a>
</div>
<div className='part2'>
<div className={this.state.storage[1306]?'item_2_1 clicked':'item_2_1 unclick'} onClick={()=>{this.collect(1306)}}></div>
<a className='block_2_1'
data-url='/pages/goodsList/brandStore?shop_id=1306&shop_name=STORE by NIGO®' onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=1306&openby:yohobuy={"action":"go.shop","params":{"shop_id":"1306","shop_template_type":"1","shop_name":"STORE by NIGO®","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[1482]?'item_2_2 clicked':'item_2_2 unclick'} onClick={()=>{this.collect(1482)}}></div>
<a className='block_2_2'
data-url='/pages/goodsList/brandStore?shop_id=1482&shop_name=MADNESS' onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=1482&openby:yohobuy={"action":"go.shop","params":{"shop_id":"1482","shop_template_type":"1","shop_name":"MADNESS","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[992]?'item_2_3 clicked':'item_2_3 unclick'} onClick={()=>{this.collect(992)}}></div>
<a className='block_2_3'
data-url='/pages/goodsList/brandStore?shop_id=992&shop_name=ROARINGWILD' onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=992&openby:yohobuy={"action":"go.shop","params":{"shop_id":"992","shop_template_type":"1","shop_name":"ROARINGWILD","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[1474]?'item_2_4 clicked':'item_2_4 unclick'} onClick={()=>{this.collect(1474)}}></div>
<a className='block_2_4'
data-url='/pages/goodsList/brandStore?shop_id=1474&shop_name=Dickies' onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=1474&openby:yohobuy={"action":"go.shop","params":{"shop_id":"1474","shop_template_type":"1","shop_name":"Dickies","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[1472]?'item_2_5 clicked':'item_2_5 unclick'} onClick={()=>{this.collect(1472)}}></div>
<a className='block_2_5'
data-url='/pages/goodsList/brandStore?shop_id=1472&shop_name=NOTHOMME' onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=1472&openby:yohobuy={"action":"go.shop","params":{"shop_id":"1472","shop_template_type":"1","shop_name":"NOTHOMME","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[97]?'item_2_6 clicked':'item_2_6 unclick'} onClick={()=>{this.collect(97)}}></div>
<a className='block_2_6'
data-url='/pages/goodsList/brandStore?shop_id=97&shop_name=DUSTY' onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=97&openby:yohobuy={"action":"go.shop","params":{"shop_id":"97","shop_template_type":"1","shop_name":"DUSTY","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[1298]?'item_2_7 clicked':'item_2_7 unclick'} onClick={()=>{this.collect(1298)}}></div>
<a className='block_2_7'
data-url='/pages/goodsList/brandStore?shop_id=1298&shop_name=Publish' onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=1298&openby:yohobuy={"action":"go.shop","params":{"shop_id":"1298","shop_template_type":"1","shop_name":"Publish","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[1248]?'item_2_8 clicked':'item_2_8 unclick'} onClick={()=>{this.collect(1248)}}></div>
<a className='block_2_8'
data-url="/pages/goodsList/brandStore?shop_id=1248&shop_name=LEVI'S" onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : `https://m.yohobuy.com/product/index/brand?shop_id=1248&openby:yohobuy={"action":"go.shop","params":{"shop_id":"1248","shop_template_type":"1","shop_name":"LEVI'S","is_red_shop":"1"}}`}></a>
<div className={this.state.storage[3520]?'item_2_9 clicked':'item_2_9 unclick'} onClick={()=>{this.collect(3520)}}></div>
<a className='block_2_9'
data-url='/pages/goodsList/brandStore?shop_id=3520&shop_name=MOSTWANTED LAB' onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=3520&openby:yohobuy={"action":"go.shop","params":{"shop_id":"3520","shop_template_type":"1","shop_name":"MOSTWANTED LAB","is_red_shop":"1"}}'}></a>
<a className="bottom_2" data-url="/pages/goodsList/productPool?productPool=26494&title=工装" onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'http://search.m.yohobuy.com/?filter_poolId=26494&title=工装&openby:yohobuy={"action":"go.poollist","params":{"title":"工装","productPool":"26494"}}'}></a>
</div>
<div className='part3'>
<div className={this.state.storage[2642]?'item_3_1 clicked':'item_3_1 unclick'} onClick={()=>{this.collect(2642)}}></div>
<a className='block_3_1'
data-url='/pages/goodsList/brandStore?shop_id=2642&shop_name=Timberland' onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=2642&openby:yohobuy={"action":"go.shop","params":{"shop_id":"2642","shop_template_type":"1","shop_name":"Timberland","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[964]?'item_3_2 clicked':'item_3_2 unclick'} onClick={()=>{this.collect(964)}}></div>
<a className='block_3_2'
data-url='/pages/goodsList/brandStore?shop_id=964&shop_name=ENSHADOWER隐蔽者' onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=964&openby:yohobuy={"action":"go.shop","params":{"shop_id":"964","shop_template_type":"1","shop_name":"ENSHADOWER隐蔽者","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[990]?'item_3_3 clicked':'item_3_3 unclick'} onClick={()=>{this.collect(990)}}></div>
<a className='block_3_3'
data-url='/pages/goodsList/brandStore?shop_id=990&shop_name=TMCAZ' onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=990&openby:yohobuy={"action":"go.shop","params":{"shop_id":"990","shop_template_type":"1","shop_name":"TMCAZ","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[1262]?'item_3_4 clicked':'item_3_4 unclick'} onClick={()=>{this.collect(1262)}}></div>
<a className='block_3_4'
data-url='/pages/goodsList/brandStore?shop_id=1262&shop_name=Herschel Supply' onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=1262&openby:yohobuy={"action":"go.shop","params":{"shop_id":"1262","shop_template_type":"1","shop_name":"Herschel Supply","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[1494]?'item_3_5 clicked':'item_3_5 unclick'} onClick={()=>{this.collect(1494)}}></div>
<a className='block_3_5'
data-url='/pages/goodsList/brandStore?shop_id=1494&shop_name=COMBACK' onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=1494&openby:yohobuy={"action":"go.shop","params":{"shop_id":"1494","shop_template_type":"1","shop_name":"COMBACK","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[292]?'item_3_6 clicked':'item_3_6 unclick'} onClick={()=>{this.collect(292)}}></div>
<a className='block_3_6'
data-url='/pages/goodsList/brandStore?shop_id=292&shop_name=Draconite' onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=292&openby:yohobuy={"action":"go.shop","params":{"shop_id":"292","shop_template_type":"1","shop_name":"Draconite","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[3146]?'item_3_7 clicked':'item_3_7 unclick'} onClick={()=>{this.collect(3146)}}></div>
<a className='block_3_7'
data-url='/pages/goodsList/brandStore?shop_id=3146&shop_name=11 by Boris Bidjan Saberi' onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=3146&openby:yohobuy={"action":"go.shop","params":{"shop_id":"3146","shop_template_type":"1","shop_name":"11 by Boris Bidjan Saberi","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[369]?'item_3_8 clicked':'item_3_8 unclick'} onClick={()=>{this.collect(369)}}></div>
<a className='block_3_8' data-url='/pages/goodsList/brandStore?shop_id=369&shop_name=CHUMS' onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=369&openby:yohobuy={"action":"go.shop","params":{"shop_id":"369","shop_template_type":"1","shop_name":"CHUMS","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[720]?'item_3_9 clicked':'item_3_9 unclick'} onClick={()=>{this.collect(720)}}></div>
<a className='block_3_9'
data-url='/pages/goodsList/brandStore?shop_id=720&shop_name=BABAMA' onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=720&openby:yohobuy={"action":"go.shop","params":{"shop_id":"720","shop_template_type":"1","shop_name":"BABAMA","is_red_shop":"1"}}'}></a>
<a className="bottom_3" onClick={linkToMiniApp} data-type="miniApp" data-url="/pages/goodsList/productPool?productPool=26490&title=机能"
href={env === "miniprogram" ? "javascript:void(0)" : 'http://search.m.yohobuy.com/?filter_poolId=26490&title=机能&openby:yohobuy={"action":"go.poollist","params":{"title":"机能","productPool":"26490"}}'}></a>
</div>
<div className='part4'>
<div className={this.state.storage[1282]?'item_4_2 clicked':'item_4_2 unclick'} onClick={()=>{this.collect(1282)}}></div>
<a className='block_4_2'
data-url='/pages/goodsList/brandStore?shop_id=1282&shop_name=SANKUANZ' onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" :'https://m.yohobuy.com/product/index/brand?shop_id=1282&openby:yohobuy={"action":"go.shop","params":{"shop_id":"1282","shop_template_type":"1","shop_name":"SANKUANZ","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[2312]?'item_4_1 clicked':'item_4_1 unclick'} onClick={()=>{this.collect(2312)}}></div>
<a className='block_4_1'
data-url='/pages/goodsList/brandStore?shop_id=2312&shop_name=UNDERCOVER' onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=2312&openby:yohobuy={"action":"go.shop","params":{"shop_id":"2312","shop_template_type":"1","shop_name":"UNDERCOVER","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[1878]?'item_4_3 clicked':'item_4_3 unclick'} onClick={()=>{this.collect(1878)}}></div>
<a className='block_4_3'
data-url='/pages/goodsList/brandStore?shop_id=1878&shop_name=umamiism' onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" :'https://m.yohobuy.com/product/index/brand?shop_id=1878&openby:yohobuy={"action":"go.shop","params":{"shop_id":"1878","shop_template_type":"1","shop_name":"umamiism","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[3210]?'item_4_4 clicked':'item_4_4 unclick'} onClick={()=>{this.collect(3210)}}></div>
<a className='block_4_4'
data-url='/pages/goodsList/brandStore?shop_id=3210&shop_name=MM6 Maison Margiela' onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=3210&openby:yohobuy={"action":"go.shop","params":{"shop_id":"3210","shop_template_type":"1","shop_name":"MM6 Maison Margiela","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[3576]?'item_4_5 clicked':'item_4_5 unclick'} onClick={()=>{this.collect(3576)}}></div>
<a className='block_4_5'
data-url='/pages/goodsList/brandStore?shop_id=3576&shop_name=ATTEMPT' onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" :'https://m.yohobuy.com/product/index/brand?shop_id=3576&openby:yohobuy={"action":"go.shop","params":{"shop_id":"3576","shop_template_type":"1","shop_name":"ATTEMPT","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[468]?'item_4_6 clicked':'item_4_6 unclick'} onClick={()=>{this.collect(468)}}></div>
<a className='block_4_6' data-url='/pages/goodsList/brandStore?shop_id=468&shop_name=FANTASTIC PLANET怪诞星球' onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=468&openby:yohobuy={"action":"go.shop","params":{"shop_id":"468","shop_template_type":"1","shop_name":"FANTASTIC PLANET怪诞星球","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[3196]?'item_4_7 clicked':'item_4_7 unclick'} onClick={()=>{this.collect(3196)}}></div>
<a className='block_4_7'
data-url='/pages/goodsList/brandStore?shop_id=3196&shop_name=OZ FANTASY' onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=3196&openby:yohobuy={"action":"go.shop","params":{"shop_id":"3196","shop_template_type":"1","shop_name":"OZ FANTASY","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[1938]?'item_4_8 clicked':'item_4_8 unclick'} onClick={()=>{this.collect(1938)}}></div>
<a className='block_4_8'
data-url='/pages/goodsList/brandStore?shop_id=1938&shop_name=MISBHV' onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" :'https://m.yohobuy.com/product/index/brand?shop_id=1938&openby:yohobuy={"action":"go.shop","params":{"shop_id":"1938","shop_template_type":"1","shop_name":"MISBHV","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[3012]?'item_4_9 clicked':'item_4_9 unclick'} onClick={()=>{this.collect(3012)}}></div>
<a className='block_4_9'
data-url='/pages/goodsList/brandStore?shop_id=3012&shop_name=christian dada' onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" :'https://m.yohobuy.com/product/index/brand?shop_id=3012&openby:yohobuy={"action":"go.shop","params":{"shop_id":"3012","shop_template_type":"1","shop_name":"christian dada","is_red_shop":"1"}}'}></a>
<a className="bottom_4" onClick={linkToMiniApp} data-type="miniApp" data-url="/pages/goodsList/productPool?productPool=26496&title=未来感"
href={env === "miniprogram" ? "javascript:void(0)" : 'http://search.m.yohobuy.com/?filter_poolId=26496&title=未来感&openby:yohobuy={"action":"go.poollist","params":{"title":"未来感","productPool":"26496"}}'}></a>
</div>
<LazyLoad height={'57.2rem'}>
<div className='part1'>
<div className={this.state.storage[1292] ? 'item_1_1 clicked' : 'item_1_1 unclick'}
onClick={() => {
this.collect(1292)
}}></div>
<a className='block_1_1'
data-url='/pages/goodsList/brandStore?shop_id=1292&shop_name=Stussy' onClick={linkToMiniApp}
data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=1292&openby:yohobuy={"action":"go.shop","params":{"shop_id":"1292","shop_template_type":"1","shop_name":"Stussy","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[282] ? 'item_1_2 clicked' : 'item_1_2 unclick'}
onClick={() => {
this.collect(282)
}}></div>
<a className='block_1_2'
data-url='/pages/goodsList/brandStore?shop_id=282&shop_name=Randomevent'
onClick={linkToMiniApp}
data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=282&openby:yohobuy={"action":"go.shop","params":{"shop_id":"282","shop_template_type":"1","shop_name":"Randomevent","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[3082] ? 'item_1_3 clicked' : 'item_1_3 unclick'}
onClick={() => {
this.collect(3082)
}}></div>
<a className='block_1_3'
data-url='/pages/goodsList/brandStore?shop_id=3082&shop_name=MYGE' onClick={linkToMiniApp}
data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=3082&openby:yohobuy={"action":"go.shop","params":{"shop_id":"3082","shop_template_type":"1","shop_name":"MYGE","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[3372] ? 'item_1_4 clicked' : 'item_1_4 unclick'}
onClick={() => {
this.collect(3372)
}}></div>
<a className='block_1_4'
data-url='/pages/goodsList/brandStore?shop_id=3372&shop_name=ripndip' onClick={linkToMiniApp}
data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=3372&openby:yohobuy={"action":"go.shop","params":{"shop_id":"3372","shop_template_type":"1","shop_name":"ripndip","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[3548] ? 'item_1_5 clicked' : 'item_1_5 unclick'}
onClick={() => {
this.collect(3548)
}}></div>
<a className='block_1_5'
data-url='/pages/goodsList/brandStore?shop_id=3548&shop_name=FMACM' onClick={linkToMiniApp}
data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=3548&openby:yohobuy={"action":"go.shop","params":{"shop_id":"3548","shop_template_type":"1","shop_name":"FMACM","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[25] ? 'item_1_6 clicked' : 'item_1_6 unclick'}
onClick={() => {
this.collect(25)
}}></div>
<a className='block_1_6'
data-url='/pages/goodsList/brandStore?shop_id=25&shop_name=kissfunk' onClick={linkToMiniApp}
data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=25&openby:yohobuy={"action":"go.shop","params":{"shop_id":"25","shop_template_type":"1","shop_name":"kissfunk","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[3350] ? 'item_1_8 clicked' : 'item_1_8 unclick'}
onClick={() => {
this.collect(3350)
}}></div>
<a className='block_1_8'
data-url='/pages/goodsList/brandStore?shop_id=3350&shop_name=CarrotsbyAnwar'
onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=3350&openby:yohobuy={"action":"go.shop","params":{"shop_id":"3350","shop_template_type":"1","shop_name":"CarrotsbyAnwar","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[1898] ? 'item_1_7 clicked' : 'item_1_7 unclick'}
onClick={() => {
this.collect(1898)
}}></div>
<a className='block_1_7'
data-url='/pages/goodsList/brandStore?shop_id=1898&shop_name=Diamond SUPPLY CO.'
onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=1898&openby:yohobuy={"action":"go.shop","params":{"shop_id":"1898","shop_template_type":"1","shop_name":"Diamond SUPPLY CO.","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[1330] ? 'item_1_9 clicked' : 'item_1_9 unclick'}
onClick={() => {
this.collect(1330)
}}></div>
<a className='block_1_9'
data-url='/pages/goodsList/brandStore?shop_id=1330&shop_name=THETHING'
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=1330&openby:yohobuy={"action":"go.shop","params":{"shop_id":"1330","shop_template_type":"1","shop_name":"THETHING","is_red_shop":"1"}}'}></a>
<a className="bottom_1" data-url="/pages/goodsList/productPool?productPool=26498&title=街头"
onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'http://search.m.yohobuy.com/?filter_poolId=26498&title=街头&openby:yohobuy={"action":"go.poollist","params":{"title":"街头","productPool":"26498"}}'}></a>
</div>
</LazyLoad>
<LazyLoad height={'59.8rem'}>
<div className='part2'>
<div className={this.state.storage[1306] ? 'item_2_1 clicked' : 'item_2_1 unclick'}
onClick={() => {
this.collect(1306)
}}></div>
<a className='block_2_1'
data-url='/pages/goodsList/brandStore?shop_id=1306&shop_name=STORE by NIGO®'
onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=1306&openby:yohobuy={"action":"go.shop","params":{"shop_id":"1306","shop_template_type":"1","shop_name":"STORE by NIGO®","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[1482] ? 'item_2_2 clicked' : 'item_2_2 unclick'}
onClick={() => {
this.collect(1482)
}}></div>
<a className='block_2_2'
data-url='/pages/goodsList/brandStore?shop_id=1482&shop_name=MADNESS' onClick={linkToMiniApp}
data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=1482&openby:yohobuy={"action":"go.shop","params":{"shop_id":"1482","shop_template_type":"1","shop_name":"MADNESS","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[992] ? 'item_2_3 clicked' : 'item_2_3 unclick'}
onClick={() => {
this.collect(992)
}}></div>
<a className='block_2_3'
data-url='/pages/goodsList/brandStore?shop_id=992&shop_name=ROARINGWILD'
onClick={linkToMiniApp}
data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=992&openby:yohobuy={"action":"go.shop","params":{"shop_id":"992","shop_template_type":"1","shop_name":"ROARINGWILD","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[1474] ? 'item_2_4 clicked' : 'item_2_4 unclick'}
onClick={() => {
this.collect(1474)
}}></div>
<a className='block_2_4'
data-url='/pages/goodsList/brandStore?shop_id=1474&shop_name=Dickies' onClick={linkToMiniApp}
data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=1474&openby:yohobuy={"action":"go.shop","params":{"shop_id":"1474","shop_template_type":"1","shop_name":"Dickies","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[1472] ? 'item_2_5 clicked' : 'item_2_5 unclick'}
onClick={() => {
this.collect(1472)
}}></div>
<a className='block_2_5'
data-url='/pages/goodsList/brandStore?shop_id=1472&shop_name=NOTHOMME'
onClick={linkToMiniApp}
data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=1472&openby:yohobuy={"action":"go.shop","params":{"shop_id":"1472","shop_template_type":"1","shop_name":"NOTHOMME","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[97] ? 'item_2_6 clicked' : 'item_2_6 unclick'}
onClick={() => {
this.collect(97)
}}></div>
<a className='block_2_6'
data-url='/pages/goodsList/brandStore?shop_id=97&shop_name=DUSTY' onClick={linkToMiniApp}
data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=97&openby:yohobuy={"action":"go.shop","params":{"shop_id":"97","shop_template_type":"1","shop_name":"DUSTY","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[1298] ? 'item_2_7 clicked' : 'item_2_7 unclick'}
onClick={() => {
this.collect(1298)
}}></div>
<a className='block_2_7'
data-url='/pages/goodsList/brandStore?shop_id=1298&shop_name=Publish' onClick={linkToMiniApp}
data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=1298&openby:yohobuy={"action":"go.shop","params":{"shop_id":"1298","shop_template_type":"1","shop_name":"Publish","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[1248] ? 'item_2_8 clicked' : 'item_2_8 unclick'}
onClick={() => {
this.collect(1248)
}}></div>
<a className='block_2_8'
data-url="/pages/goodsList/brandStore?shop_id=1248&shop_name=LEVI'S" onClick={linkToMiniApp}
data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : `https://m.yohobuy.com/product/index/brand?shop_id=1248&openby:yohobuy={"action":"go.shop","params":{"shop_id":"1248","shop_template_type":"1","shop_name":"LEVI'S","is_red_shop":"1"}}`}></a>
<div className={this.state.storage[3520] ? 'item_2_9 clicked' : 'item_2_9 unclick'}
onClick={() => {
this.collect(3520)
}}></div>
<a className='block_2_9'
data-url='/pages/goodsList/brandStore?shop_id=3520&shop_name=MOSTWANTED LAB'
onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=3520&openby:yohobuy={"action":"go.shop","params":{"shop_id":"3520","shop_template_type":"1","shop_name":"MOSTWANTED LAB","is_red_shop":"1"}}'}></a>
<a className="bottom_2" data-url="/pages/goodsList/productPool?productPool=26494&title=工装"
onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'http://search.m.yohobuy.com/?filter_poolId=26494&title=工装&openby:yohobuy={"action":"go.poollist","params":{"title":"工装","productPool":"26494"}}'}></a>
</div>
</LazyLoad>
<LazyLoad height={'58.7rem'}>
<div className='part3'>
<div className={this.state.storage[2642] ? 'item_3_1 clicked' : 'item_3_1 unclick'}
onClick={() => {
this.collect(2642)
}}></div>
<a className='block_3_1'
data-url='/pages/goodsList/brandStore?shop_id=2642&shop_name=Timberland'
onClick={linkToMiniApp}
data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=2642&openby:yohobuy={"action":"go.shop","params":{"shop_id":"2642","shop_template_type":"1","shop_name":"Timberland","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[964] ? 'item_3_2 clicked' : 'item_3_2 unclick'}
onClick={() => {
this.collect(964)
}}></div>
<a className='block_3_2'
data-url='/pages/goodsList/brandStore?shop_id=964&shop_name=ENSHADOWER隐蔽者'
onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=964&openby:yohobuy={"action":"go.shop","params":{"shop_id":"964","shop_template_type":"1","shop_name":"ENSHADOWER隐蔽者","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[990] ? 'item_3_3 clicked' : 'item_3_3 unclick'}
onClick={() => {
this.collect(990)
}}></div>
<a className='block_3_3'
data-url='/pages/goodsList/brandStore?shop_id=990&shop_name=TMCAZ' onClick={linkToMiniApp}
data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=990&openby:yohobuy={"action":"go.shop","params":{"shop_id":"990","shop_template_type":"1","shop_name":"TMCAZ","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[1262] ? 'item_3_4 clicked' : 'item_3_4 unclick'}
onClick={() => {
this.collect(1262)
}}></div>
<a className='block_3_4'
data-url='/pages/goodsList/brandStore?shop_id=1262&shop_name=Herschel Supply'
onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=1262&openby:yohobuy={"action":"go.shop","params":{"shop_id":"1262","shop_template_type":"1","shop_name":"Herschel Supply","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[1494] ? 'item_3_5 clicked' : 'item_3_5 unclick'}
onClick={() => {
this.collect(1494)
}}></div>
<a className='block_3_5'
data-url='/pages/goodsList/brandStore?shop_id=1494&shop_name=COMBACK' onClick={linkToMiniApp}
data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=1494&openby:yohobuy={"action":"go.shop","params":{"shop_id":"1494","shop_template_type":"1","shop_name":"COMBACK","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[292] ? 'item_3_6 clicked' : 'item_3_6 unclick'}
onClick={() => {
this.collect(292)
}}></div>
<a className='block_3_6'
data-url='/pages/goodsList/brandStore?shop_id=292&shop_name=Draconite'
onClick={linkToMiniApp}
data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=292&openby:yohobuy={"action":"go.shop","params":{"shop_id":"292","shop_template_type":"1","shop_name":"Draconite","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[3146] ? 'item_3_7 clicked' : 'item_3_7 unclick'}
onClick={() => {
this.collect(3146)
}}></div>
<a className='block_3_7'
data-url='/pages/goodsList/brandStore?shop_id=3146&shop_name=11 by Boris Bidjan Saberi'
onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=3146&openby:yohobuy={"action":"go.shop","params":{"shop_id":"3146","shop_template_type":"1","shop_name":"11 by Boris Bidjan Saberi","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[369] ? 'item_3_8 clicked' : 'item_3_8 unclick'}
onClick={() => {
this.collect(369)
}}></div>
<a className='block_3_8' data-url='/pages/goodsList/brandStore?shop_id=369&shop_name=CHUMS'
onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=369&openby:yohobuy={"action":"go.shop","params":{"shop_id":"369","shop_template_type":"1","shop_name":"CHUMS","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[720] ? 'item_3_9 clicked' : 'item_3_9 unclick'}
onClick={() => {
this.collect(720)
}}></div>
<a className='block_3_9'
data-url='/pages/goodsList/brandStore?shop_id=720&shop_name=BABAMA' onClick={linkToMiniApp}
data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=720&openby:yohobuy={"action":"go.shop","params":{"shop_id":"720","shop_template_type":"1","shop_name":"BABAMA","is_red_shop":"1"}}'}></a>
<a className="bottom_3" onClick={linkToMiniApp} data-type="miniApp"
data-url="/pages/goodsList/productPool?productPool=26490&title=机能"
href={env === "miniprogram" ? "javascript:void(0)" : 'http://search.m.yohobuy.com/?filter_poolId=26490&title=机能&openby:yohobuy={"action":"go.poollist","params":{"title":"机能","productPool":"26490"}}'}></a>
</div>
</LazyLoad>
<LazyLoad height={'60.6rem'}>
<div className='part4'>
<div className={this.state.storage[1282] ? 'item_4_2 clicked' : 'item_4_2 unclick'}
onClick={() => {
this.collect(1282)
}}></div>
<a className='block_4_2'
data-url='/pages/goodsList/brandStore?shop_id=1282&shop_name=SANKUANZ'
onClick={linkToMiniApp}
data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=1282&openby:yohobuy={"action":"go.shop","params":{"shop_id":"1282","shop_template_type":"1","shop_name":"SANKUANZ","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[2312] ? 'item_4_1 clicked' : 'item_4_1 unclick'}
onClick={() => {
this.collect(2312)
}}></div>
<a className='block_4_1'
data-url='/pages/goodsList/brandStore?shop_id=2312&shop_name=UNDERCOVER'
onClick={linkToMiniApp}
data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=2312&openby:yohobuy={"action":"go.shop","params":{"shop_id":"2312","shop_template_type":"1","shop_name":"UNDERCOVER","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[1878] ? 'item_4_3 clicked' : 'item_4_3 unclick'}
onClick={() => {
this.collect(1878)
}}></div>
<a className='block_4_3'
data-url='/pages/goodsList/brandStore?shop_id=1878&shop_name=umamiism'
onClick={linkToMiniApp}
data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=1878&openby:yohobuy={"action":"go.shop","params":{"shop_id":"1878","shop_template_type":"1","shop_name":"umamiism","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[3210] ? 'item_4_4 clicked' : 'item_4_4 unclick'}
onClick={() => {
this.collect(3210)
}}></div>
<a className='block_4_4'
data-url='/pages/goodsList/brandStore?shop_id=3210&shop_name=MM6 Maison Margiela'
onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=3210&openby:yohobuy={"action":"go.shop","params":{"shop_id":"3210","shop_template_type":"1","shop_name":"MM6 Maison Margiela","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[3576] ? 'item_4_5 clicked' : 'item_4_5 unclick'}
onClick={() => {
this.collect(3576)
}}></div>
<a className='block_4_5'
data-url='/pages/goodsList/brandStore?shop_id=3576&shop_name=ATTEMPT' onClick={linkToMiniApp}
data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=3576&openby:yohobuy={"action":"go.shop","params":{"shop_id":"3576","shop_template_type":"1","shop_name":"ATTEMPT","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[468] ? 'item_4_6 clicked' : 'item_4_6 unclick'}
onClick={() => {
this.collect(468)
}}></div>
<a className='block_4_6'
data-url='/pages/goodsList/brandStore?shop_id=468&shop_name=FANTASTIC PLANET怪诞星球'
onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=468&openby:yohobuy={"action":"go.shop","params":{"shop_id":"468","shop_template_type":"1","shop_name":"FANTASTIC PLANET怪诞星球","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[3196] ? 'item_4_7 clicked' : 'item_4_7 unclick'}
onClick={() => {
this.collect(3196)
}}></div>
<a className='block_4_7'
data-url='/pages/goodsList/brandStore?shop_id=3196&shop_name=OZ FANTASY'
onClick={linkToMiniApp}
data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=3196&openby:yohobuy={"action":"go.shop","params":{"shop_id":"3196","shop_template_type":"1","shop_name":"OZ FANTASY","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[1938] ? 'item_4_8 clicked' : 'item_4_8 unclick'}
onClick={() => {
this.collect(1938)
}}></div>
<a className='block_4_8'
data-url='/pages/goodsList/brandStore?shop_id=1938&shop_name=MISBHV' onClick={linkToMiniApp}
data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=1938&openby:yohobuy={"action":"go.shop","params":{"shop_id":"1938","shop_template_type":"1","shop_name":"MISBHV","is_red_shop":"1"}}'}></a>
<div className={this.state.storage[3012] ? 'item_4_9 clicked' : 'item_4_9 unclick'}
onClick={() => {
this.collect(3012)
}}></div>
<a className='block_4_9'
data-url='/pages/goodsList/brandStore?shop_id=3012&shop_name=christian dada'
onClick={linkToMiniApp} data-type="miniApp"
href={env === "miniprogram" ? "javascript:void(0)" : 'https://m.yohobuy.com/product/index/brand?shop_id=3012&openby:yohobuy={"action":"go.shop","params":{"shop_id":"3012","shop_template_type":"1","shop_name":"christian dada","is_red_shop":"1"}}'}></a>
<a className="bottom_4" onClick={linkToMiniApp} data-type="miniApp"
data-url="/pages/goodsList/productPool?productPool=26496&title=未来感"
href={env === "miniprogram" ? "javascript:void(0)" : 'http://search.m.yohobuy.com/?filter_poolId=26496&title=未来感&openby:yohobuy={"action":"go.poollist","params":{"title":"未来感","productPool":"26496"}}'}></a>
</div>
</LazyLoad>
<a onClick={linkToMiniApp} data-type="h5" data-url='https://activity.yoho.cn/feature/2969.html'
href={env === "miniprogram" ? "javascript:void(0)" : 'https://activity.yoho.cn/feature/2969.html?openby:yohobuy={"action":"go.h5","params":{"title":"新品节主会场/BOY","url":"https://activity.yoho.cn/feature/2969.html","share":"\\/operations\\/api\\/v5\\/webshare\\/getShare","shareparam":{"share_id":"5601"},"param":{"share_id":"5601"}}}'}
className='bottom'></a>
... ...
... ... @@ -94,7 +94,7 @@ export default class top40 extends PureComponent {
}
return (
<div className='wrap'>
<Link to={config.routerPath+'/guochao.html'} className='back'></Link>
<a href={config.routerPath+'/guochao.html'} className='back'></a>
<div onClick={this.scrollTop} className={this.state.display?'toTop':''}></div>
<div className='up'>
{list(data,0)}
... ...
... ... @@ -28,7 +28,6 @@ const linkToMiniApp = (event) => {
scene = mini_url;
}
console.log('newUrl:', mini_url, scene);
wx.miniProgram.navigateTo({url: scene});
return false;
... ... @@ -72,13 +71,13 @@ const getQueryObj = (link) => {
return query_obj;
};
const invokeMethod = (method, args, success, fail) => {
let emptyFn = function() {};
const invokeMethod = (obj) => {
let appInterface = window.yohoInterface;
if (appInterface) {
appInterface.triggerEvent(success || emptyFn, fail || emptyFn, {
method: method,
arguments: args
appInterface.triggerEvent(obj.success || emptyFn, obj.fail || emptyFn, {
method: obj.method,
arguments: obj.args
});
} else {
console.log('暂不支持,请在YOHO!BUY应用中打开');
... ... @@ -87,15 +86,40 @@ const invokeMethod = (method, args, success, fail) => {
const getEnv = () =>{
return new Promise((resolve)=>{
wx.miniProgram.getEnv(function (res){
wx.miniProgram.getEnv(function (res,err){
if(err){
resolve(err)
}
return resolve(res.miniprogram);
})
})
}
const parseUrl= (url)=> {
let query = {},
hashs,
hash,
i;
url = (url || '').split('?');
hashs = (url[1] || '').split('&');
if (hashs && hashs.length) {
for (i = 0; i < hashs.length; i++) {
hash = hashs[i].split('=');
query[hash[0]] = hash[1];
}
}
return {
path: url[0],
query: query
};
}
export {
getEnv,
invokeMethod,
getQueryObj,
linkToMiniApp
linkToMiniApp,
parseUrl
};
\ No newline at end of file
... ...
... ... @@ -23,6 +23,8 @@
"react-router-dom": "^4.2.2",
"react-slick": "^0.23.1",
"react-loadable": "^5.5.0",
"react-cookies": "^0.1.0",
"react-lazy-load":"^3.0.13",
"weixin-js-sdk": "^1.3.3"
},
"devDependencies": {
... ...