Fix:[#988,#987,#986,#985,#983]修复测试反馈的问题和调整内容
This commit is contained in:
@@ -5,23 +5,13 @@
|
||||
<Coupons class="coupons" :data="item" v-for="(item,index) in list" :key="index"/>
|
||||
|
||||
<image class="zero-coupons" :src="webUrl+'/20231201201733142658.png'" mode="scaleToFill" v-if="list.length===0"/>
|
||||
<!-- <view>-->
|
||||
<!-- <button @tap="startRecord">开始录音</button>-->
|
||||
<!-- <button @tap="endRecord">停止录音</button>-->
|
||||
<!-- <button @tap="playVoice">播放录音</button>-->
|
||||
<!-- </view>-->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import SubSection from "@/components/SubSection.vue";
|
||||
import Coupons from "@/components/Coupons.vue";
|
||||
import {getCouponsUser} from "@/api/user";
|
||||
|
||||
const recorderManager = uni.getRecorderManager();
|
||||
const innerAudioContext = uni.createInnerAudioContext();
|
||||
|
||||
innerAudioContext.autoplay = true;
|
||||
import SubSection from '@/components/SubSection.vue'
|
||||
import Coupons from '../components/Coupons.vue'
|
||||
import {getCouponsUser} from '@/api/user'
|
||||
|
||||
export default {
|
||||
name: "myCoupons",
|
||||
@@ -29,7 +19,6 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
voicePath: '',
|
||||
current: 0,
|
||||
canUse: 0,
|
||||
notUse: 0,
|
||||
@@ -37,34 +26,10 @@ export default {
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
// let self = this;
|
||||
// recorderManager.onStop(function (res) {
|
||||
// console.log('recorder stop' + JSON.stringify(res));
|
||||
// self.voicePath = res.tempFilePath;
|
||||
// });
|
||||
|
||||
this.fetchList(1)
|
||||
this.fetchList(2)
|
||||
},
|
||||
methods: {
|
||||
startRecord() {
|
||||
console.log('开始录音');
|
||||
|
||||
recorderManager.start();
|
||||
},
|
||||
endRecord() {
|
||||
console.log('录音结束');
|
||||
recorderManager.stop();
|
||||
},
|
||||
playVoice() {
|
||||
console.log('播放录音');
|
||||
|
||||
if (this.voicePath) {
|
||||
innerAudioContext.src = this.voicePath;
|
||||
innerAudioContext.play();
|
||||
}
|
||||
},
|
||||
|
||||
changeNav(index) {
|
||||
this.current = index
|
||||
this.fetchList(index + 1)
|
||||
@@ -79,7 +44,7 @@ export default {
|
||||
if (type === 1) this.canUse = data.length
|
||||
if (type === 2) this.notUse = data.length
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user