|
@@ -129,28 +129,18 @@
|
|
|
</view>
|
|
|
<!-- 播放前拍照start -->
|
|
|
<u-popup v-model="photoPopup" mode="bottom" border-radius="32" :mask-close-able="false">
|
|
|
- <view class="photoBox">
|
|
|
- <view class="photoTop">
|
|
|
- <view class="sqzz" v-if="false">
|
|
|
- <u-icon name="close" color="#333333" size="30" @click="closePhoto"></u-icon>
|
|
|
- </view>
|
|
|
- <view class="centersq">
|
|
|
- 请正视手机屏幕
|
|
|
- </view>
|
|
|
- <view class="sqzz">
|
|
|
-
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="photoCenter">
|
|
|
- <camera device-position="front" flash="off" @error="error" style="width: 100%; height: 100%" v-if="photoPopup"></camera>
|
|
|
- <view class="custom">
|
|
|
- <image src="@/pages2/static/zhezhao.png" mode=""></image>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="btnResult" @click="takePhoto">
|
|
|
- 拍照
|
|
|
- </view>
|
|
|
- </view>
|
|
|
+ <view class="photoBox">
|
|
|
+ <view class="photoTop">
|
|
|
+ <view class="sqzz" v-if="false"><u-icon name="close" color="#333333" size="30" @click="closePhoto"></u-icon></view>
|
|
|
+ <view class="centersq">请正视手机屏幕</view>
|
|
|
+ <view class="sqzz"></view>
|
|
|
+ </view>
|
|
|
+ <view class="photoCenter">
|
|
|
+ <camera device-position="front" flash="off" @error="error" style="width: 100%; height: 100%" v-if="photoPopup"></camera>
|
|
|
+ <view class="custom"><image src="@/pages2/static/zhezhao.png" mode=""></image></view>
|
|
|
+ </view>
|
|
|
+ <view class="btnResult" @click="takePhoto">拍照</view>
|
|
|
+ </view>
|
|
|
</u-popup>
|
|
|
<!-- 播放前拍照end -->
|
|
|
</view>
|
|
@@ -245,24 +235,27 @@ export default {
|
|
|
if (res.data.rows[0].keyValue) {
|
|
|
self.$api.getbaseprofiletpgetInfo({ goodsId: self.goodsId }).then(result => {
|
|
|
if (result.data.code === 200) {
|
|
|
- if (!result.data.data || result.data.data.status === 3 && result.data.data.changeStatus === 0) {
|
|
|
+ if (!result.data.data || (result.data.data.status === 3 && result.data.data.changeStatus === 1)) {
|
|
|
uni.showModal({
|
|
|
- showCancel: false,
|
|
|
content: '资料审核不通过,请前往重新填写',
|
|
|
+ cancelText: '返回',
|
|
|
success: function(resultst) {
|
|
|
if (resultst.confirm) {
|
|
|
self.$navTo.togo('/pages2/verify/input', {
|
|
|
id: self.goodsId
|
|
|
});
|
|
|
}
|
|
|
+ if (resultst.cancel) {
|
|
|
+ uni.navigateBack();
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
} else if (result.data.data.status === 1 && res.data.rows[0].keyValue2) {
|
|
|
self.$api.getbaseprofileStampgetInfo({ goodsId: self.goodsId }).then(k => {
|
|
|
- if(k.data.code === 200){
|
|
|
- if(!k.data.data || k.data.data.status === 3 && k.data.data.changeStatus === 0){
|
|
|
+ if (k.data.code === 200) {
|
|
|
+ if (!k.data.data || (k.data.data.status === 3 && k.data.data.changeStatus === 1)) {
|
|
|
uni.showModal({
|
|
|
- showCancel: false,
|
|
|
+ cancelText: '返回',
|
|
|
content: '资料盖章审核不通过,请前往重新填写',
|
|
|
success: function(resultst) {
|
|
|
if (resultst.confirm) {
|
|
@@ -270,6 +263,9 @@ export default {
|
|
|
id: self.goodsId
|
|
|
});
|
|
|
}
|
|
|
+ if (resultst.cancel) {
|
|
|
+ uni.navigateBack();
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -333,15 +329,15 @@ export default {
|
|
|
let self = this;
|
|
|
return new Promise(resolve => {
|
|
|
let data = {
|
|
|
- gradeId:Number(self.gradeId),
|
|
|
- goodsId:Number(self.goodsId),
|
|
|
- sectionId:Number(self.playSectionId),
|
|
|
- courseId: Number(self.courseId),
|
|
|
- }
|
|
|
- self.$api.recordLast(data).then(res => {
|
|
|
- resolve(res.data.data)
|
|
|
- });
|
|
|
- })
|
|
|
+ gradeId: Number(self.gradeId),
|
|
|
+ goodsId: Number(self.goodsId),
|
|
|
+ sectionId: Number(self.playSectionId),
|
|
|
+ courseId: Number(self.courseId)
|
|
|
+ };
|
|
|
+ self.$api.recordLast(data).then(res => {
|
|
|
+ resolve(res.data.data);
|
|
|
+ });
|
|
|
+ });
|
|
|
},
|
|
|
jumpNote(item) {
|
|
|
this.noteId = item.noteId;
|
|
@@ -437,28 +433,29 @@ export default {
|
|
|
}
|
|
|
this.postAnswer();
|
|
|
},
|
|
|
- postStudyRecord(status=0,sectionId=this.playSectionId) {
|
|
|
- let currentTime = 0
|
|
|
- var polyvPlayerContext = this.selectComponent('#playerVideo');
|
|
|
- if(polyvPlayerContext){
|
|
|
- currentTime =polyvPlayerContext.getCurrentTime()
|
|
|
- }
|
|
|
+ postStudyRecord(status = 0, sectionId = this.playSectionId) {
|
|
|
+ let currentTime = 0;
|
|
|
+ var polyvPlayerContext = this.selectComponent('#playerVideo');
|
|
|
+ if (polyvPlayerContext) {
|
|
|
+ currentTime = polyvPlayerContext.getCurrentTime();
|
|
|
+ }
|
|
|
let self = this;
|
|
|
let data = {
|
|
|
- photo:self.ossAvatarUrl,
|
|
|
- sectionId:parseInt(sectionId),
|
|
|
- goodsId:parseInt(self.goodsId),
|
|
|
- courseId:parseInt(self.courseId),
|
|
|
- studyDuration:parseInt(currentTime>0?currentTime:self.studyDuration),
|
|
|
- gradeId:parseInt(self.gradeId),
|
|
|
- chapterId:parseInt(self.chapterId),
|
|
|
- moduleId:parseInt(self.moduleId)
|
|
|
- }
|
|
|
- if(data.studyDuration<=5){ //5秒内不上传记录
|
|
|
- return
|
|
|
+ photo: self.ossAvatarUrl,
|
|
|
+ sectionId: parseInt(sectionId),
|
|
|
+ goodsId: parseInt(self.goodsId),
|
|
|
+ courseId: parseInt(self.courseId),
|
|
|
+ studyDuration: parseInt(currentTime > 0 ? currentTime : self.studyDuration),
|
|
|
+ gradeId: parseInt(self.gradeId),
|
|
|
+ chapterId: parseInt(self.chapterId),
|
|
|
+ moduleId: parseInt(self.moduleId)
|
|
|
+ };
|
|
|
+ if (data.studyDuration <= 5) {
|
|
|
+ //5秒内不上传记录
|
|
|
+ return;
|
|
|
}
|
|
|
- if(status>0){
|
|
|
- data.status = status
|
|
|
+ if (status > 0) {
|
|
|
+ data.status = status;
|
|
|
}
|
|
|
console.log('提交接口', data);
|
|
|
this.$api.studyRecord(data).then(res => {
|