mirror of
https://gitee.com/ShopeX/ECShopX_mobile-frontend
synced 2026-08-13 06:35:41 +08:00
Merge branch 'feature/store-rule' into 'master'
导购货架-链接跳转失败 See merge request huiqi/ecshopx-vshop!80
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import React, { Component } from 'react'
|
||||
import Taro, { getCurrentInstance } from '@tarojs/taro'
|
||||
import { View, Video } from '@tarojs/components'
|
||||
import { linkPage } from './helper'
|
||||
|
||||
import './film.scss'
|
||||
|
||||
@@ -25,8 +24,6 @@ export default class WgtFilm extends Component {
|
||||
})
|
||||
}
|
||||
|
||||
handleClickItem = linkPage
|
||||
|
||||
resolveSize({ width, height, ratio: tRatio } = {}, screenWidth, base = {}) {
|
||||
const aspectRatios = [16 / 9, 9 / 16, 4 / 3, 3 / 4, 1 / 1]
|
||||
const { proportion = 0 } = base
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import React, { Component } from 'react'
|
||||
import Taro, { getCurrentInstance } from '@tarojs/taro'
|
||||
import { View } from '@tarojs/components'
|
||||
import { linkPage } from './helper'
|
||||
|
||||
import './writing.scss'
|
||||
|
||||
@@ -22,8 +21,6 @@ export default class WgtHeading extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
handleClickItem = linkPage
|
||||
|
||||
handleSwiperChange = (e) => {
|
||||
const { current } = e.detail
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import Taro from '@tarojs/taro'
|
||||
import { WGTS_NAV_MAP } from '@/consts'
|
||||
|
||||
export function linkPage(type, id, item) {
|
||||
export function linkPage(item) {
|
||||
const { id } = item
|
||||
// console.log('[首页模版点击:linkPage]-type',type)
|
||||
// console.log('[首页模版点击:linkPage]-id', id)
|
||||
// console.log('[首页模版点击:linkPage]-item',item)
|
||||
let url = ''
|
||||
|
||||
switch (type) {
|
||||
switch (item.linkPage) {
|
||||
case 'goods':
|
||||
url = '/subpages/guide/item/espier-detail?id=' + id
|
||||
break
|
||||
@@ -33,8 +33,8 @@ export function linkPage(type, id, item) {
|
||||
// return
|
||||
// }
|
||||
|
||||
let is_arr = Array.isArray(type) //活动 ['activity','满折/满减/满赠/限时特惠/任选']
|
||||
is_arr && (url = `/guide/item/promotion-list?type=${type[1]}&id=${id}`)
|
||||
let is_arr = Array.isArray(item.linkPage) //活动 ['activity','满折/满减/满赠/限时特惠/任选']
|
||||
is_arr && (url = `/guide/item/promotion-list?type=${item.linkPage[1]}&id=${id}`)
|
||||
|
||||
Taro.navigateTo({
|
||||
url
|
||||
|
||||
@@ -31,7 +31,7 @@ function WgtImgHotZone(props) {
|
||||
return
|
||||
}
|
||||
|
||||
linkPage(item.linkPage, item.id, item)
|
||||
linkPage(item)
|
||||
}
|
||||
const onClickAddCart = async (id) => {
|
||||
if (!S.getAuthToken()) {
|
||||
|
||||
@@ -75,7 +75,7 @@ export default class WgtLimittimeSlider extends Component {
|
||||
>
|
||||
<View
|
||||
style={`padding: 0 ${Taro.pxTransform(config.sliderSpace || 0)}`}
|
||||
onClick={this.handleClickItem.bind(this, item.linkPage, item.id)}
|
||||
onClick={this.handleClickItem.bind(this, item)}
|
||||
>
|
||||
<Image mode='widthFix' className='slider-item__img' src={item.imgUrl} />
|
||||
</View>
|
||||
|
||||
@@ -14,9 +14,7 @@ export default class WgtNavigation extends Component {
|
||||
info: null
|
||||
}
|
||||
|
||||
handleClickItem(item, index) {
|
||||
linkPage(item.linkPage, item.id)
|
||||
}
|
||||
handleClickItem = linkPage
|
||||
|
||||
render() {
|
||||
const { info } = this.props
|
||||
|
||||
@@ -17,9 +17,7 @@ export default class WgtShowCase extends Component {
|
||||
|
||||
navigateTo = navigateTo
|
||||
|
||||
handleClickItem(item, index) {
|
||||
linkPage(item.linkPage, item.id, item)
|
||||
}
|
||||
handleClickItem = linkPage
|
||||
|
||||
render() {
|
||||
const { info } = this.props
|
||||
|
||||
@@ -56,7 +56,7 @@ export default class WgtSliderHotzone extends Component {
|
||||
return
|
||||
}
|
||||
|
||||
linkPage(item.linkPage, item.id, item)
|
||||
linkPage(item)
|
||||
}
|
||||
onClickAddCart = async (id) => {
|
||||
if (!S.getAuthToken()) {
|
||||
|
||||
Reference in New Issue
Block a user