优化
This commit is contained in:
parent
85e447e438
commit
956923bc20
@ -71,6 +71,7 @@ export default {
|
||||
this.tempVideoPath = res.tempVideoPath;
|
||||
this.tips = "⚪录制完成";
|
||||
this.isEnd = false;
|
||||
uni.setStorageSync("tempVideoPath", res.tempVideoPath);
|
||||
}
|
||||
});
|
||||
}, 5000);
|
||||
@ -96,8 +97,8 @@ export default {
|
||||
// });
|
||||
// },
|
||||
back() {
|
||||
uni.redirectTo({
|
||||
url: "/pages/realName/realName?tempVideoPath=" + this.tempVideoPath
|
||||
uni.navigateBack({
|
||||
delta: 2
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -100,33 +100,46 @@ export default {
|
||||
fileList2: [],
|
||||
video: '',
|
||||
isChecked: false,
|
||||
isFddSuccess:false,
|
||||
isFddSuccess: false,
|
||||
// show:false
|
||||
};
|
||||
},
|
||||
async onLoad(options) {
|
||||
if (options.tempVideoPath) {
|
||||
this.video = await this.uploadFilePromise(options.tempVideoPath)
|
||||
console.log('this.video', this.video)
|
||||
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() {
|
||||
// onLoad(options) {
|
||||
// console.log(this.isFddSuccess)
|
||||
// if (this.isFddSuccess) {
|
||||
// this.nextTick(() => {
|
||||
|
||||
// })
|
||||
// }
|
||||
// },
|
||||
async onShow() {
|
||||
this.checkFdd()
|
||||
if (uni.getStorageSync('tempVideoPath')) {
|
||||
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)
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
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: {
|
||||
changeName(value) {
|
||||
@ -136,13 +149,6 @@ export default {
|
||||
this.num = value;
|
||||
},
|
||||
camera() {
|
||||
const data = {
|
||||
num: this.num,
|
||||
name: this.name,
|
||||
fileList: this.fileList,
|
||||
fileList2: this.fileList2
|
||||
}
|
||||
uni.setStorageSync("info", data)
|
||||
uni.navigateTo({
|
||||
url: '/pages/cameraContext/cameraContext'
|
||||
});
|
||||
@ -207,7 +213,6 @@ export default {
|
||||
})
|
||||
for (let i = 0; i < lists.length; i++) {
|
||||
const result = await this.uploadFilePromise(lists[i].url, 'check')
|
||||
console.log(result)
|
||||
let item = this[`fileList`][fileListLen]
|
||||
this[`fileList`].splice(fileListLen, 1, Object.assign(item, {
|
||||
status: 'success',
|
||||
@ -247,7 +252,6 @@ export default {
|
||||
name: "file",
|
||||
success: (res) => {
|
||||
const { path } = JSON.parse(res.data).data;
|
||||
console.log('@@@@', path)
|
||||
resolve(path);
|
||||
if (type === 'check') {
|
||||
this.chenckId(path)
|
||||
@ -283,10 +287,10 @@ export default {
|
||||
mobile
|
||||
})
|
||||
if (res.status === 0) {
|
||||
uni.setStorageSync("fddUrl",res.data?.url);
|
||||
uni.setStorageSync("fddUrl", res.data?.url);
|
||||
uni.navigateTo({
|
||||
url: "/pages/realName/FDDRegister",
|
||||
});
|
||||
url: "/pages/realName/FDDRegister",
|
||||
});
|
||||
} else {
|
||||
this.$common.msgToast(res.msg)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user