|
@@ -302,6 +302,8 @@ import {
|
|
|
nextTick
|
|
|
} from "vue"
|
|
|
import {useZhuapaiStore} from "@/store/zhuapai.js"
|
|
|
+import {getFileUpload} from "@/api/kaoshi.js"
|
|
|
+
|
|
|
// H5 播放抓拍功能
|
|
|
export function useH5Camera({
|
|
|
elVideoId,
|
|
@@ -309,6 +311,7 @@ export function useH5Camera({
|
|
|
onVideoSuccess, // 成功播放回调
|
|
|
onVideoError, // 失败回调
|
|
|
zhuapaiHttp, // 抓拍接口将base64 上传
|
|
|
+ operId
|
|
|
}) {
|
|
|
|
|
|
const zhuapaiStore = useZhuapaiStore();
|
|
@@ -432,21 +435,38 @@ export function useH5Camera({
|
|
|
};
|
|
|
|
|
|
console.log('optoptopt', opt)
|
|
|
- zhuapaiHttp && zhuapaiHttp(opt)
|
|
|
- .then(res => {
|
|
|
- console.log('【源 : 获取抓拍数据】');
|
|
|
- this.$emit('getImage', res.data);
|
|
|
- })
|
|
|
- .catch(err => {
|
|
|
- console.error('源 :抓拍接口异常', err);
|
|
|
- uni.showToast({
|
|
|
- icon: 'none',
|
|
|
- title: '抓拍图片异常!'
|
|
|
- })
|
|
|
- uni.redirectTo({
|
|
|
- url: "/pages/client/Kaoshi/list"
|
|
|
+
|
|
|
+ getFileUpload(opt).then(res => {
|
|
|
+ const dOption = {
|
|
|
+ operId,
|
|
|
+ url: res.data
|
|
|
+ }
|
|
|
+ zhuapaiHttp && zhuapaiHttp(opt)
|
|
|
+ .then(res => {
|
|
|
+ console.log('【源 : 获取抓拍数据】');
|
|
|
+ this.$emit('getImage', res.data);
|
|
|
})
|
|
|
- });
|
|
|
+ .catch(err => {
|
|
|
+ console.error('源 :抓拍接口异常', err);
|
|
|
+ uni.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: '抓拍图片异常!'
|
|
|
+ })
|
|
|
+ uni.redirectTo({
|
|
|
+ url: "/pages/client/Kaoshi/list"
|
|
|
+ })
|
|
|
+ });
|
|
|
+ }).catch(err => {
|
|
|
+ uni.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: '抓拍图片异常!'
|
|
|
+ })
|
|
|
+ uni.redirectTo({
|
|
|
+ url: "/pages/client/Kaoshi/list"
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
return {
|