dev-hxf #23

Merged
huxiaofeng666 merged 2 commits from dev-hxf into master 1 year ago
  1. 1
      src/jtools/pay/index.js
  2. 4
      src/pages/index/components/Subject2.vue
  3. 13
      src/pages/index/videoVip.vue
  4. 30
      src/pages/me/vip.vue
  5. 1
      src/pages/questionBank/baseOperate.vue
  6. 100
      src/pages/questionBank/videoDetail.vue

@ -70,6 +70,7 @@ export default class JtoolsPay {
params.openId = uni.getStorageSync('openId'); params.openId = uni.getStorageSync('openId');
} }
prePay(params).then(res => { prePay(params).then(res => {
console.log('预支付',res);
if (res.code == '0000') { if (res.code == '0000') {
resolve(res); resolve(res);
} }

@ -36,7 +36,7 @@
</swiper-item> </swiper-item>
</swiper> </swiper>
</view> </view>
<view class="video_box mt10"> <view class="video_box mt10" v-if="subject=='2'">
<view class="flex ai-c jc-sb"> <view class="flex ai-c jc-sb">
<text class="fs18 cor-000">基础操作讲解</text> <text class="fs18 cor-000">基础操作讲解</text>
<view class="flex cor-666" @tap="toDetail"> <view class="flex cor-666" @tap="toDetail">
@ -138,6 +138,7 @@
return { return {
...item, ...item,
projectId:item.videoId, projectId:item.videoId,
subDesc:this.baseList[0].description,
videoTime:this.formateTime(item.videoTime) videoTime:this.formateTime(item.videoTime)
} }
}) })
@ -172,6 +173,7 @@
this.diverTypeIndex = this.diverTypeIndex == 0 ? 1 : 0 this.diverTypeIndex = this.diverTypeIndex == 0 ? 1 : 0
this.videoIndex = 0 this.videoIndex = 0
this.getVideoList() this.getVideoList()
this.getOperateList()
}, },
checkVideo(val) { checkVideo(val) {
this.projectId = this.operateList[val]?.projectId this.projectId = this.operateList[val]?.projectId

@ -4,7 +4,7 @@
<view class="p14"> <view class="p14">
<view class="flex jc-fa ai-c wp100"> <view class="flex jc-fa ai-c wp100">
<view class="option_tem relative mr15" :class="checkedId===item.memberId?'checked_item':''" v-for="(item,index) of priceList" :key="index" @click="checkPrice(item.memberId,item.price)"> <view class="option_tem relative mr15" :class="checkedId===item.memberId?'checked_item':''" v-for="(item,index) of priceList" :key="index" @click="checkPrice(item.memberId,item.price)">
<text class="fw600 fs15 cor-333">{{item.memberName}}</text> <text class="fw600 fs12 cor-333">{{item.memberName}}</text>
<view class="mt5"> <view class="mt5">
<text class="fs14" style="color: #FF6E02;">¥</text> <text class="fs14" style="color: #FF6E02;">¥</text>
<text class="fs30 fw600" style="color: #FF6E02;">{{item.price}}</text> <text class="fs30 fw600" style="color: #FF6E02;">{{item.price}}</text>
@ -57,7 +57,7 @@
checkedId:0, checkedId:0,
priceList:[], priceList:[],
order:{ order:{
money:0.01, money:0,
description:'会员充值' description:'会员充值'
} }
} }
@ -75,11 +75,12 @@
...mapState(useUserStore, ["userInfo"]) ...mapState(useUserStore, ["userInfo"])
}, },
methods:{ methods:{
handlePay(){ async handlePay(){
console.log(this.order);
if(this.loading){ if(this.loading){
this.loading=false this.loading=false
await this.getWXOpenId()
new Pay('wechat', this.order); new Pay('wechat', this.order);
this.loading=true
} }
}, },
getWXOpenId() { getWXOpenId() {
@ -98,6 +99,7 @@
this.priceList=resp.data this.priceList=resp.data
this.checkedId=this.priceList[0].memberId this.checkedId=this.priceList[0].memberId
this.order.outTradeNo=this.priceList[0].memberId this.order.outTradeNo=this.priceList[0].memberId
this.order.money=this.priceList[0].price
this.nowPrice=this.priceList[0].price this.nowPrice=this.priceList[0].price
this.priceList.forEach(item=>{ this.priceList.forEach(item=>{
if(item.subjects.length>1){ if(item.subjects.length>1){
@ -110,6 +112,7 @@
this.checkedId=val this.checkedId=val
this.order.outTradeNo=val this.order.outTradeNo=val
this.nowPrice=price this.nowPrice=price
this.order.money=price
} }
} }
} }
@ -143,7 +146,7 @@
} }
.checked_bottom{ .checked_bottom{
width: 218rpx; width: 218rpx;
border-radius: 0 0 16rpx 12rpx; border-radius: 0 0 16rpx 5rpx;
background-color: #FF6E02; background-color: #FF6E02;
color:#fff color:#fff
} }

@ -104,13 +104,16 @@
<text class="cor-666 fs12">全部 ></text> <text class="cor-666 fs12">全部 ></text>
</view> </view>
<view class="flex ai-c mt20"> <view class="flex ai-c mt20">
<image src="../../static/image/index/index_bg.png" mode="widthFix" style="flex: 1;border-radius: 33rpx;"></image> <view class="contain-box relative">
<view class="ml18 text-center"> <image class="contain-box" src="../../../static/image/index/jpsp.png"></image>
<u-button :customStyle="{ width: '200rpx', height: '66rpx', borderRadius: '33rpx' }" iconColor="#fff" <image class="play_btn_2" src="../../static/image/index/play.png" />
text="去看视频" color="linear-gradient(90deg, #E66501 0%, #F8A42C 100%)" icon="play-circle" @click="toPlaceLive(item)"> </view>
</u-button> <view class="ml15 text-center">
<view class="cor-333 fs15 mt17">真实考场模拟</view> <u-button :customStyle="{width:'200rpx',height:'66rpx',borderRadius: '33rpx'}" iconColor="#fff"
</view> text="去看视频" color="linear-gradient(90deg, #E66501 0%, #F8A42C 100%)" icon="play-circle" @click="toPlaceLive(item)">
</u-button>
<view class="cor-333 fs15 fw600 mt10">真实考场模拟</view>
</view>
</view> </view>
</view> </view>
</view> </view>
@ -309,4 +312,17 @@ export default {
border: 2rpx solid #CF8B6D; border: 2rpx solid #CF8B6D;
border-radius: 16rpx; border-radius: 16rpx;
} }
.contain-box {
width: 406rpx;
height: 228rpx;
background: #00B74F;
border-radius: 16rpx;
}
.play_btn_2 {
width: 65rpx;
height: 65rpx;
position: absolute;
left: 165.5rpx;
top: 78rpx
}
</style> </style>

@ -71,6 +71,7 @@
arr = arr.map(item => { arr = arr.map(item => {
return { return {
...item, ...item,
subDesc:this.allVideoList[0].description,
projectId:item.videoId, projectId:item.videoId,
videoTime:this.formateTime(item.videoTime) videoTime:this.formateTime(item.videoTime)
} }

@ -1,12 +1,11 @@
<template> <template>
<view> <view>
<sunny-video style="width: 100%" videoHeight="422rpx" ref="sunny-video" <sunny-video style="width: 100%" videoHeight="422rpx" ref="sunny-video" :src="videoList[currentIndex].videoUrl" />
:src="videoList[currentIndex].videoUrl" />
<view class="p14tb bc-fff"> <view class="p14tb bc-fff">
<view class="skill-sequence-panel-content-wrapper pr14" v-if="videoType=='test'"> <view class="skill-sequence-panel-content-wrapper pr14" v-if="videoType=='test'">
<scroll-view class="skill-sequence-panel-content" scroll-x> <scroll-view class="skill-sequence-panel-content" scroll-x>
<view class="skill-sequence-skill-wrapper tab_iem" :class="videoIndex===item.value?'checked_tab':''" v-for="(item,index) of testList" <view class="skill-sequence-skill-wrapper tab_iem" :class="videoIndex===item.value?'checked_tab':''"
:key="index" @tap="checkTest(item.value)">{{item.label}}</view> v-for="(item,index) of testList" :key="index" @tap="checkTest(item.value)">{{item.label}}</view>
</scroll-view> </scroll-view>
</view> </view>
<view class="flex ai-c jc-sb mt10 wp100 p14"> <view class="flex ai-c jc-sb mt10 wp100 p14">
@ -22,19 +21,22 @@
</view> </view>
<view class="bc-fff pl14 pb10"> <view class="bc-fff pl14 pb10">
<view class="skill-sequence-panel-content-wrapper"> <view class="skill-sequence-panel-content-wrapper">
<scroll-view class="skill-sequence-panel-content" scroll-x :scroll-left="164*currentIndex"> <scroll-view class="skill-sequence-panel-content" scroll-x :scroll-left="getScrollLeft">
<view class="skill-sequence-skill-wrapper" v-for="(item, index) in videoList" :key="index" <view class="skill-sequence-skill-wrapper" v-for="(item, index) in videoList" :key="index"
@tap="checkVideo(item.projectId)"> @tap="checkVideo(item.projectId)">
<view> <view>
<view class="mb10 relative"> <view class="mb10 relative">
<view class="contain-box" style="overflow: hidden;"> <view class="contain-box" style="overflow: hidden;">
<image class="contain-box" mode="widthFix" :src="item.videoUrl+'?x-oss-process=video/snapshot,t_0,f_jpg'"></image> <image class="contain-box" mode="widthFix"
:src="item.videoUrl+'?x-oss-process=video/snapshot,t_0,f_jpg'"></image>
</view> </view>
<view v-if="projectId==item.projectId" class="playLogo">播放中</view> <view v-if="projectId==item.projectId" class="playLogo">播放中</view>
<image class="play_btn" src="../../static/image/index/play.png" /> <image class="play_btn" src="../../static/image/index/play.png" />
<text style="position: absolute;right: 8rpx;bottom: 8rpx;color:#fff">{{item.videoTime}}</text> <text style="position: absolute;right: 8rpx;bottom: 8rpx;color:#fff">{{item.videoTime}}</text>
</view> </view>
<text :style="{color:projectId==item.projectId?'#FF6E02':'#333'}">{{item.description}}</text> <view class="topic_cont_text" :style="{color:projectId==item.projectId?'#FF6E02':'#333'}">
{{item.description}}
</view>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
@ -55,7 +57,7 @@
</view> </view>
<view class="ml10"> <view class="ml10">
<text class="fs16 cor-000 fw600">{{item.description}}</text> <text class="fs16 cor-000 fw600">{{item.description}}</text>
<view class="fs14 mt5 cor-666">上车下车的方法</view> <view class="fs14 mt5 cor-666">{{item.subDesc}}</view>
</view> </view>
</view> </view>
</view> </view>
@ -71,8 +73,8 @@
export default { export default {
data() { data() {
return { return {
title:'', title: '',
currentIndex:0, currentIndex: 0,
videoIndex: 0, videoIndex: 0,
testList: [{ testList: [{
label: "八一考场", label: "八一考场",
@ -123,35 +125,41 @@
time: '13:14', time: '13:14',
id: 5 id: 5
}], }],
projectId:undefined, projectId: undefined,
param:{} param: {}
} }
}, },
onLoad(op) { onLoad(op) {
if (op.type) { if (op.type) {
this.videoType = op.type this.videoType = op.type
} }
if(op.projectId){ if (op.projectId) {
this.projectId=op.projectId this.projectId = op.projectId
} }
if(op.subject){ if (op.subject) {
this.param.subject=op.subject this.param.subject = op.subject
} }
if(op.type){ if (op.type) {
this.param.type=op.type this.param.type = op.type
} }
if(op.type=='1'){ if (op.type == '1') {
if(this.param.subject=='2'){ if (this.param.subject == '2') {
this.title='科二基础项目讲解' this.title = '科二基础项目讲解'
}else{ } else {
this.title='科三基础项目讲解' this.title = '科三基础项目讲解'
} }
}else{ } else {
this.title='基础操作讲解' this.title = '基础操作讲解'
} }
if(op.videoList){ if (op.videoList) {
this.videoList=JSON.parse(op.videoList) this.videoList = JSON.parse(op.videoList)
this.currentIndex=this.videoList.findIndex(item=>item.projectId==this.projectId) this.currentIndex = this.videoList.findIndex(item => item.projectId == this.projectId)
}
},
computed: {
getScrollLeft() {
const index = this.currentIndex - 1 < 0 ? 0 : this.currentIndex - 1
return 164 * index
} }
}, },
methods: { methods: {
@ -159,9 +167,9 @@
this.videoIndex = val this.videoIndex = val
}, },
checkVideo(val) { checkVideo(val) {
this.popupShow=false this.popupShow = false
this.projectId = val this.projectId = val
this.currentIndex=this.videoList.findIndex(item=>item.projectId==this.projectId) this.currentIndex = this.videoList.findIndex(item => item.projectId == this.projectId)
} }
} }
} }
@ -175,6 +183,21 @@
border-radius: 8rpx; border-radius: 8rpx;
} }
.topic_cont_text {
width: 260rpx;
height:45rpx;
overflow: hidden;
word-break: break-all;
/* break-all(允许在单词内换行。) */
text-overflow: ellipsis;
/* 超出部分省略号 */
/* display: -webkit-box; */
white-space: nowrap;
-webkit-box-orient: vertical; /** 设置或检索伸缩盒对象的子元素的排列方式 **/
-webkit-line-clamp:1; /** 显示的行数 **/
}
.playLogo { .playLogo {
width: 90rpx; width: 90rpx;
height: 40rpx; height: 40rpx;
@ -226,18 +249,21 @@
background: linear-gradient(90deg, #11DF20 0%, #01B74F 100%); background: linear-gradient(90deg, #11DF20 0%, #01B74F 100%);
color: #fff color: #fff
} }
/*scroll-view外层*/ /*scroll-view外层*/
.skill-sequence-panel-content-wrapper{ .skill-sequence-panel-content-wrapper {
position: relative; position: relative;
white-space:nowrap; white-space: nowrap;
} }
/*scroll-view本身*/ /*scroll-view本身*/
.skill-sequence-panel-content{ .skill-sequence-panel-content {
min-width:100%; min-width: 100%;
} }
/*scroll-view内层*/ /*scroll-view内层*/
.skill-sequence-skill-wrapper{ .skill-sequence-skill-wrapper {
display: inline-block; display: inline-block;
margin-right: 15px; margin-right: 15px;
} }
</style> </style>
Loading…
Cancel
Save