From f31251c28ea6fff2a463899d4030bc5d036c848f Mon Sep 17 00:00:00 2001 From: xuminyui <576362016@qq.com> Date: Tue, 26 Sep 2023 19:03:35 +0800 Subject: [PATCH 1/3] fix --- pages/cameraContext/cameraContext.vue | 51 +++++++++++++++------------ pages/realName/realName.vue | 6 ++-- 2 files changed, 31 insertions(+), 26 deletions(-) diff --git a/pages/cameraContext/cameraContext.vue b/pages/cameraContext/cameraContext.vue index 7bcdf8a..2cc297e 100644 --- a/pages/cameraContext/cameraContext.vue +++ b/pages/cameraContext/cameraContext.vue @@ -20,12 +20,12 @@ - + @@ -41,47 +41,52 @@ export default { data() { return { isAnimate: false, - tempVideoPath: "" + tempVideoPath: "", + tips: "⚪录制" }; }, 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 = "⚪录制完成"; } }); }, 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: diff --git a/pages/realName/realName.vue b/pages/realName/realName.vue index d12b48b..72ec45e 100644 --- a/pages/realName/realName.vue +++ b/pages/realName/realName.vue @@ -108,8 +108,8 @@ export default { this.video = await this.uploadFilePromise(options.tempVideoPath) console.log('this.video', this.video) const data = { - num: uni.getStorageSync("info").name || '', - name: uni.getStorageSync("info").num || '', + num: uni.getStorageSync("info").num || '', + name: uni.getStorageSync("info").name || '', fileList: uni.getStorageSync("info").fileList || [], fileList2: uni.getStorageSync("info").fileList2, video: this.video @@ -138,10 +138,10 @@ export default { fileList: this.fileList, fileList2: this.fileList2 } + uni.setStorageSync("info", data) uni.navigateTo({ url: '/pages/cameraContext/cameraContext' }); - uni.setStorageSync("info", data) }, async completeRegistration() { console.log({ From 529b55bf832642cdf6a76c4d14be44903858a585 Mon Sep 17 00:00:00 2001 From: xuminyui <576362016@qq.com> Date: Tue, 26 Sep 2023 19:26:41 +0800 Subject: [PATCH 2/3] fix --- pages/cameraContext/cameraContext.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pages/cameraContext/cameraContext.vue b/pages/cameraContext/cameraContext.vue index 2cc297e..f923bf2 100644 --- a/pages/cameraContext/cameraContext.vue +++ b/pages/cameraContext/cameraContext.vue @@ -27,9 +27,10 @@ color="#76C458" @click="startRecord" @touchend="stopRecord" + :disabled="isAnimate" > - + @@ -42,7 +43,8 @@ export default { return { isAnimate: false, tempVideoPath: "", - tips: "⚪录制" + tips: "⚪录制", + isEnd: true }; }, onLoad() { @@ -63,6 +65,7 @@ export default { this.$common.msgToast("录制完成"); this.tempVideoPath = res.tempVideoPath; this.tips = "⚪录制完成"; + this.isEnd = false; } }); }, 5000); @@ -139,6 +142,7 @@ export default { display: flex; justify-content: center; align-items: center; + .dot { width: 30rpx; height: 30rpx; From c1270dc839beeae93ef7b99c86abb0bdb693f81b Mon Sep 17 00:00:00 2001 From: xuminyui <576362016@qq.com> Date: Tue, 26 Sep 2023 19:54:31 +0800 Subject: [PATCH 3/3] fix --- pages/realName/agreement.vue | 6 +++--- pages/realName/realName.vue | 12 ++++++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) 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 @@