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({