ios判断,红包修改

This commit is contained in:
duan 2025-01-14 18:06:23 +08:00
parent 6e153586c9
commit 383ffe5c31
29 changed files with 1468 additions and 301 deletions

View File

@ -5,9 +5,7 @@
export default {
onLaunch: function() {
console.log('App Launch');
const sysInfo = uni.getSystemInfoSync();
let isIos = sysInfo.platform == 'ios'
uni.setStorageSync('isIos', isIos)
},
onShow: function() {
},

View File

@ -34,13 +34,20 @@ export const selectCourseTitles = (data) => {
})
}
// 抽奖
// 抽奖列表
export const selectDiscSpinning = (data) => {
return http.request({
url: '/discSpinning/selectDiscSpinning',
data
})
}
// 抽奖
export const discSpinningdraw = (data) => {
return http.request({
url: '/discSpinning/draw',
data
})
}
export const selectUserMoney = (data) => {
return http.request({

View File

@ -1,15 +1,19 @@
{
"dependencies": {
"clipboard": "^2.0.11",
"dayjs": "^1.11.13",
"gm-crypto": "^0.1.8",
"jsbn": "^1.1.0",
"lodash": "^4.17.21",
"pre-commit": "^1.2.2",
"to-arraybuffer": "^1.0.1",
"uview-plus": "^3.3.61"
},
"devDependencies": {
"pinia-plugin-unistorage": "^0.1.2"
"id": "mosowe-rotary-table-compatible",
"name": "抽奖转盘非固定图片可自定义传入奖项列表v2 v3兼容",
"displayName": "抽奖转盘非固定图片可自定义传入奖项列表v2 v3兼容",
"version": "1.0.0",
"description": "抽奖转盘非固定图片可自定义传入奖项列表v2 v3兼容",
"keywords": [
"抽奖",
"转盘",
"转盘抽奖",
"轮盘抽奖"
],
"dcloudext": {
"category": [
"前端组件",
"通用组件"
]
}
}

View File

@ -149,6 +149,11 @@
"style": {
"navigationBarTitleText": "实名认证"
}
}, {
"path": "pages/index/prizeDraw/kevy-luckydraw",
"style": {
"navigationBarTitleText": "大转盘抽奖"
}
}, {
"path": "pages/me/withdraw/alipay",
"style": {
@ -186,14 +191,15 @@
}
},
{
"path": "pages/me/prizeDraw",
"path": "pages/pays/pays",
"style": {
"navigationBarTitleText": "抽奖"
"navigationBarTitleText": ""
}
},
{
"path": "pages/pays/pays",
"style": {
"path" : "pages/me/prizeDraw",
"style" :
{
"navigationBarTitleText" : ""
}
}

View File

@ -4,13 +4,13 @@
</image>
<view class="indexStyleTwo">
<image src="@/static/logo.png" mode=""></image>
<view @tap="moreVideo">
<!-- <view @tap="moreVideo">
<image src="@/static/sosuo.png" style="height: 34rpx;width: 34rpx;" mode=""></image>
点击搜索更多好剧
</view>
</view> -->
</view>
<template v-if="datas.isExamine == 0">
<template v-if="$common.isIosExamine()">
<view class="gongao">
<view class="gongaoicon">
公告
@ -42,21 +42,24 @@
</view>
</view>
<contentlist :list='datas.list'></contentlist>
<image v-if="datas.isExamine == 0" @click="goMsg()" src="@/static/index/red-pack-new.gif"
<image v-if="$common.isIosExamine()" @click="goMsg()" src="@/static/index/red-pack-new.gif"
style="width: 200rpx;height: 200rpx;position: fixed;right: 10rpx;bottom: 180rpx;" mode=""></image>
<up-modal :show="datas.version.show" :confirm-text="datas.version.confirmText" :showCancelButton="datas.version.cancelText!=''" @confirm='confirmUpdateVersion'
:title="datas.version.title" :title-style="{ fontWeight: '700' }" confirm-color="rgb(255, 117, 129)" @cancel="datas.version.show = false">
<up-modal :show="datas.version.show" :confirm-text="datas.version.confirmText"
:showCancelButton="datas.version.cancelText!=''" @confirm='confirmUpdateVersion' :title="datas.version.title"
:title-style="{ fontWeight: '700' }" confirm-color="rgb(255, 117, 129)" @cancel="datas.version.show = false">
<view class="" style="padding-top: 30rpx;text-align: left;">
<scroll-view scroll-y="true" style="max-height: 50vh;">
<rich-text style="color:#666" :nodes="datas.version.content"></rich-text>
</scroll-view>
</view>
</up-modal>
<up-modal :show="datas.ruleShow" v-if="datas.isExamine == 0&&!datas.version.show" confirm-text="知道了" title="规则说明" :title="datas.rule_title" :title-style="{fontWeight:'700'}" @confirm="ruleConfirm" confirm-color="rgb(255, 117, 129)">
<up-modal :show="datas.ruleShow" v-if="$common.isIosExamine()&&!datas.version.show" confirm-text="知道了" title="规则说明"
:title="datas.rule_title" :title-style="{fontWeight:'700'}" @confirm="ruleConfirm"
confirm-color="rgb(255, 117, 129)">
<view class="u-p-30 u-text-left">
<scroll-view scroll-y="true" style="max-height: 50vh;">
<rich-text style="text-align: justify;font-size: 18px;color: #666;" :nodes="datas.rule_content"></rich-text>
<rich-text style="text-align: justify;font-size: 18px;color: #666;"
:nodes="datas.rule_content"></rich-text>
</scroll-view>
</view>
</up-modal>
@ -66,16 +69,24 @@
import {
reactive
} from 'vue';
import { announcement, messageselectMessage, courseselectCourse } from '@/api/index/index.js'
import {
announcement,
messageselectMessage,
courseselectCourse
} from '@/api/index/index.js'
import {
onLoad,
onReady,
onReachBottom
} from '@dcloudio/uni-app'
import contentlist from './components/contentlist.vue'
import { selectNewApp } from '@/api/user/user.js';
import {
selectNewApp
} from '@/api/user/user.js';
import config from '@/commons/config.js';
import { linkTo } from '@/utils/app.js';
import {
linkTo
} from '@/utils/app.js';
import {
useCommonStore
} from '@/store/common.js'
@ -94,9 +105,6 @@ let datas = reactive({
ruleIndex: 0,
ruleList: [],
//ios 1
isExamine: $common.isExamine,
version: {
show: false,
title: "",
@ -109,9 +117,12 @@ onLoad(() => {
versionUpdate()
getMsg()
getrecomVideo()
})
onReady(() => {
announcement({type: 0}).then(res=>{
announcement({
type: 0
}).then(res => {
datas.ruleList = res
ruleInit()
datas.ruleShow = true
@ -121,6 +132,7 @@ onReachBottom(() => {
++datas.page
getrecomVideo()
})
function versionUpdate() {
//#ifdef APP-PLUS
plus.screen.lockOrientation('portrait-primary'); //
@ -158,6 +170,7 @@ function versionUpdate(){
});
//#endif
}
function confirmUpdateVersion() {
// plus.runtime.openURL(config.baseUrl + '/pages/login/appEq')
linkTo('/pages/login/download')
@ -194,6 +207,7 @@ function confirmUpdateVersion(){
plus.runtime.openURL(iosLink, function(res) {});
}
}
function ruleInit() {
datas.rule_title = datas.ruleList[datas.ruleIndex].title
datas.rule_content = datas.ruleList[datas.ruleIndex].content
@ -216,6 +230,9 @@ function ruleConfirm() {
//
function goMsg(url) {
// uni.navigateTo({
// url: '/pages/index/prizeDraw/kevy-luckydraw'
// });
uni.navigateTo({
url: '/pages/me/prizeDraw'
});

View File

@ -0,0 +1,138 @@
<template>
<view class="lottery-container">
<!-- 抽奖圆盘 -->
<view class="lottery-wheel" @click="startLottery">
<view class="lottery-item" v-for="(item, index) in lotteryItems" :key="index">
<image :src="item.icon" mode="aspectFit"></image>
<text>{{ item.name }}</text>
</view>
<view class="start-btn">开始抽奖</view>
</view>
<!-- 剩余抽奖次数 -->
<view class="lottery-info">
<text>剩余免费抽奖{{ remainingTimes }}</text>
</view>
</view>
</template>
<script setup>
import { ref } from 'vue';
//
const lotteryItems = [
{
name: '现金红包',
icon: 'https://example.com/red-envelope-icon.png'
},
{
name: '平板',
icon: 'https://example.com/tablet-icon.png'
},
{
name: '爱奇艺会员',
icon: 'https://example.com/iqiyi-icon.png'
},
{
name: '淘宝优惠券',
icon: 'https://example.com/taobao-coupon-icon.png'
},
{
name: '京东优惠券',
icon: 'https://example.com/jd-coupon-icon.png'
},
{
name: '拼多多优惠券',
icon: 'https://example.com/pdd-coupon-icon.png'
}
];
//
const remainingTimes = ref(2);
//
const startLottery = () => {
if (remainingTimes.value > 0) {
//
//
const randomIndex = Math.floor(Math.random() * lotteryItems.length);
const selectedItem = lotteryItems[randomIndex];
console.log('恭喜你获得:', selectedItem.name);
remainingTimes.value--;
} else {
uni.showToast({
title: '抽奖次数已用完',
icon: 'none'
});
}
}
</script>
<style lang="scss">
.lottery-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
}
.lottery-wheel {
width: 300px;
height: 300px;
border-radius: 50%;
background-color: #ffd700;
display: flex;
justify-content: center;
align-items: center;
position: relative;
}
.lottery-item {
width: 50%;
height: 50%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: absolute;
}
.lottery-item:nth-child(1) {
transform: rotate(0deg);
}
.lottery-item:nth-child(2) {
transform: rotate(60deg);
}
.lottery-item:nth-child(3) {
transform: rotate(120deg);
}
.lottery-item:nth-child(4) {
transform: rotate(180deg);
}
.lottery-item:nth-child(5) {
transform: rotate(240deg);
}
.lottery-item:nth-child(6) {
transform: rotate(300deg);
}
.start-btn {
width: 100px;
height: 100px;
border-radius: 50%;
background-color: #ff4500;
display: flex;
justify-content: center;
align-items: center;
color: #fff;
font-size: 18px;
}
.lottery-info {
margin-top: 20px;
}
</style>

View File

@ -0,0 +1,523 @@
<template>
<view class="content">
<view class="t-bg" style="">
<image class="t-wan" src="./luck/wenan.png"></image>
<image class="t-wan-lp" src="./luck/hengfu.png"></image>
<view class="t-choujiang t-flex-row" style="background-image:url('./luck/BJ.png')">
<choujiangcanvas v-if="list.length" ref="lucky" startText="开始" :wIndex="0" :luckyList="list"
@onReadyStart="onReadyStart" @lotteryData="getLotterData"></choujiangcanvas>
</view>
</view>
<!-- 规则部分 -->
<view class="t-bottom">
<view class="t-luck-wrapper">
<view class="t-jh t-flex-row" style="background-image:url('./luck/anniu.png')">
剩余免费抽奖{{luckDrawTimes}}
</view>
<!-- <view class="t-fuhuo-text t-flex-row">{{freeNumDay}}</view> -->
<view class="t-fh-fs t-flex-row-sb">
<view class="t-flex-row" @tap='goUrl("/pages/me/withdraw/index")' hover-class="t-click-class">红包 &nbsp;{{totalMoney}}</view>
<button open-type="share" @tap='goUrl("/pages/task/prizeList?source=2")' class="t-share t-flex-row t-plain-btn"
hover-class="t-click-class">我的奖品</button>
</view>
<view class="t-line"></view>
<view class="t-r-title t-flex-row">活动规则</view>
<view class="t-rule">
<text>1.抽奖细则每日前{{ freeNumDay }}次付款均可获得抽奖机会</text>
<text>2.奖励说明红包奖励将自动发放到红包余额已绑定支付宝账号将会自动发起提现其余奖品则需联系客服领取</text>
</view>
</view>
</view>
<!-- 抽奖结束弹窗 -->
<kevy-mask :show="isShowAwd" @click="toConfirmAwd">
<view class="t-full t-flex-row">
<view class="t-tk-modal">
<view class="t-tk-bg t-bg-full" style="background-image:url('./luck/tankuang.png')">
<view v-if="drawIdx!=null && drawIdx == 0" class="t-xxcy t-flex-col-s">
<image src="./luck/xiexiecanyu.png"></image>
<view class="t-xxcy-ts t-flex-row">再努力努力肯定就会中哦~</view>
</view>
<view v-if="drawIdx!=null && drawIdx > 0" class="t-tk-zj t-flex-col-s">
<image class="t-tk-zj-tip" src="./luck/wenzi.png"></image>
<view class="t-tk-zj-desc t-flex-col">
<image class="t-zj-jp" :src="'./luck/'+drawIdx+'.png'"></image>
<view class="t-zj-jp-desc">某某公司提供的能量动力
{{drawIdx==5?"探亲礼包":(drawIdx==4?"加油卡":(drawIdx==3?"鸡腿":(drawIdx==2?"方便面":"矿泉水")))}}同等价值{{drawIdx==5?"888":(drawIdx==4?"100":(drawIdx==3?"10":(drawIdx==2?"5":"2")))}}元现金已到账微信零钱
</view>
</view>
</view>
</view>
<view @click="toConfirmAwd" class="t-tk-btn t-bg-full"
style="background-image:url('./luck/xiaoanniu.png')">
{{drawIdx > 0?"领取":"确定"}}
</view>
</view>
</view>
</kevy-mask>
</view>
</template>
<script>
import {
drawCount,
selectUserMoney,
selectDiscSpinning,
discSpinningdraw
} from '@/api/index/index.js';
import choujiangcanvas from './choujiangcanvas.vue'
var animation = uni.createAnimation({
duration: 4000,
timingFunction: 'ease-out'
});
import kevyMask from './kevy-mask.vue';
export default {
components: {
kevyMask,
choujiangcanvas
},
data() {
return {
totalMoney: 0, //
rotate: 0, //-
turning: false, //
luckDrawTimes: 0, //55
isShowAwd: false, //
drawIdx: null, //5340
//
freeNumDay: 0,
list: []
}
},
onLoad() {
this.getRedPack();
this.getCount();
this.getPrizeList();
},
methods: {
goUrl(url){
uni.navigateTo({
url
})
},
async onReadyStart() {
//
const res = await discSpinningdraw({
source: 1
});
console.log(res, 'debug')
this.wIndex = 2
// this.$refs.lucky.o n S t a r t()
this.$refs.lucky.onStart() // o.n.S.t.a.r.t()
},
getLotterData(data) {
console.log(data, 'debugger')
},
//
async getCount() {
const res = await drawCount({
source: 1
});
// this.luckDrawTimes = 10;
this.luckDrawTimes = res.count || 0;
this.freeNumDay = res.sum || 0;
},
//
async getRedPack() {
const res = await selectUserMoney();
this.totalMoney = res.amount;
},
//
async getPrizeList() {
const res = await selectDiscSpinning({
source: 1
});
this.list = res.records
},
/**
* 确认奖品按钮点击事件
*/
toConfirmAwd() {
//
this.isShowAwd = false;
}
}
}
</script>
<style scoped>
.content {
width: 100%;
box-sizing: border-box;
}
.t-bg {
background-image:url('./luck/DZP_BJ.png');
width: 100%;
box-sizing: border-box;
background-size: 100% 100%;
background-repeat: no-repeat;
position: relative;
overflow-x: hidden;
height: 1200rpx;
padding-top: 345rpx;
/* margin-top: 40rpx; */
}
.t-overlay {
width: 100vw;
height: 100vh;
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: 9999;
background: rgba(0, 0, 0, 0.3);
display: flex;
justify-content: center;
align-items: center;
flex-direction: row;
transition: all 0.5s;
}
.t-wan {
position: absolute;
width: 100%;
height: 283rpx;
top: 12rpx;
left: 0;
z-index: 1;
}
.t-wan-lp {
position: absolute;
width: 370rpx;
height: 130rpx;
top: 223rpx;
z-index: 0;
left: calc(50% - 185rpx);
}
.t-choujiang {
width: 630rpx;
height: 630rpx;
background-size: 100% 100%;
background-repeat: no-repeat;
margin: 0rpx auto;
position: relative;
}
.t-zp {
width: 577rpx;
height: 577rpx;
background-size: 100% 100%;
background-repeat: no-repeat;
transform-origin: 0% 100%;
}
.t-start {
width: 146rpx;
height: 171rpx;
position: absolute;
z-index: 1;
}
.t-jh {
width: 456rpx;
height: 120rpx;
margin: 0 auto;
background-size: 100% 100%;
background-repeat: no-repeat;
font-size: 40rpx;
color: #980100;
}
.t-fuhuo-text {
font-size: 30rpx;
color: #980100;
width: 100%;
height: 42rpx;
margin-top: 14rpx;
}
.t-fh-fs {
width: 580rpx;
height: 100rpx;
margin: 20rpx auto 0rpx;
}
.t-fh-fs view {
width: 250rpx;
height: 100rpx;
background-image: linear-gradient(180deg, #DF0236 0%, #DD0227 100%);
border-radius: 10rpx;
font-size: 30rpx;
color: #FFFFFF;
}
.t-share {
width: 250rpx;
height: 100rpx;
background-image: linear-gradient(180deg, #DF0236 0%, #DD0227 100%);
border-radius: 10rpx;
font-size: 30rpx;
color: #FFFFFF;
}
.t-bottom {
position: relative;
width: 100%;
box-sizing: border-box;
opacity: 0.99;
background: #FDC469;
}
.t-luck-wrapper {
position: relative;
box-sizing: border-box;
top: -219rpx;
}
.t-line {
width: 580rpx;
height: 1rpx;
margin: 50rpx auto 0rpx;
background: #980100;
}
.t-r-title {
font-size: 28rpx;
color: #980100;
height: 40rpx;
width: 100%;
margin: 30rpx auto 0rpx;
width: 585rpx;
}
.t-rule {
margin: 10rpx auto 0rpx;
width: 585rpx;
}
.t-rule text {
font-size: 28rpx;
color: #980100;
text-align: justify;
display: block;
}
.t-wrapper {
width: 100%;
height: 100%;
position: relative;
top: 0rpx;
}
.t-video-con {
width: 100%;
height: 422rpx;
background: #fff;
position: relative;
}
.t-video {
width: 100%;
height: 100%;
}
.t-close {
position: absolute;
top: 0rpx;
right: 0rpx;
width: 34rpx;
height: 34rpx;
padding: 30rpx;
z-index: 9999;
}
.t-nocice {
position: fixed;
left: 0rpx;
top: 0rpx;
z-index: 999;
width: 100%;
height: 40rpx !important;
box-sizing: border-box;
font-size: 30rpx;
}
.t-tk-modal {
width: 632rpx;
height: 588rpx;
position: relative;
box-sizing: border-box;
}
.t-tk-bg {
width: 100%;
height: 528rpx;
background-size: 100% 100%;
}
.t-tk-btn {
width: 336rpx;
height: 120rpx;
position: absolute;
bottom: 0rpx;
left: calc(50% - 168rpx);
font-size: 40rpx;
color: #980100;
line-height: 120rpx;
text-align: center;
background-size: 100% 100%;
}
.t-flex-row {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
.t-flex-row-sa {
display: flex;
flex-direction: row;
justify-content: space-around;
align-items: center;
}
.t-flex-row-sb {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
.t-flex-row-s {
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
}
.t-flex-row-s-s {
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: flex-start;
}
.t-flex-row-s-e {
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: flex-end;
}
.t-flex-row-e {
display: flex;
flex-direction: row;
justify-content: flex-end;
align-items: center;
line-height: 60rpx;
}
.t-flex-col {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.t-flex-col-sa {
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
}
.t-flex-col-sb {
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
}
.t-flex-col-s {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
}
.t-flex-col-s-s {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
}
.t-flex-col-s-e {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-end;
}
.t-flex-col-e {
display: flex;
flex-direction: column;
justify-content: flex-end;
align-items: center;
}
.t-xxcy image {
width: 400rpx;
height: 148rpx;
margin-top: 139rpx;
}
.t-xxcy-ts {
width: 510rpx;
height: 100rpx;
background: #FEF2CD;
border-radius: 20rpx;
font-size: 30rpx;
color: #D93637;
margin-top: 43rpx;
}
.t-tk-zj {}
.t-tk-zj-tip {
width: 347rpx;
height: 106rpx;
margin-top: 44rpx;
}
.t-tk-zj-desc {
width: 474rpx;
height: 281rpx;
background: #FEF2CD;
border-radius: 20rpx;
margin-top: 2rpx;
}
.t-zj-jp {
width: 264rpx;
height: 157rpx;
}
.t-zj-jp-desc {
font-size: 24rpx;
color: #D93637;
text-align: justify;
width: 420rpx;
}
.t-click-class {
opacity: 0.7;
}
</style>

View File

@ -0,0 +1,355 @@
<template>
<view class="content">
<view class="t-mask"
:style="{opacity:show?'1':'0','z-index':zIndex,'left':show?'0rpx':'200%','transition-duration':duration?(duration+'s'):'0.3s'}"
@click.stop="maskClick" @mousemove.stop>
<view :class="['t-wrap',aniType,{'show':show}]">
<view :style="[contentStyle]" @click.stop>
<slot></slot>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
name: "KevyMask",
props: {
/**
* 是否显示
*/
show: {
type: Boolean,
default: false
},
/**
* 是否开启点击遮罩关闭
*/
maskClose: {
type: Boolean,
default: true
},
/**
* 层级
*/
zIndex: {
type: Number,
default: 10
},
/**
* 动画时长单位秒
*/
duration: {
type: [String, Number],
default: 0.3
},
/**
* 嵌入内容css类名
*/
contentStyle: {
type: Object,
default: () => {}
},
/**
* 动画类型13fadeInAndScaleUpslideFromRightslideFromBottomnewspaperfallsideAndFallflipH3dflipV3dsign3dsuperScaleslit3drotateFromBottom3drotateFromLeft3d
*/
aniType: {
type: String,
default: 'fadeInAndScaleUp'
},
},
data() {
return {
isRm:false
}
},
created() {
},
methods: {
//
maskClick() {
if (this.maskClose) {
this.$emit("click");
}
}
}
}
</script>
<style lang="scss" scoped>
.content {
width: 100%;
box-sizing: border-box;
height: 0rpx;
overflow: hidden;
.t-mask {
position: fixed;
top: 0rpx;
left: 0rpx;
background: rgba(0, 0, 0, 0.6);
margin: 0rpx;
padding: 0rpx;
transition-property: opacity;
transition-timing-function: ease-in;
-webkit-perspective: 1300rpx;
perspective: 1300rpx;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
.t-wrap {
min-width: 100vw;
min-height: 100vh;
overflow: hidden;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
//fadeInAndScaleUp
&.fadeInAndScaleUp {
-webkit-transform: scale(0.7);
transform: scale(0.7);
opacity: 0;
-webkit-transition: all 0.3s;
transition: all 0.3s;
&.show {
-webkit-transform: scale(1);
transform: scale(1);
opacity: 1;
}
}
//slideFromRight
&.slideFromRight {
-webkit-transform: translateX(20%);
transform: translateX(20%);
opacity: 0;
-webkit-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
&.show {
-webkit-transform: translateX(0);
transform: translateX(0);
opacity: 1;
}
}
//slideFromBottom
&.slideFromBottom {
-webkit-transform: translateY(20%);
transform: translateY(20%);
opacity: 0;
-webkit-transition: all 0.3s;
transition: all 0.3s;
&.show {
-webkit-transform: translateY(0);
transform: translateY(0);
opacity: 1;
}
}
//newspaper
&.newspaper {
-webkit-transform: scale(0) rotate(720deg);
transform: scale(0) rotate(720deg);
opacity: 0;
-webkit-transition: all 0.5s;
transition: all 0.5s;
&.show {
-webkit-transform: scale(1) rotate(0deg);
transform: scale(1) rotate(0deg);
opacity: 1;
}
}
//fall
&.fall {
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
-webkit-transform: translateZ(600px) rotateX(20deg);
transform: translateZ(600px) rotateX(20deg);
opacity: 0;
&.show {
-webkit-transition: all 0.3s ease-in;
transition: all 0.3s ease-in;
-webkit-transform: translateZ(0px) rotateX(0deg);
transform: translateZ(0px) rotateX(0deg);
opacity: 1;
}
}
//sideAndFall
&.sideAndFall {
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
-webkit-transform: translate(30%) translateZ(600px) rotate(10deg);
transform: translate(30%) translateZ(600px) rotate(10deg);
opacity: 0;
&.show {
-webkit-transition: all 0.3s ease-in;
transition: all 0.3s ease-in;
-webkit-transform: translate(0%) translateZ(0) rotate(0deg);
transform: translate(0%) translateZ(0) rotate(0deg);
opacity: 1;
}
}
//flipH3d
&.flipH3d {
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
-webkit-transform: rotateY(-70deg);
transform: rotateY(-70deg);
-webkit-transition: all 0.3s;
transition: all 0.3s;
opacity: 0;
&.show {
-webkit-transform: rotateY(0deg);
transform: rotateY(0deg);
opacity: 1;
}
}
//flipV3d
&.flipV3d {
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
-webkit-transform: rotateX(-70deg);
transform: rotateX(-70deg);
-webkit-transition: all 0.3s;
transition: all 0.3s;
opacity: 0;
&.show {
-webkit-transform: rotateX(0deg);
transform: rotateX(0deg);
opacity: 1;
}
}
//sign3d
&.sign3d {
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
-webkit-transform: rotateX(-60deg);
transform: rotateX(-60deg);
-webkit-transform-origin: 50% 0;
transform-origin: 50% 0;
opacity: 0;
-webkit-transition: all 0.3s;
transition: all 0.3s;
&.show {
-webkit-transform: rotateX(0deg);
transform: rotateX(0deg);
opacity: 1;
}
}
//superScale
&.superScale {
-webkit-transform: scale(2);
transform: scale(2);
opacity: 0;
-webkit-transition: all 0.3s;
transition: all 0.3s;
&.show {
-webkit-transform: scale(1);
transform: scale(1);
opacity: 1;
}
}
//slit3d
&.slit3d {
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
-webkit-transform: translateZ(-3000px) rotateY(90deg);
transform: translateZ(-3000px) rotateY(90deg);
opacity: 0;
&.show {
-webkit-animation: slit .7s forwards ease-out;
animation: slit .7s forwards ease-out;
}
}
@-webkit-keyframes slit {
50% {
-webkit-transform: translateZ(-250px) rotateY(89deg);
opacity: .5;
-webkit-animation-timing-function: ease-out;
}
100% {
-webkit-transform: translateZ(0) rotateY(0deg);
opacity: 1;
}
}
@keyframes slit {
50% {
transform: translateZ(-250px) rotateY(89deg);
opacity: 1;
animation-timing-function: ease-in;
}
100% {
transform: translateZ(0) rotateY(0deg);
opacity: 1;
}
}
//rotateFromBottom3d
&.rotateFromBottom3d {
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
-webkit-transform: translateY(100%) rotateX(90deg);
transform: translateY(100%) rotateX(90deg);
-webkit-transform-origin: 0 100%;
transform-origin: 0 100%;
opacity: 0;
-webkit-transition: all 0.3s ease-out;
transition: all 0.3s ease-out;
&.show {
-webkit-transform: translateY(0%) rotateX(0deg);
transform: translateY(0%) rotateX(0deg);
opacity: 1;
}
}
//rotateFromLeft3d
&.rotateFromLeft3d {
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
-webkit-transform: translateZ(100px) translateX(-30%) rotateY(90deg);
transform: translateZ(100px) translateX(-30%) rotateY(90deg);
-webkit-transform-origin: 0 100%;
transform-origin: 0 100%;
opacity: 0;
-webkit-transition: all 0.3s;
transition: all 0.3s;
&.show {
-webkit-transform: translateZ(0px) translateX(0%) rotateY(0deg);
transform: translateZ(0px) translateX(0%) rotateY(0deg);
opacity: 1;
}
}
}
}
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 809 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -31,7 +31,7 @@
<view class="title">我的追剧</view>
<view class="num">{{ likeData.collectCount }}</view>
</navigator>
<view class="item" v-if="$common.isExamine==0" @click="linkTo('/pages/me/withdraw/index')">
<view class="item" v-if="$common.isIosExamine()" @click="linkTo('/pages/me/withdraw/index')">
<view class="title">我的红包</view>
<view class="num">{{ amount || 0 }}</view>
</view>

View File

@ -74,11 +74,18 @@
useCommonStore
} from '@/store/common.js'
const $common = useCommonStore()
import { selectUserMoney, selectPayDetails, canCash, state, withdraw } from '@/api/me/withdraw.js';
import {
selectUserMoney,
selectPayDetails,
canCash,
state,
withdraw
} from '@/api/me/withdraw.js';
import {
reactive,
getCurrentInstance,
nextTick
nextTick,
ref
} from "vue";
import {
onShow,
@ -95,8 +102,6 @@
signDays: 0,
signInList: [],
list: [],
// ios
isExamine: $common.isExamine,
urlCallback: {},
adRewardedShow: true,
adRewardedVideoloadNum: 0,
@ -104,28 +109,127 @@
})
const adRewarded = ref(null);
onShow(() => {
if (uni.getStorageSync("token")) {
getTaskdata()
getsignIn()
const sysInfo = uni.getSystemInfoSync();
let isIos = sysInfo.platform == 'ios'
console.log("is ios ", isIos);
// nextTick(() => {
// currentInstance.ctx.$refs.adRewardedVideo.load();
// })
getCanCash()
} else {
datas.signDays = 0
const dateArray = [];
datas.signInList = []
for (let i = 0; i < 7; i++) {
const date = new Date(Date.now() + i * 24 * 60 * 60 * 1000);
const year = date.getFullYear();
const month = date.getMonth() + 1 < 10 ? `0${date.getMonth() + 1}` : date.getMonth() +
1;
const day = date.getDate() < 10 ? `0${date.getDate()}` : date.getDate();
dateArray.push(`${year}-${month}-${day}`);
}
dateArray.forEach(ele => {
datas.signInList.push({
"signDay": ele,
"status": "0",
})
})
datas.list = [{
"id": 1,
"title": "每日打卡奖励",
"type": 2,
"detail": "解锁3集视频即可领取",
"rewardDetail": "奖励666金币",
"number": 3,
"buttonTitle": "",
"jumpType": 1,
"buttonUrl": "",
"buttonUnderContent": "",
"buttonUnderUrl": "",
"updateTime": "2025-01-06 18:08:49",
"sort": 0,
"shows": 1,
"discNumber": 0,
"disabled": false
},
{
"id": 17,
"title": "每周打卡奖励",
"type": 2,
"detail": "当月签到满7天即可免费领取",
"rewardImg": "https://short-video.hnsiyao.cn/20241210/8aca569a9d544e819f542ce8aa7e7ce5.png",
"rewardDetail": "",
"number": 7,
"buttonTitle": "立即领取",
"buttonBgColor": "#EC6F48",
"buttonFontColor": "#fff",
"jumpType": 1,
"buttonUrl": "/pages/task/receiveMember",
"buttonUnderContent": "",
"buttonUnderUrl": "/pages/task/receiveMember",
"createTime": "2024-12-10 17:43:42",
"updateTime": "2024-12-25 09:52:09",
"sort": 5,
"shows": 1,
"discNumber": 0,
"disabled": false
},
{
"id": 17,
"title": "每月打卡奖励1",
"type": 2,
"detail": "当月签到满25天即可免费领取",
"rewardImg": "https://short-video.hnsiyao.cn/20241210/8aca569a9d544e819f542ce8aa7e7ce5.png",
"rewardDetail": "会员免费领",
"number": 25,
"buttonTitle": "立即领取",
"buttonBgColor": "#EC6F48",
"buttonFontColor": "#fff",
"jumpType": 1,
"buttonUrl": "/pages/task/receiveMember",
"buttonUnderContent": "",
"buttonUnderUrl": "/pages/task/receiveMember",
"createTime": "2024-12-10 17:43:42",
"updateTime": "2024-12-25 09:52:09",
"sort": 5,
"shows": 1,
"discNumber": 0,
"disabled": false
},
{
"id": 17,
"title": "每月打卡奖励2",
"type": 2,
"detail": "当月签到满25天即可免费领取",
"rewardImg": "https://short-video.hnsiyao.cn/20241210/8aca569a9d544e819f542ce8aa7e7ce5.png",
"rewardDetail": "",
"number": 25,
"buttonTitle": "立即领取",
"buttonBgColor": "#EC6F48",
"buttonFontColor": "#fff",
"jumpType": 1,
"buttonUrl": "/pages/task/receiveMember",
"buttonUnderContent": "",
"buttonUnderUrl": "/pages/task/receiveMember",
"createTime": "2024-12-10 17:43:42",
"updateTime": "2024-12-25 09:52:09",
"sort": 5,
"shows": 1,
"discNumber": 0,
"disabled": false
}
]
}
})
onReady(() => {
nextTick(() => {
data.adRewardedVideoloadNum = 0
datas.adRewardedVideoloadNum = 0
adRewarded.value.load();
})
getCanCash()
})
/**
* 获取看广告状态
*/
async function getCanCash() {
canCash().then(res => {
data.isWithdraw = !res;
datas.isWithdraw = !res;
})
}
@ -135,11 +239,11 @@
* @param {Object} e
*/
function onaderror(e) {
if ( data.adRewardedVideoloadNum >=3 ) {
data.adRewardedShow = false;
if (datas.adRewardedVideoloadNum >= 3) {
datas.adRewardedShow = false;
return
}
data.adRewardedVideoloadNum++
datas.adRewardedVideoloadNum++
setTimeout(() => {
adRewarded.value.load();
}, 1000); // 10
@ -151,7 +255,7 @@
* @param {Object} e
*/
function onadload(e) {
data.adRewardedShow = true;
datas.adRewardedShow = true;
console.log('广告数据加载成功');
}
/**
@ -163,7 +267,7 @@
if (detail && detail.isEnded) {
//
let res = await state({
extraKey: data.urlCallback.extra
extraKey: datas.urlCallback.extra
})
getCanCash()
} else {
@ -174,7 +278,6 @@
// jumpType (integer, optional): 1 2 ,
// type (integer, optional): 1 2 9 ,
if (url) {
console.log(url, 'debug12')
let urls = ''
if (url == '/pages/task/prizeList') {
urls = url + '?source=2'
@ -253,18 +356,22 @@
//
async function getTaskdata() {
let res = await selectTaskCenter()
if (!datas.isExamine) {
let arrData = []
if (!$common.isIosExamine()) {
res.forEach(ele => {
if (ele.title.indexOf('分享奖励') == -1 && ele.title.indexOf('新人福利') == -1 &&
ele.title.indexOf('观看视频奖励') == -1) {
arrData.push(ele)
}
})
datas.list = arrData
} else {
datas.list = res
res.forEach(ele => {
if (ele.title.indexOf('观看视频奖励') == -1) {
arrData.push(ele)
}
})
}
datas.list = arrData
}
</script>

View File

@ -60,6 +60,18 @@ export const useCommonStore = defineStore("common", {
}
}
}
},
isIosExamine() {
const sysInfo = uni.getSystemInfoSync();
let isIos = sysInfo.platform == 'ios'
if (!isIos) {
return true
}
let isExamine = useCommonStore()
if (isExamine.isExamine == 1) {
return false
}
return true
}
},
unistorage: true, // 开启后对 state 的数据读写都将持久化