123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315 |
- <template>
- <view class="courselist-item">
- <view class="courselist-con x-start" @click="toCourseDetail(info)">
- <view class="courselist-img">
- <image :src="info.thumbnail" mode="aspectFill"></image>
- </view>
- <view class="courselist-con-r">
- <view @click.passive.stop>
- <text class="more-t">{{info.title}}</text>
- </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'">
- <view class="x-f acea-row"><u-icon class="icon" name="file-text" color="#999"
- size="20"></u-icon>{{info.createTime}}</view>
- </view>
- </view>
- </view>
- <view class="courselist-footer x-f">
- <view class="courselist-footer-item x-c" @click="openShare"><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">
- <view class="sharePop-item y-f" @click="sendInput()">
- <image src="@/static/images/link_icon.png" mode="aspectFill"></image>
- <view style="font-weight: bold;margin-bottom: 4px;">发送课程</view>
- <view style="font-size: 12px;color: #888;">一键发送到输入框</view>
- </view>
- </view>
- </u-popup>
- </view>
- </template>
- <script>
-
- import {
- createRoomLink
- } from '@/api/courseManage'
- export default {
- props: {
- activeTab: {
- type: [Number, String],
- default: 0
- },
- // 来源
- from: {
- type: String,
- default: 'live'
- },
- info: {
- type: Object,
- default: () => {
- return {}
- }
- },
- },
- data() {
- return {
- showShare: false,
- type: 1,
- }
- },
- onLoad() {},
- mounted() {
-
- },
- methods: {
- toCourseDetail(info) {
- uni.navigateTo({
- url:'/pages/course/courseVideo?videoId='+info.videoId
- })
- },
- openShare() {
- this.showShare = true
- console.log(this.info)
- //this.getlink('preload'); // 提前加载链接
- },
- closeShare() {
- this.showShare = false
- // console.log('open');
- },
- sendInput(){
- var corpId=uni.getStorageSync("corpId");
- var qwUserId=uni.getStorageSync("qwUserId");
- const param = {
- videoId:this.info.videoId,
- corpId:corpId,
- qwUserId:qwUserId,
- courseId:this.info.courseId,
- title:this.info.title
- }
- createRoomLink(param).then(res => {
- console.log(res)
- if(res.code==200){
- jWeixin.invoke('sendChatMessage', {
- msgtype:"news", //消息类型,必填
- enterChat: true,
- news:
- {
- link: res.news.link, //H5消息页面url 必填
- title: res.news.title, //H5消息标题
- desc: res.news.desc, //H5消息摘要
- imgUrl: res.news.imgUrl, //H5消息封面图片URL
- }
-
- }, function(res) {
- console.log("发送成功")
- console.log(res)
- uni.showToast({
- title: "发送成功",
- });
- })
-
- }
- else{
-
- uni.showToast({
- title: res.msg,
- });
- }
- })
- },
- }
- }
- </script>
- <style scoped lang="scss">
- .imgshe {
- display: flex;
- flex-direction: row-reverse
- }
- .point-box {
- height: 100%;
- width: 100%;
- .xu-box {
- border: #f5f5f5 4rpx dashed;
- padding: 20rpx 20rpx;
- }
- }
- .codeimg {
- position: absolute;
- z-index: 99999;
- left: 40rpx;
- top: 40rpx;
- }
- #codeurl {
- position: relative;
- }
- ::v-deep {
- .model .u-fade-enter-active {
- z-index: 10075 !important;
- }
- }
- .sharePop {
- background-color: #fff;
- padding: 20px 0;
- // padding-bottom: 100px;
- border-radius: 20px 20px 0 0;
- &-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;
- margin-bottom: 10px;
- }
- }
- }
- .setTimebox {
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 14px;
- }
- .timetip {
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 14px;
- color: #2979ff;
- text-align: center;
- margin-bottom: 5px;
- }
- .courselist {
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 14px;
- &-item {
- width: 100%;
- border-radius: 14px;
- background-color: #fff;
- overflow: hidden;
- margin-bottom: 10px;
- }
- &-con {
- padding: 10px 10px 5px 10px;
- font-size: 12px;
- color: #777;
- }
- &-con-r {
- flex: 1;
- overflow: hidden;
- .more-t {
- flex: 1;
- font-size: 14px;
- color: #222;
- display: inline;
- }
- image {
- width: 20px;
- height: 20px;
- }
- .btn_icon {
- font-size: 14px;
- color: #1677ff;
- display: inline-flex;
- align-items: center;
- }
- }
- &-img {
- width: 110px;
- height: 70px;
- border-radius: 10px;
- overflow: hidden;
- flex-shrink: 0;
- margin-right: 10px;
- position: relative;
- image {
- height: 100%;
- width: 100%;
- }
- .status {
- position: absolute;
- top: 0;
- left: 0;
- z-index: 2;
- height: 21px;
- padding: 0 5px;
- box-sizing: border-box;
- line-height: 21px;
- border-radius: 10px 0 10px 0;
- text-align: center;
- color: #fff;
- background-color: #08ce36;
- }
- }
- &-desc {
- flex: 1;
- margin-top: 7px;
- }
- &-con-timebox {
- margin-top: 7px;
- flex-wrap: wrap;
- .acea-row {
- margin-right: 12px;
- margin-bottom: 5px;
- flex-wrap: nowrap;
- }
- .icon {
- margin-right: 5px;
- }
- }
- &-footer {
- padding: 5px;
- font-size: 14px;
- &-item {
- flex: 1;
- text-align: center;
- color: #1677ff;
- padding: 6px;
- box-sizing: border-box;
- }
- .shishi {
- border-left: 1px solid #f5f5f5;
- }
- .shuju {
- border-radius: 5px;
- border: 1px solid #1677ff;
- }
- }
- }
- </style>
|