diff --git a/src/components/UserExchangeModal/index.tsx b/src/components/UserExchangeModal/index.tsx index 66990d5..259c06b 100644 --- a/src/components/UserExchangeModal/index.tsx +++ b/src/components/UserExchangeModal/index.tsx @@ -33,10 +33,9 @@ export default function UserExchangeModal({ isOpen, setIsOpen }: Props) { //唤起扫码 const handleScanCode = () => { - console.log('唤起扫码') Taro.scanCode({ success: (res: any) => { - console.log(res.path.slice(-8)) + console.log('唤起扫码:',res,res.path) if(!Taro.getStorageSync('UserToken')){ setisLoginOpen(true) setuserScene(res.path.slice(-8)) @@ -89,12 +88,13 @@ export default function UserExchangeModal({ isOpen, setIsOpen }: Props) { change_code: inputValue }, success: (res: any) => { - console.log('兑换成功=>', res.data) if(res.data.state === '200'){ const list = res.data.data.Subscribed + console.log('兑换成功=>', list) setPrdtNames(list.map((e: any) => e.PrdtTitle).join(';')) setPrdtList(list) setIsOpen(false) + setisUserExchangeSuccessModalOpen(true) }else if(res.data.state === '207'){ Taro.showToast({ title: '兑换码已使用', @@ -115,50 +115,51 @@ export default function UserExchangeModal({ isOpen, setIsOpen }: Props) { } - if(!isOpen){ - return null - } - return ( <> - setIsOpen(false)} - > - - - 兑换码 + { + isOpen && ( + setIsOpen(false)} > + + + 兑换码 + setIsOpen(false)} + > + + + setinputValue(e.detail.value)} + > + + 兑换 + + + + setisLoginOpen(false)} + > - - setinputValue(e.detail.value)} - > - - 兑换 - - + )} - - setisLoginOpen(false)} - > ) } diff --git a/src/components/UserExchangeSuccessModal/index.tsx b/src/components/UserExchangeSuccessModal/index.tsx index 993a453..46450b9 100644 --- a/src/components/UserExchangeSuccessModal/index.tsx +++ b/src/components/UserExchangeSuccessModal/index.tsx @@ -11,11 +11,13 @@ interface Props{ export default function UserExchangeModal({ isOpen, setIsOpen, prdtNames, prdtList }: Props) { const handleExchange = () => { - if(prdtList[0].PrdtType === '03'){ + if (prdtList[0].PrdtType === '03') { + setIsOpen(false) Taro.navigateTo({ url: '/pages/ListenDetail/index?prdtId=' + prdtList[0].PrdtId }) }else if(prdtList[0].PrdtType === '05'){ + setIsOpen(false) Taro.navigateTo({ url: '/pages/CollectionDetail/index?id=' + prdtList[0].PrdtId }) diff --git a/src/pages/Home/index.less b/src/pages/Home/index.less index cd6e96d..3ead537 100644 --- a/src/pages/Home/index.less +++ b/src/pages/Home/index.less @@ -168,7 +168,7 @@ &:not(:last-child) { padding-bottom: 1rem; margin-bottom: 1rem; - border-bottom: 6px solid #efefef; + border-bottom: 2px solid #efefef; } .hot_info { diff --git a/src/pages/Listen/index.less b/src/pages/Listen/index.less index 10da540..b00d335 100644 --- a/src/pages/Listen/index.less +++ b/src/pages/Listen/index.less @@ -99,7 +99,6 @@ .item { width: 100%; - height: 12.5rem; display: flex; flex-direction: column; gap: 1rem; @@ -133,8 +132,8 @@ background-repeat: no-repeat; background-size: contain; margin: auto 0 auto 0; - } - + } + } .selection { @@ -172,8 +171,8 @@ width: 100%; height: 0; top: 0; - left: 0; - + left: 0; + .free_item_label { position: absolute; left: calc(100% - 3rem); @@ -183,15 +182,15 @@ border-radius: .75rem 0; background-color: #fcca1e; display: flex; - + .free_item_label_text { font-size: .5rem; margin: auto; - } + } } } } } } } -} \ No newline at end of file +} diff --git a/src/pages/ListenSearch/index.tsx b/src/pages/ListenSearch/index.tsx index f2d7103..f565980 100644 --- a/src/pages/ListenSearch/index.tsx +++ b/src/pages/ListenSearch/index.tsx @@ -1,9 +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 searchIcon from '../../assets/images/searchIcon.png' -import empty from '../../assets/images/empty.svg' import './index.less' +import DefaultPage3 from '../../components/defaultPage3' export default function SearchDetail() { @@ -163,13 +162,7 @@ export default function SearchDetail() { } : - - - 抱歉,暂无查询结果 - + searchText && } ) diff --git a/src/pages/SearchDetail/index.less b/src/pages/SearchDetail/index.less index dd1bb9e..acdc10c 100644 --- a/src/pages/SearchDetail/index.less +++ b/src/pages/SearchDetail/index.less @@ -121,7 +121,7 @@ display: grid; grid-template-columns: repeat(3, 1fr); // height: auto; - gap: .625rem; + gap: .8rem .625rem; .subscribe_content_singleItem { width: 100%; @@ -171,7 +171,6 @@ .subscribe_content_collectionItem { width: 100%; - height: calc(((100vw - 2rem - .625rem) / 2) * .5625 + .5rem + 2rem); display: flex; flex-direction: column; @@ -201,14 +200,13 @@ .subscribe_content_singleItem_cover { width: 100%; - height: calc(((100vw - 2rem - .625rem) / 2) * .5625); + height: 5.8rem; border-radius: .75rem; margin-bottom: .625rem; } .subscribe_content_singleItem_title { width: calc(((100vw - 2rem - .625rem) / 2)); - height: 1.25rem; line-height: 1.25rem; font-size: .875rem; font-weight: 600; @@ -219,7 +217,7 @@ } .subscribe_content_collectionItem_count { - height: .625rem; + margin-top: .3rem; line-height: .625rem; font-size: .625rem; color: rgba(0, 0, 0, .3); diff --git a/src/pages/SearchDetail/index.tsx b/src/pages/SearchDetail/index.tsx index cab25ed..791cfc6 100644 --- a/src/pages/SearchDetail/index.tsx +++ b/src/pages/SearchDetail/index.tsx @@ -249,7 +249,6 @@ export default function SearchDetail() { {item.PrdtTitle} @@ -259,7 +258,7 @@ export default function SearchDetail() { } : - searchText && + searchText && } ) diff --git a/src/pages/Subscribe/index.less b/src/pages/Subscribe/index.less index 0f2af98..582adb8 100644 --- a/src/pages/Subscribe/index.less +++ b/src/pages/Subscribe/index.less @@ -126,7 +126,7 @@ display: grid; grid-template-columns: repeat(3, 1fr); // height: auto; - gap: .625rem; + gap: .8rem .625rem; .subscribe_content_singleItem { width: 100%; @@ -160,7 +160,6 @@ .subscribe_content_singleItem_cover { width: 100%; - height: calc((100vw - 2rem - 1.25rem) / 3); border-radius: .75rem; margin-bottom: auto; } @@ -176,7 +175,6 @@ .subscribe_content_collectionItem { width: 100%; - height: calc(((100vw - 2rem - .625rem) / 2) * .5625 + .5rem + 2rem); display: flex; flex-direction: column; @@ -206,14 +204,13 @@ .subscribe_content_singleItem_cover { width: 100%; - height: calc(((100vw - 2rem - .625rem) / 2) * .5625); + height: 5.8rem; border-radius: .75rem; margin-bottom: .625rem; } .subscribe_content_singleItem_title { width: calc(((100vw - 2rem - .625rem) / 2)); - height: 1.25rem; line-height: 1.25rem; font-size: .875rem; font-weight: 600; @@ -224,7 +221,7 @@ } .subscribe_content_collectionItem_count { - height: .625rem; + margin-top: .3rem; line-height: .625rem; font-size: .625rem; color: rgba(0, 0, 0, .3); diff --git a/src/pages/Subscribe/index.tsx b/src/pages/Subscribe/index.tsx index 8f94479..9089edb 100644 --- a/src/pages/Subscribe/index.tsx +++ b/src/pages/Subscribe/index.tsx @@ -566,7 +566,7 @@ export default function Subscribe() { {item.PrdtTitle} @@ -593,7 +593,6 @@ export default function Subscribe() { {item.PrdtTitle} diff --git a/src/pages/UserHome/index.less b/src/pages/UserHome/index.less index 7daeab9..dc3780f 100644 --- a/src/pages/UserHome/index.less +++ b/src/pages/UserHome/index.less @@ -54,7 +54,6 @@ } .user_home_content { - width: calc(100% - 2rem); height: auto; min-height: calc(100% - 6.25rem - 3rem - 2rem); display: flex; @@ -69,7 +68,7 @@ flex-direction: row; padding: 0; background-color: #fff; - + .user_home_content_item_icon { width: 2.5rem; height: 2.5rem; @@ -96,4 +95,4 @@ border: 0; } } -} \ No newline at end of file +}