yujialong 4 weeks ago
parent 9d1518eb8a
commit 10fc0dd24e
  1. 2
      src/app.config.ts
  2. 1
      src/assets/images/empty.svg
  3. 6
      src/components/gift/index.less
  4. 16
      src/components/gift/index.tsx
  5. 5
      src/pages/Customer/index.config.ts
  6. 7
      src/pages/Customer/index.less
  7. 14
      src/pages/Customer/index.tsx
  8. 3
      src/pages/Home/index.tsx
  9. 3
      src/pages/Listen/index.tsx
  10. 8
      src/pages/Share/index.less
  11. 2
      src/pages/Share/index.tsx
  12. 5
      src/pages/Subscribe/index.tsx
  13. 2
      src/pages/UserHome/UserMessage/index.tsx
  14. 89
      src/pages/UserHome/UserSubscribe/index.less
  15. 56
      src/pages/UserHome/UserSubscribe/index.tsx
  16. 5
      src/pages/UserHome/index.tsx
  17. 5
      src/pages/Vip/index.config.ts
  18. 39
      src/pages/Vip/index.less
  19. 37
      src/pages/Vip/index.tsx

@ -21,6 +21,8 @@ export default defineAppConfig({
'pages/ListenSearch/index',
'pages/ListenBookDisplay/index',
'pages/Share/index',
'pages/Customer/index',
'pages/Vip/index',
],
tabBar: {
color: '#999',

@ -1 +0,0 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1728469377393" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8447" width="200" height="200" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M867.36 197.71a39.5 39.5 0 0 0 0.51-79h-0.47a39.5 39.5 0 0 0 0 79zM844 148.24a25.39 25.39 0 0 1 23.45-15.52h0.32A25.49 25.49 0 1 1 844 148.24zM172.91 353a33.92 33.92 0 1 0 33.92 33.91A33.95 33.95 0 0 0 172.91 353z m0 53.83a19.92 19.92 0 1 1 19.92-19.92 19.94 19.94 0 0 1-19.92 19.87zM226.87 152.77h12.61v12.84a7.58 7.58 0 0 0 15.15 0v-12.84h12.61a7.58 7.58 0 0 0 0-15.15h-12.61v-12.79a7.58 7.58 0 1 0-15.15 0v12.79h-12.61a7.58 7.58 0 0 0 0 15.15zM137.18 668.17h12.61v12.76a7.58 7.58 0 1 0 15.15 0V668.1h12.61a7.58 7.58 0 0 0 0-15.15h-12.61v-12.8a7.58 7.58 0 0 0-15.15 0V653l-12.61 0.08a7.57 7.57 0 0 0 0 15.14zM947.32 606.64h-12.6v-12.8a7.58 7.58 0 0 0-15.15 0v12.8H907a7.58 7.58 0 1 0 0 15.15h12.61v12.83a7.58 7.58 0 0 0 15.15 0v-12.83h12.6a7.58 7.58 0 1 0 0-15.15zM375.13 416.34H519a11.47 11.47 0 0 0 0-22.93H375.13a11.47 11.47 0 1 0 0 22.93zM588.23 466.39a11.48 11.48 0 0 0-11.47-11.47H375.13a11.47 11.47 0 1 0 0 22.93h201.63a11.48 11.48 0 0 0 11.47-11.46zM477.36 516.43H375.13a11.47 11.47 0 1 0 0 22.93h102.23a11.47 11.47 0 1 0 0-22.93zM173 814.67H87.79a15.47 15.47 0 1 0 0 30.93H173a15.47 15.47 0 0 0 0-30.93z" fill="#3BA366" p-id="8448"></path><path d="M917.39 744.7h-75.56V268.84a29.08 29.08 0 0 0-29-29H406.55a29.14 29.14 0 0 0-29 29v41.76h-71.98a29.14 29.14 0 0 0-29 29v475.9h-59.2a15.11 15.11 0 1 0 0 30.21h379.25l44.66 44.66 0.11 0.11a19.75 19.75 0 0 0 27.93-27.88l-16.85-16.89H760.7a15.11 15.11 0 1 0 0-30.21H741v-40.59h176.4a15.11 15.11 0 1 0 0-30.21z m-185-425.59a28.8 28.8 0 0 0-20.52-8.51H407.73V270h403.89v474.7h-70.77V339.64a28.81 28.81 0 0 0-8.51-20.53zM467.51 766.75h-0.09a76 76 0 1 1 0.09 0z m88-8.6l-3.36-3.36a107 107 0 1 0-17.84 18.34l2.74 2.73a19.62 19.62 0 0 0 5.87 15.9l23.6 23.6H306.76V340.82h403.88V815.5h-88.51L570.62 764a19.68 19.68 0 0 0-15.13-5.85z" fill="#3BA366" p-id="8449"></path></svg>

Before

Width:  |  Height:  |  Size: 2.1 KiB

@ -0,0 +1,6 @@
.gift_icon {
position: fixed;
bottom: 5rem;
right: 2rem;
width: 4rem;
}

@ -0,0 +1,16 @@
import { Image } from '@tarojs/components'
import Taro from '@tarojs/taro';
import './index.less'
import giftIcon from '../../assets/images/gift.svg'
export default function Gift() {
const toCustomer = () => {
Taro.navigateTo({
url: '/pages/Customer/index',
})
}
return (
<Image src={giftIcon} mode='widthFix' className='gift_icon' onClick={toCustomer}></Image>
)
}

@ -0,0 +1,5 @@
export default {
navigationBarTitleText: '添加客服',
enableShareAppMessage: true,
enableShareTimeline: true,
}

@ -0,0 +1,7 @@
page {
overflow: hidden;
}
.pic {
width: 100vw;
height: 100vh;
}

@ -0,0 +1,14 @@
import { Image } from '@tarojs/components'
import './index.less'
import customerPic from '../../assets/images/customer.svg'
export default function Customer() {
return (
<Image
src={customerPic}
className='pic'
mode='aspectFill'
></Image>
)
}

@ -5,6 +5,7 @@ import './index.less'
import GetPhoneNumber from '../../components/getPhoneModal'
import GoToStoreModal from '../../components/goToStoreModal'
import UserExchangeSuccessModal from '../../components/UserExchangeSuccessModal'
import Gift from '../../components/gift'
interface FreeItemProps {
Child: any[],
@ -399,6 +400,8 @@ export default function Home() {
</View>
<Gift />
<UserExchangeSuccessModal prdtList={prdtList} prdtNames={prdtNames} isOpen={isUserExchangeSuccessModalOpen} setIsOpen={setisUserExchangeSuccessModalOpen}></UserExchangeSuccessModal>

@ -3,6 +3,7 @@ import React, { useEffect, useState } from 'react'
import Taro, { useDidShow } from '@tarojs/taro'
import './index.less'
import GetPhoneNumber from '../../components/getPhoneModal'
import Gift from '../../components/gift'
// const areaList = [
// {
@ -304,6 +305,8 @@ export default function Listen() {
}
</View>
<Gift />
<GetPhoneNumber
onClose={setisGetUsePhone}
modalVisible={isLoginOpen}

@ -1,9 +1,7 @@
page {
overflow: hidden;
}
.pic {
width: 100vw;
height: 100vh;
// background: url(../../assets/images/share.svg) 0 0/100% 100% no-repeat;
// background-image: url(../../assets/images/share.svg);
// background-repeat: no-repeat;
// background-size: cover;
}

@ -4,7 +4,7 @@ import React, { useState } from 'react'
import './index.less'
import sharePic from '../../assets/images/share.svg'
export default function ListenDisplay() {
export default function Share() {
useShareAppMessage((res) => {
if (res.from === 'button') {
console.log(res.target);

@ -4,10 +4,9 @@ import { Image, Input, ScrollView, View, Text } from '@tarojs/components'
import PopupHalfScreen from '../../components/Popup'
import DefaultPage1 from '../../components/defaultPage1'
import DefaultPage2 from '../../components/defaultPage2'
import GetPhoneNumber from '../../components/getPhoneModal'
import GoToStoreModal from '../../components/goToStoreModal'
import errorIcon from '../../assets/images/error.png'
import Gift from '../../components/gift'
import './index.less'
import DefaultPage3 from '../../components/defaultPage3'
@ -662,6 +661,8 @@ export default function Subscribe() {
></DefaultPage1>
}
<Gift />
<GetPhoneNumber
onClose={setisGetUsePhone}
scene={userScene}

@ -14,7 +14,7 @@ interface subscribeProps {
PrdtTitle: string,
}
export default function UserSubscribe() {
export default function UserMessage() {
useShareAppMessage((res) => {
if (res.from === 'button') {

@ -1,7 +1,94 @@
.subscribe_bg {
height: 100vh;
background: #fafafa;
padding: 0 1rem;
padding: 1rem;
.subscribe_header {
width: 100%;
height: 2.75rem;
display: flex;
flex-direction: row;
margin-bottom: 1rem;
.subscribe_header_input {
width: calc(100% - 2.5rem - 2rem);
height: 2.5rem;
background: #f8f8f8;
border-radius: 2.25rem;
padding-left: 1rem;
border: .0625rem solid green;
}
.subscribe_header_dressing {
width: 2.5rem;
height: 2.5rem;
background-image: url(https://oss.jm-kid.com/wx_5colorflower/screenIcon.svg);
background-repeat: no-repeat;
background-size: cover;
margin: auto 0 auto auto;
}
.subscribe_header_scanCodeBtn {
position: absolute;
top: 1.5625rem;
left: 2rem;
width: 1.5rem;
height: 1.5rem;
}
.subscribe_header_errorIcon {
position: absolute;
top: 1.5625rem;
right: calc(2rem + 3.375rem);
width: 1.5rem;
height: 1.5rem;
z-index: 999;
}
.subscribe_header_searchContainer {
position: relative;
width: 0;
height: 2.5rem;
top: calc(2.5rem + .125rem);
left: 0;
.subscribe_searchContainer {
position: absolute;
left: 1.125rem;
width: calc(100vw - 2rem - 3.375rem - 2.25rem);
height: auto;
background: #fafafa;
display: flex;
flex-direction: column;
z-index: 999;
opacity: .9;
.subscribe_searchItem {
// width: 100%;
width: auto;
height: 2.5rem;
background: #fff;
border: .0625rem solid #f8f8f8;
display: flex;
flex-direction: row;
.subscribe_searchItem_cover {
width: 2.5rem;
height: 2.5rem;
}
.subscribe_searchItem_title {
width: auto;
font-size: 1.125rem;
font-weight: 600;
margin: auto .25rem;
}
}
}
}
}
.subscribe_scrollview {
height: 100vh;

@ -1,7 +1,8 @@
import { ScrollView, View, Text } from '@tarojs/components'
import React, { useState } from 'react'
import { ScrollView, View, Text, Input, Image } from '@tarojs/components'
import React, { useState, useEffect } from 'react'
import Taro, { useLoad, useShareAppMessage, useShareTimeline } from '@tarojs/taro'
import DefaultPage2 from '../../../components/defaultPage2'
import PopupHalfScreen from '../../../components/Popup'
import './index.less'
interface subscribeProps {
@ -35,6 +36,18 @@ export default function UserSubscribe() {
const [userSubuscribed, setuserSubuscribed] = useState<subscribeProps[]>()
const [timer, setTimer] = useState<any>(null);
//搜索框内容
const [searchValue, setsearchValue] = useState('')
//搜索内容
const [searchResult, setsearchResult] = useState([])
const [isPopupOpen, setisPopupOpen] = useState(false)
//记录用户筛选状态
const [isFilter, setisFilter] = useState('')
useLoad(() => {
Taro.request({
url: 'https://interapi.jm-kid.com/api/user/subscribed',
@ -49,6 +62,18 @@ export default function UserSubscribe() {
})
})
// 搜索逻辑
const handleSearch = () => {
// const searchSingle = searchValue ? userSubuscribed.filter(( item:any ) => item.PrdtTitle.includes(searchValue)) : []
// console.log('searchSingle=>', searchSingle)
// setSearchSingleResults(searchSingle)
};
useEffect(() => {
clearTimeout(timer)
setTimer(setTimeout(handleSearch, 300))
}, [searchValue])
//跳转详情页
const handleToCollectionDetail = (id: string) => {
Taro.navigateTo({
@ -58,6 +83,33 @@ export default function UserSubscribe() {
return (
<View className='subscribe_bg'>
<View className='subscribe_header'>
<View
className='subscribe_header_searchContainer'
>
</View>
<Input
className='subscribe_header_input'
placeholder='请输入绘本套装名称'
value={searchValue}
confirmType='search'
onInput={(e) => {
setsearchValue(e.detail.value)
}}
></Input>
<View
className='subscribe_header_dressing'
onClick={() => setisPopupOpen(!isPopupOpen)}
></View>
</View>
<PopupHalfScreen
visible={isPopupOpen}
onClose={() => setisPopupOpen(!isPopupOpen)}
isfilter={isFilter}
onFilter={setisFilter}
></PopupHalfScreen>
<ScrollView
scrollY
scrollWithAnimation

@ -2,6 +2,7 @@ import React, { useEffect, useState } from 'react'
import Taro, { useDidHide, useDidShow, useLoad, useShareAppMessage, useShareTimeline } from '@tarojs/taro'
import { Button, Image, View, Text } from '@tarojs/components'
import UserExchangeModal from '../../components/UserExchangeModal'
import Gift from '../../components/gift'
import serviceIcon from '../../assets/images/service.svg'
import storeIcon from '../../assets/images/store.png'
@ -20,7 +21,7 @@ const userOperateList = [
index: 2,
name: '熏听会员',
icon: 'https://oss.jm-kid.com/wx_5colorflower/operate2.svg',
pushUrl: '/pages/UserHome/UserSubscribe/index',
pushUrl: '/pages/Vip/index',
des: '未开通',
},
{
@ -221,6 +222,8 @@ export default function UserHome() {
}
</View>
<Gift />
<UserExchangeModal isOpen={isUserExchangeModalOpen} setIsOpen={setisUserExchangeModalOpen}></UserExchangeModal>
<GetPhoneNumber

@ -0,0 +1,5 @@
export default {
navigationBarTitleText: '熏听会员',
enableShareAppMessage: true,
enableShareTimeline: true,
}

@ -0,0 +1,39 @@
.vip {
padding: 1rem;
}
.vip_card {
display: flex;
align-items: center;
padding: 1.5rem;
border: 2px solid #ffd0c6;
border-radius: 1.5rem;
background: linear-gradient(to right, #fcc1b5 20%, #f8c8bd 50%, #fce4df 100%);
.vip_avatar{
width: 3.75rem;
height: 3.75rem;
margin-right: 1rem;
border: .0625rem solid #ccc;
border-radius: 50%;
}
.vip_name {
margin-bottom: .5rem;
font-size: 1rem;
font-weight: 600;
color: #714135;
}
.vip_status {
font-size: .8rem;
color: #935d4f;
}
.vip_open {
position: absolute;
top: 4rem;
right: 3rem;
padding: .3rem .8rem;
font-size: .9rem;
font-weight: 600;
color: #68392d;
border: 2px solid;
border-radius: 1.5rem;
}
}

@ -0,0 +1,37 @@
import { View, Text, Image } from '@tarojs/components'
import Taro, { useLoad } from '@tarojs/taro'
import React, { useState } from 'react'
import './index.less'
export default function Share() {
const [userAvator, setuserAvator] = useState('')
const [userNickName, setuserNickName] = useState('')
const handleShare = () => {
}
useLoad((query)=> {
if(Taro.getStorageSync('UserToken')){
setuserAvator(Taro.getStorageSync('UserAvatar'))
setuserNickName(Taro.getStorageSync('UserNickName'))
}
})
return (
<View className='vip'>
<View className='vip_card'>
<Image className='vip_avatar'
src={userAvator === '' ? 'https://oss.jm-kid.com/wx_5colorflower/header.svg' : userAvator}
></Image>
<View className='vip_info'>
<View className='vip_name'>{userNickName}</View>
<View className='vip_status'></View>
</View>
<View className='vip_open'></View>
</View>
</View>
)
}
Loading…
Cancel
Save