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