Commit 98f77daf authored by zhoucong's avatar zhoucong

优化vlog 流程

parent f881bb72
......@@ -34,7 +34,21 @@
},
onReady() {},
onLoad() {
this.getMyVlogList()
this.$request("distribution/vlog/getVlogCreateInfo", {//获取结果
userId: uni.getStorageSync("openid")
}).then(res=>{
if(res.code==="00"){
setTimeout(()=>{
this.getMyVlogList()
},1000)
}else{
uni.showModal({
title: '提示',
content: '视频合成失败,需要在打卡点重新获取素材',
showCancel:false
});
}
})
},
methods: {
navTo(item){
......
......@@ -32,7 +32,7 @@
<view>不遮挡面部</view>
</view>
</view>
<u-button v-if="buttonShow" type="success" size="medium" @click="takePhoto">开始识别</u-button>
<!-- <u-button type="success" size="medium" @click="takePhoto">开始识别</u-button> -->
</view>
</template>
......@@ -44,7 +44,6 @@
text: 3, //倒计时
show: false, //摄像头倒计时文本
base64: "", //照片base64
buttonShow: false
}
},
onLoad() { //代替 vue 里面的 created
......@@ -64,38 +63,29 @@
enableImgBeauty: true //默认填true
}
this.$request("distribution/vlog/createVlog",data).then(res => {//创建任务
uni.showLoading({
title: '人脸识别中'
});
if (res.code === "00") {
setTimeout(() => {
this.$request("distribution/vlog/getVlogCreateInfo", {//获取结果
userId: uni.getStorageSync("openid")
}).then(res => {
if (res.code === "00") {
uni.showToast({
title: '识别成功',
duration: 1500
});
this.$u.route("pages/vlog/myVlog/myVlog")
} else {
uni.showModal({
title: '提示',
content: '识别失败,请重新扫脸',
showCancel:false
});
this.buttonShow = true
var that=this
uni.showModal({
title: '提示',
content: '视频合成中,请在1~2分钟后在我的VLOG视频集中查看',
showCancel:false,
success(res) {
if (res.confirm) {
that.$u.route("pages/vlog/vlogIndex/vlogIndex")
}
})
}, 8000)
}
});
}else{
uni.hideLoading()
uni.showModal({
title: '提示',
content: '打卡点未录取足够的素材',
showCancel:false
content: '请先在打卡点录制素材',
showCancel:false,
success(res) {
if (res.confirm) {
that.$u.route("pages/vlog/vlogIndex/vlogIndex")
}
}
});
this.buttonShow = true
}
})
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment