Merge pull request 'dev-hxf' (#23) from dev-hxf into master

Reviewed-on: #23
pull/24/head
huxiaofeng666 1 year ago
commit a09ef61e2f
  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');
}
prePay(params).then(res => {
console.log('预支付',res);
if (res.code == '0000') {
resolve(res);
}

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

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

@ -104,13 +104,16 @@
<text class="cor-666 fs12">全部 ></text>
</view>
<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="ml18 text-center">
<u-button :customStyle="{ width: '200rpx', height: '66rpx', borderRadius: '33rpx' }" iconColor="#fff"
text="去看视频" color="linear-gradient(90deg, #E66501 0%, #F8A42C 100%)" icon="play-circle" @click="toPlaceLive(item)">
</u-button>
<view class="cor-333 fs15 mt17">真实考场模拟</view>
</view>
<view class="contain-box relative">
<image class="contain-box" src="../../../static/image/index/jpsp.png"></image>
<image class="play_btn_2" src="../../static/image/index/play.png" />
</view>
<view class="ml15 text-center">
<u-button :customStyle="{width:'200rpx',height:'66rpx',borderRadius: '33rpx'}" iconColor="#fff"
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>
@ -309,4 +312,17 @@ export default {
border: 2rpx solid #CF8B6D;
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>

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

@ -1,12 +1,11 @@
<template>
<view>
<sunny-video style="width: 100%" videoHeight="422rpx" ref="sunny-video"
:src="videoList[currentIndex].videoUrl" />
<sunny-video style="width: 100%" videoHeight="422rpx" ref="sunny-video" :src="videoList[currentIndex].videoUrl" />
<view class="p14tb bc-fff">
<view class="skill-sequence-panel-content-wrapper pr14" v-if="videoType=='test'">
<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"
:key="index" @tap="checkTest(item.value)">{{item.label}}</view>
<view class="skill-sequence-skill-wrapper tab_iem" :class="videoIndex===item.value?'checked_tab':''"
v-for="(item,index) of testList" :key="index" @tap="checkTest(item.value)">{{item.label}}</view>
</scroll-view>
</view>
<view class="flex ai-c jc-sb mt10 wp100 p14">
@ -22,19 +21,22 @@
</view>
<view class="bc-fff pl14 pb10">
<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"
@tap="checkVideo(item.projectId)">
<view>
<view class="mb10 relative">
<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 v-if="projectId==item.projectId" class="playLogo">播放中</view>
<image class="play_btn" src="../../static/image/index/play.png" />
<text style="position: absolute;right: 8rpx;bottom: 8rpx;color:#fff">{{item.videoTime}}</text>
</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>
</scroll-view>
@ -55,7 +57,7 @@
</view>
<view class="ml10">
<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>
@ -71,8 +73,8 @@
export default {
data() {
return {
title:'',
currentIndex:0,
title: '',
currentIndex: 0,
videoIndex: 0,
testList: [{
label: "八一考场",
@ -123,35 +125,41 @@
time: '13:14',
id: 5
}],
projectId:undefined,
param:{}
projectId: undefined,
param: {}
}
},
onLoad(op) {
if (op.type) {
this.videoType = op.type
}
if(op.projectId){
this.projectId=op.projectId
if (op.projectId) {
this.projectId = op.projectId
}
if(op.subject){
this.param.subject=op.subject
if (op.subject) {
this.param.subject = op.subject
}
if(op.type){
this.param.type=op.type
if (op.type) {
this.param.type = op.type
}
if(op.type=='1'){
if(this.param.subject=='2'){
this.title='科二基础项目讲解'
}else{
this.title='科三基础项目讲解'
if (op.type == '1') {
if (this.param.subject == '2') {
this.title = '科二基础项目讲解'
} else {
this.title = '科三基础项目讲解'
}
}else{
this.title='基础操作讲解'
} else {
this.title = '基础操作讲解'
}
if(op.videoList){
this.videoList=JSON.parse(op.videoList)
this.currentIndex=this.videoList.findIndex(item=>item.projectId==this.projectId)
if (op.videoList) {
this.videoList = JSON.parse(op.videoList)
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: {
@ -159,9 +167,9 @@
this.videoIndex = val
},
checkVideo(val) {
this.popupShow=false
this.popupShow = false
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;
}
.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 {
width: 90rpx;
height: 40rpx;
@ -226,18 +249,21 @@
background: linear-gradient(90deg, #11DF20 0%, #01B74F 100%);
color: #fff
}
/*scroll-view外层*/
.skill-sequence-panel-content-wrapper{
position: relative;
white-space:nowrap;
.skill-sequence-panel-content-wrapper {
position: relative;
white-space: nowrap;
}
/*scroll-view本身*/
.skill-sequence-panel-content{
min-width:100%;
.skill-sequence-panel-content {
min-width: 100%;
}
/*scroll-view内层*/
.skill-sequence-skill-wrapper{
display: inline-block;
.skill-sequence-skill-wrapper {
display: inline-block;
margin-right: 15px;
}
</style>
Loading…
Cancel
Save