|
|
@@ -6,7 +6,7 @@
|
|
|
<u-icon name="arrow-left" size='22' color="#222" bold></u-icon>
|
|
|
</view>
|
|
|
<view class="arrow-left-warning" v-else @click="feedback">
|
|
|
- <image :src="imgPath+'/app/image/warning.png'"></image>
|
|
|
+ <image src="/static/warning.png"></image>
|
|
|
<text>投诉</text>
|
|
|
</view>
|
|
|
<view class="header-title" :style="{width:menuButtonLeft + 'px',height:menuButtonH+'px',lineHeight:menuButtonH+'px'}">{{courseInfo.title}}</view>
|
|
|
@@ -257,6 +257,9 @@
|
|
|
<button class="send" @click="handleChatInput">发送</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <ykscreenRecord></ykscreenRecord>
|
|
|
+ <courseExpiration v-if="showExpiration" :code="resCode" :msg="resMsg" :qrcode="qrcode"
|
|
|
+ :userId="user && user.userId ? user.userId : ''"></courseExpiration>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
@@ -279,11 +282,14 @@
|
|
|
getIntegralByH5Video,
|
|
|
sendReward,
|
|
|
loginByMp,
|
|
|
- getRealLink
|
|
|
- } from "@/api/courseAuto.js"
|
|
|
- import {
|
|
|
+ getRealLink,
|
|
|
getConfigByKey
|
|
|
- } from "@/api/user.js"
|
|
|
+ } from "@/api/courseAuto.js"
|
|
|
+ import ykscreenRecord from "@/components/yk-screenRecord/yk-screenRecord.vue"
|
|
|
+ import courseExpiration from './components/courseExpiration.vue'
|
|
|
+ // import {
|
|
|
+ // getConfigByKey
|
|
|
+ // } from "@/api/user.js"
|
|
|
import {handleFsUserWx} from '@/api/courseLook.js'
|
|
|
export default {
|
|
|
components: {
|
|
|
@@ -291,9 +297,14 @@
|
|
|
descInfo,
|
|
|
commentBox,
|
|
|
ques,
|
|
|
+ ykscreenRecord,
|
|
|
+ courseExpiration
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ resMsg :'',
|
|
|
+ resCode:"",
|
|
|
+ showExpiration:false,
|
|
|
code: '',
|
|
|
baseUrl:uni.getStorageSync('requestPath'),
|
|
|
// 1 红包 2 积分
|
|
|
@@ -487,7 +498,7 @@
|
|
|
}else {
|
|
|
this.isOpen = 0
|
|
|
console.log(option)
|
|
|
- this.urlOption = option.course ? JSON.parse(option.course) : {}
|
|
|
+ this.urlOption = option.course ? JSON.parse(decodeURIComponent(option.course)) : {}
|
|
|
console.log(this.urlOption)
|
|
|
}
|
|
|
uni.$on('usercode',(data)=>{
|
|
|
@@ -683,6 +694,14 @@
|
|
|
this.isFinish = 1
|
|
|
this.showProgress = true
|
|
|
this.getFinishCourseVideo()
|
|
|
+ if(this.quesList==null||this.quesList&&this.quesList.length==0) {
|
|
|
+ const param = {
|
|
|
+ ...this.urlOption,
|
|
|
+ source: 2,
|
|
|
+ appId: this.appid
|
|
|
+ }
|
|
|
+ this.sendRewardFun(param)
|
|
|
+ }
|
|
|
},
|
|
|
fullscreenchange(event) {
|
|
|
this.isfull = event.detail.fullScreen
|
|
|
@@ -1057,25 +1076,30 @@
|
|
|
appId: this.appid
|
|
|
}
|
|
|
}
|
|
|
- sendReward(param).then(res => {
|
|
|
- if(res.isNew&&res.isNew==1) {
|
|
|
- const packageInfo = res.data.packageInfo || ''
|
|
|
- if(packageInfo) {
|
|
|
- uni.setStorageSync('receive_package',packageInfo);
|
|
|
- if(res.mchId) uni.setStorageSync('mchId',res.mchId);
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages_course/reward'
|
|
|
- })
|
|
|
- }
|
|
|
- } else {
|
|
|
- uni.showToast({
|
|
|
- title: res.msg,
|
|
|
- icon: 'none'
|
|
|
+ this.sendRewardFun(param)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ sendRewardFun(param){
|
|
|
+ sendReward(param).then(res => {
|
|
|
+ uni.hideLoading()
|
|
|
+ if(res.isNew&&res.isNew==1) {
|
|
|
+ const packageInfo = res.data.packageInfo || ''
|
|
|
+ if(packageInfo) {
|
|
|
+ uni.setStorageSync('receive_package',packageInfo);
|
|
|
+ if(res.mchId) uni.setStorageSync('mchId',res.mchId);
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages_course/reward'
|
|
|
})
|
|
|
}
|
|
|
- })
|
|
|
- }
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: res.msg,
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
+
|
|
|
// 线路
|
|
|
openPop() {
|
|
|
this.$refs.popup.open('bottom')
|
|
|
@@ -1139,9 +1163,11 @@
|
|
|
this.qrcode = res.qrcode
|
|
|
this.qrcodeMsg = res.msg
|
|
|
this.$refs.kfPopup.open()
|
|
|
+ this.initExpiration(res.msg,res.code)
|
|
|
} else if (res.code == 504) {
|
|
|
// 登录
|
|
|
- // this.goLogin()
|
|
|
+ this.goLogin()
|
|
|
+ this.initExpiration(res.msg,res.code)
|
|
|
} else if (res.code == 566) {
|
|
|
// 官方群发通用链接
|
|
|
const url = res.courseLink.realLink.split('?course=')[1]
|
|
|
@@ -1162,11 +1188,18 @@
|
|
|
title: res.msg,
|
|
|
icon: 'none'
|
|
|
});
|
|
|
+ this.initExpiration(res.msg,res.code)
|
|
|
}
|
|
|
},
|
|
|
err => {}
|
|
|
);
|
|
|
},
|
|
|
+ initExpiration(resMsg,resCode) {
|
|
|
+ if(resCode==401) return;
|
|
|
+ this.resMsg = resMsg
|
|
|
+ this.resCode = resCode
|
|
|
+ this.showExpiration = true
|
|
|
+ },
|
|
|
closeKFPop() {
|
|
|
this.$refs.kfPopup.close()
|
|
|
},
|
|
|
@@ -1467,6 +1500,7 @@
|
|
|
}
|
|
|
},
|
|
|
feedback() {
|
|
|
+ console.log(111)
|
|
|
const userId = this.user.userId || ''
|
|
|
const courseId = this.urlOption.courseId || ''
|
|
|
const videoId = this.urlOption.videoId || ''
|