|
@@ -849,42 +849,42 @@ export default {
|
|
|
|
|
|
},
|
|
|
onShow() {
|
|
|
- this.photoPopup = true;
|
|
|
- this.isTaking = true;
|
|
|
- console.log('photoPopup:', this.photoPopup, 'isTaking:', this.isTaking, 'window:', window, 'navigator:', navigator);
|
|
|
- console.log('window.navigator.mediaDevices', navigator.mediaDevices, navigator.mediaDevices.getUserMedia, navigator.getUserMedia,
|
|
|
- navigator.webkitGetUserMedia, navigator.mozGetUserMedia);
|
|
|
- if (
|
|
|
- (window.navigator.mediaDevices &&
|
|
|
- window.navigator.mediaDevices.getUserMedia) ||
|
|
|
- window.navigator.getUserMedia ||
|
|
|
- window.navigator.webkitGetUserMedia ||
|
|
|
- window.navigator.mozGetUserMedia
|
|
|
- ) {
|
|
|
- console.log( "getUserMedia----");
|
|
|
- // 调用用户媒体设备, 访问摄像头
|
|
|
- this.getUserMedia(
|
|
|
- {
|
|
|
- video: {
|
|
|
- width: 400,
|
|
|
- height: 300,
|
|
|
- },
|
|
|
- },
|
|
|
- this.photographSuccess,
|
|
|
- this.photographError
|
|
|
- );
|
|
|
- } else {
|
|
|
- console.log('1111没有摄像');
|
|
|
- this.photographError();
|
|
|
- }
|
|
|
- // console.log('this.option:', this.option);
|
|
|
- // if (this.$method.isGoLogin()) { // 从公众号消息进来的没登录需要跳到登录页,登录后返回
|
|
|
- // return;
|
|
|
- // }
|
|
|
- // console.log('onshow返回之后');
|
|
|
- // this.courseCourseList();
|
|
|
- // this.informId && this.clickOfficial() // 从公众号消息点击进来上报一次
|
|
|
- // this.$store.getters.dictObj;
|
|
|
+ // this.photoPopup = true;
|
|
|
+ // this.isTaking = true;
|
|
|
+ // console.log('photoPopup:', this.photoPopup, 'isTaking:', this.isTaking, 'window:', window, 'navigator:', navigator);
|
|
|
+ // console.log('window.navigator.mediaDevices', window.navigator.mediaDevices, '1:', window.navigator.mediaDevices.getUserMedia, '2:',window.navigator.getUserMedia,
|
|
|
+ // '3:', window.navigator.webkitGetUserMedia, '4:', window.navigator.mozGetUserMedia);
|
|
|
+ // if (
|
|
|
+ // (window.navigator.mediaDevices &&
|
|
|
+ // window.navigator.mediaDevices.getUserMedia) ||
|
|
|
+ // window.navigator.getUserMedia ||
|
|
|
+ // window.navigator.webkitGetUserMedia ||
|
|
|
+ // window.navigator.mozGetUserMedia
|
|
|
+ // ) {
|
|
|
+ // console.log( "getUserMedia----");
|
|
|
+ // // 调用用户媒体设备, 访问摄像头
|
|
|
+ // this.getUserMedia(
|
|
|
+ // {
|
|
|
+ // video: {
|
|
|
+ // width: 400,
|
|
|
+ // height: 300,
|
|
|
+ // },
|
|
|
+ // },
|
|
|
+ // this.photographSuccess,
|
|
|
+ // this.photographError
|
|
|
+ // );
|
|
|
+ // } else {
|
|
|
+ // console.log('1111没有摄像');
|
|
|
+ // this.photographError();
|
|
|
+ // }
|
|
|
+ console.log('this.option:', this.option);
|
|
|
+ if (this.$method.isGoLogin()) { // 从公众号消息进来的没登录需要跳到登录页,登录后返回
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ console.log('onshow返回之后');
|
|
|
+ this.courseCourseList();
|
|
|
+ this.informId && this.clickOfficial() // 从公众号消息点击进来上报一次
|
|
|
+ this.$store.getters.dictObj;
|
|
|
},
|
|
|
onUnload() {
|
|
|
console.log('onUnloadonUnloadonUnloadonUnload');
|
|
@@ -2944,8 +2944,8 @@ export default {
|
|
|
// #endif
|
|
|
}
|
|
|
this.enableAutoRotation = false;
|
|
|
- // this.photoPopup = true;
|
|
|
- // this.isTaking = true;
|
|
|
+ this.photoPopup = true;
|
|
|
+ this.isTaking = true;
|
|
|
// #ifdef MP-WEIXIN
|
|
|
uni.setKeepScreenOn({
|
|
|
keepScreenOn: true,
|
|
@@ -3595,6 +3595,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
photographSuccess(stream) {
|
|
|
+ console.log('有摄像头---');
|
|
|
// 兼容webkit核心浏览器
|
|
|
this.isTaking = true
|
|
|
this.photoPopup = true
|