This commit is contained in:
weipengfei 2024-03-28 18:07:39 +08:00
parent cc3204ea93
commit 5dbcc14ece
9 changed files with 9 additions and 7 deletions

12
App.vue
View File

@ -204,10 +204,11 @@
} }
// #endif // #endif
that.getConfigData(); that.getConfigData();
// setTimeout(()=>{ setTimeout(()=>{
// this.audio('https://lihai001.oss-cn-chengdu.aliyuncs.com/app/out.wav') this.audioTeam = ['/static/audio/zhifubao.MP3','/static/audio/2.MP3','/static/audio/bai.MP3','/static/audio/1.MP3','/static/audio/shi.MP3','/static/audio/3.MP3', '/static/audio/yuan.MP3']
// // this.audio() this.audio(this.audioTeam[0])
// }, 1500) // this.audio('https://lihai001.oss-cn-chengdu.aliyuncs.com/app/out.wav')
}, 1500)
}, },
onShow() { onShow() {
let that = this let that = this
@ -307,6 +308,7 @@
async audio(url) { async audio(url) {
const innerAudioContext = uni.createInnerAudioContext(); const innerAudioContext = uni.createInnerAudioContext();
innerAudioContext.src = url || `/static/audio/order.mp3`; innerAudioContext.src = url || `/static/audio/order.mp3`;
innerAudioContext.startTime = 0.2;
innerAudioContext.autoplay = true; innerAudioContext.autoplay = true;
innerAudioContext.onPlay(() => { innerAudioContext.onPlay(() => {
console.log('开始播放') console.log('开始播放')
@ -317,7 +319,7 @@
if (this.audioTeam.length > 1) { if (this.audioTeam.length > 1) {
this.audioTeam.splice(0, 1); this.audioTeam.splice(0, 1);
console.log('队列中'); console.log('队列中');
this.audio() this.audio(this.audioTeam[0]);
} else { } else {
console.log('队列为零'); console.log('队列为零');
this.audioTeam = [] this.audioTeam = []

View File

@ -2,8 +2,8 @@
"name" : "惠农生活", "name" : "惠农生活",
"appid" : "__UNI__3A527D1", "appid" : "__UNI__3A527D1",
"description" : "", "description" : "",
"versionName" : "2.0.15", "versionName" : "2.0.16",
"versionCode" : 2015, "versionCode" : 2016,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {

BIN
static/audio/1.MP3 Normal file

Binary file not shown.

BIN
static/audio/2.MP3 Normal file

Binary file not shown.

BIN
static/audio/3.MP3 Normal file

Binary file not shown.

BIN
static/audio/bai.MP3 Normal file

Binary file not shown.

BIN
static/audio/shi.MP3 Normal file

Binary file not shown.

BIN
static/audio/yuan.MP3 Normal file

Binary file not shown.

BIN
static/audio/zhifubao.MP3 Normal file

Binary file not shown.