分享封装完成
This commit is contained in:
parent
050f90433c
commit
16ba165fec
@ -92,6 +92,8 @@ export default ({show = false, onClose}: param) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View className={styles.shop_cart_main}>
|
<View className={styles.shop_cart_main}>
|
||||||
|
@ -28,11 +28,20 @@
|
|||||||
font-size: $font_size_min;
|
font-size: $font_size_min;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: $color_font_three;
|
color: $color_font_three;
|
||||||
|
position: relative;
|
||||||
.text{
|
.text{
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
font-size: $font_size_medium;
|
font-size: $font_size_medium;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.shareBtn {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
.miconfont{
|
.miconfont{
|
||||||
font-size: 36px;
|
font-size: 36px;
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
|
|
||||||
import { Button, Image, RichText, Swiper, SwiperItem, View } from '@tarojs/components'
|
import { Button, Image, RichText, Swiper, SwiperItem, View } from '@tarojs/components'
|
||||||
import Taro, { useShareAppMessage } from '@tarojs/taro';
|
import Taro, { useDidShow, useRouter, useShareAppMessage } from '@tarojs/taro';
|
||||||
import classnames from "classnames";
|
import classnames from "classnames";
|
||||||
import DesSwiper from './components/swiper';
|
import DesSwiper from './components/swiper';
|
||||||
import OrderCount from './components/orderCount';
|
import OrderCount from './components/orderCount';
|
||||||
import ShopCart from '@/components/shopCart';
|
import ShopCart from '@/components/shopCart';
|
||||||
import Preview,{colorItem} from './components/preview';
|
import Preview,{colorItem} from './components/preview';
|
||||||
import styles from './index.module.scss'
|
import styles from './index.module.scss'
|
||||||
import { useMemo, useState } from 'react';
|
import { useEffect, useMemo, useState } from 'react';
|
||||||
import useManualPullDownRefresh from '@/use/useManualPullDownRefresh';
|
import useManualPullDownRefresh from '@/use/useManualPullDownRefresh';
|
||||||
|
import { goLink } from '@/common/common';
|
||||||
type item = {title:string, img:string, url:string, id:number}
|
type item = {title:string, img:string, url:string, id:number}
|
||||||
|
|
||||||
type params = {
|
type params = {
|
||||||
@ -18,6 +19,11 @@ type params = {
|
|||||||
}
|
}
|
||||||
export default (props:params) => {
|
export default (props:params) => {
|
||||||
|
|
||||||
|
const router = useRouter()
|
||||||
|
useEffect(() => {
|
||||||
|
console.log('router::',router)
|
||||||
|
}, [])
|
||||||
|
|
||||||
//页面下拉刷新
|
//页面下拉刷新
|
||||||
const res = useManualPullDownRefresh()
|
const res = useManualPullDownRefresh()
|
||||||
|
|
||||||
@ -92,7 +98,8 @@ export default (props:params) => {
|
|||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
title: '自定义转发标题',
|
title: '自定义转发标题',
|
||||||
path: '/page/user?id=123'
|
path: '/pages/details/index?id=10',
|
||||||
|
imageUrl: list[0].img
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -108,7 +115,8 @@ export default (props:params) => {
|
|||||||
<View className={styles.share}>
|
<View className={styles.share}>
|
||||||
<View className={classnames('iconfont icon-fenxiang', styles.miconfont)}></View>
|
<View className={classnames('iconfont icon-fenxiang', styles.miconfont)}></View>
|
||||||
<View className={styles.text}>分享</View>
|
<View className={styles.text}>分享</View>
|
||||||
<Button open-type="share">转发</Button>
|
|
||||||
|
<Button open-type="share" className={styles.shareBtn}></Button>
|
||||||
</View>
|
</View>
|
||||||
<View className={styles.collect}>
|
<View className={styles.collect}>
|
||||||
<View className={classnames('iconfont icon-shoucang', styles.miconfont, collectStatus&&styles.collected)} onClick={() => changeCollect()}></View>
|
<View className={classnames('iconfont icon-shoucang', styles.miconfont, collectStatus&&styles.collected)} onClick={() => changeCollect()}></View>
|
||||||
|
@ -7,8 +7,8 @@ import MoveBtn from '@/components/moveBtn'
|
|||||||
import ShopCart from '@/components/shopCart'
|
import ShopCart from '@/components/shopCart'
|
||||||
import styles from './index.module.scss'
|
import styles from './index.module.scss'
|
||||||
import { goLink } from '@/common/common'
|
import { goLink } from '@/common/common'
|
||||||
import { useState } from 'react'
|
import { useEffect, useState } from 'react'
|
||||||
import Taro, { usePullDownRefresh } from '@tarojs/taro'
|
import Taro, { useDidShow, usePullDownRefresh, useRouter } from '@tarojs/taro'
|
||||||
import useManualPullDownRefresh from '@/use/useManualPullDownRefresh'
|
import useManualPullDownRefresh from '@/use/useManualPullDownRefresh'
|
||||||
|
|
||||||
|
|
||||||
@ -47,6 +47,8 @@ export default () => {
|
|||||||
}, 1000)
|
}, 1000)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MoveBtn onClick={() => setShowShopCart(!showShopCart)}>
|
<MoveBtn onClick={() => setShowShopCart(!showShopCart)}>
|
||||||
<View className={styles.main}>
|
<View className={styles.main}>
|
||||||
|
@ -4,6 +4,7 @@ import Search from '@/components/search'
|
|||||||
import { goLink } from '@/common/common';
|
import { goLink } from '@/common/common';
|
||||||
import classnames from "classnames";
|
import classnames from "classnames";
|
||||||
import styles from './index.module.scss'
|
import styles from './index.module.scss'
|
||||||
|
import { useEffect } from 'react';
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
return (
|
return (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user