增加签到,修改0元支付问题
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
const ROOTPATH1 = "https://dj-api.hnsiyao.cn/sqx_fast/"; //
|
// const ROOTPATH1 = "https://dj-api.hnsiyao.cn/sqx_fast/"; //
|
||||||
const ROOTPATH = "https://dj-api.hnsiyao.cn/sqx_fast/"; //后台服务域名
|
// const ROOTPATH = "https://dj-api.hnsiyao.cn/sqx_fast/"; //后台服务域名
|
||||||
const ROOTPATH2 = "https://dj-h5.hnsiyao.cn"; //后台服务域名
|
// const ROOTPATH2 = "https://dj-h5.hnsiyao.cn"; //后台服务域名
|
||||||
|
|
||||||
// const ROOTPATH1 = "https://video.hnsiyao.cn/sqx_fast/"; //
|
const ROOTPATH1 = "https://video.hnsiyao.cn/sqx_fast/"; //
|
||||||
// const ROOTPATH = "https://video.hnsiyao.cn/sqx_fast/"; //后台服务域名
|
const ROOTPATH = "https://video.hnsiyao.cn/sqx_fast/"; //后台服务域名
|
||||||
// const ROOTPATH2 = "https://video-h5.hnsiyao.cn"; //后台服务域名
|
const ROOTPATH2 = "https://video-h5.hnsiyao.cn"; //后台服务域名
|
||||||
|
|
||||||
// const ROOTPATH1 = "http://192.168.1.5:8100/sqx_fast/"; //
|
// const ROOTPATH1 = "http://192.168.1.5:8100/sqx_fast/"; //
|
||||||
// const ROOTPATH = "http://192.168.1.5:8100/sqx_fast/"; //后台服务域名
|
// const ROOTPATH = "http://192.168.1.5:8100/sqx_fast/"; //后台服务域名
|
||||||
|
|||||||
@@ -632,6 +632,7 @@
|
|||||||
},
|
},
|
||||||
//选集弹窗的回调
|
//选集弹窗的回调
|
||||||
changeXj(e) {
|
changeXj(e) {
|
||||||
|
console.log(e)
|
||||||
if (e.show == false) {
|
if (e.show == false) {
|
||||||
//关闭弹窗的时候重置scrollIntoViews,防止关闭后第二次点就不能自动滑动到当前集的位置
|
//关闭弹窗的时候重置scrollIntoViews,防止关闭后第二次点就不能自动滑动到当前集的位置
|
||||||
this.scrollIntoViews = 'video0'
|
this.scrollIntoViews = 'video0'
|
||||||
@@ -1095,7 +1096,11 @@
|
|||||||
this.$refs.popupPya.close()
|
this.$refs.popupPya.close()
|
||||||
},
|
},
|
||||||
//选择播放
|
//选择播放
|
||||||
selectPlay(item) {
|
selectPlay(item,type) {
|
||||||
|
if ( this.videoList[this.current].videoUrl == '' && this.videoList[this.current].price <= 0 && !type ) {
|
||||||
|
this.getDataList(this.courseId, this.courseDetailsId, true, 'select')
|
||||||
|
return;
|
||||||
|
}
|
||||||
//重新计算一下当前观看的是哪个视频
|
//重新计算一下当前观看的是哪个视频
|
||||||
this.comNumVideo()
|
this.comNumVideo()
|
||||||
//滚动到选择的位置
|
//滚动到选择的位置
|
||||||
@@ -1212,6 +1217,7 @@
|
|||||||
//滚动到指定位置
|
//滚动到指定位置
|
||||||
goListPosition(courseDetailsId) {
|
goListPosition(courseDetailsId) {
|
||||||
let _this = this;
|
let _this = this;
|
||||||
|
// this.scrollIntoViews = 'video0'
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
// setTimeout(()=>{
|
// setTimeout(()=>{
|
||||||
console.log(courseDetailsId, '开始移动了')
|
console.log(courseDetailsId, '开始移动了')
|
||||||
@@ -1238,7 +1244,7 @@
|
|||||||
* @param {Number} courseDetailsId 当前视频id
|
* @param {Number} courseDetailsId 当前视频id
|
||||||
* @param {boolean} type 是购买后返回的还是直接进来的
|
* @param {boolean} type 是购买后返回的还是直接进来的
|
||||||
*/
|
*/
|
||||||
getDataList(courseId, courseDetailsId, type) {
|
getDataList(courseId, courseDetailsId, type, t) {
|
||||||
let data = {
|
let data = {
|
||||||
id: courseId,
|
id: courseId,
|
||||||
token: uni.getStorageSync('token') ? uni.getStorageSync('token') : ''
|
token: uni.getStorageSync('token') ? uni.getStorageSync('token') : ''
|
||||||
@@ -1347,7 +1353,9 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
if ( t == 'select') {
|
||||||
|
this.selectPlay(this.videoList[this.current],true)
|
||||||
|
}
|
||||||
this.$forceUpdate();
|
this.$forceUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1457,11 +1457,15 @@
|
|||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
},
|
},
|
||||||
//选择播放
|
//选择播放
|
||||||
selectPlay(item) {
|
selectPlay(item,type) {//price //videoUrl
|
||||||
// 根据选择的courseDetailsId拿到meunList列表中的相同数据的下标
|
// 根据选择的courseDetailsId拿到meunList列表中的相同数据的下标
|
||||||
const index = this.meunList.findIndex(menu => menu.courseDetailsId === item.courseDetailsId);
|
const index = this.meunList.findIndex(menu => menu.courseDetailsId === item.courseDetailsId);
|
||||||
this.videoList = [this.meunList[index]]
|
this.videoList = [this.meunList[index]]
|
||||||
this.current = 0
|
this.current = 0
|
||||||
|
if ( this.videoList[this.current].videoUrl == '' && this.videoList[this.current].price <= 0 && !type ) {
|
||||||
|
this.getDataList(this.courseId, this.courseDetailsId, true, 'select')
|
||||||
|
return;
|
||||||
|
}
|
||||||
//重新计算一下当前观看的是哪个视频
|
//重新计算一下当前观看的是哪个视频
|
||||||
this.comNumVideo()
|
this.comNumVideo()
|
||||||
this.setWxUrl()
|
this.setWxUrl()
|
||||||
@@ -1493,7 +1497,7 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
// 资源详情
|
// 资源详情
|
||||||
getDataList(id, courseDetailsId, type) {
|
getDataList(id, courseDetailsId, type, t) {
|
||||||
console.log('getDataList');
|
console.log('getDataList');
|
||||||
let data = {
|
let data = {
|
||||||
id,
|
id,
|
||||||
@@ -1660,7 +1664,9 @@
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if ( t == 'select') {
|
||||||
|
this.selectPlay(this.videoList[this.current],true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|||||||
@@ -1032,11 +1032,15 @@
|
|||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
},
|
},
|
||||||
//选择播放
|
//选择播放
|
||||||
selectPlay(item, index) {
|
selectPlay(item, index, type) {
|
||||||
// 根据选择的courseDetailsId拿到meunList列表中的相同数据的下标
|
// 根据选择的courseDetailsId拿到meunList列表中的相同数据的下标
|
||||||
// const index = this.meunList.findIndex(menu => menu.courseDetailsId === item.courseDetailsId);
|
// const index = this.meunList.findIndex(menu => menu.courseDetailsId === item.courseDetailsId);
|
||||||
// this.videoList = [this.meunList[index]]
|
// this.videoList = [this.meunList[index]]
|
||||||
this.current = index
|
this.current = index
|
||||||
|
if ( this.videoList[this.current].videoUrl == '' && this.videoList[this.current].price <= 0 && !type ) {
|
||||||
|
this.getDataList(this.courseId, this.courseDetailsId, true, 'select')
|
||||||
|
return;
|
||||||
|
}
|
||||||
//重新计算一下当前观看的是哪个视频
|
//重新计算一下当前观看的是哪个视频
|
||||||
this.comNumVideo()
|
this.comNumVideo()
|
||||||
// 把选择的视频的自动播放设置为true
|
// 把选择的视频的自动播放设置为true
|
||||||
@@ -1270,7 +1274,7 @@
|
|||||||
* @param {Number} courseDetailsId 当前视频id
|
* @param {Number} courseDetailsId 当前视频id
|
||||||
* @param {boolean} type 是购买后返回的还是直接进来的
|
* @param {boolean} type 是购买后返回的还是直接进来的
|
||||||
*/
|
*/
|
||||||
getDataList(courseId, courseDetailsId, type) {
|
getDataList(courseId, courseDetailsId, type, t) {
|
||||||
let data = {
|
let data = {
|
||||||
id: courseId,
|
id: courseId,
|
||||||
token: uni.getStorageSync('token') ? uni.getStorageSync('token') : ''
|
token: uni.getStorageSync('token') ? uni.getStorageSync('token') : ''
|
||||||
@@ -1381,7 +1385,9 @@
|
|||||||
} else { //不能播放则需要购买
|
} else { //不能播放则需要购买
|
||||||
this.openPay()
|
this.openPay()
|
||||||
}
|
}
|
||||||
|
if ( t == 'select') {
|
||||||
|
this.selectPlay(this.videoList[this.current],this.current,true)
|
||||||
|
}
|
||||||
this.$forceUpdate();
|
this.$forceUpdate();
|
||||||
//插入历史记录
|
//插入历史记录
|
||||||
this.setHistor(this.videoList[this.current].courseId, this.videoList[this.current]
|
this.setHistor(this.videoList[this.current].courseId, this.videoList[this.current]
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view style="padding-bottom: 100rpx;">
|
<view style="padding-bottom: 100rpx;">
|
||||||
<view class="title flex align-center justify-center">
|
<!-- <view class="title flex align-center justify-center">
|
||||||
<view class="title-box">
|
<view class="title-box">
|
||||||
<view class="title-box-title flex align-center justify-between">
|
<view class="title-box-title flex align-center justify-between">
|
||||||
<view class="title-box-title-l">
|
<view class="title-box-title-l">
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view v-if="list.length>0" class="itemTitle flex align-center justify-center">
|
<view v-if="list.length>0" class="itemTitle flex align-center justify-center">
|
||||||
<view class="itemTitle-box flex align-center justify-between">
|
<view class="itemTitle-box flex align-center justify-between">
|
||||||
<view class="itemTitle-box-l">
|
<view class="itemTitle-box-l">
|
||||||
|
|||||||
@@ -10,26 +10,33 @@
|
|||||||
<view class="icon_title u-font-32 text-bold u-relative">新人好礼送不停</view>
|
<view class="icon_title u-font-32 text-bold u-relative">新人好礼送不停</view>
|
||||||
<u-image class="task_icon2 u-relative" src="../../static/images/me/task_icon2.png"></u-image>
|
<u-image class="task_icon2 u-relative" src="../../static/images/me/task_icon2.png"></u-image>
|
||||||
</view>
|
</view>
|
||||||
<view class="content margin-lr padding bg-white u-relative" v-if="list.length" style="margin-bottom: 32rpx;">
|
|
||||||
<u-steps :list="numList" :current="1" active-color="#EA9EA8" un-active-color="#D8D5D5"></u-steps>
|
<view class="content signIn margin-lr padding bg-white u-relative" v-if="list.length" style="margin-bottom: 32rpx;">
|
||||||
<view class="cell flex justify-between" v-for="(item,index) in list" :key="index">
|
<view class="title flex justify-between">
|
||||||
<view class="cell_left flex">
|
<view>已连续签到 <text class="num">3</text> 天</view>
|
||||||
<view class="cell_title flex">
|
<view class="dk flex">
|
||||||
<view class="u-font-28 text-bold title" :style="{alignSelf: item.rewardImg?'center':'flex-start'}">{{ item.title}}</view>
|
<text style="margin-right: 20rpx;">打卡提醒</text>
|
||||||
<u-image v-if="item.rewardImg" class="cell_icon" :src="item.rewardImg "></u-image>
|
<u-switch v-model="checked" size="35" active-color="#EA9EA8 "></u-switch>
|
||||||
<view class="u-font-24 tip">{{ item.rewardDetail }}</view>
|
|
||||||
</view>
|
|
||||||
<view class="subhead u-font-24">{{ item.detail }}</view>
|
|
||||||
</view>
|
|
||||||
<view class="cell_right flex">
|
|
||||||
<view v-if=" item.disabled " class="btn u-font-24 text-bold" :style="{backgroundColor: item.buttonBgColor,color: item.buttonFontColor }" @click="goNav(item)">{{ item.type == 1 ? item.buttonTitle : item.number ? `${item.discNumber}/${item.number}` : ( item.discNumber <= 0 ? item.buttonTitle : `剩余${item.discNumber}次`) }}</view>
|
|
||||||
<view v-else class="btn u-font-24 text-bold disabled">{{ item.type == 1 ? item.buttonTitle : item.number ? `${item.discNumber}/${item.number}` : ( item.discNumber <= 0 ? item.buttonTitle : `剩余${item.discNumber}次`) }}</view>
|
|
||||||
<!-- <view v-else class="btn u-font-24 text-bold" @click="goNav(item)">{{ item.buttonTitle }}</view> -->
|
|
||||||
<!-- <view v-if=" item.type ==4 " class="u-font-20 tip" @click="goNav('/me/gift/gift', item.type)">查看奖品列表</view> -->
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="signInList flex justify-between">
|
||||||
|
<text class="line"></text>
|
||||||
|
<view class="signIn-Item" v-for="(item,index) in signInList" :key="index">
|
||||||
|
<image class="signIn_icon" src="../../static/images/signIn_icon1.png" mode="">
|
||||||
|
<view class="radius"></view>
|
||||||
|
<view class="_label">{{item.name}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<viwe>连续签到7天即可享受惊喜大礼包</viwe>
|
||||||
|
|
||||||
|
<view class="signInBtn">
|
||||||
|
<view>点击签到</view>
|
||||||
|
<view class="signInBtnBg"></view>
|
||||||
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="content margin-lr padding bg-white u-relative" v-if="list.length">
|
<view class="content margin-lr padding bg-white u-relative" v-if="list.length">
|
||||||
|
|
||||||
<view class="cell flex justify-between" v-for="(item,index) in list" :key="index">
|
<view class="cell flex justify-between" v-for="(item,index) in list" :key="index">
|
||||||
@@ -64,7 +71,8 @@
|
|||||||
backgroundImage: 'linear-gradient(to right, #FFE5EA 0%, #E4F5FB 49%, #FFF0EE 100%)'
|
backgroundImage: 'linear-gradient(to right, #FFE5EA 0%, #E4F5FB 49%, #FFF0EE 100%)'
|
||||||
},
|
},
|
||||||
list: [],
|
list: [],
|
||||||
numList: [
|
checked:false,
|
||||||
|
signInList: [
|
||||||
{ name: '第一天' },
|
{ name: '第一天' },
|
||||||
{ name: '第二天' },
|
{ name: '第二天' },
|
||||||
{ name: '第三天' },
|
{ name: '第三天' },
|
||||||
@@ -184,6 +192,8 @@
|
|||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
top: -115rpx;
|
top: -115rpx;
|
||||||
padding: 28rpx;
|
padding: 28rpx;
|
||||||
|
|
||||||
|
|
||||||
.cell{
|
.cell{
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 32rpx 0;
|
padding: 32rpx 0;
|
||||||
@@ -245,6 +255,92 @@
|
|||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.signIn{
|
||||||
|
>.title{
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #666666;
|
||||||
|
.num{
|
||||||
|
font-weight: bold;
|
||||||
|
color: #EC6F48;
|
||||||
|
margin: 0 10rpx;
|
||||||
|
}
|
||||||
|
.dk{
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #333333;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.signInList{
|
||||||
|
margin-top: 24rpx;
|
||||||
|
margin-bottom: 26rpx;
|
||||||
|
position: relative;
|
||||||
|
.line{
|
||||||
|
width: 92%;
|
||||||
|
height: 0rpx;
|
||||||
|
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||||
|
border: 2rpx solid #D8D5D5;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 57rpx;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
.signIn-Item{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
position: relative;
|
||||||
|
z-index: 5;
|
||||||
|
.signIn_icon{
|
||||||
|
width: 52.33rpx;
|
||||||
|
height: 51.68rpx;
|
||||||
|
margin-bottom: 32rpx;
|
||||||
|
}
|
||||||
|
.radius{
|
||||||
|
width: 26rpx;
|
||||||
|
height: 26rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
background-color: #D8D5D5;
|
||||||
|
|
||||||
|
}
|
||||||
|
._label{
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 18rpx;
|
||||||
|
color: #333333;
|
||||||
|
margin-top: 24rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.signInBtn{
|
||||||
|
width: 355rpx;
|
||||||
|
height: 64rpx;
|
||||||
|
line-height: 64rpx;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
text-align: center;
|
||||||
|
background: #EA9EA8;
|
||||||
|
border-radius: 14rpx 14rpx 14rpx 14rpx;
|
||||||
|
margin: 32rpx auto;
|
||||||
|
box-shadow: 0 0 0 rgba(234,158,168,0.75);
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.signInBtnBg{
|
||||||
|
width: 327rpx;
|
||||||
|
height: 52rpx;
|
||||||
|
background: rgba(234,158,168,0.75);
|
||||||
|
border-radius: 14rpx 14rpx 14rpx 14rpx;
|
||||||
|
opacity: 0.31;
|
||||||
|
position: absolute;
|
||||||
|
bottom: -10rpx;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
BIN
static/images/signIn_icon1.png
Normal file
BIN
static/images/signIn_icon1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
BIN
static/images/signIn_icon2.png
Normal file
BIN
static/images/signIn_icon2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
BIN
static/images/signIn_icon3.png
Normal file
BIN
static/images/signIn_icon3.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
Reference in New Issue
Block a user