diff --git a/src/components/UserExchangeModal/index.less b/src/components/UserExchangeModal/index.less index c9e523c..688487d 100644 --- a/src/components/UserExchangeModal/index.less +++ b/src/components/UserExchangeModal/index.less @@ -14,7 +14,6 @@ left: 50%; transform: translate(-50%, -50%); width: calc(18rem - 2rem); - height: calc(15rem - 1.875rem); background: #fff; border-radius: 1rem; display: flex; @@ -57,9 +56,12 @@ .exchange_input { width: 100%; - height: 2rem; - margin: 0 auto; + height: 2.3rem; + padding: .6rem .5rem; + margin: .5rem auto; + font-size: .9rem; background-color: #f8f8f8; + box-sizing: border-box; } .exchange_exchange { @@ -79,4 +81,4 @@ margin: auto; } } -} \ No newline at end of file +} diff --git a/src/components/UserExchangeModal/index.tsx b/src/components/UserExchangeModal/index.tsx index feb7ba1..faadf1f 100644 --- a/src/components/UserExchangeModal/index.tsx +++ b/src/components/UserExchangeModal/index.tsx @@ -10,7 +10,7 @@ interface Props{ } export default function UserExchangeModal({ isOpen, setIsOpen }: Props) { - + const [inputValue, setinputValue] = useState('') const [userScene, setuserScene] = useState(null) @@ -48,7 +48,7 @@ export default function UserExchangeModal({ isOpen, setIsOpen }: Props) { s_res.data.data.Subscribed.forEach(element => { modalContent += `${element.PrdtTitle};` }) - + Taro.showModal({ title: '兑换成功', content: modalContent, @@ -83,7 +83,7 @@ export default function UserExchangeModal({ isOpen, setIsOpen }: Props) { } }) } - + } }) } @@ -148,40 +148,40 @@ export default function UserExchangeModal({ isOpen, setIsOpen }: Props) { icon: 'none' }) } - + } if(!isOpen){ return null } - + return ( <> - setIsOpen(false)} > 兑换码 - setIsOpen(false)} > - - setinputValue(e.detail.value)} + onInput={(e) => setinputValue(e.detail.value)} > 兑换 diff --git a/src/components/defaultPage2/index.tsx b/src/components/defaultPage2/index.tsx index cfc7d4d..b1e624c 100644 --- a/src/components/defaultPage2/index.tsx +++ b/src/components/defaultPage2/index.tsx @@ -1,31 +1,31 @@ import { View, Text, Image } from '@tarojs/components' -import { useState } from 'react' +import Taro from '@tarojs/taro'; import './index.less' -import GoToStoreModal from '../goToStoreModal' export default function DefaultPage2() { + const handleNavigateToMiniProgram = () => { + Taro.navigateToMiniProgram({ + appId: 'wxbd3d383851fea776', + path: 'pages/home/dashboard/index', + success: (res) => { + console.log('打开成功=>',res) + }, + fail: (res) => { + console.log('打开失败=>',res) + } + }) + } - const [isToStoreOpen, setisToStoreOpen] = useState(false) - return ( 当前没有订阅绘本,请前往商城购买哦~ - { - setisToStoreOpen(true) - }} + onClick={handleNavigateToMiniProgram} > 去选购~ - - setisToStoreOpen(false)} - type={0} - setmallLink={()=>{}} - > ) } diff --git a/src/components/defaultPage3/index.less b/src/components/defaultPage3/index.less index 1ae262d..d4ceeae 100644 --- a/src/components/defaultPage3/index.less +++ b/src/components/defaultPage3/index.less @@ -1,19 +1,15 @@ .default3_bg { display: flex; - height: 100%; - width: 100%; flex-direction: column; - margin: auto; - gap: 1.25rem; + justify-content: center; + align-items: center; + padding-top: 2rem; .default1_img { width: 15.625rem; - height: 15.625rem; - margin: auto auto 1rem auto; } .default1_context { - margin: 0 auto auto auto; color: black; font-size: .875rem; font-weight: 600; @@ -33,4 +29,4 @@ // font-size: .875rem; // } // } -} \ No newline at end of file +} diff --git a/src/pages/DisplayVideo/index.less b/src/pages/DisplayVideo/index.less index 723bdb5..8cc0b9c 100644 --- a/src/pages/DisplayVideo/index.less +++ b/src/pages/DisplayVideo/index.less @@ -20,7 +20,7 @@ .displayList { // width: 100vw; // height: 100vh; - // display: flex; + // display: flex; // align-items: center; // margin-top: 12.5rem; height: calc(100vh - 100vw * .5625); @@ -33,16 +33,19 @@ width: 100vw; height: 6rem; display: flex; - + justify-content: space-between; + padding-right: .75rem; + .card-left { + display: inline-flex; + align-items: center; + } + .card-image { // object-fit: cover; wechatapp中object-fit属性不生效 width: 8rem; height: 4.5rem; border-radius: 1rem; - margin-top: .75rem; - margin-bottom: .75rem; - margin-left: 1.5rem; - margin-right: .75rem; + margin: .75rem; } .card-textarea { @@ -69,7 +72,7 @@ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; - display: flex; + display: flex; .content-icon { width: .9375rem; @@ -91,11 +94,9 @@ } .card-button { - // margin-top: 2.3125rem; - // margin-left: auto; - margin: 2.0625rem 0 0; + margin: 2.0625rem 1.2rem 0 0; width: 1.875rem; height: 1.875rem; } } -} \ No newline at end of file +} diff --git a/src/pages/DisplayVideo/index.tsx b/src/pages/DisplayVideo/index.tsx index 487e078..6ecd2d8 100644 --- a/src/pages/DisplayVideo/index.tsx +++ b/src/pages/DisplayVideo/index.tsx @@ -394,14 +394,16 @@ export default function Index() { { alldata.map((item : any, index: number) => changedisplay(item, index)} > - - - {item['ResTitle']} - - - {getDuration(item['ResDuration'])} + + + + {item['ResTitle']} + + + {getDuration(item['ResDuration'])} + + - ) diff --git a/src/pages/Home/index.less b/src/pages/Home/index.less index 3d02fa7..cd6e96d 100644 --- a/src/pages/Home/index.less +++ b/src/pages/Home/index.less @@ -7,7 +7,7 @@ .home_swiper { width: 100vw; - height: calc(100vw * .5625); + height: calc(100vw * .5625); background: #000; // background-image: url(https://oss.jm-kid.com/wx_5colorflower/banner1.png); // background-repeat: no-repeat; @@ -25,7 +25,7 @@ .swiper_item_img { width: 100%; height: 100%; - } + } } } } @@ -74,7 +74,7 @@ .free_item_label_text { font-size: .5rem; margin: auto; - } + } } } @@ -84,7 +84,7 @@ border-radius: .75rem; margin-bottom: .5rem; } - + .free_item_title { width: calc(((100vw - 2rem - 1.25rem) / 3)); height: 2.5rem; @@ -114,7 +114,7 @@ background: linear-gradient(to right, #329C5E, #3BA366); display: flex; margin: .5rem auto .5rem auto; - + .home_single_checkMore_text { color: #fff; font-size: .75rem; @@ -128,7 +128,7 @@ .home_hot_container { width: calc(100% - 2rem); height: auto; - padding: 0 1rem; + padding: 1rem 1rem 0; display: flex; flex-direction: column; background: #fff; @@ -138,8 +138,8 @@ width: 6rem; height: 1.5rem; display: flex; - margin-bottom: 1rem; - + align-items: center; + .home_hot_title_text { line-height: 1.5rem; font-size: 1rem; @@ -165,6 +165,12 @@ display: flex; flex-direction: column; + &:not(:last-child) { + padding-bottom: 1rem; + margin-bottom: 1rem; + border-bottom: 6px solid #efefef; + } + .hot_info { width: 100%; height: auto; @@ -231,20 +237,20 @@ height: auto; gap: .625rem; background: #fff; - + .hot_details_item { width: 100%; height: calc((100vw - 2rem - 1.25rem) / 3 + .5rem + 2.5rem); display: flex; flex-direction: column; - + .hot_details_item_cover { width: 100%; height: calc((100vw - 2rem - 1.25rem) / 3); border-radius: .75rem; margin-bottom: .5rem; } - + .hot_details_item_title { width: calc(((100vw - 2rem - 1.25rem) / 3)); height: 2.5rem; @@ -259,8 +265,8 @@ } } } - + } } - -} \ No newline at end of file + +} diff --git a/src/pages/ListenType/MainType/index.less b/src/pages/ListenType/MainType/index.less index 368b070..02c679b 100644 --- a/src/pages/ListenType/MainType/index.less +++ b/src/pages/ListenType/MainType/index.less @@ -57,7 +57,7 @@ .typelist { height: calc(100vh - 2.5rem); - padding: 0 .7rem; + padding: 0 0.7rem 0 1rem; .item { width: 100%; diff --git a/src/pages/ListenType/SingleType/index.less b/src/pages/ListenType/SingleType/index.less index 71656a5..d635aa3 100644 --- a/src/pages/ListenType/SingleType/index.less +++ b/src/pages/ListenType/SingleType/index.less @@ -40,7 +40,7 @@ .typelist { height: calc(100vh - 6.5rem - 1rem); - padding: 0 .7rem; + padding: 0 0.7rem 0 1rem; .item { width: 100%; diff --git a/src/pages/SearchDetail/index.tsx b/src/pages/SearchDetail/index.tsx index 20e3ef8..cab25ed 100644 --- a/src/pages/SearchDetail/index.tsx +++ b/src/pages/SearchDetail/index.tsx @@ -1,8 +1,8 @@ import { Input, View, Image, Text, ScrollView } from '@tarojs/components' import Taro, { useLoad, useShareAppMessage, useShareTimeline } from '@tarojs/taro' import React, { useState, useEffect } from 'react' -import empty from '../../assets/images/empty.svg' import './index.less' +import DefaultPage3 from '../../components/defaultPage3' export default function SearchDetail() { @@ -43,12 +43,12 @@ export default function SearchDetail() { // 搜索逻辑 const handleSearch = () => { //搜索单本结果 - const searchSingle = userSubscribeSingleList.filter(( item:any ) => item.PrdtTitle.includes(searchText)) + const searchSingle = searchText ? userSubscribeSingleList.filter(( item:any ) => item.PrdtTitle.includes(searchText)) : [] console.log('searchSingle=>', searchSingle) setSearchSingleResults(searchSingle) //搜索套装结果 - const searchCollection = userSubscribeCollectionList.filter(( item:any ) => item.PrdtTitle.includes(searchText)) + const searchCollection = searchText ? userSubscribeCollectionList.filter(( item:any ) => item.PrdtTitle.includes(searchText)) : [] console.log('searchCollection=>', searchCollection) setsearchCollectionResults(searchCollection) }; @@ -222,7 +222,7 @@ export default function SearchDetail() { {item.PrdtTitle} @@ -249,7 +249,7 @@ export default function SearchDetail() { {item.PrdtTitle} @@ -259,13 +259,7 @@ export default function SearchDetail() { } : - - - 抱歉,暂无查询结果 - + searchText && } ) diff --git a/src/pages/SingleDetail/index.tsx b/src/pages/SingleDetail/index.tsx index c95085b..db302f2 100644 --- a/src/pages/SingleDetail/index.tsx +++ b/src/pages/SingleDetail/index.tsx @@ -20,7 +20,7 @@ const tabbarList = [ { tabIndex: 2, name: '听绘本', - cover: 'https://oss.jm-kid.com/wx_5colorflower/detailsTabbar3.png', + cover: 'https://oss.jm-kid.com/wx_5colorflower/detailsTabbar4.png', url: '/pages/ListenBookDisplay/index', }, // { @@ -121,7 +121,7 @@ export default function SingleDetail() { }, success: (res) => { console.log('产品资源获取成功=>', res.data) - + if(res.data.data.StoryResource.length > 0){ setisListenBook(true) } @@ -173,7 +173,7 @@ export default function SingleDetail() { url: url + `?id=${singleDetail?.PrdtId}` }) } - + } return ( @@ -181,11 +181,11 @@ export default function SingleDetail() { - {Taro.navigateBack()}} > @@ -199,13 +199,13 @@ export default function SingleDetail() { { - singleDetail && } - + {singleDetail?.PrdtTitle} @@ -220,7 +220,7 @@ export default function SingleDetail() { )) } - + 绘本介绍 {singleDetail?.PrdtDescription} 绘本配图 @@ -241,7 +241,7 @@ export default function SingleDetail() { {/* { tabbarList.map((item: any, index: number) => ( - handleNavigateTo(item.url)} @@ -260,7 +260,7 @@ export default function SingleDetail() { { tabbarList.map((item: any, index: number) => ( - handleNavigateTo(item.url)} @@ -276,6 +276,6 @@ export default function SingleDetail() { } - + ) } diff --git a/src/pages/Subscribe/index.less b/src/pages/Subscribe/index.less index d5db0ae..0f2af98 100644 --- a/src/pages/Subscribe/index.less +++ b/src/pages/Subscribe/index.less @@ -88,7 +88,7 @@ } } - + } } @@ -114,9 +114,13 @@ .subscribe_content { width: 100%; - height: calc(100% - 3.75rem - 2.5rem); + height: calc(100% - 3.75rem - 5.8rem); display: flex; flex-direction: column; + &.empty { + height: auto; + margin-bottom: 1rem; + } .subscribe_container { display: grid; @@ -146,11 +150,11 @@ border-radius: .75rem 0; background-color: #fcca1e; display: flex; - + .subscribe_content_singleItem_label_text { font-size: .5rem; margin: auto; - } + } } } @@ -160,7 +164,7 @@ border-radius: .75rem; margin-bottom: auto; } - + .subscribe_content_singleItem_title { width: 100%; height: 2.5rem; @@ -192,11 +196,11 @@ border-radius: .75rem 0; background-color: #fcca1e; display: flex; - + .subscribe_content_singleItem_label_text { font-size: .5rem; margin: auto; - } + } } } @@ -206,7 +210,7 @@ border-radius: .75rem; margin-bottom: .625rem; } - + .subscribe_content_singleItem_title { width: calc(((100vw - 2rem - .625rem) / 2)); height: 1.25rem; @@ -244,30 +248,30 @@ } } } + } - .subscribe_footer { - width: 100%; - height: 2.5rem; - display: flex; - flex-direction: column; - margin-top: auto; - - .subscribe_footer_tips { - // height: 1.25rem; - line-height: 1.125rem; - font-size: .75rem; - color: rgba(0, 0, 0, .3); - text-align: center; - } - - .subscribe_footer_add { - // height: 1.25rem; - line-height: 1.125rem; - font-size: .75rem; - font-weight: 600; - color: #3ba366; - text-align: center; - } + .subscribe_footer { + width: 100%; + height: 2.5rem; + display: flex; + flex-direction: column; + margin-top: .5rem; + + .subscribe_footer_tips { + margin-bottom: .1rem; + line-height: 1.125rem; + font-size: .75rem; + color: rgba(0, 0, 0, .3); + text-align: center; + } + + .subscribe_footer_add { + // height: 1.25rem; + line-height: 1.125rem; + font-size: .75rem; + font-weight: 600; + color: #3ba366; + text-align: center; } } -} \ No newline at end of file +} diff --git a/src/pages/Subscribe/index.tsx b/src/pages/Subscribe/index.tsx index cffcc88..8f94479 100644 --- a/src/pages/Subscribe/index.tsx +++ b/src/pages/Subscribe/index.tsx @@ -100,7 +100,7 @@ export default function Subscribe() { for(let item of res.data.data.FreeProducts){ b++ - + for(let sec_item of item.Child){ if(!singleArr.some((arr_item : any) => arr_item === sec_item)){ @@ -172,7 +172,7 @@ export default function Subscribe() { let singleArr: any = [] for(let item of res.data.data.FreeProducts){ - + for(let sec_item of item.Child){ if(!singleArr.some((arr_item : any) => arr_item === sec_item)){ @@ -217,7 +217,7 @@ export default function Subscribe() { } }) } - + } }, [isFilter]) @@ -257,7 +257,7 @@ export default function Subscribe() { for(let item of res.data.data.FreeProducts){ b++ - + for(let sec_item of item.Child){ if(!singleArr.some((arr_item : any) => arr_item.PrdtId === sec_item.PrdtId)){ @@ -391,7 +391,7 @@ export default function Subscribe() { s_res.data.data.Subscribed.forEach(element => { modalContent += `兑换成功: ${element.PrdtTitle}\n` }) - + Taro.showModal({ title: '兑换成功', content: modalContent, @@ -417,7 +417,7 @@ export default function Subscribe() { } }) } - + } }) } @@ -478,24 +478,25 @@ export default function Subscribe() { }) } } - + return ( - - handleSearch()} onInput={(e) => { setsearchValue(e.detail.value) - }} - onClick={() => handleSearchToDetail()} + }} + onClick={() => handleSearchToDetail()} > - setisPopupOpen(!isPopupOpen)} isfilter={isFilter} onFilter={setisFilter} > - {setuserSelect(0)}} > 单本 - {setuserSelect(1)}} + onClick={()=>{setuserSelect(1)}} > 套装 @@ -534,11 +535,11 @@ export default function Subscribe() { {/* 列表渲染 */} { - isGetUsePhone && + isGetUsePhone && { userSelect === 0 && userSubscribeSingleList.length > 0 && userSubscribeSingleList.map((item: any, index: number) => ( - handleToSingleDetail(item.PrdtId)} @@ -561,7 +562,7 @@ export default function Subscribe() { ) } - + 0 && userSubscribeCollectionList.map((item: any, index: number) => ( - handleToCollectionDetail(item.PrdtId)} @@ -592,7 +593,7 @@ export default function Subscribe() { {item.PrdtTitle} @@ -611,40 +612,41 @@ export default function Subscribe() { } - { - isGetUsePhone && (isFilter === '' || isFilter === 'reset') && - - - { - userSelect === 0 ? `${userSubscribeSingleFreeCount}本免费绘本,${userSubscribeSinglePaidCount}本订阅绘本 ` : `${userSubscribeCollectionFreeCount}套免费绘本,${userSubscribeCollectionPaidCount}套订阅绘本 ` - } - - - 订阅更多绘本 - - - } + + } - { - isGetUsePhone && userSelect === 0 && userSubscribeSingleList.length === 0 && - - } - { - isGetUsePhone && userSelect === 1 && userSubscribeCollectionList.length === 0 && - + { + isGetUsePhone && (isFilter === '' || isFilter === 'reset') && + + + { + userSelect === 0 ? `${userSubscribeSingleFreeCount}本免费绘本,${userSubscribeSinglePaidCount}本订阅绘本 ` : `${userSubscribeCollectionFreeCount}套免费绘本,${userSubscribeCollectionPaidCount}套订阅绘本 ` } - - + + + 订阅更多绘本 + + } - + + { + isGetUsePhone && userSelect === 0 && userSubscribeSingleList.length === 0 && + + } + + { + isGetUsePhone && userSelect === 1 && userSubscribeCollectionList.length === 0 && + + } + {/* 用户未登录 */} { - !isGetUsePhone && + !isGetUsePhone && @@ -652,15 +654,15 @@ export default function Subscribe() { setisLoginOpen(false)} > {/* 跳转商城 */} - setisToStoreOpen(false)} + setisToStoreOpen(false)} type={1} setmallLink={(link: string) => {}} > diff --git a/src/pages/UserHome/UserPersonalInfo/index.less b/src/pages/UserHome/UserPersonalInfo/index.less index 1c4d656..bf28e87 100644 --- a/src/pages/UserHome/UserPersonalInfo/index.less +++ b/src/pages/UserHome/UserPersonalInfo/index.less @@ -11,14 +11,14 @@ height: auto; display: flex; background: #fff; - + .info_avatar { width: 6.25rem; height: 6.25rem; border-radius: 3.125rem; padding: 0; margin: 2rem auto; - + .info_avatar_img { width: 6.25rem; height: 6.25rem; @@ -53,6 +53,9 @@ height: 1.4375rem; padding-left: 1.875rem; } + .phone { + color: #b9b9b9; + } } } @@ -72,4 +75,4 @@ margin: auto; } } -} \ No newline at end of file +} diff --git a/src/pages/UserHome/UserPersonalInfo/index.tsx b/src/pages/UserHome/UserPersonalInfo/index.tsx index c7b6d60..87e9df8 100644 --- a/src/pages/UserHome/UserPersonalInfo/index.tsx +++ b/src/pages/UserHome/UserPersonalInfo/index.tsx @@ -52,7 +52,7 @@ export default function UserPersonalInfo() { } const handleSave = () => { - + console.log('userAvatar=>', userAvatar) if(isChangeAvatar){ Taro.uploadFile({ @@ -77,7 +77,7 @@ export default function UserPersonalInfo() { }) Taro.setStorageSync('UserAvatar', JSON.parse(res.data).data.user.Avatar) Taro.setStorageSync('UserNickName', JSON.parse(res.data).data.user.NickName) - + setisChangeAvatar(false) // Taro.navigateBack() } @@ -101,24 +101,24 @@ export default function UserPersonalInfo() { duration: 2000 }) Taro.setStorageSync('UserNickName', res.data.data.user.NickName) - + setisChangeAvatar(false) // Taro.navigateBack()0000 } }) } - + } return ( - - handleNavigateToMiniProgram()} > {userOperateList[3].name} - @@ -200,11 +200,11 @@ export default function UserHome() { - setisLoginOpen(false)} - > + > ) }