Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
f4c743e0d4
@ -20,16 +20,17 @@
|
|||||||
<view class="dot"></view>
|
<view class="dot"></view>
|
||||||
<u-count-down :time="5 * 1000" format="ss" ref="countDown" v-if="isAnimate"></u-count-down>
|
<u-count-down :time="5 * 1000" format="ss" ref="countDown" v-if="isAnimate"></u-count-down>
|
||||||
</view>
|
</view>
|
||||||
<view style="width:284rpx;">
|
<view style="width:400rpx;">
|
||||||
<u-button
|
<u-button
|
||||||
text="⚪长按录制"
|
:text="tips"
|
||||||
shape="circle"
|
shape="circle"
|
||||||
color="#76C458"
|
color="#76C458"
|
||||||
@longpress="startRecord"
|
@click="startRecord"
|
||||||
@touchend="stopRecord"
|
@touchend="stopRecord"
|
||||||
|
:disabled="isAnimate"
|
||||||
></u-button>
|
></u-button>
|
||||||
<view style="margin-top: 20rpx;">
|
<view style="margin-top: 20rpx;">
|
||||||
<u-button text="确认" shape="circle" color="#76C458" @click="back"></u-button>
|
<u-button text="确认" shape="circle" color="#76C458" @click="back" :disabled="isEnd"></u-button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -41,47 +42,54 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isAnimate: false,
|
isAnimate: false,
|
||||||
tempVideoPath: ""
|
tempVideoPath: "",
|
||||||
|
tips: "⚪录制",
|
||||||
|
isEnd: true
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.ctx = uni.createCameraContext();
|
this.ctx = uni.createCameraContext();
|
||||||
|
this.tips = "⚪录制";
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
startRecord() {
|
startRecord() {
|
||||||
this.ctx.startRecord({
|
this.ctx.startRecord({
|
||||||
success: res => {
|
success: res => {
|
||||||
this.isAnimate = true;
|
this.isAnimate = true;
|
||||||
|
this.tips = "⚪录制中";
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.ctx.stopRecord({
|
this.ctx.stopRecord({
|
||||||
success: res => {
|
success: res => {
|
||||||
console.log("自动停止录像", res);
|
console.log("自动停止录像", res);
|
||||||
this.tempVideoPath = res.tempVideoPath;
|
|
||||||
this.isAnimate = false;
|
this.isAnimate = false;
|
||||||
|
this.$common.msgToast("录制完成");
|
||||||
|
this.tempVideoPath = res.tempVideoPath;
|
||||||
|
this.tips = "⚪录制完成";
|
||||||
|
this.isEnd = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}, 5000);
|
}, 5000);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
stopRecord() {
|
// stopRecord() {
|
||||||
// 手动停止录制
|
// // 手动停止录制
|
||||||
this.ctx.stopRecord({
|
// this.ctx.stopRecord({
|
||||||
success: res => {
|
// success: res => {
|
||||||
console.log("手动停止录像", res);
|
// console.log("手动停止录像", res);
|
||||||
this.tempVideoPath = res.tempVideoPath;
|
// this.tempVideoPath = res.tempVideoPath;
|
||||||
this.isAnimate = false;
|
// this.isAnimate = false;
|
||||||
},
|
// },
|
||||||
fail: function(error) {
|
// fail: function(error) {
|
||||||
console.log(error);
|
// console.log(error);
|
||||||
this.isAnimate = false;
|
// this.isAnimate = false;
|
||||||
uni.showModal({
|
// uni.showModal({
|
||||||
content: "停止录像失败",
|
// content: "停止录像失败",
|
||||||
showCancel: false
|
// showCancel: false
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
},
|
// },
|
||||||
back() {
|
back() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:
|
url:
|
||||||
@ -134,6 +142,7 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.dot {
|
.dot {
|
||||||
width: 30rpx;
|
width: 30rpx;
|
||||||
height: 30rpx;
|
height: 30rpx;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="main">
|
<view class="main">
|
||||||
<title-block class="title-block" :title="type === 'service' ? '软件许可及服务协议' : '隐私保护政策'">
|
<title-block class="title-block" >
|
||||||
<template #left>
|
<template #left>
|
||||||
<div>
|
<div>
|
||||||
<image style="width: 112rpx;height: 52rpx"
|
<image style="width: 112rpx;height: 52rpx"
|
||||||
@ -30,8 +30,8 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
back(){
|
back(){
|
||||||
uni.navigateBack({
|
uni.navigateTo({
|
||||||
delta: 2
|
url: "/pages/realName/realName"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -108,8 +108,8 @@ export default {
|
|||||||
this.video = await this.uploadFilePromise(options.tempVideoPath)
|
this.video = await this.uploadFilePromise(options.tempVideoPath)
|
||||||
console.log('this.video', this.video)
|
console.log('this.video', this.video)
|
||||||
const data = {
|
const data = {
|
||||||
num: uni.getStorageSync("info").name || '',
|
num: uni.getStorageSync("info").num || '',
|
||||||
name: uni.getStorageSync("info").num || '',
|
name: uni.getStorageSync("info").name || '',
|
||||||
fileList: uni.getStorageSync("info").fileList || [],
|
fileList: uni.getStorageSync("info").fileList || [],
|
||||||
fileList2: uni.getStorageSync("info").fileList2,
|
fileList2: uni.getStorageSync("info").fileList2,
|
||||||
video: this.video
|
video: this.video
|
||||||
@ -138,10 +138,10 @@ export default {
|
|||||||
fileList: this.fileList,
|
fileList: this.fileList,
|
||||||
fileList2: this.fileList2
|
fileList2: this.fileList2
|
||||||
}
|
}
|
||||||
|
uni.setStorageSync("info", data)
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/cameraContext/cameraContext'
|
url: '/pages/cameraContext/cameraContext'
|
||||||
});
|
});
|
||||||
uni.setStorageSync("info", data)
|
|
||||||
},
|
},
|
||||||
async completeRegistration() {
|
async completeRegistration() {
|
||||||
console.log({
|
console.log({
|
||||||
@ -298,6 +298,14 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
agreementHandle(type) {
|
agreementHandle(type) {
|
||||||
|
const data = {
|
||||||
|
num: this.num,
|
||||||
|
name: this.name,
|
||||||
|
fileList: this.fileList,
|
||||||
|
fileList2: this.fileList2,
|
||||||
|
video: this.video
|
||||||
|
}
|
||||||
|
uni.setStorageSync("info", data)
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/realName/agreement?type=" + type,
|
url: "/pages/realName/agreement?type=" + type,
|
||||||
});
|
});
|
||||||
@ -308,8 +316,8 @@ export default {
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
/deep/.u-checkbox__icon-wrap--circle {
|
/deep/.u-checkbox__icon-wrap--circle {
|
||||||
width: 25upx !important;
|
width: 30upx !important;
|
||||||
height: 25upx !important;
|
height: 30upx !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .u-checkbox-label--left {
|
/deep/ .u-checkbox-label--left {
|
||||||
|
Loading…
Reference in New Issue
Block a user