ios弹窗提交

This commit is contained in:
duan 2025-01-09 15:39:00 +08:00
parent cb88b8bf54
commit 5af0821075
1 changed files with 9 additions and 157 deletions

View File

@ -12,7 +12,7 @@
:enable-progress-gesture="false" :poster="item.titleImg" :ref="'myVideo'+item.courseDetailsId"
:id="'myVideo'+item.courseDetailsId" :src="item.videoUrl" :autoplay="item.autoPlay"
class="swipersastqw"></video>
<image v-else @click="!item.videoUrl?openPay():''" :src="item.titleImg"
<image v-else @click="!item.videoUrl?upPop():''" :src="item.titleImg"
class="swipers-items-imgsbgwq" mode="aspectFill">
</image>
<!-- 返回图标 -->
@ -193,56 +193,7 @@
src="../../static/images/me/closeIconss.png" mode=""></image>
</view>
<!-- 余额 -->
<!-- <view class="popuppay-money">
<view class="popuppay-money-l">
<text class="popuppay-money-l-ye">
账号余额:
</text>
<text class="popuppay-money-l-jd">
{{moneyNum}}金币
</text>
<text class="popuppay-money-l-mx" @click="goWallet('/me/wallet/wallet')">
查看明细
</text>
</view>
<view class="popuppay-money-r">
<text class="popuppay-money-ye">
解锁价格:
</text>
<text class="popuppay-money-jd">
{{payPrice}}金币
</text>
</view>
</view> -->
<!-- 充值类型列表 -->
<!-- <scroll-view scroll-y="true" class="payLists">
<view class="popuppay-payList">
<view class="payList-item" @click="wallCurr = index" :class="wallCurr == index?'activePrice':''"
v-for="(item,index) in wallet" :key="index">
<view class="payList-item-price">
<text class="payList-item-prices">
¥{{item.price}}
</text>
</view>
<view class="payList-item-dou">
<text class="payList-item-dous">
{{item.money}}金币
</text>
</view>
<view class="payList-item-duo" v-if="item.giveMoney>0">
<text class="payList-item-duos">
多送{{item.giveMoney}}金币
</text>
</view>
<view class="payList-item-hui" v-if="item.remarks">
<text class="payList-item-huis">
{{item.remarks}}
</text>
</view>
</view>
</view>
</scroll-view> -->
<!-- 支付类型 -->
<view class="payType">
<view class="payType-item" @tap='selectWay(item)' v-for="(item,index) in openLists" :key="index">
@ -297,7 +248,7 @@
</view>
</uni-popup>
<uni-popup ref="alertDialog" type="dialog">
<uni-popup-dialog type="info" cancelText="看免费视频" confirmText="去登录" title=" " content="使用金币解锁此视频"
<uni-popup-dialog type="info" cancelText="看免费视频" confirmText="去登录" content="使用金币解锁此视频"
@confirm="dialogConfirm" @close="dialogClose"></uni-popup-dialog>
</uni-popup>
</view>
@ -1044,6 +995,10 @@
}
});
},
// 弹出弹出层
upPop(){
this.$refs.alertDialog.open()
},
//打开购买弹窗
openPay() {
//获取总价跟单集价格
@ -1193,110 +1148,7 @@
this.current = current;
//插入历史记录
this.setHistor(this.videoList[this.current].courseId, this.videoList[this.current].courseDetailsId);
// //拿出当前的swiper索引
// let current = Number(e.detail.current);
// // 根据courseDetailsId在meunList中找到这个数据的下标
// let indexs = -1;
// //考虑向上滑动的时候
// if (current == 2 && this.current == 0) {
// //向上滑到头的时候先拿第一条数据的courseDetailsId
// let courseDetailsId = this.videoList[0].courseDetailsId;
// indexs = this.meunList.findIndex(item => item.courseDetailsId === courseDetailsId);
// if (indexs != -1) { //找到了indexs就是对应下标
// //先判断meunList数组剩下的元素是否够三条
// const lengths = (this.meunList.slice(0, indexs)).length;
// if (lengths >= 3) { //够三条
// // 因为轮播图开启了首尾衔接,所以在滑动到尾部重新进入第一页之前替换全部数据为之前的三条
// //因为slice(str,end)包含str不包含end所以拿三条数据则-3
// this.videoList = this.meunList.slice(indexs - 3, indexs);
// } else { //不够三条
// let arr = new Array(3);
// switch (lengths) {
// //只有一条
// case 1:
// //只有一条的时候需要给数组补两条凑够三条把meunList数组的前两条拿出来补在后面
// arr[2] = this.meunList[indexs - 1]; //把剩下的一条取出来放到要滑动的那一页
// //因为剩下的数据不够了则拿meunList末尾的两条数据补齐
// //第二个用最后一条数据
// arr[1] = this.meunList[this.meunList.length - 1];
// //第一个用倒数第二条数据
// arr[0] = this.meunList[this.meunList.length - 2];
// //赋值
// this.videoList = arr;
// break;
// //只有二条
// case 2:
// //还剩下两条数据的时候
// //把剩下的倒数第一条取出来放到要滑动的那一页
// arr[2] = this.meunList[indexs - 1];
// //把剩下的最后一条放到第二个元素
// arr[1] = this.meunList[indexs - 2];
// //最后一个元素则由meunList的最后一条补齐
// arr[0] = this.meunList[this.meunList.length - 1];
// //最后赋值
// this.videoList = arr;
// break;
// default:
// //一条都没有的时候 [1,2,3,4,5,6]
// //直接把meunList末尾的三条放入数组即可
// this.videoList = this.meunList.slice(-3);
// break;
// }
// }
// }
// }
// //考虑向下滑动
// if ((current == 0 && this.current == 2) || (current == 0 && this.current ==
// 0)) { //是否滑动到第一条虽然刚进入页面current为0但是首次不触发
// //拿出当前的courseDetailsId
// let courseDetailsId = this.videoList[2].courseDetailsId;
// indexs = this.meunList.findIndex(item => item.courseDetailsId === courseDetailsId);
// //记录当前数据在meunList中的下标
// if (indexs != -1) { //找到了indexs就是对应下标
// //先判断meunList数组剩下的元素是否够三条
// const lengths = (this.meunList.slice(indexs + 1, this.meunList.length)).length;
// if (lengths >= 3) { //够三条
// // 因为轮播图开启了首尾衔接,所以在滑动到尾部重新进入第一页之前替换全部数据为之后的三条
// this.videoList = this.meunList.slice(indexs + 1, indexs + 4);
// } else { //不够三条
// let arr = new Array(3);
// switch (lengths) {
// //只有一条
// case 1:
// //只有一条的时候需要给数组补两条凑够三条把meunList数组的前两条拿出来补在后面
// arr[0] = this.meunList[indexs + 1];
// arr[1] = this.meunList[0];
// arr[2] = this.meunList[1];
// this.videoList = arr;
// break;
// case 2:
// //只有二条
// arr[0] = this.meunList[indexs + 1];
// arr[1] = this.meunList[indexs + 2];
// arr[2] = this.meunList[0];
// this.videoList = arr;
// break;
// default:
// //刚好没有数据了 直接拿meunList的前三条数据
// this.videoList = this.meunList.slice(0, 3);
// break;
// }
// }
// }
// }
// //获取当前播放的视频在菜单数组中的位置
// let scrollIndex = this.meunList.findIndex(ite => ite.courseDetailsId == this.videoList[current]
// .courseDetailsId);
// //记录当前播放位置
// this.scrollIntoView = 'video' + scrollIndex;
// //控制播放
// this.startPlay(current);
// //设置轮播图索引
// this.current = current;
// //插入历史记录
// this.setHistor(this.videoList[this.current].courseId, this.videoList[this.current].courseDetailsId);
},
},
//控制播放
startPlay(current) {
if (this.videoContext) { //判断之前是否有视频的上下文
@ -1317,7 +1169,7 @@
if (uni.getStorageSync('token')) {
this.openPay()
} else {
this.$refs.alertDialog.open()
this.upPop()
}
}
this.$forceUpdate();