Authored by 李奇

链接跳转修改

import React from 'react';
import yaSDK from 'yoho-activity-sdk';
import './index.scss';
export default class BottomButton extends React.Component {
... ... @@ -13,12 +14,23 @@ export default class BottomButton extends React.Component {
return null;
}
let jump = e => {
let $el = e.currentTarget;
let url = $el.getAttribute('data-url');
if (!url) {
return;
}
yaSDK.link(e)
};
return (
<div className="comp-bottom-btns-wrap">
{
linkArr.map((link, idx) => {
return (
<a href={link.url} className="button-item" key={idx}>
<a data-type='other' data-url={link.url}
className="button-item" key={idx} onClick={jump}>
<img className="btn-item-bg" src={link.bg}/>
</a>
)
... ...
import React from 'react';
import {resource} from '../../../api';
import {image} from '../../../../../common/utils';
import yaSDK from 'yoho-activity-sdk';
import './index.scss';
... ... @@ -35,14 +36,24 @@ export default class Resource extends React.Component {
if (!this.props.code) {
return null;
}
let jump = e => {
let $el = e.currentTarget;
let url = $el.getAttribute('data-url');
if (!url) {
return;
}
yaSDK.link(e)
};
return (
<div className="comp-resource-wrap">
{
floors.map((floor, idx) => {
floors.map((floor) => {
return (
<div className="new-single-img-item" key={floor.template_id}>
<a>
<a data-type='other' data-url={floor.data.list[0].url} onClick={jump}>
<img src={
image(floor.data.list[0].src, floor.data.imageWidth, floor.data.imageHeight)
} alt=""/>
... ...