diff --git a/pages/cameraContext/cameraContext.vue b/pages/cameraContext/cameraContext.vue index 7bcdf8a..f923bf2 100644 --- a/pages/cameraContext/cameraContext.vue +++ b/pages/cameraContext/cameraContext.vue @@ -20,16 +20,17 @@ - + - + @@ -41,47 +42,54 @@ export default { data() { return { isAnimate: false, - tempVideoPath: "" + tempVideoPath: "", + tips: "⚪录制", + isEnd: true }; }, onLoad() { this.ctx = uni.createCameraContext(); + this.tips = "⚪录制"; }, methods: { startRecord() { this.ctx.startRecord({ success: res => { this.isAnimate = true; + this.tips = "⚪录制中"; setTimeout(() => { this.ctx.stopRecord({ success: res => { console.log("自动停止录像", res); - this.tempVideoPath = res.tempVideoPath; this.isAnimate = false; + this.$common.msgToast("录制完成"); + this.tempVideoPath = res.tempVideoPath; + this.tips = "⚪录制完成"; + this.isEnd = false; } }); }, 5000); } }); }, - stopRecord() { - // 手动停止录制 - this.ctx.stopRecord({ - success: res => { - console.log("手动停止录像", res); - this.tempVideoPath = res.tempVideoPath; - this.isAnimate = false; - }, - fail: function(error) { - console.log(error); - this.isAnimate = false; - uni.showModal({ - content: "停止录像失败", - showCancel: false - }); - } - }); - }, + // stopRecord() { + // // 手动停止录制 + // this.ctx.stopRecord({ + // success: res => { + // console.log("手动停止录像", res); + // this.tempVideoPath = res.tempVideoPath; + // this.isAnimate = false; + // }, + // fail: function(error) { + // console.log(error); + // this.isAnimate = false; + // uni.showModal({ + // content: "停止录像失败", + // showCancel: false + // }); + // } + // }); + // }, back() { uni.navigateTo({ url: @@ -134,6 +142,7 @@ export default { display: flex; justify-content: center; align-items: center; + .dot { width: 30rpx; height: 30rpx; diff --git a/pages/realName/agreement.vue b/pages/realName/agreement.vue index ce02714..6bc6597 100644 --- a/pages/realName/agreement.vue +++ b/pages/realName/agreement.vue @@ -1,6 +1,6 @@