From f9cae6dd3f1fa701c3f843b711754773a6b8806a Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Wed, 13 Nov 2024 10:39:30 +0800 Subject: [PATCH] fix --- src/app.config.ts | 3 ++- src/pages/Customer/index.less | 3 --- src/pages/Customer/index.tsx | 4 +--- src/pages/Home/index.tsx | 25 +++++++++++++++++++++++++ src/pages/Subscribe/index.tsx | 6 +++--- 5 files changed, 31 insertions(+), 10 deletions(-) diff --git a/src/app.config.ts b/src/app.config.ts index 51b2fa5..1165f5e 100644 --- a/src/app.config.ts +++ b/src/app.config.ts @@ -67,5 +67,6 @@ export default defineAppConfig({ "version": "2.5.2", "provider": "wxa75efa648b60994b" } - } + }, + "requiredBackgroundModes": ["audio", "location"] }) diff --git a/src/pages/Customer/index.less b/src/pages/Customer/index.less index 059368b..a8801bf 100644 --- a/src/pages/Customer/index.less +++ b/src/pages/Customer/index.less @@ -4,7 +4,4 @@ page { .pic { width: 100vw; height: 100vh; - - // width: 300rpx; - // height: 300rpx; } diff --git a/src/pages/Customer/index.tsx b/src/pages/Customer/index.tsx index 2e34698..a99e854 100644 --- a/src/pages/Customer/index.tsx +++ b/src/pages/Customer/index.tsx @@ -1,7 +1,6 @@ import { Image } from '@tarojs/components' import Taro, { useShareAppMessage, useShareTimeline } from '@tarojs/taro' import './index.less' -// import pic from '../../assets/images/1.png' export default function Customer() { @@ -21,8 +20,7 @@ export default function Customer() { return ( { + // Taro.playBackgroundAudio({ + // dataUrl: 'https://alivod.jimeikid.com/sv/3e516a3e-191bb3c3cd6/3e516a3e-191bb3c3cd6.mp3', + // title: '儿童古诗', + // coverImgUrl: 'https://files.jimeikid.com/commodity/b92a701ad285416189e16a6dd406efb1.png' + // }) + +// const backgroundAudioManager = Taro.getBackgroundAudioManager() +// backgroundAudioManager.title = '此时此刻' +// backgroundAudioManager.epname = '此时此刻' +// backgroundAudioManager.singer = '许巍' +// backgroundAudioManager.coverImgUrl = 'https://y.gtimg.cn/music/photo_new/T002R300x300M000003rsKF44GyaSk.jpg?max_age=2592000' +// backgroundAudioManager.src = 'https://alivod.jimeikid.com/sv/3e516a3e-191bb3c3cd6/3e516a3e-191bb3c3cd6.mp3' + +// const innerAudioContext = Taro.createInnerAudioContext() +// innerAudioContext.autoplay = true +// innerAudioContext.src = 'https://storage.360buyimg.com/jdrd-blog/27.mp3' +// innerAudioContext.onPlay(() => { +// console.log('开始播放') +// }) +// innerAudioContext.onError((res) => { +// console.log(res.errMsg) +// console.log(res.errCode) +// }) + + // return if(item.is_subscribed === 0){ //提醒用户登录 setisLoginOpen(true) diff --git a/src/pages/Subscribe/index.tsx b/src/pages/Subscribe/index.tsx index 0fba1d2..258019f 100644 --- a/src/pages/Subscribe/index.tsx +++ b/src/pages/Subscribe/index.tsx @@ -118,7 +118,7 @@ export default function Subscribe() { if(!singleArr.some((arr_item : any) => arr_item === sec_item)){ sec_item.isFree = 0 - sec_item.MallLink = item.MallLink || '' + // sec_item.MallLink = item.MallLink || '' singleArr.push(sec_item) c++ } @@ -188,7 +188,7 @@ export default function Subscribe() { if(!singleArr.some((arr_item : any) => arr_item === sec_item)){ sec_item.isFree = 0 - sec_item.MallLink = item.MallLink || '' + // sec_item.MallLink = item.MallLink || '' singleArr.push(sec_item) } } @@ -284,7 +284,7 @@ export default function Subscribe() { if(!singleArr.some((arr_item : any) => arr_item.PrdtId === sec_item.PrdtId)){ sec_item.isFree = 0 - sec_item.MallLink = item.MallLink || '' + // sec_item.MallLink = item.MallLink || '' singleArr.push(sec_item) c++ }