|
@@ -13,34 +13,43 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="courselist-desc one-t" v-show="from != 'course'">{{info.courseName}}</view>
|
|
|
- <view :class="from == 'course' ? 'courselist-con-timebox ':'courselist-con-timebox x-f'" @click.passive.stop>
|
|
|
- <view class="x-f acea-row"><u-icon class="icon" name="hourglass" color="#999"
|
|
|
- size="20"></u-icon>开始时间:{{info.startDateTime?info.startDateTime:''}}</view>
|
|
|
- <view class="x-f acea-row"><u-icon class="icon" name="hourglass-half-fill" color="#999"
|
|
|
- size="20"></u-icon>结束时间:{{info.endDateTime?info.endDateTime:''}}</view>
|
|
|
+ <view :class="from == 'course' ? 'courselist-con-timebox ':'courselist-con-timebox x-f'"
|
|
|
+ @click.passive.stop>
|
|
|
+ <view class="x-f acea-row">
|
|
|
+ <u-icon class="icon" name="hourglass" color="#999" size="20"></u-icon>
|
|
|
+ 开始时间:{{info.startDateTime?info.startDateTime:''}}
|
|
|
+ </view>
|
|
|
+ <view class="x-f acea-row">
|
|
|
+ <u-icon class="icon" name="hourglass-half-fill" color="#999" size="20"></u-icon>
|
|
|
+ 结束时间:{{info.endDateTime?info.endDateTime:''}}
|
|
|
+ </view>
|
|
|
<view class="justify-between align-center">
|
|
|
- <view class="x-f acea-row"><u-icon class="icon" name="clock" color="#999"
|
|
|
- size="16"></u-icon>{{$formatSeconds(info.duration,1)}}</view>
|
|
|
+ <view class="x-f acea-row">
|
|
|
+ <u-icon class="icon" name="clock" color="#999" size="16"></u-icon>
|
|
|
+ {{$formatSeconds(info.duration,1)}}
|
|
|
+ </view>
|
|
|
<view class="u-border radius50 ptb8 plr18 base-color-6" style="width: fit-content;"
|
|
|
- @click="showtime=!showtime">调整看课时间</view>
|
|
|
+ @click="showtime=!showtime">调整看课时间</view>
|
|
|
</view>
|
|
|
- <u-modal :show="showtime" :title="titletime" @confirm="confirmtime" @close="showtime=!showtime"
|
|
|
- @cancel="showtime=!showtime" :closeOnClickOverlay="true" :showCancelButton="true">
|
|
|
+ <u-modal :show="showtime" :title="titletime" @confirm="confirmtime" @close="showtime=!showtime"
|
|
|
+ @cancel="showtime=!showtime" :closeOnClickOverlay="true" :showCancelButton="true">
|
|
|
<view class="slot-content">
|
|
|
<view class="justify-start align-center">
|
|
|
<view class="mr20">开始时间:</view>
|
|
|
- <u-input v-model="startTimevalue" placeholder="请选择开始时间" @focus="startTime=!startTime"></u-input>
|
|
|
+ <u-input v-model="startTimevalue" placeholder="请选择开始时间" @focus="startTime=!startTime">
|
|
|
+ </u-input>
|
|
|
</view>
|
|
|
<view class="justify-start align-center mt20">
|
|
|
<view class="mr20">结束时间:</view>
|
|
|
- <u-input v-model="endTimevalue" placeholder="请选择结束时间" @focus="endtime=!endtime"></u-input>
|
|
|
+ <u-input v-model="endTimevalue" placeholder="请选择结束时间" @focus="endtime=!endtime">
|
|
|
+ </u-input>
|
|
|
</view>
|
|
|
</view>
|
|
|
</u-modal>
|
|
|
<u-datetime-picker :show="startTime" v-model="value1" mode="time" @cancel="startTime=!startTime"
|
|
|
- @confirm="confirmstart"></u-datetime-picker>
|
|
|
+ @confirm="confirmstart"></u-datetime-picker>
|
|
|
<u-datetime-picker :show="endtime" v-model="value2" mode="time" @cancel="endtime=!endtime"
|
|
|
- @confirm="confirmend"></u-datetime-picker>
|
|
|
+ @confirm="confirmend"></u-datetime-picker>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -50,23 +59,27 @@
|
|
|
</view>
|
|
|
<view class="courselist-footer x-f ">
|
|
|
<!--#ifdef MP-WEIXIN-->
|
|
|
- <view class="courselist-footer-item x-c " @click="handleClick()"><u-icon
|
|
|
- name="share-square" color="#1677ff" size="18"></u-icon>分享课程</view>
|
|
|
+ <view class="courselist-footer-item x-c " @click="handleClick()">
|
|
|
+ <u-icon name="share-square" color="#1677ff" size="18"></u-icon>分享课程
|
|
|
+ </view>
|
|
|
<!--#endif-->
|
|
|
<!--#ifdef H5-->
|
|
|
- <view class="courselist-footer-item x-c " @click="handleShare"><u-icon
|
|
|
- name="share-square" color="#1677ff" size="18"></u-icon>分享课程</view>
|
|
|
+ <view class="courselist-footer-item x-c " @click="handleShare">
|
|
|
+ <u-icon name="share-square" color="#1677ff" size="18"></u-icon>分享课程
|
|
|
+ </view>
|
|
|
<!--#endif-->
|
|
|
- <view class="courselist-footer-item x-c shishi" v-show="activeTab == 1" @click="handleStatistics"><u-icon
|
|
|
- name="share-square" color="#1677ff" size="18"></u-icon>课程统计</view>
|
|
|
- <view class="courselist-footer-item x-c shuju" v-show="activeTab == 2" @click="handleStatistics"><u-icon
|
|
|
- name="share-square" color="#1677ff" size="18"></u-icon>数据统计</view>
|
|
|
+ <view class="courselist-footer-item x-c shishi" v-show="activeTab == 1" @click="handleStatistics">
|
|
|
+ <u-icon name="share-square" color="#1677ff" size="18"></u-icon>课程统计
|
|
|
+ </view>
|
|
|
+ <view class="courselist-footer-item x-c shuju" v-show="activeTab == 2" @click="handleStatistics">
|
|
|
+ <u-icon name="share-square" color="#1677ff" size="18"></u-icon>数据统计
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<!-- 分享弹窗 -->
|
|
|
<u-popup :show="showShare" :closeOnClickOverlay="true" :round='20' @close="closeShare" @open="openShare">
|
|
|
<view class="sharePop x-ac">
|
|
|
<!--#ifdef MP-WEIXIN-->
|
|
|
- <view class="sharePop-item y-f card-share" >
|
|
|
+ <view class="sharePop-item y-f card-share">
|
|
|
<image :src="imgPath+'/app/images/card_icon.png'" mode="aspectFill"
|
|
|
style="width: 80rpx; height: 80rpx;margin-top: 20rpx;"></image>
|
|
|
<view style="font-weight: bold;margin-bottom: 4px;">生成卡片</view>
|
|
@@ -94,7 +107,7 @@
|
|
|
<view class="timetip">不传默认以系统参数为准</view>
|
|
|
<view class="x-f">
|
|
|
<text style="margin-right: 20px;">链接有效时长(分钟)</text>
|
|
|
- <u-input fontSize="14px" placeholder="链接有效时长" border="none" v-model="time" maxlength="5"></u-input>
|
|
|
+ <u-input fontSize="14px" placeholder="链接有效时长" border="none" v-model="time" maxlength="5" />
|
|
|
</view>
|
|
|
</view>
|
|
|
</u-modal>
|
|
@@ -102,7 +115,7 @@
|
|
|
<!-- 生成海报 -->
|
|
|
<u-popup :show="setImg" @close="closeimg" :round="12" style="z-index: 999;">
|
|
|
<view class="w100 h540 center">
|
|
|
- <image :src="codeLink.url" mode="aspectFill" ></image>
|
|
|
+ <image :src="codeLink.url" mode="aspectFill"></image>
|
|
|
</view>
|
|
|
<view class="justify-around mb40">
|
|
|
<!-- <view class="column justify-center align-center" @click="shareimg">
|
|
@@ -120,10 +133,9 @@
|
|
|
<view class="imgshe">
|
|
|
<image :src="imgPath+'/app/image/point.png'" class="w300 h300"></image>
|
|
|
</view>
|
|
|
- <view class="column colorf fs32 xu-box fs40
|
|
|
- align-center justify-center">
|
|
|
+ <view class="column colorf fs32 xu-box fs40 align-center justify-center">
|
|
|
<view class="justify-center">点击右上角
|
|
|
- <image :src=:src="imgPath+'/app/image/wxmore.png'" class="w50 h50 mlr10"></image>
|
|
|
+ <image :src="imgPath+'/app/image/wxmore.png'" class="w50 h50 mlr10"></image>
|
|
|
</view>
|
|
|
<view class="mt20">选择 “转发给朋友”</view>
|
|
|
<view style="color: #cbcbcb;" class="fs28 mt40">点击任意位置关闭弹窗</view>
|
|
@@ -157,7 +169,7 @@
|
|
|
return {}
|
|
|
}
|
|
|
},
|
|
|
- parentMethod:{
|
|
|
+ parentMethod: {
|
|
|
type: Function
|
|
|
}
|
|
|
},
|
|
@@ -178,39 +190,39 @@
|
|
|
painterSrc: '',
|
|
|
showzhidao: false,
|
|
|
// imgPath:this.$store.state.imgpath,
|
|
|
- imgs:this.$store.state.imgpath+'/app/image/logoshare.png',
|
|
|
- showtime:false,
|
|
|
- titletime:'调整看课时间',
|
|
|
- endTimevalue:'',
|
|
|
- startTimevalue:'',
|
|
|
- startTime:false,
|
|
|
- endtime:false,
|
|
|
- value1:'00:00',
|
|
|
- value2:"23:59"
|
|
|
+ imgs: this.$store.state.imgpath + '/app/image/logoshare.png',
|
|
|
+ showtime: false,
|
|
|
+ titletime: '调整看课时间',
|
|
|
+ endTimevalue: '',
|
|
|
+ startTimevalue: '',
|
|
|
+ startTime: false,
|
|
|
+ endtime: false,
|
|
|
+ value1: '00:00',
|
|
|
+ value2: "23:59"
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
- imgPath() {
|
|
|
- return this.$store.state.imgpath
|
|
|
- }
|
|
|
- },
|
|
|
+ imgPath() {
|
|
|
+ return this.$store.state.imgpath
|
|
|
+ }
|
|
|
+ },
|
|
|
onLoad() {},
|
|
|
mounted() {
|
|
|
this.user = uni.getStorageSync("companyUserInfo") ? JSON.parse(uni.getStorageSync("companyUserInfo")) : {}
|
|
|
},
|
|
|
methods: {
|
|
|
- confirmstart(e){
|
|
|
- this.startTimevalue=e.value
|
|
|
- this.startTime=!this.startTime
|
|
|
+ confirmstart(e) {
|
|
|
+ this.startTimevalue = e.value
|
|
|
+ this.startTime = !this.startTime
|
|
|
console.log(e)
|
|
|
},
|
|
|
- confirmend(e){
|
|
|
- this.endTimevalue=e.value
|
|
|
- this.endtime=!this.endtime
|
|
|
+ confirmend(e) {
|
|
|
+ this.endTimevalue = e.value
|
|
|
+ this.endtime = !this.endtime
|
|
|
console.log(e)
|
|
|
},
|
|
|
- confirmtime(){
|
|
|
- if(this.startTimevalue==''){
|
|
|
+ confirmtime() {
|
|
|
+ if (this.startTimevalue == '') {
|
|
|
uni.showToast({
|
|
|
title: '请选择开始时间',
|
|
|
icon: 'none',
|
|
@@ -218,7 +230,7 @@
|
|
|
});
|
|
|
return
|
|
|
}
|
|
|
- if(this.endTimevalue==''){
|
|
|
+ if (this.endTimevalue == '') {
|
|
|
uni.showToast({
|
|
|
title: '请选择结束时间',
|
|
|
icon: 'none',
|
|
@@ -226,23 +238,23 @@
|
|
|
});
|
|
|
return
|
|
|
}
|
|
|
- this.showtime=!this.showtime
|
|
|
- const data={
|
|
|
- periodId:this.info.periodId,
|
|
|
- courseId:this.info.courseId,
|
|
|
- videoId:this.info.videoId,
|
|
|
- startDateTime:this.info.startDateTime.substring(0, 10)+' '+this.startTimevalue+":00",
|
|
|
- endDateTime:this.info.endDateTime.substring(0, 10)+' '+this.endTimevalue+":59"
|
|
|
+ this.showtime = !this.showtime
|
|
|
+ const data = {
|
|
|
+ periodId: this.info.periodId,
|
|
|
+ courseId: this.info.courseId,
|
|
|
+ videoId: this.info.videoId,
|
|
|
+ startDateTime: this.info.startDateTime.substring(0, 10) + ' ' + this.startTimevalue + ":00",
|
|
|
+ endDateTime: this.info.endDateTime.substring(0, 10) + ' ' + this.endTimevalue + ":59"
|
|
|
}
|
|
|
- updataTime([data]).then(res=>{
|
|
|
- if(res.code==200){
|
|
|
+ updataTime([data]).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
uni.showToast({
|
|
|
title: '完成看课时间调整!',
|
|
|
icon: 'none',
|
|
|
duration: 1000
|
|
|
});
|
|
|
- this.$emit('retime',1)
|
|
|
- }else{
|
|
|
+ this.$emit('retime', 1)
|
|
|
+ } else {
|
|
|
uni.showToast({
|
|
|
title: res.msg,
|
|
|
icon: 'none',
|
|
@@ -251,16 +263,23 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- handleClick(){
|
|
|
+ handleClick() {
|
|
|
this.parentMethod();
|
|
|
- this.$emit('trigger-share', {
|
|
|
- title: this.info.courseName+this.info.title,
|
|
|
- path: "pages_course/videovip",
|
|
|
- onshow:true,
|
|
|
- params: { companyId: this.user.companyId, companyUserId: this.user.userId,id:this.info.id,projectId:this.info.projectId,
|
|
|
- courseId:this.info.courseId,videoId:this.info.videoId,periodId:this.info.periodId},
|
|
|
- img:this.info.thumbnail||this.imgs
|
|
|
- });
|
|
|
+ this.$emit('trigger-share', {
|
|
|
+ title: this.info.courseName + this.info.title,
|
|
|
+ path: "pages_course/videovip",
|
|
|
+ onshow: true,
|
|
|
+ params: {
|
|
|
+ companyId: this.user.companyId,
|
|
|
+ companyUserId: this.user.userId,
|
|
|
+ id: this.info.id,
|
|
|
+ projectId: this.info.projectId,
|
|
|
+ courseId: this.info.courseId,
|
|
|
+ videoId: this.info.videoId,
|
|
|
+ periodId: this.info.periodId
|
|
|
+ },
|
|
|
+ img: this.info.thumbnail || this.imgs
|
|
|
+ });
|
|
|
},
|
|
|
// 获取jssdk
|
|
|
getjssdklist() {
|
|
@@ -274,7 +293,8 @@
|
|
|
timestamp: res.data.timestamp, // 必填,生成签名的时间戳
|
|
|
nonceStr: res.data.nonceStr, // 必填,生成签名的随机串
|
|
|
signature: res.data.signature, // 必填,签名
|
|
|
- jsApiList: ["updateAppMessageShareData", "onMenuShareAppMessage", ] // 必填,需要使用的JS接口列表
|
|
|
+ jsApiList: ["updateAppMessageShareData",
|
|
|
+ "onMenuShareAppMessage", ] // 必填,需要使用的JS接口列表
|
|
|
});
|
|
|
})
|
|
|
},
|
|
@@ -290,7 +310,7 @@
|
|
|
// link: self.copylink,
|
|
|
link: self.copylink,
|
|
|
// 分享链接,该链接域名或路径必须与当前页面对应的公众 号JS安全域名一致
|
|
|
- imgUrl: self.info.thumbnail||self.imgs, // 分享图标
|
|
|
+ imgUrl: self.info.thumbnail || self.imgs, // 分享图标
|
|
|
success: function(res) {
|
|
|
console.log(self.info, '456');
|
|
|
self.showzhidao = true
|
|
@@ -303,7 +323,7 @@
|
|
|
duration: 1000
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
})
|
|
|
|
|
|
// 另外一个方法·
|
|
@@ -390,11 +410,11 @@
|
|
|
courseId: this.info.courseId,
|
|
|
effectiveDuration: this.time,
|
|
|
videoId: this.info.videoId,
|
|
|
- imgUrl:this.info.thumbnail,
|
|
|
- title:this.info.title,
|
|
|
- duration:this.info.duration,
|
|
|
- periodId:this.info.periodId,
|
|
|
- id:this.info.id
|
|
|
+ imgUrl: this.info.thumbnail,
|
|
|
+ title: this.info.title,
|
|
|
+ duration: this.info.duration,
|
|
|
+ periodId: this.info.periodId,
|
|
|
+ id: this.info.id
|
|
|
}).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.codeLink = res.posterImage
|
|
@@ -413,7 +433,8 @@
|
|
|
uni.navigateTo({
|
|
|
// url: '/pages/courseManage/course/learning?course='+JSON.stringify(info)
|
|
|
// url: `/pages/courseManage/course/learning?course=${JSON.stringify(info)}&isvip=1`
|
|
|
- url:'/pages_managedata/coursedetail?videoId='+info.videoId+'&id='+info.id+'&periodId='+info.periodId
|
|
|
+ url: '/pages_managedata/coursedetail?videoId=' + info.videoId + '&id=' + info.id +
|
|
|
+ '&periodId=' + info.periodId
|
|
|
})
|
|
|
|
|
|
},
|
|
@@ -445,8 +466,8 @@
|
|
|
courseId: this.info.courseId,
|
|
|
effectiveDuration: this.time,
|
|
|
videoId: this.info.videoId,
|
|
|
- periodId:this.info.periodId,
|
|
|
- id:this.info.id
|
|
|
+ periodId: this.info.periodId,
|
|
|
+ id: this.info.id
|
|
|
}
|
|
|
sharecourselink(params).then(res => {
|
|
|
if (res.code == 200) {
|
|
@@ -489,8 +510,8 @@
|
|
|
companyUserId: this.user.userId,
|
|
|
courseId: this.info.courseId,
|
|
|
time: this.time,
|
|
|
- periodId:this.info.periodId,
|
|
|
- id:this.info.id,
|
|
|
+ periodId: this.info.periodId,
|
|
|
+ id: this.info.id,
|
|
|
// type: this.type,
|
|
|
videoId: this.info.videoId,
|
|
|
}
|
|
@@ -498,9 +519,9 @@
|
|
|
if (res.code == 200) {
|
|
|
this.copylink = res.url
|
|
|
// 强制使用 HTTPS
|
|
|
- // if (this.copylink.startsWith('http://')) {
|
|
|
- // this.copylink = this.copylink.replace('http://', 'https://');
|
|
|
- // }
|
|
|
+ // if (this.copylink.startsWith('http://')) {
|
|
|
+ // this.copylink = this.copylink.replace('http://', 'https://');
|
|
|
+ // }
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
icon: 'none',
|
|
@@ -518,8 +539,8 @@
|
|
|
duration: this.info.duration,
|
|
|
fileId: this.info.fileId,
|
|
|
courseName: this.info.courseName,
|
|
|
- videoId:this.info.videoId,
|
|
|
- periodId:this.info.periodId
|
|
|
+ videoId: this.info.videoId,
|
|
|
+ periodId: this.info.periodId
|
|
|
}
|
|
|
console.log()
|
|
|
uni.navigateTo({
|
|
@@ -552,18 +573,20 @@
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
- .card-share{
|
|
|
+ .card-share {
|
|
|
position: relative;
|
|
|
}
|
|
|
- .share{
|
|
|
- display: inline-block;
|
|
|
- position: absolute;
|
|
|
- top: 0;
|
|
|
- left: 0;
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- opacity: 0;
|
|
|
- }
|
|
|
+
|
|
|
+ .share {
|
|
|
+ display: inline-block;
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ opacity: 0;
|
|
|
+ }
|
|
|
+
|
|
|
.imgshe {
|
|
|
display: flex;
|
|
|
flex-direction: row-reverse
|
|
@@ -594,20 +617,21 @@
|
|
|
padding: 30rpx 0;
|
|
|
border-radius: 20px 20px 0 0;
|
|
|
/* #ifdef MP-WEIXIN */
|
|
|
- /* #endif */
|
|
|
-
|
|
|
+ /* #endif */
|
|
|
+
|
|
|
/* #ifdef H5 */
|
|
|
padding-bottom: 100px;
|
|
|
- /* #endif */
|
|
|
+
|
|
|
+ /* #endif */
|
|
|
&-item {
|
|
|
padding: 0 10px;
|
|
|
box-sizing: border-box;
|
|
|
font-family: PingFang SC, PingFang SC;
|
|
|
font-weight: 400;
|
|
|
font-size: 14px;
|
|
|
-
|
|
|
+
|
|
|
display: inline-flex !important;
|
|
|
-
|
|
|
+
|
|
|
image {
|
|
|
height: 48px;
|
|
|
width: 48px;
|
|
@@ -746,4 +770,4 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|