This commit is contained in:
liuye
2023-12-25 15:13:10 +08:00
parent f7558d3abc
commit 9d2809de55
3 changed files with 62 additions and 46 deletions

View File

@@ -13,15 +13,16 @@
</div>
</div>
<div class="microphone-info">
<p class="loading" v-if="isStart">语音录制中...</p>
<div class="microphone-img" @touchstart="start" @touchend="end">
<!-- <img src="./img/microphone.png" alt="" @longpress=""> -->
<u-icon name="mic" color="#fff" size="140" style="margin-top:20px;"></u-icon>
</div>
<p class="text">{{isStart ? '松开结束说话' : '按住说话'}}</p>
<div class="btn">
<!-- <div class="btn">
<p class="cancel" @click="cancel">取消</p>
<!-- <p class="confirm" @click="confirm" v-if="text">确定</p> -->
</div>
<p class="confirm" @click="confirm" v-if="text">确定</p>
</div> -->
</div>
</div>
</template>
@@ -41,6 +42,7 @@ export default {
...mapState(['user']),
},
onLoad() {
this.text = ''
this.injectJWeixin(['startRecord','stopRecord', 'translateVoice'])
},
onShow() {
@@ -159,6 +161,13 @@ uni-page-body {
color: #222;
margin-bottom: 64px;
}
.loading {
font-family: PingFangSC-Regular;
font-size: 28px;
color: #666;
margin-bottom: 32px;
text-align: center;
}
.btn {
text-align: center;
font-family: PingFangSC-Regular;