Commit 813a84d3 authored by zhoucong's avatar zhoucong

123

parent 98f77daf
...@@ -63,8 +63,8 @@ ...@@ -63,8 +63,8 @@
enableImgBeauty: true //默认填true enableImgBeauty: true //默认填true
} }
this.$request("distribution/vlog/createVlog",data).then(res => {//创建任务 this.$request("distribution/vlog/createVlog",data).then(res => {//创建任务
var that=this
if (res.code === "00") { if (res.code === "00") {
var that=this
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '视频合成中,请在1~2分钟后在我的VLOG视频集中查看', content: '视频合成中,请在1~2分钟后在我的VLOG视频集中查看',
......
{"version":3,"sources":["uni-app:///main.js","webpack:///C:/Users/admin/Desktop/zc/uni-pdtravel/pages/vlog/vlogface/vlogface.vue?9839","webpack:///C:/Users/admin/Desktop/zc/uni-pdtravel/pages/vlog/vlogface/vlogface.vue?57f1","webpack:///C:/Users/admin/Desktop/zc/uni-pdtravel/pages/vlog/vlogface/vlogface.vue?d5db","webpack:///C:/Users/admin/Desktop/zc/uni-pdtravel/pages/vlog/vlogface/vlogface.vue?2aaf","uni-app:///pages/vlog/vlogface/vlogface.vue","webpack:///C:/Users/admin/Desktop/zc/uni-pdtravel/pages/vlog/vlogface/vlogface.vue?f2e1","webpack:///C:/Users/admin/Desktop/zc/uni-pdtravel/pages/vlog/vlogface/vlogface.vue?adbf"],"names":["createPage","Page"],"mappings":";;;;;;;;;;kDAAA,wCAAmB;AACnB;AACA,2G;AACAA,UAAU,CAACC,iBAAD,CAAV,C;;;;;;;;;;;;;ACHA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAiI;AACjI;AAC4D;AACL;AACsC;;;AAG7F;AACsK;AACtK,gBAAgB,6KAAU;AAC1B,EAAE,8EAAM;AACR,EAAE,+FAAM;AACR,EAAE,wGAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,mGAAU;AACZ;AACA;;AAEA;AACe,gF;;;;;;;;;;;;ACvBf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;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;ACAjrC;AACA,OAAO,KAAU,EAAE,kBAKd","file":"pages/vlog/vlogface/vlogface.js","sourcesContent":["import 'uni-pages';import '@dcloudio/uni-stat';\nimport Vue from 'vue'\nimport Page from './pages/vlog/vlogface/vlogface.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./vlogface.vue?vue&type=template&id=04da0587&scoped=true&\"\nvar renderjs\nimport script from \"./vlogface.vue?vue&type=script&lang=js&\"\nexport * from \"./vlogface.vue?vue&type=script&lang=js&\"\nimport style0 from \"./vlogface.vue?vue&type=style&index=0&id=04da0587&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"04da0587\",\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"pages/vlog/vlogface/vlogface.vue\"\nexport default component.exports","export * from \"-!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--16-0!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./vlogface.vue?vue&type=template&id=04da0587&scoped=true&\"","var components\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./vlogface.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./vlogface.vue?vue&type=script&lang=js&\"","<template>\r\n\t<view class=\"content\">\r\n\t\t<view class=\"bg\">\r\n\t\t\t<image src=\"../../../static/img/vlog/icon/camera.png\"></image>\r\n\t\t</view>\r\n\t\t<camera class=\"camera\" device-position=\"front\" flash=\"off\" @error=\"error\" @initdone=\"initdone\"></camera>\r\n\t\t<view class=\"surface\" v-show=\"show\">\r\n\t\t\t<view>请正对镜头</view>\r\n\t\t\t<text>{{text}}</text>\r\n\t\t</view>\r\n\t\t<image class=\"photo\" v-show=\"src\" :src=\"src\"></image>\r\n\t\t<view class=\"hint\">\r\n\t\t</view>\r\n\t\t<view class=\"hint1\">\r\n\t\t\t<view class=\"item\">\r\n\t\t\t\t<view class=\"\">\r\n\t\t\t\t\t<image src=\"../../../static/img/vlog/icon/icon_lightisenough.png\"></image>\r\n\t\t\t\t</view>\r\n\t\t\t\t<view>光线充足</view>\r\n\t\t\t</view>\r\n\t\t\t<view class=\"item\">\r\n\t\t\t\t<view class=\"\">\r\n\r\n\t\t\t\t\t<image src=\"../../../static/img/vlog/icon/icon_isthelens.png\"></image>\r\n\t\t\t\t</view>\r\n\t\t\t\t<view>正对镜头</view>\r\n\t\t\t</view>\r\n\t\t\t<view class=\"item\">\r\n\t\t\t\t<view class=\"\">\r\n\t\t\t\t\t<image src=\"../../../static/img/vlog/icon/icon_openface.png\"></image>\r\n\t\t\t\t</view>\r\n\t\t\t\t<view>不遮挡面部</view>\r\n\t\t\t</view>\r\n\t\t</view>\r\n\t\t<!-- <u-button type=\"success\" size=\"medium\" @click=\"takePhoto\">开始识别</u-button> -->\r\n\t</view>\r\n</template>\r\n\r\n<script>\r\n\texport default {\r\n\t\tdata() {\r\n\t\t\treturn {\r\n\t\t\t\tsrc: \"\", //照片\r\n\t\t\t\ttext: 3, //倒计时\r\n\t\t\t\tshow: false, //摄像头倒计时文本\r\n\t\t\t\tbase64: \"\", //照片base64\r\n\t\t\t}\r\n\t\t},\r\n\t\tonLoad() { //代替 vue 里面的 created\r\n\t\t},\r\n\t\tonReady() { //代替 vue 里面的 mounted\r\n\t\t},\r\n\t\tmethods: {\r\n\t\t\tquery() { //人脸查询\r\n\t\t\t\tuni.showLoading({\r\n\t\t\t\t\ttitle: '人脸识别中'\r\n\t\t\t\t});\r\n\t\t\t\tlet data = {\r\n\t\t\t\t\tcaseId: \"a124Jj6IYiSzCjVV\", //景区id\r\n\t\t\t\t\tuserId: uni.getStorageSync(\"openid\"), //用户id\r\n\t\t\t\t\tfaceImgData: this.base64, //人脸图片base64编码\r\n\t\t\t\t\toptimalFramesNum: 3, //最优帧数量(默认填3就行)\r\n\t\t\t\t\tenableImgBeauty: true //默认填true\r\n\t\t\t\t}\r\n\t\t\t\tthis.$request(\"distribution/vlog/createVlog\",data).then(res => {//创建任务\r\n\t\t\t\t\tif (res.code === \"00\") {\r\n\t\t\t\t\t\tvar that=this\r\n\t\t\t\t\t\tuni.showModal({\r\n\t\t\t\t\t\t title: '提示',\r\n\t\t\t\t\t\t content: '视频合成中,请在1~2分钟后在我的VLOG视频集中查看',\r\n\t\t\t\t\t\t\tshowCancel:false,\r\n\t\t\t\t\t\t\tsuccess(res) {\r\n\t\t\t\t\t\t\t\t if (res.confirm) {\r\n\t\t\t\t\t\t\t\t\t\tthat.$u.route(\"pages/vlog/vlogIndex/vlogIndex\")\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tuni.showModal({\r\n\t\t\t\t\t\t title: '提示',\r\n\t\t\t\t\t\t content: '请先在打卡点录制素材',\r\n\t\t\t\t\t\t\tshowCancel:false,\r\n\t\t\t\t\t\t\tsuccess(res) {\r\n\t\t\t\t\t\t\t\t if (res.confirm) {\r\n\t\t\t\t\t\t\t\t\t\tthat.$u.route(\"pages/vlog/vlogIndex/vlogIndex\")\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t},\r\n\t\t\ttakePhoto() { //扫脸\r\n\t\t\t\tthis.buttonShow = false\r\n\t\t\t\tthis.src = \"\";\r\n\t\t\t\tthis.text = 3;\r\n\t\t\t\tthis.show = true;\r\n\t\t\t\tvar test = setInterval(() => {\r\n\t\t\t\t\tthis.text = this.text - 1;\r\n\t\t\t\t\tif (this.text === -1) {\r\n\t\t\t\t\t\tclearTimeout(test)\r\n\t\t\t\t\t\tthis.show = false\r\n\t\t\t\t\t\tconst ctx = uni.createCameraContext();\r\n\t\t\t\t\t\tctx.takePhoto({\r\n\t\t\t\t\t\t\tquality: 'high',\r\n\t\t\t\t\t\t\tsuccess: (res) => {\r\n\t\t\t\t\t\t\t\tthis.src = res.tempImagePath\r\n\t\t\t\t\t\t\t\tuni.getFileSystemManager().readFile({ //图片转base64\r\n\t\t\t\t\t\t\t\t\tfilePath: res.tempImagePath, //选择图片返回的相对路径\r\n\t\t\t\t\t\t\t\t\tencoding: 'base64', //编码格式\r\n\t\t\t\t\t\t\t\t\tsuccess: res => { //成功的回调\r\n\t\t\t\t\t\t\t\t\t\tthis.base64 = \"data:image/jpeg;base64,\" + res.data\r\n\t\t\t\t\t\t\t\t\t\tthis.query()\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t}, 1000)\r\n\t\t\t},\r\n\t\t\tinitdone(){//相机初始化完成自动开始拍照\r\n\t\t\t\tthis.takePhoto()\r\n\t\t\t},\r\n\t\t\terror(e) { //相机报错\r\n\t\t\t\tuni.showModal({\r\n\t\t\t\t title: '提示',\r\n\t\t\t\t content: e.detail,\r\n\t\t\t\t\tshowCancel:false\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t}\r\n\t}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n\t.content {\r\n\t\tpadding: 0 20rpx;\r\n\t\tbackground-color: #ffffff;\r\n\t\theight: 100%;\r\n\t\twidth: 100%;\r\n\t\ttext-align: center;\r\n\t\t.bg{\r\n\t\t\twidth: 650rpx;\r\n\t\t\theight: 650rpx;\r\n\t\t\tposition: absolute;\r\n\t\t\ttop: 80rpx;\r\n\t\t\tleft: 50%;\r\n\t\t\ttransform: translate(-50%);\r\n\t\t\tz-index: 5;\r\n\t\t\timage{\r\n\t\t\t\twidth: 100%;\r\n\t\t\t\theight: 100%;\r\n\t\t\t}\r\n\t\t}\r\n\t\t.camera {\r\n\t\t\twidth: 550rpx;\r\n\t\t\theight: 550rpx;\r\n\t\t\tborder-radius: 50%;\r\n\t\t\tposition: absolute;\r\n\t\t\ttop: 140rpx;\r\n\t\t\tleft: 50%;\r\n\t\t\ttransform: translate(-50%);\r\n\t\t}\r\n\r\n\t\t.surface {\r\n\t\t\twidth: 500rpx;\r\n\t\t\theight: 500rpx;\r\n\t\t\tborder-radius: 50%;\r\n\t\t\tposition: absolute;\r\n\t\t\ttop: 150rpx;\r\n\t\t\tleft: 50%;\r\n\t\t\ttransform: translate(-50%);\r\n\t\t\ttext-align: center;\r\n\t\t\tfont-size: 40rpx;\r\n\t\t\tcolor: #fff;\r\n\t\t\tz-index: 3;\r\n\t\t\tview {\r\n\t\t\t\tmargin: 100rpx 0;\r\n\t\t\t}\r\n\t\t\ttext {\r\n\t\t\t\tfont-size: 70rpx;\r\n\t\t\t}\r\n\t\t}\r\n\t\t.photo {\r\n\t\t\twidth: 550rpx;\r\n\t\t\theight: 550rpx;\r\n\t\t\tborder-radius: 50%;\r\n\t\t\tposition: absolute;\r\n\t\t\ttop: 140rpx;\r\n\t\t\tleft: 50%;\r\n\t\t\ttransform: translate(-50%);\r\n\t\t}\r\n\t\t.hint {\r\n\t\t\tcolor: red;\r\n\t\t\tpadding-top: 680rpx;\r\n\t\t}\r\n\t\t.hint1 {\r\n\t\t\theight: 300rpx;\r\n\t\t\tdisplay: flex;\r\n\t\t\tjustify-content: space-between;\r\n\t\t\tpadding-top: 50rpx;\r\n\t\t\tpadding-left: 80rpx;\r\n\t\t\tpadding-right: 80rpx;\r\n\r\n\t\t\t.item {\r\n\t\t\t\twidth: 30%;\r\n\t\t\t\ttext-align: center;\r\n\t\t\t}\r\n\r\n\t\t\timage {\r\n\t\t\t\theight: 60rpx;\r\n\t\t\t\twidth: 60rpx;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n</style>\n","import mod from \"-!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-2!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-3!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-5!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./vlogface.vue?vue&type=style&index=0&id=04da0587&lang=scss&scoped=true&\"; export default mod; export * from \"-!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-2!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-3!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-5!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./vlogface.vue?vue&type=style&index=0&id=04da0587&lang=scss&scoped=true&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1631349033014\n var cssReload = require(\"C:/Users/admin/Desktop/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js\")(module.id, {\"hmr\":true,\"publicPath\":\"../../\",\"locals\":false});\n module.hot.dispose(cssReload);\n module.hot.accept(undefined, cssReload);\n }\n "],"sourceRoot":""} {"version":3,"sources":["uni-app:///main.js",null,"webpack:///C:/Users/admin/Desktop/zc/uni-pdtravel/pages/vlog/vlogface/vlogface.vue?57f1","webpack:///C:/Users/admin/Desktop/zc/uni-pdtravel/pages/vlog/vlogface/vlogface.vue?d5db","webpack:///C:/Users/admin/Desktop/zc/uni-pdtravel/pages/vlog/vlogface/vlogface.vue?2aaf","uni-app:///pages/vlog/vlogface/vlogface.vue","webpack:///C:/Users/admin/Desktop/zc/uni-pdtravel/pages/vlog/vlogface/vlogface.vue?f2e1","webpack:///C:/Users/admin/Desktop/zc/uni-pdtravel/pages/vlog/vlogface/vlogface.vue?adbf"],"names":["createPage","Page"],"mappings":";;;;;;;;;;kDAAA,wCAAmB;AACnB;AACA,2G;AACAA,UAAU,CAACC,iBAAD,CAAV,C;;;;;;;;;;;;;ACHA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAiI;AACjI;AAC4D;AACL;AACsC;;;AAG7F;AACsK;AACtK,gBAAgB,6KAAU;AAC1B,EAAE,8EAAM;AACR,EAAE,+FAAM;AACR,EAAE,wGAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,mGAAU;AACZ;A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A5EA,EAbA,E;;;;;;;;;;;;;ACvCA;AAAA;AAAA;AAAA;AAA6pC,CAAgB,olCAAG,EAAC,C;;;;;;;;;;;ACAjrC;AACA,OAAO,KAAU,EAAE,kBAKd","file":"pages/vlog/vlogface/vlogface.js","sourcesContent":["import 'uni-pages';import '@dcloudio/uni-stat';\nimport Vue from 'vue'\nimport Page from './pages/vlog/vlogface/vlogface.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./vlogface.vue?vue&type=template&id=04da0587&scoped=true&\"\nvar renderjs\nimport script from \"./vlogface.vue?vue&type=script&lang=js&\"\nexport * from \"./vlogface.vue?vue&type=script&lang=js&\"\nimport style0 from \"./vlogface.vue?vue&type=style&index=0&id=04da0587&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"04da0587\",\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"pages/vlog/vlogface/vlogface.vue\"\nexport default component.exports","export * from \"-!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--16-0!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./vlogface.vue?vue&type=template&id=04da0587&scoped=true&\"","var components\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./vlogface.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./vlogface.vue?vue&type=script&lang=js&\"","<template>\r\n\t<view class=\"content\">\r\n\t\t<view class=\"bg\">\r\n\t\t\t<image src=\"../../../static/img/vlog/icon/camera.png\"></image>\r\n\t\t</view>\r\n\t\t<camera class=\"camera\" device-position=\"front\" flash=\"off\" @error=\"error\" @initdone=\"initdone\"></camera>\r\n\t\t<view class=\"surface\" v-show=\"show\">\r\n\t\t\t<view>请正对镜头</view>\r\n\t\t\t<text>{{text}}</text>\r\n\t\t</view>\r\n\t\t<image class=\"photo\" v-show=\"src\" :src=\"src\"></image>\r\n\t\t<view class=\"hint\">\r\n\t\t</view>\r\n\t\t<view class=\"hint1\">\r\n\t\t\t<view class=\"item\">\r\n\t\t\t\t<view class=\"\">\r\n\t\t\t\t\t<image src=\"../../../static/img/vlog/icon/icon_lightisenough.png\"></image>\r\n\t\t\t\t</view>\r\n\t\t\t\t<view>光线充足</view>\r\n\t\t\t</view>\r\n\t\t\t<view class=\"item\">\r\n\t\t\t\t<view class=\"\">\r\n\r\n\t\t\t\t\t<image src=\"../../../static/img/vlog/icon/icon_isthelens.png\"></image>\r\n\t\t\t\t</view>\r\n\t\t\t\t<view>正对镜头</view>\r\n\t\t\t</view>\r\n\t\t\t<view class=\"item\">\r\n\t\t\t\t<view class=\"\">\r\n\t\t\t\t\t<image src=\"../../../static/img/vlog/icon/icon_openface.png\"></image>\r\n\t\t\t\t</view>\r\n\t\t\t\t<view>不遮挡面部</view>\r\n\t\t\t</view>\r\n\t\t</view>\r\n\t\t<!-- <u-button type=\"success\" size=\"medium\" @click=\"takePhoto\">开始识别</u-button> -->\r\n\t</view>\r\n</template>\r\n\r\n<script>\r\n\texport default {\r\n\t\tdata() {\r\n\t\t\treturn {\r\n\t\t\t\tsrc: \"\", //照片\r\n\t\t\t\ttext: 3, //倒计时\r\n\t\t\t\tshow: false, //摄像头倒计时文本\r\n\t\t\t\tbase64: \"\", //照片base64\r\n\t\t\t}\r\n\t\t},\r\n\t\tonLoad() { //代替 vue 里面的 created\r\n\t\t},\r\n\t\tonReady() { //代替 vue 里面的 mounted\r\n\t\t},\r\n\t\tmethods: {\r\n\t\t\tquery() { //人脸查询\r\n\t\t\t\tuni.showLoading({\r\n\t\t\t\t\ttitle: '人脸识别中'\r\n\t\t\t\t});\r\n\t\t\t\tlet data = {\r\n\t\t\t\t\tcaseId: \"a124Jj6IYiSzCjVV\", //景区id\r\n\t\t\t\t\tuserId: uni.getStorageSync(\"openid\"), //用户id\r\n\t\t\t\t\tfaceImgData: this.base64, //人脸图片base64编码\r\n\t\t\t\t\toptimalFramesNum: 3, //最优帧数量(默认填3就行)\r\n\t\t\t\t\tenableImgBeauty: true //默认填true\r\n\t\t\t\t}\r\n\t\t\t\tthis.$request(\"distribution/vlog/createVlog\",data).then(res => {//创建任务\r\n\t\t\t\t\tvar that=this\r\n\t\t\t\t\tif (res.code === \"00\") {\r\n\t\t\t\t\t\tuni.showModal({\r\n\t\t\t\t\t\t title: '提示',\r\n\t\t\t\t\t\t content: '视频合成中,请在1~2分钟后在我的VLOG视频集中查看',\r\n\t\t\t\t\t\t\tshowCancel:false,\r\n\t\t\t\t\t\t\tsuccess(res) {\r\n\t\t\t\t\t\t\t\t if (res.confirm) {\r\n\t\t\t\t\t\t\t\t\t\tthat.$u.route(\"pages/vlog/vlogIndex/vlogIndex\")\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tuni.showModal({\r\n\t\t\t\t\t\t title: '提示',\r\n\t\t\t\t\t\t content: '请先在打卡点录制素材',\r\n\t\t\t\t\t\t\tshowCancel:false,\r\n\t\t\t\t\t\t\tsuccess(res) {\r\n\t\t\t\t\t\t\t\t if (res.confirm) {\r\n\t\t\t\t\t\t\t\t\t\tthat.$u.route(\"pages/vlog/vlogIndex/vlogIndex\")\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t},\r\n\t\t\ttakePhoto() { //扫脸\r\n\t\t\t\tthis.buttonShow = false\r\n\t\t\t\tthis.src = \"\";\r\n\t\t\t\tthis.text = 3;\r\n\t\t\t\tthis.show = true;\r\n\t\t\t\tvar test = setInterval(() => {\r\n\t\t\t\t\tthis.text = this.text - 1;\r\n\t\t\t\t\tif (this.text === -1) {\r\n\t\t\t\t\t\tclearTimeout(test)\r\n\t\t\t\t\t\tthis.show = false\r\n\t\t\t\t\t\tconst ctx = uni.createCameraContext();\r\n\t\t\t\t\t\tctx.takePhoto({\r\n\t\t\t\t\t\t\tquality: 'high',\r\n\t\t\t\t\t\t\tsuccess: (res) => {\r\n\t\t\t\t\t\t\t\tthis.src = res.tempImagePath\r\n\t\t\t\t\t\t\t\tuni.getFileSystemManager().readFile({ //图片转base64\r\n\t\t\t\t\t\t\t\t\tfilePath: res.tempImagePath, //选择图片返回的相对路径\r\n\t\t\t\t\t\t\t\t\tencoding: 'base64', //编码格式\r\n\t\t\t\t\t\t\t\t\tsuccess: res => { //成功的回调\r\n\t\t\t\t\t\t\t\t\t\tthis.base64 = \"data:image/jpeg;base64,\" + res.data\r\n\t\t\t\t\t\t\t\t\t\tthis.query()\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t}, 1000)\r\n\t\t\t},\r\n\t\t\tinitdone(){//相机初始化完成自动开始拍照\r\n\t\t\t\tthis.takePhoto()\r\n\t\t\t},\r\n\t\t\terror(e) { //相机报错\r\n\t\t\t\tuni.showModal({\r\n\t\t\t\t title: '提示',\r\n\t\t\t\t content: e.detail,\r\n\t\t\t\t\tshowCancel:false\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t}\r\n\t}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n\t.content {\r\n\t\tpadding: 0 20rpx;\r\n\t\tbackground-color: #ffffff;\r\n\t\theight: 100%;\r\n\t\twidth: 100%;\r\n\t\ttext-align: center;\r\n\t\t.bg{\r\n\t\t\twidth: 650rpx;\r\n\t\t\theight: 650rpx;\r\n\t\t\tposition: absolute;\r\n\t\t\ttop: 80rpx;\r\n\t\t\tleft: 50%;\r\n\t\t\ttransform: translate(-50%);\r\n\t\t\tz-index: 5;\r\n\t\t\timage{\r\n\t\t\t\twidth: 100%;\r\n\t\t\t\theight: 100%;\r\n\t\t\t}\r\n\t\t}\r\n\t\t.camera {\r\n\t\t\twidth: 550rpx;\r\n\t\t\theight: 550rpx;\r\n\t\t\tborder-radius: 50%;\r\n\t\t\tposition: absolute;\r\n\t\t\ttop: 140rpx;\r\n\t\t\tleft: 50%;\r\n\t\t\ttransform: translate(-50%);\r\n\t\t}\r\n\r\n\t\t.surface {\r\n\t\t\twidth: 500rpx;\r\n\t\t\theight: 500rpx;\r\n\t\t\tborder-radius: 50%;\r\n\t\t\tposition: absolute;\r\n\t\t\ttop: 150rpx;\r\n\t\t\tleft: 50%;\r\n\t\t\ttransform: translate(-50%);\r\n\t\t\ttext-align: center;\r\n\t\t\tfont-size: 40rpx;\r\n\t\t\tcolor: #fff;\r\n\t\t\tz-index: 3;\r\n\t\t\tview {\r\n\t\t\t\tmargin: 100rpx 0;\r\n\t\t\t}\r\n\t\t\ttext {\r\n\t\t\t\tfont-size: 70rpx;\r\n\t\t\t}\r\n\t\t}\r\n\t\t.photo {\r\n\t\t\twidth: 550rpx;\r\n\t\t\theight: 550rpx;\r\n\t\t\tborder-radius: 50%;\r\n\t\t\tposition: absolute;\r\n\t\t\ttop: 140rpx;\r\n\t\t\tleft: 50%;\r\n\t\t\ttransform: translate(-50%);\r\n\t\t}\r\n\t\t.hint {\r\n\t\t\tcolor: red;\r\n\t\t\tpadding-top: 680rpx;\r\n\t\t}\r\n\t\t.hint1 {\r\n\t\t\theight: 300rpx;\r\n\t\t\tdisplay: flex;\r\n\t\t\tjustify-content: space-between;\r\n\t\t\tpadding-top: 50rpx;\r\n\t\t\tpadding-left: 80rpx;\r\n\t\t\tpadding-right: 80rpx;\r\n\r\n\t\t\t.item {\r\n\t\t\t\twidth: 30%;\r\n\t\t\t\ttext-align: center;\r\n\t\t\t}\r\n\r\n\t\t\timage {\r\n\t\t\t\theight: 60rpx;\r\n\t\t\t\twidth: 60rpx;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n</style>\n","import mod from \"-!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-2!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-3!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-5!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./vlogface.vue?vue&type=style&index=0&id=04da0587&lang=scss&scoped=true&\"; export default mod; export * from \"-!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-2!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-3!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-5!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./vlogface.vue?vue&type=style&index=0&id=04da0587&lang=scss&scoped=true&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1631350037287\n var cssReload = require(\"C:/Users/admin/Desktop/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js\")(module.id, {\"hmr\":true,\"publicPath\":\"../../\",\"locals\":false});\n module.hot.dispose(cssReload);\n module.hot.accept(undefined, cssReload);\n }\n "],"sourceRoot":""}
\ No newline at end of file \ No newline at end of file
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