代码合并
|
|
@ -1,10 +1,10 @@
|
|||
const ROOTPATH1 = "https://dj-api.hnsiyao.cn/sqx_fast/"; //
|
||||
const ROOTPATH = "https://dj-api.hnsiyao.cn/sqx_fast/"; //后台服务域名
|
||||
const ROOTPATH2 = "https://dj-h5.hnsiyao.cn"; //后台服务域名
|
||||
// const ROOTPATH1 = "https://dj-api.hnsiyao.cn/sqx_fast/"; //
|
||||
// const ROOTPATH = "https://dj-api.hnsiyao.cn/sqx_fast/"; //后台服务域名
|
||||
// const ROOTPATH2 = "https://dj-h5.hnsiyao.cn"; //后台服务域名
|
||||
|
||||
// const ROOTPATH1 = "https://video.hnsiyao.cn/sqx_fast/"; //
|
||||
// const ROOTPATH = "https://video.hnsiyao.cn/sqx_fast/"; //后台服务域名
|
||||
// const ROOTPATH2 = "https://video-h5.hnsiyao.cn"; //后台服务域名
|
||||
const ROOTPATH1 = "https://video.hnsiyao.cn/sqx_fast/"; //
|
||||
const ROOTPATH = "https://video.hnsiyao.cn/sqx_fast/"; //后台服务域名
|
||||
const ROOTPATH2 = "https://video-h5.hnsiyao.cn"; //后台服务域名
|
||||
|
||||
// const ROOTPATH1 = "http://192.168.1.5:8100/sqx_fast/"; //
|
||||
// const ROOTPATH = "http://192.168.1.5:8100/sqx_fast/"; //后台服务域名
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@
|
|||
methods: {
|
||||
toRed() {
|
||||
uni.navigateTo({
|
||||
url: '/me/balance/index'
|
||||
url: '/me/HEWZtgyqRH/HEWZtgyqRH'
|
||||
})
|
||||
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<view style="padding-bottom: 160rpx;">
|
||||
<view class="padding">
|
||||
<view class="money">
|
||||
<view class="MWXwdwbxts">
|
||||
<view class="money-top">
|
||||
<image src="../../static/images/me/moneyBanner.png" mode=""></image>
|
||||
<view class="money-top-title">
|
||||
|
|
@ -97,8 +97,8 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="sumbit flex align-center justify-center">
|
||||
<view class="sumbit-box flex align-center justify-center">
|
||||
<view class="gwdwbjUBRe flex align-center justify-center">
|
||||
<view class="gwdwbjUBRe-box flex align-center justify-center">
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<button v-if="osName!='ios'"
|
||||
style="background: #ff7581;color: #FFFFFF;width: 100%;height: 100%;border-radius: 44rpx;"
|
||||
|
|
@ -1216,7 +1216,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
.sumbit {
|
||||
.gwdwbjUBRe {
|
||||
width: 100%;
|
||||
height: 140rpx;
|
||||
background-color: #FFFFFF;
|
||||
|
|
@ -1224,7 +1224,7 @@
|
|||
bottom: 0;
|
||||
left: 0;
|
||||
|
||||
.sumbit-box {
|
||||
.gwdwbjUBRe-box {
|
||||
width: 686rpx;
|
||||
height: 88rpx;
|
||||
background: #6696FF;
|
||||
|
|
@ -1234,7 +1234,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
.money {
|
||||
.MWXwdwbxts {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 32rpx;
|
||||
|
|
@ -1,20 +1,20 @@
|
|||
<template>
|
||||
<view style="padding-bottom: 20rpx;">
|
||||
<view v-for="(item,index) in list" :key="index" class="list flex align-center justify-center">
|
||||
<view class="list-box">
|
||||
<view class="list-box-title">
|
||||
<view class="zdwbUQKCny">
|
||||
<view class="zdwbUQKCny-title">
|
||||
{{item.title}}
|
||||
</view>
|
||||
<view class="list-box-content">
|
||||
<view class="zdwbUQKCny-content">
|
||||
{{item.content}}
|
||||
</view>
|
||||
<view class="list-box-time flex align-center justify-between">
|
||||
<view class="zdwbUQKCny-time flex align-center justify-between">
|
||||
{{item.createTime}}
|
||||
<text>{{item.type===1?'+':'-'}}{{item.money}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="list.length > 3" class="loadMore">
|
||||
<view v-if="list.length > 3" class="jwdSnCdwbd">
|
||||
<u-loadmore :status="status" />
|
||||
</view>
|
||||
|
||||
|
|
@ -91,7 +91,7 @@
|
|||
height: auto;
|
||||
margin-top: 20rpx;
|
||||
|
||||
.list-box {
|
||||
.zdwbUQKCny {
|
||||
width: 686rpx;
|
||||
height: 100%;
|
||||
border-radius: 24rpx;
|
||||
|
|
@ -99,18 +99,18 @@
|
|||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.list-box-title {
|
||||
.zdwbUQKCny-title {
|
||||
width: 100%;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.list-box-content {
|
||||
.zdwbUQKCny-content {
|
||||
width: 100%;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.list-box-time {
|
||||
.zdwbUQKCny-time {
|
||||
width: 100%;
|
||||
margin-top: 20rpx;
|
||||
color: #999999;
|
||||
|
|
@ -123,7 +123,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
.loadMore {
|
||||
.jwdSnCdwbd {
|
||||
margin: 20rpx 0;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -2,16 +2,16 @@
|
|||
<view style="padding-bottom: 160rpx;">
|
||||
<view class="padding">
|
||||
<view class="money">
|
||||
<view class="money-top">
|
||||
<view class="qCLEJdwbZctop">
|
||||
<image src="../../static/images/me/moneyBanner.png" mode=""></image>
|
||||
<view class="money-top-title">
|
||||
<view class="qCLEJdwbZctitle">
|
||||
当前剩余金币
|
||||
</view>
|
||||
<view class="money-top-money">
|
||||
<view class="qCLEJdwbZc">
|
||||
{{formatNumber(moneyNum)}}
|
||||
</view>
|
||||
</view>
|
||||
<view @click="goNav('/me/wallet/mingxi')" class="money-bto flex align-center justify-between">
|
||||
<view @click="goNav('/me/wallet/mingxi')" class="qCLEJdwbZcbto flex align-center justify-between">
|
||||
金币明细
|
||||
<u-icon name="arrow-right" color="#6696ff" size="40"></u-icon>
|
||||
</view>
|
||||
|
|
@ -1200,7 +1200,7 @@
|
|||
border-radius: 32rpx;
|
||||
background-color: #FFFFFF;
|
||||
|
||||
.money-top {
|
||||
.qCLEJdwbZctop {
|
||||
width: 100%;
|
||||
height: 240rpx;
|
||||
position: relative;
|
||||
|
|
@ -1211,7 +1211,7 @@
|
|||
border-radius: 32rpx 32rpx 0 0;
|
||||
}
|
||||
|
||||
.money-top-title {
|
||||
.qCLEJdwbZctitle {
|
||||
position: absolute;
|
||||
font-size: 32rpx;
|
||||
color: hsla(0, 0%, 100%, .9);
|
||||
|
|
@ -1220,7 +1220,7 @@
|
|||
|
||||
}
|
||||
|
||||
.money-top-money {
|
||||
.qCLEJdwbZc {
|
||||
position: absolute;
|
||||
font-size: 64rpx;
|
||||
font-weight: 500;
|
||||
|
|
@ -1230,7 +1230,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
.money-bto {
|
||||
.qCLEJdwbZcbto {
|
||||
width: 100%;
|
||||
height: 108rpx;
|
||||
border-radius: 0 0 32rpx 32rpx;
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
<template>
|
||||
<view class="gyqSxFeTGt">
|
||||
<image class="img wgrqgyqaGW" src="/static/kigqHbgyqpImg/3_gya_65ae131b5480bb88f4e22e3ab3e3bdd242369bb3337eb-uAYvce_fw1200 (1).jpg" mode="widthFix"></image>
|
||||
<image class="img tgyqnoNIkz" src="/static/kigqHbgyqpImg/3_gya_65ae131b5480bb88f4e22e3ab3e3bdd242369bb3337eb-uAYvce_fw1200 (2).jpg" mode="widthFix"></image>
|
||||
<image class="img fKrjgyqjVb" src="/static/kigqHbgyqpImg/3_gya_65ae131b5480bb88f4e22e3ab3e3bdd242369bb3337eb-uAYvce_fw1200 (3).jpg" mode="widthFix"></image>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: []
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.img {
|
||||
width: 100%;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,15 +1,15 @@
|
|||
<template>
|
||||
<view>
|
||||
<view class="jf flex align-center justify-between">
|
||||
<view class="jf-l">
|
||||
<view class="jf-l-t">
|
||||
<view class="dngyqWXoYJ flex align-center justify-between">
|
||||
<view class="dngyqWXoYJ-l">
|
||||
<view class="dngyqWXoYJ-l-t">
|
||||
当前余额
|
||||
</view>
|
||||
<view class="jf-l-b">
|
||||
<view class="dngyqWXoYJ-l-b">
|
||||
{{amount || '0.00'}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="jf-r" @click="withdraw()">
|
||||
<view class="dngyqWXoYJ-r" @click="gyqNlYjIdi()">
|
||||
提现
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -100,7 +100,7 @@
|
|||
}
|
||||
})
|
||||
},
|
||||
withdraw() {
|
||||
gyqNlYjIdi() {
|
||||
let params = {
|
||||
amount: this.amount
|
||||
}
|
||||
|
|
@ -177,25 +177,25 @@
|
|||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.jf {
|
||||
.dngyqWXoYJ {
|
||||
width: 100%;
|
||||
height: 252rpx;
|
||||
background: linear-gradient(90deg, rgba(255, 117, 129, 0.6) 0%, #ff7581 100%);
|
||||
padding: 0 40rpx;
|
||||
|
||||
.jf-l-t {
|
||||
.dngyqWXoYJ-l-t {
|
||||
color: #ffffff;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.jf-l-b {
|
||||
.dngyqWXoYJ-l-b {
|
||||
font-size: 40rpx;
|
||||
color: #ffffff;
|
||||
font-weight: 600;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.jf-r {
|
||||
.dngyqWXoYJ-r {
|
||||
padding: 20rpx 40rpx;
|
||||
border-radius: 40rpx;
|
||||
color: #ff7581;
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
<template>
|
||||
<view class="gyqSxFeTGt">
|
||||
<image class="img gyqiDFJCLw" src="/static/kigqHbgyqpImg/4_gya_877066d6fe1d981fb2806fa73f8933c08fd096807d53-KjdBwJ_fw1200 (1).jpg" mode="widthFix"></image>
|
||||
<image class="img QiXUNgyqsr" src="/static/kigqHbgyqpImg/4_gya_877066d6fe1d981fb2806fa73f8933c08fd096807d53-KjdBwJ_fw1200 (1).png" mode="widthFix"></image>
|
||||
<image class="img gzgyqstCwR" src="/static/kigqHbgyqpImg/4_gya_877066d6fe1d981fb2806fa73f8933c08fd096807d53-KjdBwJ_fw1200 (2).jpg" mode="widthFix"></image>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: []
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.img {
|
||||
width: 100%;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,769 @@
|
|||
<template>
|
||||
<view class="almost-lottery min-page">
|
||||
<u-navbar title="" back-icon-color="#fff" :background="background" immersive :border-bottom="false" title-color="#fff"></u-navbar>
|
||||
<!-- head -->
|
||||
<view class="almost-lottery__head">
|
||||
<view class="btn-group u-flex u-row-between">
|
||||
<view :class="['action', isApple && 'action-shadow']" @click="toRed">
|
||||
<text class="pack"></text>
|
||||
<text class="content">
|
||||
红包
|
||||
<text class="num">{{ totalMoney }}</text>
|
||||
</text>
|
||||
</view>
|
||||
<view :class="['action', isApple && 'action-shadow']" @click="toGift">
|
||||
<text class="gift"></text>
|
||||
<text class="content">我的奖品</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="tip"><text class="tip-content">每次抽奖消耗 {{ goldNum }} 金币,不限次数</text></view> -->
|
||||
</view>
|
||||
<!-- action -->
|
||||
|
||||
<!-- <view class="almost-lottery__action-dev" @tap="handleInitCanvas" v-if="isDev">
|
||||
<text class="text">重新生成画板-开发模式使用</text>
|
||||
</view>
|
||||
<view class="almost-lottery__action-dev" @tap="handleCheckPopup">
|
||||
<text class="text">查看 uni-popup 用例</text>
|
||||
</view> -->
|
||||
|
||||
<!-- lottery -->
|
||||
<view class="almost-lottery__wheel">
|
||||
<view class="almost-lottery__count">
|
||||
<text class="text">剩余免费抽奖 {{ freeNum }} 次</text>
|
||||
</view>
|
||||
<!-- <button @click="showLingPop">showLingPop</button> -->
|
||||
<almost-lottery
|
||||
:lottery-size="lotteryConfig.lotterySize"
|
||||
:action-size="lotteryConfig.actionSize"
|
||||
:selfTime="selfTime"
|
||||
:ring-count="2"
|
||||
:duration="1"
|
||||
:self-rotaty="false"
|
||||
:img-circled="true"
|
||||
:canvasCached="true"
|
||||
:prize-list="prizeList"
|
||||
:prize-index="prizeIndex"
|
||||
:lotteryBg="lotteryBg"
|
||||
:actionBg="actionBg"
|
||||
@reset-index="prizeIndex = -1"
|
||||
@draw-before="handleDrawBefore"
|
||||
@draw-start="handleDrawStart"
|
||||
@draw-end="handleDrawEnd"
|
||||
@finish="handleDrawFinish"
|
||||
v-if="prizeList.length"
|
||||
/>
|
||||
</view>
|
||||
<!-- rule -->
|
||||
<view class="almost-lottery__rule">
|
||||
<view class="rule-head">
|
||||
<view class="line"></view>
|
||||
<text class="title">活动规则</text>
|
||||
<view class="line"></view>
|
||||
</view>
|
||||
<view class="rule-body">
|
||||
<view class="item">
|
||||
<view class="number">1</view>
|
||||
<view class="text">
|
||||
<text>抽奖细则:</text>
|
||||
<text>每日前{{ freeNumDay }}次付款均可获得抽奖机会</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item item-rule">
|
||||
<view class="number">2</view>
|
||||
<view class="text">
|
||||
<text>奖励说明:红包奖励将自动发放到红包余额,已绑定支付宝账号将会自动发起提现。其余奖品则需联系客服领取。</text>
|
||||
<!-- <text>b.金币奖:系统会即时转入金币账户,可在平台内使用。</text> -->
|
||||
</view>
|
||||
</view>
|
||||
<!-- <template >
|
||||
<view class="item">
|
||||
<view class="number">3</view>
|
||||
<view class="text">本次活动由XXXXXXX发起。</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="number">4</view>
|
||||
<view class="text">本活动仅限17岁以上用户参加。</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="number">5</view>
|
||||
<view class="text">本活动最终解释权归XXXXXXX所有。</view>
|
||||
</view>
|
||||
</template> -->
|
||||
</view>
|
||||
</view>
|
||||
<ling-qu ref="refLingqu" @close="lingquClose"></ling-qu>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AlmostLottery from '@/uni_modules/almost-lottery/components/almost-lottery/almost-lottery.vue';
|
||||
import lingQu from '@/components/pop-ling-qu.vue';
|
||||
import { clearCacheFile, clearStore } from '@/uni_modules/almost-lottery/utils/almost-utils.js';
|
||||
export default {
|
||||
name: 'Home',
|
||||
components: {
|
||||
AlmostLottery,
|
||||
lingQu
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 1 订单拉起抽奖
|
||||
// 2 周任务拉起抽奖
|
||||
// 3 月任务拉起抽奖
|
||||
source: 1,
|
||||
background: {
|
||||
background: 'transparent'
|
||||
},
|
||||
//红包余额
|
||||
totalMoney: 0,
|
||||
//抽奖结果
|
||||
result: '',
|
||||
// 开启调试模式
|
||||
isDev: true,
|
||||
option: {},
|
||||
// 以下是转盘配置相关数据
|
||||
lotteryConfig: {
|
||||
// 抽奖转盘的整体尺寸,单位rpx
|
||||
lotterySize: 600,
|
||||
// 抽奖按钮的尺寸,单位rpx
|
||||
actionSize: 200
|
||||
},
|
||||
selfTime: 2000,
|
||||
// 以下是转盘 UI 配置
|
||||
// 转盘外环图,如有需要,请参考替换为自己的设计稿
|
||||
lotteryBg: require('@/uni_modules/almost-lottery/static/almost-lottery/almost-lottery__bg2x.png'),
|
||||
// 抽奖按钮图
|
||||
actionBg: require('@/uni_modules/almost-lottery/static/almost-lottery/almost-lottery__action2x.png'),
|
||||
|
||||
// 以下是奖品配置数据
|
||||
// 奖品数据
|
||||
prizeList: [],
|
||||
// 奖品是否设有库存
|
||||
onStock: true,
|
||||
// 中奖下标
|
||||
prizeIndex: -1,
|
||||
|
||||
// 是否正在抽奖中,避免重复触发
|
||||
prizeing: false,
|
||||
|
||||
// 以下为中奖概率有关数据
|
||||
// 是否由前端控制概率,默认不开启,强烈建议由后端控制
|
||||
onFrontend: false,
|
||||
// 权重随机数的最大值
|
||||
prizeWeightMax: 0,
|
||||
// 权重数组
|
||||
prizeWeightArr: [],
|
||||
|
||||
// 以下为业务需求有关示例数据
|
||||
// 金币余额
|
||||
goldCoin: 20,
|
||||
// 当日免费抽奖次数余额
|
||||
freeNum: 0,
|
||||
// 每次消耗的金币数
|
||||
goldNum: 20,
|
||||
// 每天免费抽奖次数
|
||||
freeNumDay: 0
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
isApple() {
|
||||
return uni.getSystemInfoSync().platform === 'ios';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
lingquClose(key) {
|
||||
console.log('lingquClose');
|
||||
console.log(key);
|
||||
if (key && key == 'isBindAliPay') {
|
||||
uni.navigateTo({
|
||||
url: '/me/invite/zhifubao'
|
||||
});
|
||||
}
|
||||
},
|
||||
toRed() {
|
||||
uni.navigateTo({
|
||||
url: '/me/invite/cashDetail'
|
||||
});
|
||||
},
|
||||
toGift() {
|
||||
console.log('1');
|
||||
|
||||
uni.navigateTo({
|
||||
url: '/me/gift/gift?source=' + this.source
|
||||
});
|
||||
},
|
||||
// 重新生成
|
||||
handleInitCanvas() {
|
||||
clearCacheFile();
|
||||
clearStore();
|
||||
|
||||
this.prizeList = [];
|
||||
this.getPrizeList();
|
||||
},
|
||||
// 通过 popup 打开
|
||||
handleCheckPopup() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/popup/popup'
|
||||
});
|
||||
},
|
||||
// 获取奖品列表
|
||||
async getPrizeList() {
|
||||
uni.showLoading({
|
||||
title: '奖品准备中...'
|
||||
});
|
||||
|
||||
// 等待接口返回的数据进一步处理
|
||||
let res = await this.requestApiGetPrizeList();
|
||||
console.log('获取奖品列表', res);
|
||||
|
||||
if (res.ok) {
|
||||
let data = res.data;
|
||||
if (data.length) {
|
||||
this.prizeList = data;
|
||||
console.log('已获取到奖品列表数据,开始绘制抽奖转盘');
|
||||
|
||||
// 计算开始绘制的时间
|
||||
if (console.time) {
|
||||
console.time('绘制转盘用时');
|
||||
}
|
||||
|
||||
// 如果开启了前端控制概率
|
||||
// 得出权重的最大值并生成权重数组
|
||||
if (this.onFrontend) {
|
||||
// 生成权重数组并排序取得最大值
|
||||
this.prizeWeightArr = this.prizeList.map((item) => item.prizeWeight);
|
||||
let prizeWeightArrSort = [...this.prizeWeightArr];
|
||||
prizeWeightArrSort.sort((a, b) => b - a);
|
||||
|
||||
// 开放自定义权重最大值,没有自定义则取权重数组中的最大值
|
||||
this.prizeWeightMax = this.prizeWeightMax > 0 ? this.prizeWeightMax : prizeWeightArrSort[0];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: '获取奖品失败',
|
||||
mask: true,
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
},
|
||||
// 模拟请求 获取奖品列表 接口,
|
||||
// 注意这里返回的是一个 Promise
|
||||
// 大哥,这里只是模拟,别告诉我你不会对接自己的接口
|
||||
async requestApiGetPrizeList() {
|
||||
const res = await this.$Request.getT('/app/discSpinning/selectDiscSpinning', { source: this.source });
|
||||
if (res.code == 0) {
|
||||
return {
|
||||
ok: true,
|
||||
data: res.data.records.map((v) => {
|
||||
return {
|
||||
...v,
|
||||
prizeId: v.id,
|
||||
prizeName: v.name,
|
||||
prizeStock: 10,
|
||||
prizeWeight: 200,
|
||||
prizeImage: v.url
|
||||
// prizeImage: require('@/static/git.png')
|
||||
};
|
||||
})
|
||||
};
|
||||
}
|
||||
return;
|
||||
// return new Promise((resolve, reject) => {
|
||||
// let requestTimer = setTimeout(() => {
|
||||
// clearTimeout(requestTimer)
|
||||
// requestTimer = null
|
||||
|
||||
// // prizeStock 奖品库存
|
||||
// // prizeWeight 中奖概率,数值越大中奖概率越高,权重一样时随机中奖
|
||||
// resolve({
|
||||
// ok: true,
|
||||
// data: [{
|
||||
// prizeId: 1,
|
||||
// prizeName: '0.1元现金',
|
||||
// prizeStock: 10,
|
||||
// prizeWeight: 200,
|
||||
// prizeImage: require('@/static/git.png')
|
||||
// },
|
||||
// {
|
||||
// prizeId: 2,
|
||||
// prizeName: '10元现金',
|
||||
// prizeStock: 0,
|
||||
// prizeWeight: 50,
|
||||
// prizeImage: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/56f085e0-bcfe-11ea-b244-a9f5e5565f30.png'
|
||||
// },
|
||||
// {
|
||||
// prizeId: 3,
|
||||
// prizeName: '5元话费',
|
||||
// prizeStock: 1,
|
||||
// prizeWeight: 80
|
||||
// },
|
||||
// {
|
||||
// prizeId: 4,
|
||||
// prizeName: '50元现金',
|
||||
// prizeStock: 0,
|
||||
// prizeWeight: 10,
|
||||
// prizeImage: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAB2klEQVRIia3Wv09TURjG8U+u2kQZcNENh2ok0cnJ0R+L0RB2g/EvwITEwRgnV0Zx0fAHYBh0khBD4sBAmAgDiwQNg4qwmSBDAYf7Fi+n97al9UlObnvO836f3tO355b2GsAYZrCBPRzGdSPmx8J3YtXwDDsB7TR2wl/rNmAYK13C07ES9W11E9s9BjTHdnBKVf8PAcWgehpwCssF0w/5FzqLgw7AA7zDQ/wqzC8H90jjSeFMYW0Yr8PzALfjOh7z1wve2YTzpLlQw2ay+KZ1N7vS24SziVqGexhKzB07pEJXk/dDwTetdZ9HewwZLWFNw2oyudZjQFNrCW8109pqS32GpPX1TOu586fPkLR+IEMjmbzYZ0ha34Atx/fwW58hXxPeFixo7Yg7PQbcKmEtZFgsMb/C4AkDBuUnQKpFuFZI3cZuvP6C+8g6wDP572O95C4Og49/W/YJl/G5YPqO9yV3dh4f8LMCfhjcI93Afix8xAX5SVx2YBY10yagEdxjmiwY7uISXuIFrlSEPG0TMllWcAbzYViXd0rzeXC6ImSiImA+eKU6h7mCeV/eCBMnCJkLzpHSztnFCJ7L//ZkOFv1iRLtRd1IcLpSHVP4jccVnkexPqXkmd7UX15b7tiz29ReAAAAAElFTkSuQmCC'
|
||||
// },
|
||||
// {
|
||||
// prizeId: 5,
|
||||
// prizeName: '1卷抽纸',
|
||||
// prizeStock: 3,
|
||||
// prizeWeight: 3000,
|
||||
// prizeImage: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAABCElEQVRoge3YMa4BURSH8Y8o7UAp0WgkotBZwluAfhqlZSgUGr23ENUUCpppJnTswAIUSCaTiziZJ8d9/193zdzrfMltABF5plb+oLscDoAV0Pn8OC/lwDhL0k35QT3wstcIuM61Cj0IhXiNuAvOFwr5SgrxRiHeKMSbhnHfAVgU1i1gajhnBpwK6wnQtgxkDTlmSTq/L7rLYQ9byG+WpLvCOT8YQ6K5WgrxRiHeKMQbhXijEG8U4o1CvIkmxPrDquwMrI37KlFJSJake2BUxVlW0VytaEKsV6t5+8Ohak3rRmtIH9hav/QvRHO1FOKNQrwJheQfn+I9wflCIeNHLzuQc51PRP6rC1ZeIm1I8cC5AAAAAElFTkSuQmCC'
|
||||
// },
|
||||
// {
|
||||
// prizeId: 6,
|
||||
// prizeName: '0.2元现金',
|
||||
// prizeStock: 8,
|
||||
// prizeWeight: 120
|
||||
// },
|
||||
// {
|
||||
// prizeId: 7,
|
||||
// prizeName: '谢谢参与',
|
||||
// prizeStock: 100,
|
||||
// prizeWeight: 10000
|
||||
// },
|
||||
// {
|
||||
// prizeId: 8,
|
||||
// prizeName: '100金币',
|
||||
// prizeStock: 100,
|
||||
// prizeWeight: 3000
|
||||
// }
|
||||
// ]
|
||||
// })
|
||||
// }, 200)
|
||||
// })
|
||||
},
|
||||
// 抽奖开始之前
|
||||
async handleDrawBefore(callback) {
|
||||
console.log('抽奖开始之前');
|
||||
let flag = false;
|
||||
|
||||
// 还有免费数次
|
||||
if (this.freeNum > 0) {
|
||||
flag = true;
|
||||
} else {
|
||||
flag = false;
|
||||
uni.showToast({
|
||||
title: '抽奖次数不足',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
|
||||
callback(flag);
|
||||
},
|
||||
// 本次抽奖开始
|
||||
handleDrawStart() {
|
||||
console.log('触发抽奖按钮');
|
||||
if (this.prizeing) return;
|
||||
this.prizeing = true;
|
||||
this.tryLotteryDraw();
|
||||
},
|
||||
// 尝试发起抽奖
|
||||
tryLotteryDraw() {
|
||||
console.log('旋转开始,获取中奖下标......');
|
||||
// 判断是否由前端控制概率
|
||||
if (this.onFrontend) {
|
||||
this.localGetPrizeIndex();
|
||||
} else {
|
||||
this.remoteGetPrizeIndex();
|
||||
}
|
||||
},
|
||||
// 本地获取中奖下标
|
||||
localGetPrizeIndex() {
|
||||
console.warn('###当前处于前端控制中奖概率,安全起见,强烈建议由后端控制###');
|
||||
// 前端控制概率的情况下,需要拿到最接近随机权重且大于随机权重的值
|
||||
// 后端控制概率的情况下,通常会直接返回 prizeId
|
||||
if (!this.prizeWeightMax || !this.prizeWeightArr.length) {
|
||||
console.warn('###当前已开启前端控制中奖概率,但是奖品数据列表中的 prizeWeight 参数似乎配置不正确###');
|
||||
return;
|
||||
}
|
||||
console.log('当前权重最大值为 =>', this.prizeWeightMax);
|
||||
|
||||
// 注意这里使用了 Math.ceil,如果某个权重的值为 0,则始终无法中奖
|
||||
let randomWeight = Math.ceil(Math.random() * this.prizeWeightMax);
|
||||
console.log('本次权重随机数 =>', randomWeight);
|
||||
|
||||
// 生成大于等于随机权重的数组
|
||||
let tempMaxArrs = [];
|
||||
this.prizeList.forEach((item) => {
|
||||
if (item.prizeWeight >= randomWeight) {
|
||||
tempMaxArrs.push(item.prizeWeight);
|
||||
}
|
||||
});
|
||||
console.log('tempMaxArrs', tempMaxArrs);
|
||||
|
||||
// 如果大于随机权重的数组有值,先对这个数组排序然后取值
|
||||
// 反之新建一个临时的包含所有权重的已排序数组,然后取值
|
||||
let tempMaxArrsLen = tempMaxArrs.length;
|
||||
if (tempMaxArrsLen) {
|
||||
tempMaxArrs.sort((a, b) => a - b);
|
||||
// 取值时,如果存在多个值,分两种情况
|
||||
if (tempMaxArrsLen > 1) {
|
||||
// 检查是否存在重复的值
|
||||
let sameCount = 0;
|
||||
for (let i = 0; i < tempMaxArrs.length; i++) {
|
||||
if (tempMaxArrs[i] === tempMaxArrs[0]) {
|
||||
sameCount++;
|
||||
}
|
||||
}
|
||||
|
||||
// 值不相等的情况下取最接近的值,也就是第1个值
|
||||
if (sameCount === 1) {
|
||||
this.prizeIndex = this.prizeWeightArr.indexOf(tempMaxArrs[0]);
|
||||
} else {
|
||||
// 存在值相等时,随机取值,当然这里你可以自己决定是否随机取值
|
||||
let sameWeight = tempMaxArrs[0];
|
||||
let sameWeightArr = [];
|
||||
let sameWeightItem = {};
|
||||
this.prizeWeightArr.forEach((item, index) => {
|
||||
if (item === sameWeight) {
|
||||
sameWeightArr.push({
|
||||
prizeWeight: item,
|
||||
index
|
||||
});
|
||||
}
|
||||
});
|
||||
console.log('sameWeightArr', sameWeightArr);
|
||||
sameWeightItem = sameWeightArr[Math.floor(Math.random() * sameWeightArr.length)];
|
||||
console.log('sameWeightItem', sameWeightItem);
|
||||
this.prizeIndex = sameWeightItem.index;
|
||||
}
|
||||
} else {
|
||||
this.prizeIndex = this.prizeWeightArr.indexOf(tempMaxArrs[0]);
|
||||
}
|
||||
}
|
||||
|
||||
console.log('本次抽中奖品 =>', this.prizeList[this.prizeIndex].prizeName);
|
||||
|
||||
// 如果奖品设有库存
|
||||
if (this.onStock) {
|
||||
console.log('本次奖品库存 =>', this.prizeList[this.prizeIndex].prizeStock);
|
||||
}
|
||||
},
|
||||
// 远程请求接口获取中奖下标
|
||||
// 大哥,这里只是模拟,别告诉我你不会对接自己的接口
|
||||
async remoteGetPrizeIndex() {
|
||||
this.result = '';
|
||||
console.warn('###当前处于模拟的请求接口,并返回了中奖信息###');
|
||||
const res = await this.$Request.getT('app/discSpinning/draw', { source: this.source });
|
||||
this.freeNum--;
|
||||
// this.getCount()
|
||||
console.log(res);
|
||||
if (res.code != 0) {
|
||||
return uni.showToast({
|
||||
title: res.msg
|
||||
});
|
||||
}
|
||||
this.result = res.data;
|
||||
|
||||
let list = [...this.prizeList];
|
||||
// 这里随机产生的 prizeId 是模拟后端返回的 prizeId
|
||||
const arr = list.filter((v) => v.type == res.data.type);
|
||||
let prizeId = arr[0].prizeId;
|
||||
|
||||
// 拿到后端返回的 prizeId 后,开始循环比对得出那个中奖的数据
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
let item = list[i];
|
||||
if (item.prizeId === prizeId) {
|
||||
// 中奖下标
|
||||
this.prizeIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
console.log('本次抽中奖品 =>', this.prizeList[this.prizeIndex].prizeName);
|
||||
},
|
||||
// 本次抽奖结束
|
||||
handleDrawEnd() {
|
||||
console.log('旋转结束,执行拿到结果后到逻辑');
|
||||
// 旋转结束后,开始处理拿到结果后的逻辑
|
||||
// const prize = this.prizeList[this.prizeIndex]
|
||||
const prize = this.result;
|
||||
let { name } = prize;
|
||||
let tipContent = '';
|
||||
|
||||
if (name.type == 1) {
|
||||
tipContent = '很遗憾,没有中奖,请再接再厉!';
|
||||
} else {
|
||||
tipContent = `恭喜您,获得 ${name}${this.result.type == 2 ? this.result.number + '元' : ''} !`;
|
||||
}
|
||||
const _this = this;
|
||||
console.log(this.result);
|
||||
this.showLingPop({ ...this.result });
|
||||
this.result = '';
|
||||
this.prizeing = false;
|
||||
return;
|
||||
// uni.showModal({
|
||||
// content: tipContent,
|
||||
// showCancel: false,
|
||||
// success() {
|
||||
// const {
|
||||
// orderId,id
|
||||
// }=_this.result
|
||||
// _this.$Request.postJson('app/discSpinning/receive',_this.result).then(res=>{
|
||||
// _this.result=''
|
||||
// console.log(res)
|
||||
// if(res.code==0){
|
||||
// uni.showToast({
|
||||
// title: '领取成功',
|
||||
// icon:'none'
|
||||
// })
|
||||
// _this.getRedPack()
|
||||
// }else{
|
||||
// uni.showToast({
|
||||
// title: '领取失败',
|
||||
// icon:'none'
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
// complete: () => {
|
||||
// this.prizeing = false
|
||||
// }
|
||||
// })
|
||||
},
|
||||
// 抽奖转盘绘制完成
|
||||
handleDrawFinish(res) {
|
||||
console.log('抽奖转盘绘制完成', res);
|
||||
|
||||
if (res.ok) {
|
||||
// 计算结束绘制的时间
|
||||
if (console.timeEnd) {
|
||||
console.timeEnd('绘制转盘用时');
|
||||
}
|
||||
}
|
||||
|
||||
let stoTimer = setTimeout(() => {
|
||||
stoTimer = null;
|
||||
|
||||
uni.hideLoading();
|
||||
// uni.showToast({
|
||||
// title: res.msg,
|
||||
// mask: true,
|
||||
// icon: 'none'
|
||||
// })
|
||||
}, 50);
|
||||
},
|
||||
async getRedPack() {
|
||||
const res = await this.$Request.getT('app/moneyDetails/selectUserMoney');
|
||||
if (res.code == 0) {
|
||||
this.totalMoney = res.data.amount;
|
||||
}
|
||||
},
|
||||
async getCount() {
|
||||
const res = await this.$Request.getT('app/discSpinning/drawCount', { source: this.source });
|
||||
if (res.code == 0) {
|
||||
this.freeNum = res.count || 0;
|
||||
this.freeNumDay = res.sum || 0;
|
||||
}
|
||||
},
|
||||
lingquClose() {
|
||||
// this.getCount()
|
||||
this.getRedPack();
|
||||
},
|
||||
showLingPop(data) {
|
||||
this.$refs.refLingqu.open(data);
|
||||
}
|
||||
},
|
||||
onLoad(opt) {
|
||||
this.option = opt;
|
||||
if (opt.source) {
|
||||
this.source = opt.source;
|
||||
}
|
||||
this.prizeList = [];
|
||||
this.getCount();
|
||||
this.getRedPack();
|
||||
this.getPrizeList();
|
||||
},
|
||||
onUnload() {
|
||||
uni.hideLoading();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.btn-group {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 2;
|
||||
top: 180px;
|
||||
gap: 20rpx;
|
||||
padding: 0 32rpx;
|
||||
}
|
||||
|
||||
.almost-lottery {
|
||||
flex: 1;
|
||||
background-color: #ff893f;
|
||||
}
|
||||
|
||||
.almost-lottery__head {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 460rpx;
|
||||
background: url('~static/images/lottery/top-bg.png') no-repeat center center/cover;
|
||||
|
||||
.action {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
height: 88rpx;
|
||||
line-height: 88rpx;
|
||||
margin: 0 auto;
|
||||
color: #ffffff;
|
||||
font-size: 32rpx;
|
||||
background-color: rgba(255, 136, 61, 1);
|
||||
border-radius: 44rpx;
|
||||
}
|
||||
|
||||
.action-shadow {
|
||||
box-shadow: 0px 14rpx 0px 0px rgba(235, 112, 36, 1);
|
||||
}
|
||||
|
||||
.pack {
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
margin-right: 10rpx;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
background-size: contain;
|
||||
background-image: url('~static/red-pack.png');
|
||||
}
|
||||
|
||||
.gift {
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
margin-right: 10rpx;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
background-size: contain;
|
||||
background-image: url('~static/gift.png');
|
||||
}
|
||||
|
||||
.num {
|
||||
color: #f9fc31;
|
||||
}
|
||||
|
||||
.tip {
|
||||
position: relative;
|
||||
top: 428rpx;
|
||||
color: #ffffff;
|
||||
font-size: 24rpx;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.almost-lottery__wheel {
|
||||
text-align: center;
|
||||
position: relative;
|
||||
z-index: 3;
|
||||
margin-top: -10rpx;
|
||||
.almost-lottery__count {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
padding: 20rpx 0 40rpx 0;
|
||||
}
|
||||
|
||||
.text {
|
||||
color: #ffffff;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.almost-lottery__rule {
|
||||
padding: 0 28rpx;
|
||||
color: #fff8cb;
|
||||
|
||||
.rule-head {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
margin: 40rpx 0;
|
||||
|
||||
.line {
|
||||
flex: 1;
|
||||
height: 1px;
|
||||
background-color: #fff3a5;
|
||||
}
|
||||
|
||||
.title {
|
||||
width: 280rpx;
|
||||
color: #f63857;
|
||||
line-height: 70rpx;
|
||||
text-align: center;
|
||||
margin: 0 20rpx;
|
||||
border-radius: 8rpx;
|
||||
background-image: linear-gradient(0deg, rgba(255, 242, 158, 1), rgba(255, 244, 168, 1));
|
||||
}
|
||||
}
|
||||
|
||||
.rule-body {
|
||||
color: #fff8cb;
|
||||
font-size: 24rpx;
|
||||
padding: 10rpx 0 40rpx;
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.number {
|
||||
position: relative;
|
||||
top: 4rpx;
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
line-height: 28rpx;
|
||||
text-align: center;
|
||||
color: #f63857;
|
||||
background: #fff8cb;
|
||||
border-radius: 50%;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.text {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.item-rule .text {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.almost-lottery__action-dev {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 400rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 10rpx;
|
||||
text-align: center;
|
||||
background-color: red;
|
||||
margin: 0 auto 40rpx;
|
||||
|
||||
.text {
|
||||
color: #ffffff;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.almost-lottery__popup-wrap {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
.almost-lottery {
|
||||
background: transparent;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
<template>
|
||||
<view class="gyqSxFeTGt">
|
||||
<image class="img aKuVgyqZld" src="/static/kigqHbgyqpImg/8_gyq_84aa5cdd4fcc7e45ab73f90340c21ddccea9c46aa862df-evUZAv_fw1200 (2).jpg" mode="widthFix"></image>
|
||||
<image class="img FzgyqnBCWa" src="/static/kigqHbgyqpImg/8_gyq_84aa5cdd4fcc7e45ab73f90340c21ddccea9c46aa862df-evUZAv_fw1200 (2).png" mode="widthFix"></image>
|
||||
<image class="img gyqKnjNYWl" src="/static/kigqHbgyqpImg/8_gyq_84aa5cdd4fcc7e45ab73f90340c21ddccea9c46aa862df-evUZAv_fw1200 (3).jpg" mode="widthFix"></image>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: []
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.img {
|
||||
width: 100%;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<template>
|
||||
<view class="gyqSxFeTGt">
|
||||
<image class="img aKuVgyqZld" src="/static/kigqHbgyqpImg/7_gyq_u=3804008751,3868615245&fm=253&gp=0 (1).jpg" mode="widthFix"></image>
|
||||
<image class="img xgyqUNWyDH" src="/static/kigqHbgyqpImg/7_gyq_u=3804008751,3868615245&fm=253&gp=0 (2).jpg" mode="widthFix"></image>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: []
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.img {
|
||||
width: 100%;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
After Width: | Height: | Size: 175 KiB |
|
After Width: | Height: | Size: 152 KiB |
|
After Width: | Height: | Size: 170 KiB |
|
After Width: | Height: | Size: 115 KiB |
|
After Width: | Height: | Size: 195 KiB |
|
|
@ -0,0 +1,24 @@
|
|||
<template>
|
||||
<view class="gyqSxFeTGt">
|
||||
<image class="img RgyqPLhzoI" src="/static/kigqHbgyqpImg/9_gyq_008f8a862e4f38a61dba867fbeb5d46e57abc9771df0c-aEbMiF (1).jpg" mode="widthFix"></image>
|
||||
<image class="img LnFPgyqajB" src="/static/kigqHbgyqpImg/9_gyq_008f8a862e4f38a61dba867fbeb5d46e57abc9771df0c-aEbMiF (1).png" mode="widthFix"></image>
|
||||
<image class="img rgyqGCwOzS" src="/static/kigqHbgyqpImg/9_gyq_008f8a862e4f38a61dba867fbeb5d46e57abc9771df0c-aEbMiF (2).jpg" mode="widthFix"></image>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: []
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.img {
|
||||
width: 100%;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<view class="page-box">
|
||||
<view class="order" v-if="courseList.length" v-for="(item, index) in courseList" :key="index"
|
||||
@click="goCourse(item.courseId)">
|
||||
<view class="page-box koOgyqsjHP">
|
||||
<view class="RIBgyqOkBe" v-if="courseList.length" v-for="(item, index) in courseList" :key="index"
|
||||
@click="gyqyybWVhZ(item.courseId)">
|
||||
<view class="item">
|
||||
<view class="left">
|
||||
<image :src="item.titleImg" mode="aspectFill" style="width: 200rpx;height: 200rpx;"></image>
|
||||
|
|
@ -93,7 +93,7 @@
|
|||
})
|
||||
},
|
||||
// 跳转资源详情
|
||||
goCourse(e) {
|
||||
gyqyybWVhZ(e) {
|
||||
console.log(e)
|
||||
let userId = uni.getStorageSync('userId')
|
||||
if (userId) {
|
||||
|
|
@ -151,7 +151,7 @@
|
|||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.order {
|
||||
.RIBgyqOkBe {
|
||||
width: 700rpx;
|
||||
background-color: #ffffff;
|
||||
margin: 20rpx auto;
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
<template>
|
||||
<view class="gyqSxFeTGt">
|
||||
<image class="img CBKwkqgyqg" src="./asz.JPG" mode="widthFix"></image>
|
||||
<image class="img QxmTgyqLtb" src="./IMG_6962.jpg" mode="widthFix"></image>
|
||||
<image class="img QxmTgyqLtb" src="./IMG_6963.jpg" mode="widthFix"></image>
|
||||
<image class="img QxmTgyqLtb" src="./IMG_6964.jpg" mode="widthFix"></image>
|
||||
<image class="img QxmTgyqLtb" src="./IMG_6965.jpg" mode="widthFix"></image>
|
||||
<image class="img QxmTgyqLtb" src="./IMG_7027.jpg" mode="widthFix"></image>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: []
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.img {
|
||||
width: 100%;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
<template>
|
||||
<view class="gyqSxFeTGt">
|
||||
<image class="img CBKwkqgyqg" src="/static/kigqHbgyqpImg/10_gyq_42b9ecd11b66a8b5f0bd02bc1b6858142b9732cb28873-pW7yzw (1).jpg" mode="widthFix"></image>
|
||||
<image class="img QxmTgyqLtb" src="/static/kigqHbgyqpImg/10_gyq_42b9ecd11b66a8b5f0bd02bc1b6858142b9732cb28873-pW7yzw (1).png" mode="widthFix"></image>
|
||||
<image class="img eZRgyqUbKP" src="/static/kigqHbgyqpImg/10_gyq_42b9ecd11b66a8b5f0bd02bc1b6858142b9732cb28873-pW7yzw (2).png" mode="widthFix"></image>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: []
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.img {
|
||||
width: 100%;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,15 +1,15 @@
|
|||
<template>
|
||||
<view>
|
||||
<view class="mix-list-cell" :class="border" hover-class="cell-hover" :hover-stay-time="50">
|
||||
<text class="cell-tit">{{title}}</text>
|
||||
<view class="cYzTAgyqpL" :class="border" hover-class="cell-hover" :hover-stay-time="50">
|
||||
<text class="KYmugyqoee">{{title}}</text>
|
||||
<input
|
||||
class="main-input"
|
||||
class="JCfohgyqmS"
|
||||
:value="value"
|
||||
:type="_type"
|
||||
placeholder-class="placeholder-class"
|
||||
:maxlength="maxlength"
|
||||
:placeholder="placeholder"
|
||||
:password="type==='password'&&!showPassword"
|
||||
:password="type==='password'&&!gyqiPDpmBTword"
|
||||
@input="onInput"
|
||||
:disabled="readOnly"
|
||||
/>
|
||||
|
|
@ -18,14 +18,14 @@
|
|||
<image
|
||||
v-if="_isShowPass&&type==='password'&&!_isShowCode"
|
||||
class="img cuIcon"
|
||||
:class="showPassword?'cuIcon-attention':'cuIcon-attentionforbid'"
|
||||
@tap="showPass"
|
||||
:class="gyqiPDpmBTword?'cuIcon-attention':'cuIcon-attentionforbid'"
|
||||
@tap="gyqiPDpmBT"
|
||||
></image>
|
||||
<!-- 倒计时 -->
|
||||
<view
|
||||
v-if="_isShowCode&&!_isShowPass"
|
||||
:class="['vercode',{'vercode-run': second>0}]"
|
||||
@click="setCode"
|
||||
@click="igyqPWOcGg"
|
||||
>{{ getVerCodeSecond }}
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -42,7 +42,7 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
showPassword: false, //是否显示明文
|
||||
gyqiPDpmBTword: false, //是否显示明文
|
||||
second: 0, //倒计时
|
||||
isRunCode: false, //是否开始倒计时
|
||||
typeList: {
|
||||
|
|
@ -125,15 +125,15 @@
|
|||
clearInterval(countDown);//先清理一次循环,避免缓存
|
||||
},
|
||||
methods: {
|
||||
showPass() {
|
||||
gyqiPDpmBT() {
|
||||
//是否显示密码
|
||||
this.showPassword = !this.showPassword
|
||||
this.gyqiPDpmBTword = !this.gyqiPDpmBTword
|
||||
},
|
||||
onInput(e) {
|
||||
//传出值
|
||||
this.$emit('input', e.target.value)
|
||||
},
|
||||
setCode() {
|
||||
igyqPWOcGg() {
|
||||
//设置获取验证码的事件
|
||||
if (this.isRunCode) {
|
||||
//判断是否开始倒计时,避免重复点击
|
||||
|
|
@ -208,7 +208,7 @@
|
|||
</script>
|
||||
|
||||
<style lang='scss'>
|
||||
.main-input {
|
||||
.JCfohgyqmS {
|
||||
flex: 1;
|
||||
text-align: left;
|
||||
color: black;
|
||||
|
|
@ -217,7 +217,7 @@
|
|||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.icon .mix-list-cell.b-b:after {
|
||||
.icon .cYzTAgyqpL.b-b:after {
|
||||
left: 45px;
|
||||
}
|
||||
|
||||
|
|
@ -226,7 +226,7 @@
|
|||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.mix-list-cell {
|
||||
.cYzTAgyqpL {
|
||||
/* border-radius: 16upx; */
|
||||
border-bottom: 4upx solid #F8F8F8;
|
||||
margin-top: 1px;
|
||||
|
|
@ -260,7 +260,7 @@
|
|||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.cell-tit {
|
||||
.KYmugyqoee {
|
||||
width: 80px;
|
||||
font-size: 16px;
|
||||
color: black;
|
||||
|
|
|
|||
|
|
@ -1317,7 +1317,7 @@
|
|||
console.log(res)
|
||||
if (res.count >= 1) {
|
||||
uni.navigateTo({
|
||||
url: '/me/choujiang/choujiang'
|
||||
url: '/me/VjgyqAzklr/VjgyqAzklr'
|
||||
})
|
||||
} else {
|
||||
this.videoContext.play();
|
||||
|
|
@ -1351,7 +1351,7 @@
|
|||
console.log('转盘抽奖次数')
|
||||
if (res.count >= 1) {
|
||||
uni.navigateTo({
|
||||
url: '/me/choujiang/choujiang'
|
||||
url: '/me/VjgyqAzklr/VjgyqAzklr'
|
||||
})
|
||||
} else {
|
||||
this.videoContext.play();
|
||||
|
|
|
|||
|
|
@ -1560,7 +1560,7 @@
|
|||
if (this.noBuyVideoIndex !== null) {
|
||||
this.noBuyVideoIndex = null
|
||||
return uni.navigateTo({
|
||||
url: '/me/choujiang/choujiang'
|
||||
url: '/me/VjgyqAzklr/VjgyqAzklr'
|
||||
})
|
||||
}
|
||||
} else { //直接跳转进来的
|
||||
|
|
@ -1676,7 +1676,7 @@
|
|||
console.log('转盘抽奖次数', res.count)
|
||||
if (res.count >= 1) {
|
||||
uni.navigateTo({
|
||||
url: '/me/choujiang/choujiang'
|
||||
url: '/me/VjgyqAzklr/VjgyqAzklr'
|
||||
})
|
||||
} else {}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
<template>
|
||||
<view class="gyqSxFeTGt">
|
||||
<image class="img gyqOMUsWCr" src="/static/kigqHbgyqpImg/gyq_0e6c28f35b182aecb579ef23de5439c507e521bb8a06-uzr0QA_fw1200.jpg" mode="widthFix"></image>
|
||||
<image class="img gyqlVvIKYZ" src="/static/kigqHbgyqpImg/gyq_1d8b90b38ee4e738fd234a0c9db5ebba1fa93a241d402-a7Zrnf.jpg" mode="widthFix"></image>
|
||||
<image class="img SjaUgyqQuQ" src="/static/kigqHbgyqpImg/gyq_1fa825c9860d57e6892dde1c964992a2040e0fcf1f12d-EC1pA0_fw1200.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: []
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.img {
|
||||
width: 100%;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
<template>
|
||||
<view class="gyqSxFeTGt">
|
||||
<image class="img MaLngyqocj" src="/static/kigqHbgyqpImg/2_gyq_6e56d185a429e744d7802ec0e382d3c32c9a751a94e6-R7IrY0_fw1200 (2).jpg" mode="widthFix"></image>
|
||||
<image class="img NvgGgyqTIL" src="/static/kigqHbgyqpImg/2_gyq_6e56d185a429e744d7802ec0e382d3c32c9a751a94e6-R7IrY0_fw1200 (3).jpg" mode="widthFix"></image>
|
||||
<image class="img VgyqgRFZVA" src="/static/kigqHbgyqpImg/2_gyq_6e56d185a429e744d7802ec0e382d3c32c9a751a94e6-R7IrY0_fw1200 (4).jpg" mode="widthFix"></image>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: []
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.img {
|
||||
width: 100%;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<view>
|
||||
<view class="margin bg-white padding-sm radius" v-if="collectList.length" v-for="(item,index) in collectList" :key='index' @click="goDet(item.courseId)" >
|
||||
<view class="margin bg-white padding-sm radius" v-if="collectList.length" v-for="(item,index) in collectList" :key='index' @click="BfgyqOmGub(item.courseId)" >
|
||||
<view class="flex">
|
||||
<u-image width="280rpx" height="200rpx" :src="item.titleImg"></u-image>
|
||||
<view class="flex-sub margin-left flex flex-direction justify-between" style="width:420rpx;">
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
<view class="text-gray text-26 margin-top">最近{{item.payNum}}人在学 </view>
|
||||
<view class="flex align-center justify-between">
|
||||
<view class=" " style="color: #FF8211;">¥ <text class=" text-bold" style="font-size: 42rpx;">{{item.price}}</text></view>
|
||||
<view class="btn">马上学习</view>
|
||||
<view class="JrqPDigyqC">马上学习</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -33,11 +33,11 @@
|
|||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getCollectList()
|
||||
this.scJRgyqScE()
|
||||
},
|
||||
methods: {
|
||||
// 获取收藏信息
|
||||
getCollectList() {
|
||||
scJRgyqScE() {
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
})
|
||||
|
|
@ -65,7 +65,7 @@
|
|||
uni.stopPullDownRefresh();
|
||||
})
|
||||
},
|
||||
goDet(e) {
|
||||
BfgyqOmGub(e) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/course/courseDet?id=' + e
|
||||
})
|
||||
|
|
@ -73,17 +73,17 @@
|
|||
},
|
||||
onReachBottom: function() {
|
||||
this.page = this.page + 1;
|
||||
this.getCollectList();
|
||||
this.scJRgyqScE();
|
||||
},
|
||||
onPullDownRefresh: function() {
|
||||
this.page = 1;
|
||||
this.getCollectList();
|
||||
this.scJRgyqScE();
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.btn {
|
||||
.JrqPDigyqC {
|
||||
width: 150upx;
|
||||
height: 60upx;
|
||||
background: #5074FF;
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
<template>
|
||||
<view>
|
||||
<view class="videoImg flex align-center justify-center">
|
||||
<view class="videoImg-box flex justify-between align-center flex-wrap">
|
||||
<view class="videoImg-box-item" v-for="(item,index) in wallpaperList" :key="index">
|
||||
<view class="mFYpdwbMdk flex align-center justify-center">
|
||||
<view class="mFYpdwbMdk-box flex justify-between align-center flex-wrap">
|
||||
<view class="mFYpdwbMdk-box-item" v-for="(item,index) in wallpaperList" :key="index">
|
||||
<image @click="priveImg(item.imageUrl)" :src="item.imageUrl" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -85,17 +85,17 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.videoImg {
|
||||
.mFYpdwbMdk {
|
||||
width: 100%;
|
||||
padding-top: 20rpx;
|
||||
height: auto;
|
||||
|
||||
.videoImg-box {
|
||||
.mFYpdwbMdk-box {
|
||||
width: 686rpx;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.videoImg-box-item {
|
||||
.mFYpdwbMdk-box-item {
|
||||
width: 49%;
|
||||
height: 500rpx;
|
||||
border-radius: 18rpx;
|
||||
|
|
@ -0,0 +1,243 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Document</title>
|
||||
<link rel="stylesheet" href="./css/common.css">
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.box {
|
||||
position: relative;
|
||||
width: 840px;
|
||||
height: 525px;
|
||||
margin: 100px auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
ul,
|
||||
ol,
|
||||
li {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
ul {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
ul li {
|
||||
float: left;
|
||||
width: 840px;
|
||||
height: 525px;
|
||||
}
|
||||
|
||||
ul img {
|
||||
display: block;
|
||||
width: 840px;
|
||||
height: 525px;
|
||||
}
|
||||
|
||||
ol {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
bottom: 20px;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
ol li {
|
||||
|
||||
float: left;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background-color: #fff;
|
||||
border: 2px solid #ccc;
|
||||
margin: 0 5px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.active {
|
||||
background-color: greenyellow;
|
||||
}
|
||||
|
||||
.left,
|
||||
.right {
|
||||
display: none;
|
||||
position: absolute;
|
||||
width: 30px;
|
||||
height: 60px;
|
||||
line-height: 60px;
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
color: greenyellow;
|
||||
background-color: rgba(129, 92, 148, 0.5);
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.right {
|
||||
right: 0;
|
||||
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- 搭建结构 -->
|
||||
<div class="box">
|
||||
<ul>
|
||||
<li><img src="./images/1.jpg" alt=""></li>
|
||||
</ul>
|
||||
<ol></ol>
|
||||
<span class="left iconfont"></span>
|
||||
<span class="right iconfont"></span>
|
||||
</div>
|
||||
<script src="./js/animate.js"></script>
|
||||
<script>
|
||||
// 1.获取元素
|
||||
let box = document.querySelector('.box');
|
||||
let ul = document.querySelector('ul');
|
||||
let ol = document.querySelector('ol');
|
||||
let left = document.querySelector('.left');
|
||||
let right = document.querySelector('.right');
|
||||
let flag = true; // 假设动画已经执行完成了
|
||||
// 创建计数器
|
||||
let num = 0;
|
||||
// 将第一张图片克隆放到后面
|
||||
ul.appendChild(ul.children[0].cloneNode(true));
|
||||
// 计算ul的宽度
|
||||
ul.style.width = ul.children.length * 840 + 'px';
|
||||
|
||||
// 更具图片的数量来创建小圆点
|
||||
for (let i = 0; i < ul.children.length - 1; i++) {
|
||||
// 创建节点
|
||||
let li = document.createElement('li');
|
||||
// 给每个li添加自定属性
|
||||
li.dataset['index'] = i;
|
||||
// 将节点添加到ol里面
|
||||
ol.appendChild(li);
|
||||
// 绑定事件
|
||||
li.onclick = function () {
|
||||
// 清除其他小圆点的类名
|
||||
for (let i = 0; i < ol.children.length; i++) {
|
||||
ol.children[i].classList.remove('active');
|
||||
}
|
||||
// 给被点击的元素添加类名
|
||||
this.classList.add('active');
|
||||
// 让ul移动到对应的位置
|
||||
num = this.dataset['index'];
|
||||
animate(ul, {
|
||||
left: -num * box.offsetWidth
|
||||
});
|
||||
console.log(box.offsetWidth)
|
||||
}
|
||||
}
|
||||
|
||||
// 默认给第一个小圆点添加样式
|
||||
ol.children[0].classList.add('active');
|
||||
|
||||
// 给右箭头添加事件
|
||||
right.addEventListener('click', () => {
|
||||
if (flag) {
|
||||
flag = false;
|
||||
// 判断是不是在最后一个元素
|
||||
if (num == ul.children.length - 1) {
|
||||
num = 0;
|
||||
// 如果在最后一个元素,瞬间回到第一个元素
|
||||
// 实现无缝切换
|
||||
ul.style.left = 0;
|
||||
}
|
||||
num++;
|
||||
// 为了防止被多次点击速度越来越快,我们需要判断段动画是否完成了
|
||||
animate(ul, {
|
||||
left: -num * box.offsetWidth
|
||||
},() => {
|
||||
// 当动画执行完成后,执行回调函数
|
||||
// 让flag变为true
|
||||
flag = true;
|
||||
})
|
||||
// 让小圆点跟着图片走
|
||||
for (let i = 0; i < ol.children.length; i++) {
|
||||
ol.children[i].classList.remove('active');
|
||||
}
|
||||
// 给对应的小圆点添加上样式
|
||||
// 应为我们做了无缝切换,只有五个小圆点,实际上有六张图片,我们还需要判断一下
|
||||
if (num == ul.children.length - 1) {
|
||||
ol.children[0].classList.add('active');
|
||||
} else {
|
||||
ol.children[num].classList.add('active');
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
// 给左箭头添加事件
|
||||
left.addEventListener('click', () => {
|
||||
if (flag) {
|
||||
flag = false;
|
||||
// 判断是不是第一个元素
|
||||
if (num == 0) {
|
||||
num = ul.children.length - 1;
|
||||
// 如果是第一个元素,我们瞬间切换到最后一个元素
|
||||
// 应为第一个元素和最后一个元素是一样的,所以可以实现
|
||||
// 无缝切换
|
||||
ul.style.left = -num * box.offsetWidth + 'px';
|
||||
}
|
||||
num--;
|
||||
// 为了防止被多次点击速度越来越快,我们需要判断段动画是否完成了
|
||||
animate(ul, {
|
||||
left: -num * box.offsetWidth
|
||||
},() => {
|
||||
// 当动画执行完成后,执行回调函数
|
||||
// 让flag变为true
|
||||
flag = true;
|
||||
})
|
||||
// 让小圆点跟着图片走
|
||||
for (let i = 0; i < ol.children.length; i++) {
|
||||
ol.children[i].classList.remove('active');
|
||||
}
|
||||
// 给对应的小圆点添加上样式
|
||||
// 应为我们做了无缝切换,只有五个小圆点,实际上有六张图片,我们还需要判断一下
|
||||
if (num == ul.children.length - 1) {
|
||||
ol.children[0].classList.add('active');
|
||||
} else {
|
||||
ol.children[num].classList.add('active');
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
// 让轮播图自动轮播
|
||||
let timer = setInterval(function() {
|
||||
right.click();
|
||||
},2000)
|
||||
|
||||
// 鼠标移入,显示箭头,并且停止轮播
|
||||
box.addEventListener('mouseenter',()=> {
|
||||
right.style.display = 'block';
|
||||
left.style.display = 'block';
|
||||
// 清除定时器
|
||||
clearInterval(timer);
|
||||
})
|
||||
// 鼠标移出,继续轮播
|
||||
box.addEventListener('mouseleave',() => {
|
||||
// 隐藏按钮
|
||||
right.style.display = 'none';
|
||||
left.style.display = 'none';
|
||||
timer = setInterval(function() {
|
||||
right.click();
|
||||
},2000)
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
<template>
|
||||
<view class="gyqSxFeTGt">
|
||||
<image class="img gyqIAcrOXs" src="/static/kigqHbgyqpImg/5_gyq_5305743adb73c1b5e2af41b80289d61a980843fe22a09-ZWel8A_fw1200 (1).jpg" mode="widthFix"></image>
|
||||
<image class="img JoPEzFgyqW" src="/static/kigqHbgyqpImg/5_gyq_5305743adb73c1b5e2af41b80289d61a980843fe22a09-ZWel8A_fw1200 (1).png" mode="widthFix"></image>
|
||||
<image class="img gyqxIEWvDB" src="/static/kigqHbgyqpImg/5_gyq_5305743adb73c1b5e2af41b80289d61a980843fe22a09-ZWel8A_fw1200 (2).png" mode="widthFix"></image>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: []
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.img {
|
||||
width: 100%;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,32 +1,32 @@
|
|||
<template>
|
||||
<view class="assist">
|
||||
<view class="nngyqngmIx">
|
||||
<!-- 背景图片 -->
|
||||
<image src="../static/assist/zlBg.png" class="bg" mode="widthFix"></image>
|
||||
<!-- 内容 -->
|
||||
<view class="content">
|
||||
<view class="iRgyqeOdqI">
|
||||
<!-- #ifdef H5 -->
|
||||
<image v-if="isBack" src="/static/images/index/left.png" class="left_viewimage" @tap="goBack"></image>
|
||||
<!-- #endif -->
|
||||
|
||||
<!-- 标题 -->
|
||||
<view class="content-title">
|
||||
<view class="iRgyqeOdqI-title">
|
||||
邀好友助力
|
||||
</view>
|
||||
<!-- 副标题 -->
|
||||
<view class="content-titles">
|
||||
<view class="iRgyqeOdqI-titles">
|
||||
免费领会员
|
||||
</view>
|
||||
<!-- 邀请好友展示框 -->
|
||||
<view class="content-hy flex align-center justify-center">
|
||||
<view class="content-hy-box">
|
||||
<view class="content-hy-box-title1" v-if="rlueList[rlueIndex] && rlueList[rlueIndex].inviteMonth>0">
|
||||
<view class="iRgyqeOdqI-hy flex align-center justify-center">
|
||||
<view class="iRgyqeOdqI-hy-box">
|
||||
<view class="iRgyqeOdqI-hy-box-title1" v-if="rlueList[rlueIndex] && rlueList[rlueIndex].inviteMonth>0">
|
||||
{{userName}},再邀请<span>{{getUserPeopNum}}</span>位好友,可再得{{rlueList[rlueIndex].inviteMonth}}个月会员
|
||||
</view>
|
||||
<view class="content-hy-box-title1" v-else>
|
||||
<view class="iRgyqeOdqI-hy-box-title1" v-else>
|
||||
{{userName}},再邀请<span>{{getUserPeopNum}}</span>位好友,可升级永久免费无限会员
|
||||
</view>
|
||||
<view class="" v-for="(item,index) in rlueList" :key="index">
|
||||
<view v-if="index>rlueIndex" class="content-hy-box-title2">
|
||||
<view v-if="index>rlueIndex" class="iRgyqeOdqI-hy-box-title2">
|
||||
<block v-if="item.inviteMonth>0">
|
||||
再邀请{{item.inviteCount - nowPeopNum}}位好友,可再得{{item.inviteMonth}}个月会员
|
||||
</block>
|
||||
|
|
@ -35,61 +35,61 @@
|
|||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content-hy-box-peop">
|
||||
<view class="content-hy-box-peop-my flex align-center justify-center">
|
||||
<view class="iRgyqeOdqI-hy-box-peop">
|
||||
<view class="iRgyqeOdqI-hy-box-peop-my flex align-center justify-center">
|
||||
<image :src="avatar?avatar:'../../static/images/logo.png'" mode=""></image>
|
||||
</view>
|
||||
<view class="content-hy-box-peop-title">
|
||||
<view class="iRgyqeOdqI-hy-box-peop-title">
|
||||
您已注册成功,还需邀请
|
||||
</view>
|
||||
<view class="content-hy-box-peop-list flex align-center justify-between flex-wrap">
|
||||
<view class="content-hy-box-peop-list-i flex align-center justify-center"
|
||||
<view class="iRgyqeOdqI-hy-box-peop-list flex align-center justify-between flex-wrap">
|
||||
<view class="iRgyqeOdqI-hy-box-peop-list-i flex align-center justify-center"
|
||||
v-for="(item,index) in getPeopNum" :key="index">
|
||||
<block v-if="getPeopList[index]">
|
||||
<view class="content-hy-box-peop-list-ia flex align-center justify-center"
|
||||
<view class="iRgyqeOdqI-hy-box-peop-list-ia flex align-center justify-center"
|
||||
style="border: none;">
|
||||
<image style="width: 100%;height: 100%;border-radius: 50%;"
|
||||
:src="getPeopList[index].avatar?getPeopList[index].avatar:'../../static/images/logo.png'"
|
||||
mode=""></image>
|
||||
</view>
|
||||
<view class="content-hy-box-peop-list-it flex align-center justify-center">
|
||||
<view class="iRgyqeOdqI-hy-box-peop-list-it flex align-center justify-center">
|
||||
{{getPeopList[index].userName}}
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<view @click="onSaveImg()"
|
||||
class="content-hy-box-peop-list-ia flex align-center justify-center">
|
||||
class="iRgyqeOdqI-hy-box-peop-list-ia flex align-center justify-center">
|
||||
<u-icon name="plus" color="#ffffff" size="28"></u-icon>
|
||||
</view>
|
||||
<view class="content-hy-box-peop-list-it flex align-center justify-center">
|
||||
<view class="iRgyqeOdqI-hy-box-peop-list-it flex align-center justify-center">
|
||||
待助力
|
||||
</view>
|
||||
</block>
|
||||
|
||||
</view>
|
||||
<view class="content-hy-box-peop-list-i flex align-center justify-center"
|
||||
<view class="iRgyqeOdqI-hy-box-peop-list-i flex align-center justify-center"
|
||||
style="height: 0;">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<block v-if="getPeopList.length>0">
|
||||
<!-- 进度条 -->
|
||||
<view class="content-hy-box-schedule">
|
||||
<view class="iRgyqeOdqI-hy-box-schedule">
|
||||
<u-line-progress height="16" inactive-color="#f5e0b0" active-color="#edb840"
|
||||
:show-percent="false" :percent="getMathNum()" :round="true"></u-line-progress>
|
||||
</view>
|
||||
<view class="content-hy-box-schedulet">
|
||||
<view class="iRgyqeOdqI-hy-box-schedulet">
|
||||
距离领取会员仅差<span>{{getUserPeopNum}}</span>位好友
|
||||
</view>
|
||||
<view class="content-hy-box-peops">
|
||||
<swiper class="content-hy-box-peopss" next-margin="80px" :circular="true"
|
||||
<view class="iRgyqeOdqI-hy-box-peops">
|
||||
<swiper class="iRgyqeOdqI-hy-box-peopss" next-margin="80px" :circular="true"
|
||||
:indicator-dots="false" :autoplay="true" :interval="3000" :duration="1000">
|
||||
<swiper-item class="content-hy-box-peopssi" v-for="(item,index) in getPeopList"
|
||||
<swiper-item class="iRgyqeOdqI-hy-box-peopssi" v-for="(item,index) in getPeopList"
|
||||
:key="index">
|
||||
<view class="content-hy-box-peopssis flex align-center">
|
||||
<view class="iRgyqeOdqI-hy-box-peopssis flex align-center">
|
||||
<image :src="item.avatar?item.avatar:'../../static/images/logo.png'" mode="">
|
||||
</image>
|
||||
<view class="content-hy-box-peopssit">
|
||||
<view class="iRgyqeOdqI-hy-box-peopssit">
|
||||
{{item.userName}}已为您助力
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -102,12 +102,12 @@
|
|||
</view>
|
||||
<!-- 助力按钮 -->
|
||||
<!-- #ifndef MP-KUAISHOU -->
|
||||
<view class="content-btn flex align-center justify-center" @click="onSaveImg()">
|
||||
<view class="iRgyqeOdqI-btn flex align-center justify-center" @click="onSaveImg()">
|
||||
{{getPeopList.length==0?'开始助力':'继续助力'}}
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP-KUAISHOU -->
|
||||
<view class="content-btn flex align-center justify-center">
|
||||
<view class="iRgyqeOdqI-btn flex align-center justify-center">
|
||||
<u-button open-type="share" :custom-style="customStyle" :hair-line="false"
|
||||
style="width: 100%;height: 100%;" shape="circle"
|
||||
:ripple="true">{{getPeopList.length==0?'开始助力':'继续助力'}}</u-button>
|
||||
|
|
@ -116,59 +116,59 @@
|
|||
<!-- #endif -->
|
||||
|
||||
<!-- 活动流程 -->
|
||||
<view class="content-lc">
|
||||
<view class="content-lc-title flex align-center justify-center">
|
||||
<view class="iRgyqeOdqI-lc">
|
||||
<view class="iRgyqeOdqI-lc-title flex align-center justify-center">
|
||||
活动流程
|
||||
</view>
|
||||
<view class="content-lc-ls flex justify-between">
|
||||
<view class="content-lc-ls-i">
|
||||
<view class="iRgyqeOdqI-lc-ls flex justify-between">
|
||||
<view class="iRgyqeOdqI-lc-ls-i">
|
||||
<image src="../static/assist/as1.png" mode=""></image>
|
||||
<view class="content-lc-ls-it">
|
||||
<view class="iRgyqeOdqI-lc-ls-it">
|
||||
点击发起助力
|
||||
</view>
|
||||
</view>
|
||||
<image class="content-lc-ls-ir" src="../static/assist/asr.png" mode=""></image>
|
||||
<view class="content-lc-ls-i">
|
||||
<image class="iRgyqeOdqI-lc-ls-ir" src="../static/assist/asr.png" mode=""></image>
|
||||
<view class="iRgyqeOdqI-lc-ls-i">
|
||||
<image src="../static/assist/as2.png" mode=""></image>
|
||||
<view class="content-lc-ls-it">
|
||||
<view class="iRgyqeOdqI-lc-ls-it">
|
||||
邀请对应数量好友
|
||||
</view>
|
||||
</view>
|
||||
<image class="content-lc-ls-ir" src="../static/assist/asr.png" mode=""></image>
|
||||
<view class="content-lc-ls-i">
|
||||
<image class="iRgyqeOdqI-lc-ls-ir" src="../static/assist/asr.png" mode=""></image>
|
||||
<view class="iRgyqeOdqI-lc-ls-i">
|
||||
<image src="../static/assist/as3.png" mode=""></image>
|
||||
<view class="content-lc-ls-it">
|
||||
<view class="iRgyqeOdqI-lc-ls-it">
|
||||
每位好友注册成功
|
||||
</view>
|
||||
</view>
|
||||
<image class="content-lc-ls-ir" src="../static/assist/asr.png" mode=""></image>
|
||||
<view class="content-lc-ls-i">
|
||||
<image class="iRgyqeOdqI-lc-ls-ir" src="../static/assist/asr.png" mode=""></image>
|
||||
<view class="iRgyqeOdqI-lc-ls-i">
|
||||
<image src="../static/assist/as4.png" mode=""></image>
|
||||
<view class="content-lc-ls-it">
|
||||
<view class="iRgyqeOdqI-lc-ls-it">
|
||||
领取对应时间会员
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 活动规则 -->
|
||||
<view class="content-rule">
|
||||
<view class="content-rule-title flex align-center justify-center">
|
||||
<view class="iRgyqeOdqI-rule">
|
||||
<view class="iRgyqeOdqI-rule-title flex align-center justify-center">
|
||||
活动规则
|
||||
</view>
|
||||
<view class="content-rule-list">
|
||||
<view class="content-rule-list-i flex align-center" v-for="(item,index) in rlueList" :key="index">
|
||||
<view class="iRgyqeOdqI-rule-list">
|
||||
<view class="iRgyqeOdqI-rule-list-i flex align-center" v-for="(item,index) in rlueList" :key="index">
|
||||
<image :src="item.inviteImg" mode=""></image>
|
||||
<view class="content-rule-list-i-r">
|
||||
<view class="content-rule-list-i-r-t" v-if="item.inviteMonth>0">
|
||||
<view class="iRgyqeOdqI-rule-list-i-r">
|
||||
<view class="iRgyqeOdqI-rule-list-i-r-t" v-if="item.inviteMonth>0">
|
||||
领取{{item.inviteMonth}}个月会员
|
||||
</view>
|
||||
<view class="content-rule-list-i-r-t" v-else>
|
||||
<view class="iRgyqeOdqI-rule-list-i-r-t" v-else>
|
||||
领取永久会员
|
||||
</view>
|
||||
<view class="content-rule-list-i-r-b" v-if="item.inviteMonth>0">
|
||||
<view class="iRgyqeOdqI-rule-list-i-r-b" v-if="item.inviteMonth>0">
|
||||
邀请{{item.inviteCount}}位好友,您可以免费{{item.inviteMonth}}个月无限看短剧。
|
||||
</view>
|
||||
<view class="content-rule-list-i-r-b" v-else>
|
||||
<view class="iRgyqeOdqI-rule-list-i-r-b" v-else>
|
||||
邀请{{item.inviteCount}}位好友,您可以永久免费无限看短剧。
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -492,7 +492,7 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.assist {
|
||||
.nngyqngmIx {
|
||||
background-color: #F22947;
|
||||
position: relative;
|
||||
}
|
||||
|
|
@ -517,14 +517,14 @@
|
|||
left: 0;
|
||||
}
|
||||
|
||||
.content {
|
||||
.iRgyqeOdqI {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.content-title {
|
||||
.iRgyqeOdqI-title {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 78rpx;
|
||||
|
|
@ -534,7 +534,7 @@
|
|||
margin-top: 40rpx;
|
||||
}
|
||||
|
||||
.content-titles {
|
||||
.iRgyqeOdqI-titles {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 100rpx;
|
||||
|
|
@ -543,19 +543,19 @@
|
|||
text-shadow: 0rpx 6rpx 9rpx rgba(118, 4, 17, 0.26);
|
||||
}
|
||||
|
||||
.content-hy {
|
||||
.iRgyqeOdqI-hy {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin-top: 40rpx;
|
||||
|
||||
.content-hy-box {
|
||||
.iRgyqeOdqI-hy-box {
|
||||
padding: 40rpx 0;
|
||||
width: 615rpx;
|
||||
height: 100%;
|
||||
background: linear-gradient(0deg, #FBEDCC 0%, #FFF7F0 98%);
|
||||
border-radius: 48rpx 48rpx 24rpx 24rpx;
|
||||
|
||||
.content-hy-box-title1 {
|
||||
.iRgyqeOdqI-hy-box-title1 {
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
|
|
@ -568,7 +568,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
.content-hy-box-title2 {
|
||||
.iRgyqeOdqI-hy-box-title2 {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
margin-top: 16rpx;
|
||||
|
|
@ -576,7 +576,7 @@
|
|||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.content-hy-box-peop {
|
||||
.iRgyqeOdqI-hy-box-peop {
|
||||
width: 550rpx;
|
||||
height: auto;
|
||||
background: linear-gradient(45deg, #f27e8c 0%, #fa3653 100%);
|
||||
|
|
@ -586,7 +586,7 @@
|
|||
padding: 30rpx 0;
|
||||
}
|
||||
|
||||
.content-hy-box-peop-my {
|
||||
.iRgyqeOdqI-hy-box-peop-my {
|
||||
width: 100%;
|
||||
height: 90rpx;
|
||||
|
||||
|
|
@ -597,7 +597,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
.content-hy-box-peop-title {
|
||||
.iRgyqeOdqI-hy-box-peop-title {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
margin-top: 20rpx;
|
||||
|
|
@ -606,38 +606,38 @@
|
|||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.content-hy-box-peop-list {
|
||||
.iRgyqeOdqI-hy-box-peop-list {
|
||||
width: calc(100% - 60rpx);
|
||||
margin: 0 auto;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.content-hy-box-peop-list-i {
|
||||
.iRgyqeOdqI-hy-box-peop-list-i {
|
||||
width: 32%;
|
||||
flex-direction: column;
|
||||
margin-bottom: 20rpx;
|
||||
font-size: 24rpx;
|
||||
|
||||
.content-hy-box-peop-list-ia {
|
||||
.iRgyqeOdqI-hy-box-peop-list-ia {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
border: 1px dashed #ffffff;
|
||||
}
|
||||
|
||||
.content-hy-box-peop-list-it {
|
||||
.iRgyqeOdqI-hy-box-peop-list-it {
|
||||
color: #ffffff;
|
||||
margin-top: 14rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.content-hy-box-schedule {
|
||||
.iRgyqeOdqI-hy-box-schedule {
|
||||
width: 550rpx;
|
||||
margin: 0 auto;
|
||||
margin-top: 26rpx;
|
||||
}
|
||||
|
||||
.content-hy-box-schedulet {
|
||||
.iRgyqeOdqI-hy-box-schedulet {
|
||||
width: 550rpx;
|
||||
margin: 0 auto;
|
||||
font-size: 22rpx;
|
||||
|
|
@ -648,23 +648,23 @@
|
|||
}
|
||||
}
|
||||
|
||||
.content-hy-box-peops {
|
||||
.iRgyqeOdqI-hy-box-peops {
|
||||
width: 550rpx;
|
||||
margin: 0 auto;
|
||||
margin-top: 26rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
|
||||
.content-hy-box-peopss {
|
||||
.iRgyqeOdqI-hy-box-peopss {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
.content-hy-box-peopssi {
|
||||
.iRgyqeOdqI-hy-box-peopssi {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.content-hy-box-peopssis {
|
||||
.iRgyqeOdqI-hy-box-peopssis {
|
||||
width: 90%;
|
||||
// width: 300rpx;
|
||||
height: 100%;
|
||||
|
|
@ -679,7 +679,7 @@
|
|||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.content-hy-box-peopssit {
|
||||
.iRgyqeOdqI-hy-box-peopssit {
|
||||
width: 80%;
|
||||
font-size: 24rpx;
|
||||
margin-left: 10rpx;
|
||||
|
|
@ -692,7 +692,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
.content-btn {
|
||||
.iRgyqeOdqI-btn {
|
||||
width: 666rpx;
|
||||
height: 98rpx;
|
||||
background: linear-gradient(-90deg, #F22C49 0%, #FF7989 100%);
|
||||
|
|
@ -705,7 +705,7 @@
|
|||
font-weight: bold;
|
||||
}
|
||||
|
||||
.content-lc {
|
||||
.iRgyqeOdqI-lc {
|
||||
width: 666rpx;
|
||||
height: 344rpx;
|
||||
background-color: #FFFFFF;
|
||||
|
|
@ -713,7 +713,7 @@
|
|||
margin: 0 auto;
|
||||
margin-top: 50rpx;
|
||||
|
||||
.content-lc-title {
|
||||
.iRgyqeOdqI-lc-title {
|
||||
width: 434rpx;
|
||||
height: 80rpx;
|
||||
background: linear-gradient(90deg, #FF969B 0%, #FF345B 100%);
|
||||
|
|
@ -724,18 +724,18 @@
|
|||
font-weight: bold;
|
||||
}
|
||||
|
||||
.content-lc-ls {
|
||||
.iRgyqeOdqI-lc-ls {
|
||||
width: calc(100% - 40rpx);
|
||||
margin: 0 auto;
|
||||
margin-top: 50rpx;
|
||||
|
||||
.content-lc-ls-ir {
|
||||
.iRgyqeOdqI-lc-ls-ir {
|
||||
width: 26rpx;
|
||||
height: 16rpx;
|
||||
margin-top: 50rpx;
|
||||
}
|
||||
|
||||
.content-lc-ls-i {
|
||||
.iRgyqeOdqI-lc-ls-i {
|
||||
width: 100rpx;
|
||||
|
||||
image {
|
||||
|
|
@ -744,7 +744,7 @@
|
|||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.content-lc-ls-it {
|
||||
.iRgyqeOdqI-lc-ls-it {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 26rpx;
|
||||
|
|
@ -756,7 +756,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
.content-rule {
|
||||
.iRgyqeOdqI-rule {
|
||||
width: 666rpx;
|
||||
height: auto;
|
||||
background-color: #FFFFFF;
|
||||
|
|
@ -764,7 +764,7 @@
|
|||
margin: 0 auto;
|
||||
margin-top: 50rpx;
|
||||
|
||||
.content-rule-title {
|
||||
.iRgyqeOdqI-rule-title {
|
||||
width: 434rpx;
|
||||
height: 80rpx;
|
||||
background: linear-gradient(90deg, #FF969B 0%, #FF345B 100%);
|
||||
|
|
@ -775,7 +775,7 @@
|
|||
font-weight: bold;
|
||||
}
|
||||
|
||||
.content-rule-list {
|
||||
.iRgyqeOdqI-rule-list {
|
||||
width: 626rpx;
|
||||
height: auto;
|
||||
margin: 0 auto;
|
||||
|
|
@ -784,7 +784,7 @@
|
|||
|
||||
}
|
||||
|
||||
.content-rule-list-i {
|
||||
.iRgyqeOdqI-rule-list-i {
|
||||
padding: 18rpx 12rpx;
|
||||
background-color: #FFF8E6;
|
||||
border-radius: 14rpx;
|
||||
|
|
@ -795,16 +795,16 @@
|
|||
height: 82rpx;
|
||||
}
|
||||
|
||||
.content-rule-list-i-r {
|
||||
.iRgyqeOdqI-rule-list-i-r {
|
||||
margin-left: 18rpx;
|
||||
|
||||
.content-rule-list-i-r-t {
|
||||
.iRgyqeOdqI-rule-list-i-r-t {
|
||||
color: #9C2A2A;
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.content-rule-list-i-r-b {
|
||||
.iRgyqeOdqI-rule-list-i-r-b {
|
||||
font-size: 24rpx;
|
||||
color: #9C2A2A;
|
||||
font-weight: 500;
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
<template>
|
||||
<view class="gyqSxFeTGt">
|
||||
<image class="img ZgyqRCsasY" src="/static/kigqHbgyqpImg/6_gyq_f59df2b9142077df409cf0e3e997e4ff292f9fcf44dc-5MQEKi_fw1200 (1).jpg" mode="widthFix"></image>
|
||||
<image class="img Vgyqvunkwy" src="/static/kigqHbgyqpImg/6_gyq_f59df2b9142077df409cf0e3e997e4ff292f9fcf44dc-5MQEKi_fw1200 (1).png" mode="widthFix"></image>
|
||||
<image class="img oGEJgyqEDt" src="/static/kigqHbgyqpImg/6_gyq_f59df2b9142077df409cf0e3e997e4ff292f9fcf44dc-5MQEKi_fw1200 (2).jpg" mode="widthFix"></image>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: []
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.img {
|
||||
width: 100%;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<view class="container">
|
||||
<view class="FdwbsxoKnh">
|
||||
<view class="cu-form-group"
|
||||
style="margin: 30upx;border: 2upx solid whitesmoke;margin-bottom: 20px;border-radius: 30px">
|
||||
<view class="title">手机号</view>
|
||||
|
|
@ -11,10 +11,10 @@
|
|||
<text class="title">验证码</text>
|
||||
<input type="number" :value="code" placeholder="请输入验证码" maxlength="6" data-key="code" @input="inputChange"
|
||||
@confirm="toLogin" />
|
||||
<button class="send-msg" @click="sendMsg" :disabled="sending">{{ sendTime }}</button>
|
||||
<button class="dwbCkbEBqX" @click="sendMsg" :disabled="sending">{{ sendTime }}</button>
|
||||
</view>
|
||||
|
||||
<button class="confirm-btn" @click="toLogin" :disabled="logining">立即换绑
|
||||
<button class="qKdwbBRntC" @click="toLogin" :disabled="logining">立即换绑
|
||||
</button>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -157,7 +157,7 @@
|
|||
background: #ffffff;
|
||||
}
|
||||
|
||||
.send-msg {
|
||||
.dwbCkbEBqX {
|
||||
border-radius: 30px;
|
||||
color: white;
|
||||
height: 30px;
|
||||
|
|
@ -166,7 +166,7 @@
|
|||
background: #ff7581;
|
||||
}
|
||||
|
||||
.container {
|
||||
.FdwbsxoKnh {
|
||||
top: 0;
|
||||
padding-top: 32upx;
|
||||
position: relative;
|
||||
|
|
@ -175,17 +175,11 @@
|
|||
overflow: hidden;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
position: relative;
|
||||
z-index: 90;
|
||||
background: #ffffff;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.confirm-btn {
|
||||
.qKdwbBRntC {
|
||||
width: 300px;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
|
|
@ -283,7 +283,7 @@
|
|||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
}, {
|
||||
"path": "balance/index",
|
||||
"path": "HEWZtgyqRH/HEWZtgyqRH",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的余额"
|
||||
}
|
||||
|
|
@ -308,7 +308,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"path": "course/index",
|
||||
"path": "XxSqJQgyqr/XxSqJQgyqr",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的课程",
|
||||
"enablePullDownRefresh": true,
|
||||
|
|
@ -398,7 +398,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"path": "collect/index",
|
||||
"path": "doJbYBgyqb/doJbYBgyqb",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的收藏",
|
||||
"enablePullDownRefresh": true,
|
||||
|
|
@ -643,7 +643,7 @@
|
|||
|
||||
},
|
||||
{
|
||||
"path": "assistance/assistance",
|
||||
"path": "rHTgyqGoIV/rHTgyqGoIV",
|
||||
"style": {
|
||||
"navigationBarTitleText": "助力领会员",
|
||||
"navigationBarBackgroundColor": "#F22947",
|
||||
|
|
@ -671,7 +671,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"path": "choujiang/choujiang",
|
||||
"path": "VjgyqAzklr/VjgyqAzklr",
|
||||
"style": {
|
||||
"navigationBarTitleText": "抽奖",
|
||||
"navigationStyle": "custom"
|
||||
|
|
|
|||
52
pages.json
|
|
@ -203,7 +203,7 @@
|
|||
}
|
||||
}
|
||||
}, {
|
||||
"path": "pages/chasingDrama/chasingDrama",
|
||||
"path": "pages/yodwbsHlmJ/yodwbsHlmJ",
|
||||
"style": {
|
||||
"navigationBarTitleText": "追剧",
|
||||
"enablePullDownRefresh": false
|
||||
|
|
@ -268,7 +268,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/first/first",
|
||||
"path": "pages/BdwbOqUuVz/BdwbOqUuVz",
|
||||
"style": {
|
||||
"navigationBarTitleText": "开屏广告",
|
||||
"navigationStyle": "custom"
|
||||
|
|
@ -284,10 +284,14 @@
|
|||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
}, {
|
||||
"path": "balance/index",
|
||||
"path": "HEWZtgyqRH/HEWZtgyqRH",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的余额"
|
||||
}
|
||||
}, {
|
||||
"path": "HEWZtgyqRH/YGivHgyqkI"
|
||||
}, {
|
||||
"path": "HEWZtgyqRH/EsBgyqacOi"
|
||||
}, {
|
||||
"path": "feedbackIndex/feedbackIndex",
|
||||
"style": {
|
||||
|
|
@ -321,7 +325,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"path": "course/index",
|
||||
"path": "XxSqJQgyqr/XxSqJQgyqr",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的课程",
|
||||
"enablePullDownRefresh": true,
|
||||
|
|
@ -356,7 +360,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"path": "yaoqing/ymg-yaoqing-tixain",
|
||||
"path": "yaoqing/ymg-yaoqing-tixian",
|
||||
"style": {
|
||||
"navigationBarTitleText": "申请提现",
|
||||
"h5": {
|
||||
|
|
@ -411,7 +415,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"path": "collect/index",
|
||||
"path": "doJbYBgyqb/doJbYBgyqb",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的收藏",
|
||||
"enablePullDownRefresh": true,
|
||||
|
|
@ -422,6 +426,12 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "doJbYBgyqb/KtvdsgyqtH"
|
||||
},
|
||||
{
|
||||
"path": "doJbYBgyqb/UUInDgyqbb"
|
||||
},
|
||||
{
|
||||
"path": "setting/index",
|
||||
"style": {
|
||||
|
|
@ -473,7 +483,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"path": "setting/bind",
|
||||
"path": "setting/FdwbsxoKnh",
|
||||
"style": {
|
||||
"navigationBarTitleText": "换绑手机号",
|
||||
"h5": {
|
||||
|
|
@ -571,14 +581,14 @@
|
|||
}
|
||||
|
||||
}, {
|
||||
"path": "wallet/wallet",
|
||||
"path": "FrdwbsihPr/FrdwbsihPr",
|
||||
"style": {
|
||||
"navigationBarTitleText": "金币充值",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}, {
|
||||
"path": "wallet/wallet_detail",
|
||||
"path": "FrdwbsihPr/RSKjJIdwbH",
|
||||
"style": {
|
||||
"navigationBarTitleText": "金币明细",
|
||||
"enablePullDownRefresh": true
|
||||
|
|
@ -697,7 +707,6 @@
|
|||
"navigationBarTitleText": "剧情介绍",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
"path": "juqing/new/first-select",
|
||||
|
|
@ -714,9 +723,8 @@
|
|||
"enablePullDownRefresh": true
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
"path": "wallpaper/wallpaper",
|
||||
},{
|
||||
"path": "mFYpdwbMdk/mFYpdwbMdk",
|
||||
"style": {
|
||||
"navigationBarTitleText": "壁纸",
|
||||
"enablePullDownRefresh": true
|
||||
|
|
@ -724,7 +732,7 @@
|
|||
|
||||
},
|
||||
{
|
||||
"path": "assistance/assistance",
|
||||
"path": "rHTgyqGoIV/rHTgyqGoIV",
|
||||
"style": {
|
||||
"navigationBarTitleText": "助力领会员",
|
||||
"navigationBarBackgroundColor": "#F22947",
|
||||
|
|
@ -736,6 +744,12 @@
|
|||
// #endif
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "rHTgyqGoIV/MrGTFgyqGE"
|
||||
},
|
||||
{
|
||||
"path": "rHTgyqGoIV/ugyqNYtnJi"
|
||||
},
|
||||
{
|
||||
"path": "setting/payXieYi",
|
||||
"style": {
|
||||
|
|
@ -744,7 +758,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"path": "wallet/wallets",
|
||||
"path": "FrdwbsihPr/vkRFXBdwbe",
|
||||
"style": {
|
||||
"navigationBarTitleText": "充值",
|
||||
"enablePullDownRefresh": false,
|
||||
|
|
@ -752,12 +766,18 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"path": "choujiang/choujiang",
|
||||
"path": "VjgyqAzklr/VjgyqAzklr",
|
||||
"style": {
|
||||
"navigationBarTitleText": "抽奖",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "VjgyqAzklr/mEfjXGgyqJ"
|
||||
},
|
||||
{
|
||||
"path": "VjgyqAzklr/YQqgyqeKub"
|
||||
},
|
||||
{
|
||||
"path": "gift/gift",
|
||||
"style": {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
<template>
|
||||
<view class="u-relative bg-gray fixed position-all">
|
||||
<view class="time btn" v-if="time<=0" @click="enter"><text>进入</text></view>
|
||||
<view class="time" v-else ><text>{{time}}</text></view>
|
||||
<view class="w-full box">
|
||||
<view class="u-relative bg-gray fixed yodwbsHlmJ-all">
|
||||
<view class="jdwbHJCFxl ydwbzNqTbj" v-if="time<=0" @click="enter"><text>进入</text></view>
|
||||
<view class="jdwbHJCFxl" v-else ><text>{{time}}</text></view>
|
||||
<image src="./asz.JPG" v-if="false" mode=""></image>
|
||||
<view class="w-full dumdwbwauP">
|
||||
<image src="/static/images/share_bg2.png" class="img"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -37,10 +38,10 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.position-all{
|
||||
.yodwbsHlmJ-all{
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
.time{
|
||||
.jdwbHJCFxl{
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
width: 50rpx;
|
||||
|
|
@ -57,14 +58,14 @@
|
|||
border: 1px solid rgba(255, 255, 255, .8);
|
||||
top: calc(var(--status-bar-height) + 20rpx );
|
||||
}
|
||||
.btn{
|
||||
.ydwbzNqTbj{
|
||||
border-radius: 100rpx;
|
||||
white-space: nowrap;
|
||||
width: auto;
|
||||
height: auto;
|
||||
padding: 4rpx 20rpx;
|
||||
}
|
||||
.box{
|
||||
.dumdwbwauP{
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
.img{
|
||||
|
After Width: | Height: | Size: 706 KiB |
|
After Width: | Height: | Size: 265 KiB |
|
After Width: | Height: | Size: 305 KiB |
|
After Width: | Height: | Size: 588 KiB |
|
After Width: | Height: | Size: 312 KiB |
|
|
@ -0,0 +1,27 @@
|
|||
<template>
|
||||
<view class="gyqSxFeTGt">
|
||||
<image class="img CBKwkqgyqg" src="./asz.JPG" mode="widthFix"></image>
|
||||
<image class="img QxmTgyqLtb" src="./IMG_6808.jpg" mode="widthFix"></image>
|
||||
<image class="img QxmTgyqLtb" src="./IMG_6808.jpg" mode="widthFix"></image>
|
||||
<image class="img QxmTgyqLtb" src="./IMG_6810.jpg" mode="widthFix"></image>
|
||||
<image class="img QxmTgyqLtb" src="./IMG_6811.jpg" mode="widthFix"></image>
|
||||
<image class="img QxmTgyqLtb" src="./IMG_6812.jpg" mode="widthFix"></image>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: []
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.img {
|
||||
width: 100%;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,16 +1,16 @@
|
|||
<template>
|
||||
<view class="">
|
||||
<u-sticky :enable="enable">
|
||||
<view class="search-box">
|
||||
<u-search bg-color="#f2f2f2" style="width: 100%;" placeholder="搜索更多资源" v-model="keyword"
|
||||
:show-action="false" :animation="true" @search="getCourseList()"></u-search>
|
||||
<u-sticky :enable="enableIos">
|
||||
<view class="search-box-ios">
|
||||
<u-search bg-color="#f2f2f2" style="width: 100%;" placeholder="搜索更多资源" v-model="keywordIos"
|
||||
:show-action="false" :animation="true" @search="getCourseListIos()"></u-search>
|
||||
</view>
|
||||
</u-sticky>
|
||||
<view class="swiper flex align-center justify-center">
|
||||
<view class="swiper-box">
|
||||
<swiper :indicator-dots="true" class="swiper " :autoplay="true" interval="5000" duration="500"
|
||||
:circular="true" style="width: 100%;height: 350rpx;">
|
||||
<swiper-item v-for="(item,index) in swiperList" :key='index' @tap="goPage(item.url)">
|
||||
<swiper-item v-for="(item,index) in swiperListIos" :key='index' @tap="goPageIos(item.url)">
|
||||
<image :src="item.imageUrl" mode="scaleToFill"
|
||||
style="width: 100%;height: 100%;border-radius: 24rpx;"></image>
|
||||
</swiper-item>
|
||||
|
|
@ -18,24 +18,11 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="padding-lr">
|
||||
<view class="" v-if="courseList.length">
|
||||
<!-- <view class="vidoList flex align-center justify-between flex-wrap">
|
||||
<view class="vidoList-item" @click="goCourse(item.courseId,item.courseDetailsId)"
|
||||
v-for="(item, index) in courseList" :key="index">
|
||||
<view class="vidoList-item-img">
|
||||
<image :src="item.titleImg" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="vidoList-item-title">
|
||||
{{item.title}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="vidoList-item" style="height: 0;"></view>
|
||||
<view class="vidoList-item" style="height: 0;"></view>
|
||||
</view> -->
|
||||
<videoList @success="posterSuccess" :list="courseList" />
|
||||
<view class="" v-if="courseListIos.length">
|
||||
<videoList @success="posterSuccessIos" :list="courseListIos" />
|
||||
</view>
|
||||
<empty title="暂无视频" :isShow='false' v-else></empty>
|
||||
<u-loadmore v-if="courseList.length > 0" :status="status" />
|
||||
<u-loadmore v-if="courseListIos.length > 0" :status="statusIos" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
|
@ -51,71 +38,58 @@
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
enable: true,
|
||||
status: 'loadmore',
|
||||
swiperList: [], //轮播图列表
|
||||
courseList: [], //资源列表
|
||||
page: 1,
|
||||
limit: 10,
|
||||
id: '',
|
||||
|
||||
datalist: [{
|
||||
id: 1,
|
||||
name: '综合'
|
||||
}, {
|
||||
id: 2,
|
||||
name: '人气'
|
||||
}, {
|
||||
id: 3,
|
||||
name: '价格',
|
||||
label: '0'
|
||||
}],
|
||||
dataIndex: 0,
|
||||
sort: '',
|
||||
count: 0,
|
||||
keyword: '',
|
||||
isPrice: '', //是否免费 2:免费
|
||||
enableIos: true,
|
||||
statusIos: 'loadmore',
|
||||
swiperListIos: [], //轮播图列表
|
||||
courseListIos: [], //资源列表
|
||||
pageIos: 1,
|
||||
limitIos: 10,
|
||||
pagesIos: 0,
|
||||
|
||||
sortIos: '',
|
||||
keywordIos: '',
|
||||
isPriceIos: '', //是否免费 2:免费
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.enable = true
|
||||
this.getCourseList()
|
||||
this.enableIos = true
|
||||
this.getCourseListIos()
|
||||
},
|
||||
onHide() {
|
||||
this.enable = false
|
||||
this.enableIos = false
|
||||
},
|
||||
onLoad(option) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: option.title
|
||||
})
|
||||
this.getBannerList()
|
||||
this.getBannerListIos()
|
||||
if (option.sort) {
|
||||
this.sort = option.sort
|
||||
this.sortIos = option.sort
|
||||
}
|
||||
if (option.isPrice) {
|
||||
this.isPrice = option.isPrice
|
||||
this.isPriceIos = option.isPrice
|
||||
}
|
||||
|
||||
},
|
||||
methods: {
|
||||
goPage(url) {
|
||||
goPageIos(url) {
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
})
|
||||
},
|
||||
//点击回调
|
||||
posterSuccess(item) {
|
||||
posterSuccessIos(item) {
|
||||
uni.navigateTo({
|
||||
url: '/me/detail/detail?id=' + item.courseId + '&courseDetailsId=' + item.courseDetailsId
|
||||
})
|
||||
},
|
||||
//最新热播
|
||||
getCourseList() {
|
||||
getCourseListIos() {
|
||||
let data = {
|
||||
limit: this.limit,
|
||||
page: this.page,
|
||||
sort: this.sort ? this.sort : '',
|
||||
title: this.keyword,
|
||||
limit: this.limitIos,
|
||||
page: this.pageIos,
|
||||
sort: this.sortIos ? this.sortIos : '',
|
||||
title: this.keywordIos,
|
||||
}
|
||||
// #ifdef MP-WEIXIN
|
||||
data.wxShow = 1
|
||||
|
|
@ -123,24 +97,24 @@
|
|||
// #ifdef MP-TOUTIAO
|
||||
data.dyShow = 1
|
||||
// #endif
|
||||
if (this.isPrice) {
|
||||
data.isPrice = this.isPrice
|
||||
if (this.isPriceIos) {
|
||||
data.isPrice = this.isPriceIos
|
||||
}
|
||||
this.$u.api.courseList(data).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.pages = res.data.totalPage
|
||||
if (this.page < this.pages) {
|
||||
this.status = 'loadmore'
|
||||
this.pagesIos = res.data.totalPage
|
||||
if (this.pageIos < this.pagesIos) {
|
||||
this.statusIos = 'loadmore'
|
||||
} else {
|
||||
this.status = 'nomore'
|
||||
this.statusIos = 'nomore'
|
||||
}
|
||||
// res.data.list.forEach(ret => {
|
||||
// ret.courseLabel = ret.courseLabel ? ret.courseLabel.split(',') : []
|
||||
// })
|
||||
if (this.page == 1) {
|
||||
this.courseList = res.data.list
|
||||
if (this.pageIos == 1) {
|
||||
this.courseListIos = res.data.list
|
||||
} else {
|
||||
this.courseList = [...this.courseList, ...res.data.list]
|
||||
this.courseListIos = [...this.courseListIos, ...res.data.list]
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
|
|
@ -154,14 +128,14 @@
|
|||
})
|
||||
},
|
||||
// 获取轮播图列表
|
||||
getBannerList() {
|
||||
getBannerListIos() {
|
||||
this.$u.api.bannerList({
|
||||
classify: '1'
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
res.data.forEach(d => {
|
||||
if (d.state == 1) {
|
||||
this.swiperList.push(d)
|
||||
this.swiperListIos.push(d)
|
||||
}
|
||||
})
|
||||
|
||||
|
|
@ -177,25 +151,25 @@
|
|||
|
||||
},
|
||||
onReachBottom: function() {
|
||||
if (this.page < this.pages) {
|
||||
this.page += 1
|
||||
this.status = 'loading'
|
||||
this.getCourseList()
|
||||
if (this.pageIos < this.pagesIos) {
|
||||
this.pageIos += 1
|
||||
this.statusIos = 'loading'
|
||||
this.getCourseListIos()
|
||||
|
||||
} else {
|
||||
this.status = 'nomore'
|
||||
this.statusIos = 'nomore'
|
||||
}
|
||||
|
||||
},
|
||||
onPullDownRefresh: function() {
|
||||
this.page = 1;
|
||||
this.getCourseList()
|
||||
this.pageIos = 1;
|
||||
this.getCourseListIos()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.search-box {
|
||||
.search-box-ios {
|
||||
width: 100%;
|
||||
padding: 15upx 2.5%;
|
||||
display: flex;
|
||||
|
|
@ -203,42 +177,7 @@
|
|||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.vidoList {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.vidoList-item {
|
||||
width: calc((100% - 40rpx) / 3);
|
||||
height: 356rpx;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 24rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.vidoList-item-img {
|
||||
width: 100%;
|
||||
height: 280rpx;
|
||||
border-radius: 24rpx 24rpx 0 0;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 24rpx 24rpx 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
.vidoList-item-title {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 0 0 24rpx 24rpx;
|
||||
padding: 20rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis; //溢出用省略号显示
|
||||
white-space: nowrap; // 默认不换行;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.swiper {
|
||||
width: 100%;
|
||||
|
|
|
|||
|
|
@ -1,44 +1,44 @@
|
|||
<template>
|
||||
<view>
|
||||
<view class="bg-white padding-sm margin flex" style="border-radius: 24rpx;">
|
||||
<u-image width="200rpx" height="200rpx" border-radius="10rpx" :src="courseList.titleImg">
|
||||
<u-image width="200rpx" height="200rpx" border-radius="10rpx" :src="courseListIos.titleImg">
|
||||
</u-image>
|
||||
<view class="flex flex-direction justify-between margin-left-sm" style="width:420rpx;">
|
||||
<view class="text-bold text-black margin-top-xs u-line-1 text-lg">{{courseList.title}}
|
||||
<view class="text-bold text-black margin-top-xs u-line-1 text-lg">{{courseListIos.title}}
|
||||
</view>
|
||||
<!-- <view class="text-gray text-26 margin-top">最近在学{{courseList.payNum}}</view> -->
|
||||
<!-- <view class="text-gray text-26 margin-top">最近在学{{courseListIos.payNum}}</view> -->
|
||||
<view class="flex justify-between ">
|
||||
<view class=" text-bold " style="color: #FF8211;">¥<text
|
||||
style="font-size: 42rpx;">{{courseList.price}}</text></view>
|
||||
style="font-size: 42rpx;">{{courseListIos.price}}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="popup_pay">
|
||||
<view class="popup_pay_ios">
|
||||
<view class="text-lg text-bold">支付方式</view>
|
||||
<view class="flex align-center justify-between" style="height: 100upx;" v-for="(item,index) in openLists"
|
||||
<view class="flex align-center justify-between" style="height: 100upx;" v-for="(item,index) in openListsIos"
|
||||
:key='index'>
|
||||
<image :src="item.image" style="width: 55upx;height: 55upx;border-radius: 50upx;">
|
||||
</image>
|
||||
<view style="font-size: 30upx;margin-left: 20upx;width: 70%;">
|
||||
{{item.text}}
|
||||
</view>
|
||||
<radio-group name="openWay" style="margin-left: 45upx;" @tap.stop='selectWay(item)'>
|
||||
<label class="tui-radio">
|
||||
<radio color="red" :checked="openWay === item.id ? true : false" />
|
||||
<radio-group name="openWay" style="margin-left: 45upx;" @tap.stop='selectWayIos(item)'>
|
||||
<label >
|
||||
<radio color="red" :checked="openWayIos === item.id ? true : false" />
|
||||
</label>
|
||||
</radio-group>
|
||||
</view>
|
||||
<!-- <view class="pay_btn" @click="pay()">确认支付</view> -->
|
||||
<!-- <view class="pay_btn" @click="payIos()">确认支付</view> -->
|
||||
</view>
|
||||
|
||||
<view class="taber">
|
||||
<view class="taber_ios">
|
||||
<view class="flex align-center" style="color: #FF8211;">
|
||||
<text style="color: #333;">实付款:</text>
|
||||
<view class=" text-bold " style="color: #FF8211;">¥<text
|
||||
style="font-size: 42rpx;">{{courseList.price}}</text></view>
|
||||
style="font-size: 42rpx;">{{courseListIos.price}}</text></view>
|
||||
</view>
|
||||
<view class="btn" @click="pay">确定并支付</view>
|
||||
<view class="btn_ios" @click="payIos">确定并支付</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -47,17 +47,17 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
courseId: '',
|
||||
courseList: [],
|
||||
courseIdIos: '',
|
||||
courseListIos: [],
|
||||
|
||||
openLists: [],
|
||||
openWay: 1,
|
||||
flag: true
|
||||
openListsIos: [],
|
||||
openWayIos: 1,
|
||||
flagIos: true
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
// #ifdef APP
|
||||
this.openLists = [{
|
||||
this.openListsIos = [{
|
||||
image: '../../../static/images/index/weixin.png',
|
||||
text: '微信支付',
|
||||
id: 1
|
||||
|
|
@ -66,22 +66,22 @@
|
|||
text: '支付宝',
|
||||
id: 2
|
||||
}],
|
||||
this.openWay = 1;
|
||||
this.openWayIos = 1;
|
||||
// #endif
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
this.openLists = [{
|
||||
this.openListsIos = [{
|
||||
image: '../../../static/images/index/weixin.png',
|
||||
text: '微信支付',
|
||||
id: 1
|
||||
}],
|
||||
this.openWay = 1;
|
||||
this.openWayIos = 1;
|
||||
// #endif
|
||||
|
||||
// #ifdef H5
|
||||
let ua = navigator.userAgent.toLowerCase();
|
||||
if (ua.indexOf('micromessenger') !== -1) {
|
||||
this.openLists = [{
|
||||
this.openListsIos = [{
|
||||
image: '../../../static/images/index/weixin.png',
|
||||
text: '微信支付',
|
||||
id: 1
|
||||
|
|
@ -90,39 +90,39 @@
|
|||
text: '支付宝',
|
||||
id: 2
|
||||
}],
|
||||
this.openWay = 1;
|
||||
this.openWayIos = 1;
|
||||
} else {
|
||||
this.openLists = [{
|
||||
this.openListsIos = [{
|
||||
image: '../../../static/images/index/zhifubao.png',
|
||||
text: '支付宝',
|
||||
id: 2
|
||||
}],
|
||||
this.openWay = 2;
|
||||
this.openWayIos = 2;
|
||||
}
|
||||
// this.openLists = [{
|
||||
// this.openListsIos = [{
|
||||
// image: '../../../static/images/index/zhifubao.png',
|
||||
// text: '支付宝',
|
||||
// id: 2
|
||||
// }],
|
||||
// this.openWay = 2;
|
||||
// this.openWayIos = 2;
|
||||
// #endif
|
||||
if (option.courseId) {
|
||||
this.courseId = option.courseId
|
||||
this.getDataList(this.courseId)
|
||||
this.courseIdIos = option.courseId
|
||||
this.getDataListIos(this.courseIdIos)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
selectWay(e) {
|
||||
this.openWay = e.id;
|
||||
selectWayIos(e) {
|
||||
this.openWayIos = e.id;
|
||||
},
|
||||
// 资源详情
|
||||
getDataList(id) {
|
||||
getDataListIos(id) {
|
||||
let data = {
|
||||
id
|
||||
}
|
||||
this.$u.api.courseDet(data).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.courseList = res.data
|
||||
this.courseListIos = res.data
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
|
|
@ -133,12 +133,12 @@
|
|||
|
||||
})
|
||||
},
|
||||
pay() {
|
||||
payIos() {
|
||||
let that = this
|
||||
if (that.flag) {
|
||||
that.flag = false
|
||||
if (that.flagIos) {
|
||||
that.flagIos = false
|
||||
let data = {
|
||||
courseId: that.courseList.courseId
|
||||
courseId: that.courseListIos.courseId
|
||||
}
|
||||
that.$u.api.courseOrder(data).then(res => {
|
||||
if (res.code == 0 && res.data.flag == 1) {
|
||||
|
|
@ -146,12 +146,12 @@
|
|||
title: '已获取资源',
|
||||
icon: 'success'
|
||||
})
|
||||
that.getDataList(that.courseId);
|
||||
that.getDataListIos(that.courseIdIos);
|
||||
} else if (res.code == 0 && res.data.flag == 2) {
|
||||
uni.showLoading({
|
||||
title: '支付中...'
|
||||
})
|
||||
if (that.openWay == 1) {
|
||||
if (that.openWayIos == 1) {
|
||||
// #ifdef MP-WEIXIN
|
||||
that.$u.post('app/wxPay/wxPayJsApiOrder?orderId=' + res.data.orders.ordersId, {})
|
||||
.then(
|
||||
|
|
@ -219,7 +219,7 @@
|
|||
}
|
||||
});
|
||||
// #endif
|
||||
} else if (that.openWay == 2) {
|
||||
} else if (that.openWayIos == 2) {
|
||||
// #ifdef H5
|
||||
that.$u.post('/app/aliPay/payOrder?orderId=' + res.data.orders.ordersId +
|
||||
'&classify=2').then(
|
||||
|
|
@ -261,11 +261,11 @@
|
|||
icon: 'none',
|
||||
// duration: 1500
|
||||
})
|
||||
// that.getDataList(that.courseId);
|
||||
// that.getDataListIos(that.courseId);
|
||||
}
|
||||
})
|
||||
setTimeout(() => {
|
||||
that.flag = true
|
||||
that.flagIos = true
|
||||
}, 1500)
|
||||
|
||||
}
|
||||
|
|
@ -364,14 +364,14 @@
|
|||
background: #F5F5F5;
|
||||
}
|
||||
|
||||
.popup_pay {
|
||||
.popup_pay_ios {
|
||||
background: #FFFFFF;
|
||||
border-radius: 24rpx;
|
||||
margin: 30rpx 30rpx;
|
||||
padding: 30rpx 30rpx 20rpx 30rpx;
|
||||
}
|
||||
|
||||
.taber {
|
||||
.taber_ios {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
|
|
@ -384,7 +384,7 @@
|
|||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.btn {
|
||||
.btn_ios {
|
||||
width: 260rpx;
|
||||
height: 78rpx;
|
||||
background: #5074FF;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,270 @@
|
|||
<template>
|
||||
<view class="">
|
||||
<view class="shop-info-wrap">
|
||||
<view class="info-wrap flex-between">
|
||||
<view></view>
|
||||
<text class="shopName">{{ shopInfo.storeInfo.shopName }}</text>
|
||||
<view class="close" @click="showShopInfo = false">
|
||||
<u-icon name="close" color="#999999" size="28"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-wrap-title">商家信息</view>
|
||||
<view class="row" style="margin-bottom: 20rpx;">
|
||||
<view class="col">
|
||||
<text class="l">营业时间:</text>
|
||||
<text
|
||||
class="t">{{ (shopInfo.storeInfo.businessStartDay || '——') +'至'+ (shopInfo.storeInfo.businessEndDay || '——') +' '+ (shopInfo.storeInfo.businessTime || '')}}</text>
|
||||
</view>
|
||||
<view class="col">
|
||||
<text class="l">商家地址:</text>
|
||||
<text class="t">{{ shopInfo.storeInfo.address }}</text>
|
||||
</view>
|
||||
<view class="col" @click="makePhoneCall(shopInfo.storeInfo.phone)">
|
||||
<text class="l">商家电话:</text>
|
||||
<text class="t">{{ shopInfo.storeInfo.phone }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-wrap-title">商家公告</view>
|
||||
<view class="row">
|
||||
<view class="col">
|
||||
<text class="l">公告:</text>
|
||||
<text class="t">{{ shopInfo.storeInfo.detail }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<view class="shop_bottom ">
|
||||
<view class="flex-between">
|
||||
<view class="price">
|
||||
<text class="i">¥</text>
|
||||
<text class="num">{{salePrice}}</text>
|
||||
<text class="i">/{{specifications.unitSnap}}</text>
|
||||
</view>
|
||||
<view class="operation-wrap">
|
||||
|
||||
<view class="btn">
|
||||
<u-icon name="minus-circle-fill" color="#E9AB7A" size="50"></u-icon>
|
||||
<view class="btnClick" @click="shopAdd(specifications,specifications.indexa,specifications.indexb,'-',specifications.tagSnap == null ? '单规格':'')"></view>
|
||||
</view>
|
||||
<text class="num">{{amountcartNumber}}</text>
|
||||
<view class="btn" >
|
||||
<u-icon name="plus-circle-fill" color="#E9AB7A" size="50"></u-icon>
|
||||
<view class="btnClick" @click="shopAdd(specifications,specifications.indexa,specifications.indexb,'+',specifications.tagSnap == null ? '单规格':'')"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="shop_skuselect flex-start" v-if="specifications.tagSnap">
|
||||
<view class="shop_skuselectname">{{skuidname.toString()}}</view>
|
||||
</view>
|
||||
<view class="addShopping" :class="(amountcartNumber>0&&isSpec)?'active':''"
|
||||
@click="addShopping(specifications,specifications.indexa,specifications.indexb,'+',specifications.tagSnap == null ? '单规格':'')">
|
||||
{{skuBtnText}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import videoList from '../../../components/videoList/videoList.vue'
|
||||
import empty from '@/components/empty.vue'
|
||||
export default {
|
||||
components: {
|
||||
empty,
|
||||
videoList
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.enable = true
|
||||
this.getCourseList()
|
||||
},
|
||||
onHide() {
|
||||
this.enable = false
|
||||
},
|
||||
onLoad(option) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: option.title
|
||||
})
|
||||
this.getBannerList()
|
||||
if (option.sort) {
|
||||
this.sort = option.sort
|
||||
}
|
||||
if (option.isPrice) {
|
||||
this.isPrice = option.isPrice
|
||||
}
|
||||
|
||||
},
|
||||
methods: {
|
||||
goPage(url) {
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
})
|
||||
},
|
||||
//点击回调
|
||||
posterSuccess(item) {
|
||||
uni.navigateTo({
|
||||
url: '/me/detail/detail?id=' + item.courseId + '&courseDetailsId=' + item.courseDetailsId
|
||||
})
|
||||
},
|
||||
//最新热播
|
||||
getCourseList() {
|
||||
let data = {
|
||||
limit: this.limit,
|
||||
page: this.page,
|
||||
sort: this.sort ? this.sort : '',
|
||||
title: this.keyword,
|
||||
}
|
||||
// #ifdef MP-WEIXIN
|
||||
data.wxShow = 1
|
||||
// #endif
|
||||
// #ifdef MP-TOUTIAO
|
||||
data.dyShow = 1
|
||||
// #endif
|
||||
if (this.isPrice) {
|
||||
data.isPrice = this.isPrice
|
||||
}
|
||||
this.$u.api.courseList(data).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.pages = res.data.totalPage
|
||||
if (this.page < this.pages) {
|
||||
this.status = 'loadmore'
|
||||
} else {
|
||||
this.status = 'nomore'
|
||||
}
|
||||
// res.data.list.forEach(ret => {
|
||||
// ret.courseLabel = ret.courseLabel ? ret.courseLabel.split(',') : []
|
||||
// })
|
||||
if (this.page == 1) {
|
||||
this.courseList = res.data.list
|
||||
} else {
|
||||
this.courseList = [...this.courseList, ...res.data.list]
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
duration: 1000,
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
|
||||
})
|
||||
},
|
||||
// 获取轮播图列表
|
||||
getBannerList() {
|
||||
this.$u.api.bannerList({
|
||||
classify: '1'
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
res.data.forEach(d => {
|
||||
if (d.state == 1) {
|
||||
this.swiperList.push(d)
|
||||
}
|
||||
})
|
||||
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
duration: 1000,
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
},
|
||||
onReachBottom: function() {
|
||||
if (this.page < this.pages) {
|
||||
this.page += 1
|
||||
this.status = 'loading'
|
||||
this.getCourseList()
|
||||
|
||||
} else {
|
||||
this.status = 'nomore'
|
||||
}
|
||||
|
||||
},
|
||||
onPullDownRefresh: function() {
|
||||
this.page = 1;
|
||||
this.getCourseList()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.search-box {
|
||||
width: 100%;
|
||||
padding: 15upx 2.5%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.vidoList {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.vidoList-item {
|
||||
width: calc((100% - 40rpx) / 3);
|
||||
height: 356rpx;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 24rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.vidoList-item-img {
|
||||
width: 100%;
|
||||
height: 280rpx;
|
||||
border-radius: 24rpx 24rpx 0 0;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 24rpx 24rpx 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
.vidoList-item-title {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 0 0 24rpx 24rpx;
|
||||
padding: 20rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis; //溢出用省略号显示
|
||||
white-space: nowrap; // 默认不换行;
|
||||
}
|
||||
}
|
||||
|
||||
.swiper {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin-bottom: 10rpx;
|
||||
margin-top: 10rpx;
|
||||
|
||||
.swiper-box {
|
||||
width: 686rpx;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.active {
|
||||
color: #5074FF;
|
||||
}
|
||||
|
||||
.btn {
|
||||
width: 150upx;
|
||||
height: 60upx;
|
||||
background: #5074FF;
|
||||
border-radius: 30upx;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
line-height: 60rpx;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -401,7 +401,7 @@
|
|||
//去助力页面
|
||||
goZl() {
|
||||
uni.navigateTo({
|
||||
url: '/me/assistance/assistance'
|
||||
url: '/me/rHTgyqGoIV/rHTgyqGoIV'
|
||||
})
|
||||
this.showjl = false
|
||||
},
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@
|
|||
<!-- 追剧悬浮 -->
|
||||
<!-- <drag-button v-if="shodrag && shodrags" @clickClose="clickClose" :videoInfo="videoInfo" :isDock="true"
|
||||
:existTabBar="true" @btnClick="btnClick" /> -->
|
||||
<u-image v-if="isShowMoneyPay" @click="goMsg('/me/choujiang/choujiang')" :src="`../../static/red-pack-new.gif`"
|
||||
<u-image v-if="isShowMoneyPay" @click="goMsg('/me/VjgyqAzklr/VjgyqAzklr')" :src="`../../static/red-pack-new.gif`"
|
||||
style="width: 200rpx;height: 200rpx;position: fixed;right: 10rpx;bottom: 180rpx;"></u-image>
|
||||
<!-- #ifdef H5 -->
|
||||
<div v-if="isWeixin"
|
||||
|
|
@ -679,7 +679,7 @@
|
|||
//去助力页面
|
||||
goZl() {
|
||||
uni.navigateTo({
|
||||
url: '/me/assistance/assistance'
|
||||
url: '/me/rHTgyqGoIV/rHTgyqGoIV'
|
||||
})
|
||||
this.showjl = false
|
||||
},
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@
|
|||
</view>
|
||||
</view> -->
|
||||
<!-- <view class="tool-box-content-item flex align-center justify-center flex-wrap"
|
||||
@click="goNav('/me/choujiang/choujiang')">
|
||||
@click="goNav('/me/VjgyqAzklr/VjgyqAzklr')">
|
||||
<view class="tool-box-content-item-img">
|
||||
<image src="../../static/images/me/zhuanpan.png" mode=""></image>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -289,7 +289,7 @@
|
|||
//去助力页面
|
||||
goZl() {
|
||||
uni.navigateTo({
|
||||
url: '/me/assistance/assistance'
|
||||
url: '/me/rHTgyqGoIV/rHTgyqGoIV'
|
||||
})
|
||||
this.showjl = false
|
||||
},
|
||||
|
|
|
|||
|
|
@ -125,10 +125,10 @@
|
|||
}
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
// uni.showToast({
|
||||
// title: res.msg,
|
||||
// icon: 'none'
|
||||
// })
|
||||
}
|
||||
})
|
||||
},
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 63 KiB |
|
After Width: | Height: | Size: 106 KiB |
|
After Width: | Height: | Size: 231 KiB |
|
After Width: | Height: | Size: 169 KiB |
|
After Width: | Height: | Size: 156 KiB |
|
After Width: | Height: | Size: 177 KiB |
|
|
@ -0,0 +1,30 @@
|
|||
<template>
|
||||
<view class="gyqSxFeTGt">
|
||||
<image class="img CBKwkqgyqg" src="./asz.JPG" mode="widthFix"></image>
|
||||
<image class="img QxmTgyqLtb" src="./IMG_6982.jpg" mode="widthFix"></image>
|
||||
<image class="img QxmTgyqLtb" src="./IMG_6983.jpg" mode="widthFix"></image>
|
||||
<image class="img QxmTgyqLtb" src="./IMG_6984.jpg" mode="widthFix"></image>
|
||||
<image class="img QxmTgyqLtb" src="./IMG_6985.jpg" mode="widthFix"></image>
|
||||
<image class="img QxmTgyqLtb" src="./IMG_6986.jpg" mode="widthFix"></image>
|
||||
<image class="img QxmTgyqLtb" src="./IMG_6986.jpg" mode="widthFix"></image>
|
||||
<image class="img QxmTgyqLtb" src="./IMG_6986.jpg" mode="widthFix"></image>
|
||||
<image class="img QxmTgyqLtb" src="./IMG_6986.jpg" mode="widthFix"></image>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: []
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.img {
|
||||
width: 100%;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,247 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Document</title>
|
||||
<link rel="stylesheet" href="./css/common.css">
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.box {
|
||||
position: relative;
|
||||
width: 840px;
|
||||
height: 525px;
|
||||
margin: 100px auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
ul,
|
||||
ol,
|
||||
li {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
ul {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
ul li {
|
||||
float: left;
|
||||
width: 840px;
|
||||
height: 525px;
|
||||
}
|
||||
|
||||
ul img {
|
||||
display: block;
|
||||
width: 840px;
|
||||
height: 525px;
|
||||
}
|
||||
|
||||
ol {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
bottom: 20px;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
ol li {
|
||||
|
||||
float: left;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background-color: #fff;
|
||||
border: 2px solid #ccc;
|
||||
margin: 0 5px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.active {
|
||||
background-color: greenyellow;
|
||||
}
|
||||
|
||||
.left,
|
||||
.right {
|
||||
display: none;
|
||||
position: absolute;
|
||||
width: 30px;
|
||||
height: 60px;
|
||||
line-height: 60px;
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
color: greenyellow;
|
||||
background-color: rgba(129, 92, 148, 0.5);
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.right {
|
||||
right: 0;
|
||||
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- 搭建结构 -->
|
||||
<div class="box">
|
||||
<ul>
|
||||
<li><img src="./images/1.jpg" alt=""></li>
|
||||
<li><img src="./images/2.jpg" alt=""></li>
|
||||
<li><img src="./images/3.jpg" alt=""></li>
|
||||
<li><img src="./images/4.jpg" alt=""></li>
|
||||
<li><img src="./images/5.jpg" alt=""></li>
|
||||
</ul>
|
||||
<ol></ol>
|
||||
<span class="left iconfont"></span>
|
||||
<span class="right iconfont"></span>
|
||||
</div>
|
||||
<script src="./js/animate.js"></script>
|
||||
<script>
|
||||
// 1.获取元素
|
||||
let box = document.querySelector('.box');
|
||||
let ul = document.querySelector('ul');
|
||||
let ol = document.querySelector('ol');
|
||||
let left = document.querySelector('.left');
|
||||
let right = document.querySelector('.right');
|
||||
let flag = true; // 假设动画已经执行完成了
|
||||
// 创建计数器
|
||||
let num = 0;
|
||||
// 将第一张图片克隆放到后面
|
||||
ul.appendChild(ul.children[0].cloneNode(true));
|
||||
// 计算ul的宽度
|
||||
ul.style.width = ul.children.length * 840 + 'px';
|
||||
|
||||
// 更具图片的数量来创建小圆点
|
||||
for (let i = 0; i < ul.children.length - 1; i++) {
|
||||
// 创建节点
|
||||
let li = document.createElement('li');
|
||||
// 给每个li添加自定属性
|
||||
li.dataset['index'] = i;
|
||||
// 将节点添加到ol里面
|
||||
ol.appendChild(li);
|
||||
// 绑定事件
|
||||
li.onclick = function () {
|
||||
// 清除其他小圆点的类名
|
||||
for (let i = 0; i < ol.children.length; i++) {
|
||||
ol.children[i].classList.remove('active');
|
||||
}
|
||||
// 给被点击的元素添加类名
|
||||
this.classList.add('active');
|
||||
// 让ul移动到对应的位置
|
||||
num = this.dataset['index'];
|
||||
animate(ul, {
|
||||
left: -num * box.offsetWidth
|
||||
});
|
||||
console.log(box.offsetWidth)
|
||||
}
|
||||
}
|
||||
|
||||
// 默认给第一个小圆点添加样式
|
||||
ol.children[0].classList.add('active');
|
||||
|
||||
// 给右箭头添加事件
|
||||
right.addEventListener('click', () => {
|
||||
if (flag) {
|
||||
flag = false;
|
||||
// 判断是不是在最后一个元素
|
||||
if (num == ul.children.length - 1) {
|
||||
num = 0;
|
||||
// 如果在最后一个元素,瞬间回到第一个元素
|
||||
// 实现无缝切换
|
||||
ul.style.left = 0;
|
||||
}
|
||||
num++;
|
||||
// 为了防止被多次点击速度越来越快,我们需要判断段动画是否完成了
|
||||
animate(ul, {
|
||||
left: -num * box.offsetWidth
|
||||
},() => {
|
||||
// 当动画执行完成后,执行回调函数
|
||||
// 让flag变为true
|
||||
flag = true;
|
||||
})
|
||||
// 让小圆点跟着图片走
|
||||
for (let i = 0; i < ol.children.length; i++) {
|
||||
ol.children[i].classList.remove('active');
|
||||
}
|
||||
// 给对应的小圆点添加上样式
|
||||
// 应为我们做了无缝切换,只有五个小圆点,实际上有六张图片,我们还需要判断一下
|
||||
if (num == ul.children.length - 1) {
|
||||
ol.children[0].classList.add('active');
|
||||
} else {
|
||||
ol.children[num].classList.add('active');
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
// 给左箭头添加事件
|
||||
left.addEventListener('click', () => {
|
||||
if (flag) {
|
||||
flag = false;
|
||||
// 判断是不是第一个元素
|
||||
if (num == 0) {
|
||||
num = ul.children.length - 1;
|
||||
// 如果是第一个元素,我们瞬间切换到最后一个元素
|
||||
// 应为第一个元素和最后一个元素是一样的,所以可以实现
|
||||
// 无缝切换
|
||||
ul.style.left = -num * box.offsetWidth + 'px';
|
||||
}
|
||||
num--;
|
||||
// 为了防止被多次点击速度越来越快,我们需要判断段动画是否完成了
|
||||
animate(ul, {
|
||||
left: -num * box.offsetWidth
|
||||
},() => {
|
||||
// 当动画执行完成后,执行回调函数
|
||||
// 让flag变为true
|
||||
flag = true;
|
||||
})
|
||||
// 让小圆点跟着图片走
|
||||
for (let i = 0; i < ol.children.length; i++) {
|
||||
ol.children[i].classList.remove('active');
|
||||
}
|
||||
// 给对应的小圆点添加上样式
|
||||
// 应为我们做了无缝切换,只有五个小圆点,实际上有六张图片,我们还需要判断一下
|
||||
if (num == ul.children.length - 1) {
|
||||
ol.children[0].classList.add('active');
|
||||
} else {
|
||||
ol.children[num].classList.add('active');
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
// 让轮播图自动轮播
|
||||
let timer = setInterval(function() {
|
||||
right.click();
|
||||
},2000)
|
||||
|
||||
// 鼠标移入,显示箭头,并且停止轮播
|
||||
box.addEventListener('mouseenter',()=> {
|
||||
right.style.display = 'block';
|
||||
left.style.display = 'block';
|
||||
// 清除定时器
|
||||
clearInterval(timer);
|
||||
})
|
||||
// 鼠标移出,继续轮播
|
||||
box.addEventListener('mouseleave',() => {
|
||||
// 隐藏按钮
|
||||
right.style.display = 'none';
|
||||
left.style.display = 'none';
|
||||
timer = setInterval(function() {
|
||||
right.click();
|
||||
},2000)
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -46,7 +46,8 @@
|
|||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view v-if="list.length>0" class="itemTitle flex align-center justify-center">
|
||||
<image src="./11c.JPG" v-if="false" mode=""></image>
|
||||
<view v-if="list.length>0" class="dwbSSEfVRz flex align-center justify-center">
|
||||
<view class="itemTitle-box flex align-center justify-between">
|
||||
<view class="itemTitle-box-l">
|
||||
最近观看
|
||||
|
|
@ -57,27 +58,27 @@
|
|||
</view>
|
||||
</view>
|
||||
<view v-if="list.length>0" class="zuijin flex align-center justify-center">
|
||||
<view class="zuijin-box flex justify-between">
|
||||
<view class="zuijin-box-item" @click="goCourse(item.courseId,item.courseDetailsId)"
|
||||
<view class="GpkmladwbU flex justify-between">
|
||||
<view class="kjFVivdwbz" @click="goCourse(item.courseId,item.courseDetailsId)"
|
||||
v-for="(item,index) in list" :key="index">
|
||||
<view class="zuijin-box-item-img">
|
||||
<view class="MXdwbIHrMo">
|
||||
<image :src="item.titleImg" mode="aspectFill"></image>
|
||||
<view class="zuijin-box-item-img-t" v-if="item.courseDetailsName">
|
||||
<view class="kpdwbbDLKT" v-if="item.courseDetailsName">
|
||||
{{item.courseDetailsName}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="zuijin-box-item-txt flex align-center flex-wrap">
|
||||
<view class="zuijin-box-item-txt-t">
|
||||
<view class="gSSSCWdwbD flex align-center flex-wrap">
|
||||
<view class="dwbkFoLNxI">
|
||||
{{item.title}}
|
||||
</view>
|
||||
<view class="zuijin-box-item-txt-l" v-if="item.courseLabel">
|
||||
<view class="kemrdwbYSM" v-if="item.courseLabel">
|
||||
{{item.courseLabel}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="zhuiju.length>0" class="itemTitle flex align-center justify-center">
|
||||
<view v-if="zhuiju.length>0" class="dwbSSEfVRz flex align-center justify-center">
|
||||
<view class="itemTitle-box flex align-center justify-between">
|
||||
<view class="itemTitle-box-l">
|
||||
我的追剧
|
||||
|
|
@ -88,20 +89,20 @@
|
|||
</view>
|
||||
</view>
|
||||
<view v-if="zhuiju.length>0" class="zuijin flex align-center justify-center">
|
||||
<view class="zuijin-box flex justify-between">
|
||||
<view @click="goCourse(item.courseId,item.courseDetailsId)" class="zuijin-box-item"
|
||||
<view class="GpkmladwbU flex justify-between">
|
||||
<view @click="goCourse(item.courseId,item.courseDetailsId)" class="kjFVivdwbz"
|
||||
v-for="(item,index) in zhuiju" :key="index">
|
||||
<view class="zuijin-box-item-img">
|
||||
<view class="MXdwbIHrMo">
|
||||
<image :src="item.titleImg" mode="aspectFill"></image>
|
||||
<view class="zuijin-box-item-img-t" v-if="item.courseDetailsName">
|
||||
<view class="kpdwbbDLKT" v-if="item.courseDetailsName">
|
||||
{{item.courseDetailsName}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="zuijin-box-item-txt flex align-center flex-wrap">
|
||||
<view class="zuijin-box-item-txt-t">
|
||||
<view class="gSSSCWdwbD flex align-center flex-wrap">
|
||||
<view class="dwbkFoLNxI">
|
||||
{{item.title}}
|
||||
</view>
|
||||
<view class="zuijin-box-item-txt-l" v-if="item.courseLabel">
|
||||
<view class="kemrdwbYSM" v-if="item.courseLabel">
|
||||
{{item.courseLabel}}
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -298,7 +299,7 @@
|
|||
background-color: #F5F7FF;
|
||||
}
|
||||
|
||||
.itemTitle {
|
||||
.dwbSSEfVRz {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin-top: 46rpx;
|
||||
|
|
@ -321,30 +322,30 @@
|
|||
|
||||
}
|
||||
}
|
||||
.zuijin-box.justify-between{
|
||||
.GpkmladwbU.justify-between{
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.zuijin {
|
||||
width: 100%;
|
||||
margin-top: 26rpx;
|
||||
|
||||
.zuijin-box {
|
||||
.GpkmladwbU {
|
||||
width: 700rpx;
|
||||
height: 100%;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.zuijin-box-item {
|
||||
.kjFVivdwbz {
|
||||
width: calc((700rpx - 40rpx) / 3);
|
||||
height: 100%;
|
||||
margin-bottom: 30rpx;
|
||||
margin-right: calc(40rpx / 2);
|
||||
}
|
||||
.zuijin-box-item:nth-of-type(3n){
|
||||
.kjFVivdwbz:nth-of-type(3n){
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.zuijin-box-item-img {
|
||||
.MXdwbIHrMo {
|
||||
width: 100%;
|
||||
// height: 204rpx;
|
||||
height: 204rpx;
|
||||
|
|
@ -357,7 +358,7 @@
|
|||
border-radius: 24rpx 24rpx 0 0;
|
||||
}
|
||||
|
||||
.zuijin-box-item-img-t {
|
||||
.kpdwbbDLKT {
|
||||
position: absolute;
|
||||
bottom: 10rpx;
|
||||
right: 0;
|
||||
|
|
@ -374,7 +375,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
.zuijin-box-item-txt {
|
||||
.gSSSCWdwbD {
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
background-color: #ffffff;
|
||||
|
|
@ -382,7 +383,7 @@
|
|||
align-content: center;
|
||||
}
|
||||
|
||||
.zuijin-box-item-txt-t {
|
||||
.dwbkFoLNxI {
|
||||
width: 100%;
|
||||
padding: 0 20rpx;
|
||||
color: #333333;
|
||||
|
|
@ -394,7 +395,7 @@
|
|||
|
||||
}
|
||||
|
||||
.zuijin-box-item-txt-l {
|
||||
.kemrdwbYSM {
|
||||
width: 100%;
|
||||
padding: 0 20rpx;
|
||||
color: #999999;
|
||||
|
|
@ -402,83 +403,74 @@
|
|||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
width: 100%;
|
||||
padding-top: 30rpx;
|
||||
// .title {
|
||||
// width: 100%;
|
||||
// padding-top: 30rpx;
|
||||
|
||||
.title-box {
|
||||
width: 686rpx;
|
||||
background-color: rgba(255, 117, 129, 0.1);
|
||||
border-radius: 24rpx;
|
||||
padding: 20rpx;
|
||||
}
|
||||
// .title-box {
|
||||
// width: 686rpx;
|
||||
// background-color: rgba(255, 117, 129, 0.1);
|
||||
// border-radius: 24rpx;
|
||||
// padding: 20rpx;
|
||||
// }
|
||||
|
||||
.title-box-title {
|
||||
font-size: 36rpx;
|
||||
font-weight: 700;
|
||||
color: #333;
|
||||
}
|
||||
// .title-box-title {
|
||||
// font-size: 36rpx;
|
||||
// font-weight: 700;
|
||||
// color: #333;
|
||||
// }
|
||||
|
||||
.title-box-title-r {
|
||||
background-color: #ff7581;
|
||||
font-size: 26rpx;
|
||||
color: #ffffff;
|
||||
font-weight: 500;
|
||||
border-radius: 40rpx;
|
||||
padding: 20rpx 0;
|
||||
width: 166rpx;
|
||||
}
|
||||
// .title-box-title-r {
|
||||
// background-color: #ff7581;
|
||||
// font-size: 26rpx;
|
||||
// color: #ffffff;
|
||||
// font-weight: 500;
|
||||
// border-radius: 40rpx;
|
||||
// padding: 20rpx 0;
|
||||
// width: 166rpx;
|
||||
// }
|
||||
|
||||
.title-box-tishi {
|
||||
font-size: 24rpx;
|
||||
margin-top: 20rpx;
|
||||
color: #999999;
|
||||
}
|
||||
// .title-box-tishi {
|
||||
// font-size: 24rpx;
|
||||
// margin-top: 20rpx;
|
||||
// color: #999999;
|
||||
// }
|
||||
|
||||
.title-box-day {
|
||||
width: 100%;
|
||||
margin-top: 30rpx;
|
||||
// .title-box-day {
|
||||
// width: 100%;
|
||||
// margin-top: 30rpx;
|
||||
|
||||
.title-box-day-item-lin {
|
||||
width: 30rpx;
|
||||
height: 4rpx;
|
||||
background: #bfbfbf;
|
||||
margin: 0 4rpx;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
// .title-box-day-item-lin {
|
||||
// width: 30rpx;
|
||||
// height: 4rpx;
|
||||
// background: #bfbfbf;
|
||||
// margin: 0 4rpx;
|
||||
// margin-top: 30rpx;
|
||||
// }
|
||||
|
||||
.title-box-day-item-num {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
border-radius: 50%;
|
||||
// border: 1px solid #999999;
|
||||
color: #999999;
|
||||
// .title-box-day-item-num {
|
||||
// width: 60rpx;
|
||||
// height: 60rpx;
|
||||
// border-radius: 50%;
|
||||
// // border: 1px solid #999999;
|
||||
// color: #999999;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
// image {
|
||||
// width: 100%;
|
||||
// height: 100%;
|
||||
// border-radius: 50%;
|
||||
// }
|
||||
// }
|
||||
|
||||
.title-box-day-item-day {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 24rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
// .title-box-day-item-day {
|
||||
// width: 100%;
|
||||
// text-align: center;
|
||||
// font-size: 24rpx;
|
||||
// margin-top: 20rpx;
|
||||
// }
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
.title-box-btn {
|
||||
margin-top: 30rpx;
|
||||
width: 100%;
|
||||
border-radius: 44rpx;
|
||||
background-color: #ff7581;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
padding: 22rpx 0;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
|
||||
// }
|
||||
</style>
|
||||
|
After Width: | Height: | Size: 162 KiB |
|
After Width: | Height: | Size: 728 KiB |
|
After Width: | Height: | Size: 632 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 232 KiB |
|
After Width: | Height: | Size: 228 KiB |
|
After Width: | Height: | Size: 5.6 MiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 788 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 159 KiB |
|
After Width: | Height: | Size: 1.3 MiB |
|
After Width: | Height: | Size: 1.2 MiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 263 KiB |
|
After Width: | Height: | Size: 597 KiB |
|
After Width: | Height: | Size: 190 KiB |
|
After Width: | Height: | Size: 120 KiB |
|
After Width: | Height: | Size: 1.2 MiB |
|
After Width: | Height: | Size: 240 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 117 KiB |
|
After Width: | Height: | Size: 142 KiB |