|
@@ -531,9 +531,19 @@
|
|
></view>
|
|
></view>
|
|
</view>
|
|
</view>
|
|
<view class="btns">
|
|
<view class="btns">
|
|
- <view class="btnResult" v-if="isTaking" @click="takePhoto"
|
|
|
|
|
|
+ <!-- <view class="btnResult" v-if="isTaking" @click="takePhoto"
|
|
>拍照</view
|
|
>拍照</view
|
|
- >
|
|
|
|
|
|
+ > -->
|
|
|
|
+ <view v-if="isTaking" class="takePhoto_btn">
|
|
|
|
+ <view style='width: 100rpx;height: 2rpx;'></view>
|
|
|
|
+ <view class="middle_btn" @click="takePhoto">
|
|
|
|
+ <view class="square"></view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="rights" @click="takePhTips()">
|
|
|
|
+ <text>拍照提示</text>
|
|
|
|
+ <u-icon name="arrow-right" color="#FFFFFF" size="30"></u-icon>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
<view class="btnResult" v-if="!isTaking" @click="reTake">重拍</view>
|
|
<view class="btnResult" v-if="!isTaking" @click="reTake">重拍</view>
|
|
<view class="btnResult" v-if="!isTaking" @click="submit">确认</view>
|
|
<view class="btnResult" v-if="!isTaking" @click="submit">确认</view>
|
|
</view>
|
|
</view>
|
|
@@ -629,6 +639,9 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</u-popup>
|
|
</u-popup>
|
|
|
|
+
|
|
|
|
+ <!-- 拍照提示 -->
|
|
|
|
+ <popup-photo :popupPhotoShow.sync="popupPhotoShow" @takePhoto='toTakePhoto()'></popup-photo>
|
|
|
|
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
@@ -638,6 +651,7 @@ import plv from "../static/polyv-sdk/index";
|
|
import courseModule from "@/components/course/courseModule.vue";
|
|
import courseModule from "@/components/course/courseModule.vue";
|
|
import courseChapter from "@/components/course/courseChapter.vue";
|
|
import courseChapter from "@/components/course/courseChapter.vue";
|
|
import courseSection from "@/components/course/courseSection.vue";
|
|
import courseSection from "@/components/course/courseSection.vue";
|
|
|
|
+import PopupPhoto from '@/components/popup/index.vue'
|
|
import {WEBVIEW_URL} from '@/common/request.js'
|
|
import {WEBVIEW_URL} from '@/common/request.js'
|
|
// import { websocket } from "@/common/socket.js";
|
|
// import { websocket } from "@/common/socket.js";
|
|
import { mapGetters, mapMutations } from "vuex";
|
|
import { mapGetters, mapMutations } from "vuex";
|
|
@@ -646,6 +660,7 @@ export default {
|
|
courseModule,
|
|
courseModule,
|
|
courseChapter,
|
|
courseChapter,
|
|
courseSection,
|
|
courseSection,
|
|
|
|
+ PopupPhoto,
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -761,6 +776,7 @@ export default {
|
|
studyTimer: null, // 学习记录定时器
|
|
studyTimer: null, // 学习记录定时器
|
|
CountTo: 30, // 倒计时
|
|
CountTo: 30, // 倒计时
|
|
menuAllList: [],
|
|
menuAllList: [],
|
|
|
|
+ popupPhotoShow: false,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -2559,7 +2575,7 @@ export default {
|
|
var polyvPlayerContext = this.selectComponent("#playerVideo");
|
|
var polyvPlayerContext = this.selectComponent("#playerVideo");
|
|
if (polyvPlayerContext != null) {
|
|
if (polyvPlayerContext != null) {
|
|
this.playTime = polyvPlayerContext.getCurrentTime(); //播放时刻
|
|
this.playTime = polyvPlayerContext.getCurrentTime(); //播放时刻
|
|
- // console.log(this.playTime, 789, this.photoHistoryList, 'this.photoList:', this.photoList)
|
|
|
|
|
|
+ console.log('拍照啊', 789, this.photoHistoryList, 'this.photoList:', this.photoList)
|
|
//判断是否需要拍照
|
|
//判断是否需要拍照
|
|
if (this.photoNum > 0) {
|
|
if (this.photoNum > 0) {
|
|
this.configPhoto();
|
|
this.configPhoto();
|
|
@@ -2577,8 +2593,14 @@ export default {
|
|
//暂停
|
|
//暂停
|
|
polyvPlayerContext.exitFullScreen();
|
|
polyvPlayerContext.exitFullScreen();
|
|
polyvPlayerContext.pause();
|
|
polyvPlayerContext.pause();
|
|
|
|
+ if (uni.getStorageSync('tabkePhotoShow')) {
|
|
this.photoIndex = i;
|
|
this.photoIndex = i;
|
|
this.openPhoto();
|
|
this.openPhoto();
|
|
|
|
+ } else {
|
|
|
|
+ this.popupPhotoShow = true
|
|
|
|
+ uni.setStorageSync('tabkePhotoShow', 1) // 本地缓存用来判断是否已经弹出过弹窗
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -2741,7 +2763,7 @@ export default {
|
|
});
|
|
});
|
|
});
|
|
});
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+ // 确定拍照
|
|
async submit() {
|
|
async submit() {
|
|
console.log('this.uploadLock的值:', this.uploadLock)
|
|
console.log('this.uploadLock的值:', this.uploadLock)
|
|
if (this.uploadLock) {
|
|
if (this.uploadLock) {
|
|
@@ -2795,6 +2817,16 @@ export default {
|
|
reTake() {
|
|
reTake() {
|
|
this.isTaking = true;
|
|
this.isTaking = true;
|
|
},
|
|
},
|
|
|
|
+ toTakePhoto() {
|
|
|
|
+ this.popupPhotoShow = false
|
|
|
|
+ this.openPhoto()
|
|
|
|
+ },
|
|
|
|
+ takePhTips() {
|
|
|
|
+ this.popupPhotoShow = true
|
|
|
|
+ this.isTaking = false
|
|
|
|
+ this.photoPopup = false
|
|
|
|
+ this.enableAutoRotation = false
|
|
|
|
+ },
|
|
//确认拍照
|
|
//确认拍照
|
|
takePhoto() {
|
|
takePhoto() {
|
|
var self = this;
|
|
var self = this;
|
|
@@ -3301,7 +3333,34 @@ export default {
|
|
|
|
|
|
.btns {
|
|
.btns {
|
|
display: flex;
|
|
display: flex;
|
|
-
|
|
|
|
|
|
+ .takePhoto_btn {
|
|
|
|
+ width: 100%;
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ background-color: #a7a8a9;
|
|
|
|
+ padding: 50rpx;
|
|
|
|
+ .middle_btn {
|
|
|
|
+ width: 120rpx;
|
|
|
|
+ height: 120rpx;
|
|
|
|
+ border-radius: 40rpx;
|
|
|
|
+ border: 4rpx solid #FFFFFF;
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ }
|
|
|
|
+ .square {
|
|
|
|
+ width: 96rpx;
|
|
|
|
+ height: 96rpx;
|
|
|
|
+ background: #FFFFFF;
|
|
|
|
+ border-radius: 28rpx;
|
|
|
|
+ }
|
|
|
|
+ .rights {
|
|
|
|
+ font-size: 32rpx;
|
|
|
|
+ font-weight: 500;
|
|
|
|
+ color: #FFFFFF;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
.btnResult {
|
|
.btnResult {
|
|
height: 100rpx;
|
|
height: 100rpx;
|
|
flex: 1;
|
|
flex: 1;
|