master
Aiden 12 months ago
parent 85e447e438
commit 956923bc20

@ -71,6 +71,7 @@ export default {
this.tempVideoPath = res.tempVideoPath; this.tempVideoPath = res.tempVideoPath;
this.tips = "⚪录制完成"; this.tips = "⚪录制完成";
this.isEnd = false; this.isEnd = false;
uni.setStorageSync("tempVideoPath", res.tempVideoPath);
} }
}); });
}, 5000); }, 5000);
@ -96,8 +97,8 @@ export default {
// }); // });
// }, // },
back() { back() {
uni.redirectTo({ uni.navigateBack({
url: "/pages/realName/realName?tempVideoPath=" + this.tempVideoPath delta: 2
}); });
} }
} }

@ -100,33 +100,46 @@ export default {
fileList2: [], fileList2: [],
video: '', video: '',
isChecked: false, isChecked: false,
isFddSuccess:false, isFddSuccess: false,
// show:false // show:false
}; };
}, },
async onLoad(options) { // onLoad(options) {
if (options.tempVideoPath) { // console.log(this.isFddSuccess)
this.video = await this.uploadFilePromise(options.tempVideoPath) // if (this.isFddSuccess) {
console.log('this.video', this.video) // this.nextTick(() => {
const data = {
num: uni.getStorageSync("info").num || '', // })
name: uni.getStorageSync("info").name || '', // }
fileList: uni.getStorageSync("info").fileList || [], // },
fileList2: uni.getStorageSync("info").fileList2, async onShow() {
video: this.video this.checkFdd()
} if (uni.getStorageSync('tempVideoPath')) {
uni.setStorageSync("info", data) const tempVideoPath = uni.getStorageSync('tempVideoPath');
this.video = await this.uploadFilePromise(tempVideoPath)
uni.removeStorageSync("tempVideoPath")
console.log('this.video', this.video,uni.getStorageSync('tempVideoPath'))
// const data = {
// num: uni.getStorageSync("info").num || '',
// name: uni.getStorageSync("info").name || '',
// fileList: uni.getStorageSync("info").fileList || [],
// fileList2: uni.getStorageSync("info").fileList2,
// video: this.video
// }
// uni.setStorageSync("info", data)
} }
this.name = uni.getStorageSync("info").name || ''
this.num = uni.getStorageSync("info").num || ''
this.fileList = uni.getStorageSync("info").fileList || []
this.fileList2 = uni.getStorageSync("info").fileList2 || []
this.video = uni.getStorageSync("info").video || ''
// this.isFdd = uni.getStorageSync("isFdd") || false
uni.removeStorageSync("info")
}, },
onShow() { watch:{
this.checkFdd() isFddSuccess(newValue){
if(newValue){
this.name = uni.getStorageSync("info").name || ''
this.num = uni.getStorageSync("info").num || ''
this.fileList = uni.getStorageSync("info").fileList || []
this.fileList2 = uni.getStorageSync("info").fileList2 || []
this.video = uni.getStorageSync("info").video || ''
uni.removeStorageSync("info")
}
}
}, },
methods: { methods: {
changeName(value) { changeName(value) {
@ -136,13 +149,6 @@ export default {
this.num = value; this.num = value;
}, },
camera() { camera() {
const data = {
num: this.num,
name: this.name,
fileList: this.fileList,
fileList2: this.fileList2
}
uni.setStorageSync("info", data)
uni.navigateTo({ uni.navigateTo({
url: '/pages/cameraContext/cameraContext' url: '/pages/cameraContext/cameraContext'
}); });
@ -207,7 +213,6 @@ export default {
}) })
for (let i = 0; i < lists.length; i++) { for (let i = 0; i < lists.length; i++) {
const result = await this.uploadFilePromise(lists[i].url, 'check') const result = await this.uploadFilePromise(lists[i].url, 'check')
console.log(result)
let item = this[`fileList`][fileListLen] let item = this[`fileList`][fileListLen]
this[`fileList`].splice(fileListLen, 1, Object.assign(item, { this[`fileList`].splice(fileListLen, 1, Object.assign(item, {
status: 'success', status: 'success',
@ -247,7 +252,6 @@ export default {
name: "file", name: "file",
success: (res) => { success: (res) => {
const { path } = JSON.parse(res.data).data; const { path } = JSON.parse(res.data).data;
console.log('@@@@', path)
resolve(path); resolve(path);
if (type === 'check') { if (type === 'check') {
this.chenckId(path) this.chenckId(path)
@ -283,10 +287,10 @@ export default {
mobile mobile
}) })
if (res.status === 0) { if (res.status === 0) {
uni.setStorageSync("fddUrl",res.data?.url); uni.setStorageSync("fddUrl", res.data?.url);
uni.navigateTo({ uni.navigateTo({
url: "/pages/realName/FDDRegister", url: "/pages/realName/FDDRegister",
}); });
} else { } else {
this.$common.msgToast(res.msg) this.$common.msgToast(res.msg)
} }

Loading…
Cancel
Save