弹窗,广告

This commit is contained in:
duan 2025-01-13 17:42:17 +08:00
parent dba6bcd906
commit fad0ca9ff0
5 changed files with 981 additions and 762 deletions

View File

@ -84,7 +84,7 @@
// //
ymfgoCourse(e,courseDetailsId) { ymfgoCourse(e,courseDetailsId) {
uni.navigateTo({ uni.navigateTo({
url: '/me/detail/detail?id=' + e+'&courseDetailsId='+courseDetailsId url: '/me/detail/detailIOS?id=' + e+'&courseDetailsId='+courseDetailsId
}) })
}, },
// //

View File

@ -14,10 +14,12 @@
<view class="u-flex flex-row justify-between align-center" style="padding: 20upx"> <view class="u-flex flex-row justify-between align-center" style="padding: 20upx">
<view class="flex align-center"> <view class="flex align-center">
<view class="color-333" style="font-size: 40upx;">¥</view> <view class="color-333" style="font-size: 40upx;">¥</view>
<input type="number" v-model="money" placeholder="请输入金额" @input="ymfmoneyInput" @blur="ymfymfmoneyBlur" <input type="number" v-model="money" placeholder="请输入金额" @input="ymfmoneyInput"
class="color-333 u-text-left u-m-l-10 u-font-40" style="width: 80%;" /> @blur="ymfymfmoneyBlur" class="color-333 u-text-left u-m-l-10 u-font-40"
style="width: 80%;" />
</view> </view>
<view @click="ymfsetAllMoney" class="u-font-28 color-333 u-p-l-15 u-p-r-15 u-p-t-16 u-p-b-16 flex-0 " <view @click="ymfsetAllMoney"
class="u-font-28 color-333 u-p-l-15 u-p-r-15 u-p-t-16 u-p-b-16 flex-0 "
style="background: #ff7581;color: white;border-radius: 10rpx;"> style="background: #ff7581;color: white;border-radius: 10rpx;">
全部 全部
</view> </view>
@ -41,18 +43,19 @@
<view @click="ymfgetOut" class="u-m-40 u-font-36 color-fff u-border-10" <view @click="ymfgetOut" class="u-m-40 u-font-36 color-fff u-border-10"
style="background: #ff7581;border-radius: 10px;height: 80rpx;line-height: 80rpx;"> style="background: #ff7581;border-radius: 10px;height: 80rpx;line-height: 80rpx;">
<!-- 提现 --> <!-- 提现 -->
立即提现 {{ !isWithdraw ? '观看广告提现' : '立即提现' }}
<!-- {{ !isWithdraw ? '观看广告提现' : '立即提现' }} -->
</view> </view>
<view class="flex w-full justify-center "> <view class="flex w-full justify-center ">
<!-- <view class="u-flex-1" style="color: grey;padding-bottom: 30px;padding-top: 20upx;" @click="ymfgoaliZhiFuBao"> <!-- <view class="u-flex-1" style="color: grey;padding-bottom: 30px;padding-top: 20upx;" @click="ymfgoaliZhiFuBao">
提现账号 提现账号
</view> --> </view> -->
<view class="u-flex-1" style="color: grey;padding-bottom: 30px;padding-top: 20upx;" @click="shimingrenzhi"> <view class="u-flex-1" style="color: grey;padding-bottom: 30px;padding-top: 20upx;"
@click="shimingrenzhi">
实名认证 实名认证
</view> </view>
<view class="u-flex-1" style="color: grey;padding-bottom: 30px;padding-top: 20upx;" @click="ymfgoqianbao"> <view class="u-flex-1" style="color: grey;padding-bottom: 30px;padding-top: 20upx;"
@click="ymfgoqianbao">
红包明细 红包明细
</view> </view>
<!-- <view style="color: grey;padding-bottom: 30px;padding-top: 20upx;width: 33%;" @click="ymfgojilu">提现记录 <!-- <view style="color: grey;padding-bottom: 30px;padding-top: 20upx;width: 33%;" @click="ymfgojilu">提现记录
@ -65,7 +68,8 @@
<view style="margin-bottom: 8rpx;text-align: right;"> <view style="margin-bottom: 8rpx;text-align: right;">
<text style="margin-bottom: 8rpx;color: green" v-if="item.state === 1"> 提现成功</text> <text style="margin-bottom: 8rpx;color: green" v-if="item.state === 1"> 提现成功</text>
<text style="margin-bottom: 8rpx;color: green" v-if="item.state === 0"> 提现中</text> <text style="margin-bottom: 8rpx;color: green" v-if="item.state === 0"> 提现中</text>
<text style="margin-bottom: 8rpx;color: #FD6416" v-if="item.state === -1 || item.state === 2"> <text style="margin-bottom: 8rpx;color: #FD6416"
v-if="item.state === -1 || item.state === 2">
提现失败 提现失败
</text> </text>
</view> </view>
@ -75,7 +79,8 @@
<view class="u-m-t-8"> 收款人姓名{{ item.zhifubaoName }}</view> <view class="u-m-t-8"> 收款人姓名{{ item.zhifubaoName }}</view>
<view class="u-m-t-8"> 发起时间{{ item.createAt }}</view> <view class="u-m-t-8"> 发起时间{{ item.createAt }}</view>
<view class="u-m-t-8" v-if="item.state === 1">成功时间 {{ item.outAt }}</view> <view class="u-m-t-8" v-if="item.state === 1">成功时间 {{ item.outAt }}</view>
<view style="margin-bottom: 8rpx;color: #FD6416" v-if="item.state === -1 || item.state === 2"> <view style="margin-bottom: 8rpx;color: #FD6416"
v-if="item.state === -1 || item.state === 2">
失败原因{{ item.refund }} 失败原因{{ item.refund }}
</view> </view>
@ -99,7 +104,17 @@
</view> </view>
</view> </view>
<u-modal v-model="ruleShow" confirm-text="知道了" title="规则说明" :title-style="{ fontWeight: '700' }"
<u-modal v-model="ruleShow" confirm-text="知道了" @confirm="ruleConfirm" :title="rule_title"
:title-style="{fontWeight:'700'}" 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 class="color-666" :nodes="rule_content"></rich-text>
</scroll-view>
</view>
</u-modal>
<!-- <u-modal v-model="ruleShow" confirm-text="知道了" title="规则说明" :title-style="{ fontWeight: '700' }"
confirm-color="rgb(255, 117, 129)"> confirm-color="rgb(255, 117, 129)">
<view class="u-p-30 u-text-left"> <view class="u-p-30 u-text-left">
<scroll-view scroll-y="true" style="max-height: 50vh;"> <scroll-view scroll-y="true" style="max-height: 50vh;">
@ -107,20 +122,30 @@
</scroll-view> </scroll-view>
</view> </view>
</u-modal> </u-modal> -->
<!-- 激励视频广告 --> <!-- 激励视频广告 -->
<!-- <ad-rewarded-video v-if="adRewardedVideo" ref="adRewardedVideo" adpid="1531580352" :loadnext="true" <ad-rewarded-video v-if="adRewardedVideo" ref="adRewardedVideo" adpid="1531580352" :loadnext="true"
v-slot:default="{ loading, error }" :url-callback="urlCallback" @load="onadload" @close="onadclose" v-slot:default="{ loading, error }" :url-callback="urlCallback" @load="onadload" @close="onadclose"
@error="onaderror"> @error="onaderror">
<view class="ad-error" v-if="error">{{ error }}</view> <view class="ad-error" v-if="error">{{ error }}</view>
</ad-rewarded-video> --> </ad-rewarded-video>
</view> </view>
</template> </template>
<script> <script>
export default { import httpsRequest from '@/common/httpRequest.js'
import {
$cache_config,
$cache_rule
} from '@/store/cashe.js'
export default {
data() { data() {
return { return {
money: '',
mayMoney: '0',
shouxufei: '',
rule_title: "",
rule_content: "",
money: '', money: '',
mayMoney: '0', mayMoney: '0',
shouxufei: '', shouxufei: '',
@ -157,28 +182,28 @@ export default {
urlCallback: null, urlCallback: null,
adRewardedVideo: true, adRewardedVideo: true,
ruleShow: true, ruleShow: true,
ruleInfo: ` ruleIndex: 0,
用户在平台中对奖励提现的适用以下规则 ruleList: $cache_rule.ruleCash||[],
<br/> ruleInfo: ``,
<br/>
1用户的收益达到最低提现金额要求后可以申请提现每日发起前10笔提现为自动到账超出则需第二个工作日后到账
<br/>
2用户需要通过支付宝提现需按照要求绑定支付宝账号并填写提现金额或其他提现所需信息请确保提供的信息准确无误以免提现失败
<br/>
3如果用户发现显示提现失败需确认当前填写或绑定的支付宝账号或银行卡账号是否正确以及支付宝账号是否可用如果用户发现显示提现成功但没到账
<br/>
(1)如果用户有多个支付宝账号请检查用户是否提现到了其他支付宝账号
<br/>
(2)高峰期提现人数多会导致网络拥堵显示提现成功之后72小时内属于正常现象请耐心等候
<br/>
4每日23:00至次日11:00为系统维护时间活动的对应奖励可能延迟到账提现通常会在72小时内到账如遇双休日节假日提现到账时间可能会延长活动高峰期间由于网络拥堵用户可能存在短时间内无法提现的情况平台将尽最大努力及时恢复提现功能但无需因此承担任何责任
<br/>
`,
}; };
}, },
onLoad() { onLoad() {
this.ymfgetExtractFei(); this.ymfgetExtractFei();
this.ymfymfgetMoneyDetail(); this.ymfymfgetMoneyDetail();
httpsRequest.getT("/app/announcement", {
type: 1
}).then(res => {
if (res.code == 0 && res.data.length > 0) {
this.ruleList = res.data
$cache_rule.set('ruleCash',this.ruleList)
this.ruleInit()
this.ruleShow = true
}
});
}, },
onShow() { onShow() {
this.token = uni.getStorageSync('token') this.token = uni.getStorageSync('token')
@ -188,14 +213,16 @@ export default {
this.ymfgetcashMoney() this.ymfgetcashMoney()
this.getCanCash() this.getCanCash()
}, },
onReachBottom: function () { onReachBottom: function() {
if (this.page * this.limit < this.totalCount) { if (this.page * this.limit < this.totalCount) {
this.page = this.page + 1; this.page = this.page + 1;
this.ymfymfgetMoneyDetail(); this.ymfymfgetMoneyDetail();
} }
}, },
onPullDownRefresh: function () { onPullDownRefresh: function() {
this.page = 1; this.page = 1;
// that.list = [] // that.list = []
this.ymfymfgetMoneyDetail(); this.ymfymfgetMoneyDetail();
@ -204,9 +231,15 @@ export default {
// this.list(); // this.list();
}, },
methods: { methods: {
shimingrenzhi(){
ruleInit() {
console.log(this.ruleIndex,'tiaoshi1')
this.rule_title = this.ruleList[this.ruleIndex].title
this.rule_content = this.ruleList[this.ruleIndex].content
},
shimingrenzhi() {
uni.navigateTo({ uni.navigateTo({
url:'/me/yaoqing/realName' url: '/me/yaoqing/realName'
}) })
}, },
onNavigationBarButtonTap() { onNavigationBarButtonTap() {
@ -264,6 +297,18 @@ export default {
} }
}) })
}, },
ruleConfirm() {
this.ruleIndex++
if (this.ruleIndex >= this.ruleList.length) {
this.ruleIndex = 0
return
}
this.ruleShow = false
setTimeout(res => {
this.ruleInit()
this.ruleShow = true
}, 300)
},
ymfmoneyInput(e) { ymfmoneyInput(e) {
let num = e.detail.value.match(/^\d*(\.?\d{0,2})/g)[0] || null; let num = e.detail.value.match(/^\d*(\.?\d{0,2})/g)[0] || null;
this.$nextTick(() => { this.$nextTick(() => {
@ -378,7 +423,7 @@ export default {
icon: 'none' icon: 'none'
}) })
that.money = '' that.money = ''
setTimeout(function () { setTimeout(function() {
that.ymfgetcashMoney() that.ymfgetcashMoney()
}, 1500) }, 1500)
} else if (res.code == 9991) { } else if (res.code == 9991) {
@ -386,7 +431,7 @@ export default {
title: res.msg, title: res.msg,
icon: 'none' icon: 'none'
}) })
setTimeout(function () { setTimeout(function() {
uni.navigateTo({ uni.navigateTo({
url: '/me/yaoqing/zhifubao-tixain' url: '/me/yaoqing/zhifubao-tixain'
}); });
@ -507,7 +552,8 @@ export default {
let shouxufei = parseFloat(money * this.shouxufei).toFixed(2); let shouxufei = parseFloat(money * this.shouxufei).toFixed(2);
uni.showModal({ uni.showModal({
title: '提现申请提示', title: '提现申请提示',
content: '请仔细确认收款人信息\n\n收款人姓名:' + that.aliZhiFuBaoName + '\n\n提现金额:' + money + content: '请仔细确认收款人信息\n\n收款人姓名:' + that.aliZhiFuBaoName + '\n\n提现金额:' +
money +
'元\n\n收款人账号' + that.aliZhiFuBao + '', '元\n\n收款人账号' + that.aliZhiFuBao + '',
// content: '\n\n:' + that.aliZhiFuBaoName + '\n\n:' + money + // content: '\n\n:' + that.aliZhiFuBaoName + '\n\n:' + money +
// '\n\n' + shouxufei + // '\n\n' + shouxufei +
@ -527,7 +573,8 @@ export default {
} else { } else {
uni.showModal({ uni.showModal({
title: '提现申请提示', title: '提现申请提示',
content: '请仔细确认收款人信息\n\n收款人姓名:' + that.aliZhiFuBaoName + '\n\n提现金额:' + money + content: '请仔细确认收款人信息\n\n收款人姓名:' + that.aliZhiFuBaoName + '\n\n提现金额:' +
money +
'元\n\n收款人账号' + that.aliZhiFuBao + '元\n\n收款人账号' + that.aliZhiFuBao +
'', '',
success: e => { success: e => {
@ -566,31 +613,31 @@ export default {
} }
} }
} }
}; };
</script> </script>
<style lang="less"> <style lang="less">
// @import '../../static/css/index.css'; // @import '../../static/css/index.css';
.top-bg { .top-bg {
background-color: #ff7581; background-color: #ff7581;
height: 400upx; height: 400upx;
border-bottom-right-radius: 40upx; border-bottom-right-radius: 40upx;
border-bottom-left-radius: 40upx; border-bottom-left-radius: 40upx;
} }
.class1 { .class1 {
font-size: 32upx; font-size: 32upx;
color: #FFFFFF; color: #FFFFFF;
padding-top: 100upx; padding-top: 100upx;
} }
.class2 { .class2 {
font-size: 40upx; font-size: 40upx;
color: #FFFFFF; color: #FFFFFF;
padding-top: 20upx; padding-top: 20upx;
} }
.class3 { .class3 {
width: 90%; width: 90%;
height: max-content; height: max-content;
margin-left: 40upx; margin-left: 40upx;
@ -598,28 +645,28 @@ export default {
box-shadow: rgba(183, 183, 183, 0.3) 0px 1px 10px; box-shadow: rgba(183, 183, 183, 0.3) 0px 1px 10px;
margin-top: 50upx; margin-top: 50upx;
border-radius: 20upx; border-radius: 20upx;
} }
.class4 { .class4 {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
padding: 20upx; padding: 20upx;
} }
.view2-view-text { .view2-view-text {
font-size: 14px; font-size: 14px;
color: #000000; color: #000000;
margin-left: 20upx; margin-left: 20upx;
width: 80%; width: 80%;
} }
.view2-view-image-right { .view2-view-image-right {
width: 18upx; width: 18upx;
height: 30upx; height: 30upx;
margin-left: 50upx; margin-left: 50upx;
} }
.tixian { .tixian {
text-align: center; text-align: center;
background: white; background: white;
height: 100%; height: 100%;
@ -637,9 +684,9 @@ export default {
color: #ffffff; color: #ffffff;
margin-bottom: 10px; margin-bottom: 10px;
} }
} }
.tixianList { .tixianList {
.item { .item {
background: white; background: white;
padding: 32rpx; padding: 32rpx;
@ -652,10 +699,10 @@ export default {
.item:first-child { .item:first-child {
margin-top: 0; margin-top: 0;
} }
} }
.centre { .centre {
text-align: center; text-align: center;
padding: 200rpx 0; padding: 200rpx 0;
font-size: 32rpx; font-size: 32rpx;
@ -684,5 +731,5 @@ export default {
font-size: 34rpx; font-size: 34rpx;
background: #ff7581; background: #ff7581;
} }
} }
</style> </style>

View File

@ -57,8 +57,8 @@
:src="`../../static/red-pack-new.gif`" :src="`../../static/red-pack-new.gif`"
style="width: 200rpx;height: 200rpx;position: fixed;right: 10rpx;bottom: 180rpx;"></u-image> style="width: 200rpx;height: 200rpx;position: fixed;right: 10rpx;bottom: 180rpx;"></u-image>
<u-modal v-if="isShowMoneyPay" v-model="ruleShow" confirm-text="知道了" :title="rule_title" :title-style="{ fontWeight: '700' }" <u-modal v-if="isShowMoneyPay" v-model="ruleShow" @confirm="ruleConfirm" confirm-text="知道了" :title="rule_title"
confirm-color="rgb(255, 117, 129)"> :title-style="{ fontWeight: '700' }" confirm-color="rgb(255, 117, 129)">
<view class="u-p-30 u-text-left"> <view class="u-p-30 u-text-left">
<scroll-view scroll-y="true" style="max-height: 50vh;"> <scroll-view scroll-y="true" style="max-height: 50vh;">
<rich-text class="color-666" :nodes="rule_content"></rich-text> <rich-text class="color-666" :nodes="rule_content"></rich-text>
@ -70,9 +70,13 @@
</template> </template>
<script> <script>
import contentlist from './components/contentlist.vue' import contentlist from './components/contentlist.vue'
import httpsRequest from '@/common/httpRequest.js' import httpsRequest from '@/common/httpRequest.js'
export default { import {
$cache_config,
$cache_rule
} from '@/store/cashe.js'
export default {
components: { components: {
contentlist contentlist
}, },
@ -86,7 +90,9 @@ export default {
ruleShow: false, ruleShow: false,
rule_title: '', rule_title: '',
rule_content: '', rule_content: '',
ruleList: "",
ruleIndex: 0,
ruleList: $cache_rule.ruleIndex || []
} }
}, },
onShow() { onShow() {
@ -102,14 +108,21 @@ export default {
} }
}); });
httpsRequest.getT("/app/announcement", {}).then(res => { httpsRequest.getT("/app/announcement", {
if (res.code == 0) { type: 0
if (res.data && res.data.state == 1) { }).then(res => {
if (res.code == 0 && res.data.length > 0) {
this.ruleShow = true this.ruleShow = true
this.rule_title = res.data.title this.ruleList = res.data
this.rule_content = res.data.content $cache_rule.set('ruleIndex', this.ruleList)
} this.ruleInit()
// this.ruleShow = true
// this.rule_title = res.data[0].title
// this.rule_content = res.data[0].content
} }
}); });
}, },
onReachBottom() { onReachBottom() {
@ -117,6 +130,22 @@ export default {
this.getrecomVideo() this.getrecomVideo()
}, },
methods: { methods: {
ruleInit() {
this.rule_title = this.ruleList[this.ruleIndex].title
this.rule_content = this.ruleList[this.ruleIndex].content
},
ruleConfirm() {
this.ruleIndex++
if (this.ruleIndex >= this.ruleList.length) {
this.ruleIndex = 0
return
}
this.ruleShow = false
setTimeout(res => {
this.ruleInit()
this.ruleShow = true
}, 300)
},
// //
goMsg(url) { goMsg(url) {
if (url.indexOf('/pages/') !== -1 || url.indexOf('/me/') !== -1) { if (url.indexOf('/pages/') !== -1 || url.indexOf('/me/') !== -1) {
@ -188,11 +217,11 @@ export default {
}, },
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.gongao { .gongao {
position: absolute; position: absolute;
bottom: 75rpx; bottom: 75rpx;
left: 70rpx; left: 70rpx;
@ -218,5 +247,5 @@ export default {
height: 78rpx; height: 78rpx;
width: 80%; width: 80%;
} }
} }
</style> </style>

View File

@ -97,11 +97,11 @@
</view> </view>
</view> </view>
<!-- 激励视频广告 --> <!-- 激励视频广告 -->
<!-- <ad-rewarded-video v-if="adRewardedVideo" ref="adRewardedVideo" adpid="1531580352" :loadnext="true" <ad-rewarded-video v-if="adRewardedVideo" ref="adRewardedVideo" adpid="1531580352" :loadnext="true"
v-slot:default="{ loading, error }" :url-callback="urlCallback" @load="onadload" @close="onadclose" v-slot:default="{ loading, error }" :url-callback="urlCallback" @load="onadload" @close="onadclose"
@error="onaderror"> @error="onaderror">
<view class="ad-error" v-if="error">{{ error }}</view> <view class="ad-error" v-if="error">{{ error }}</view>
</ad-rewarded-video> --> </ad-rewarded-video>
</view> </view>
</template> </template>

143
store/cashe.js Normal file
View File

@ -0,0 +1,143 @@
import {
data
} from "../tuniao-ui/libs/mixin/mixin"
class CACHE {
constructor(data) {
if (data === '' || data === null || data === undefined) {
throw (new Error('请传入缓存name值:index | {name:index}'))
return
}
if (typeof data === 'string') {
this._name = data
Object.defineProperty(this, '_name', {
writable: false
});
} else {
if (!data.name && !data._name) {
throw (new Error('请传入缓存name值:index | {name:index}'))
return
}
for (let i in data) {
this[i] = data[i]
const canWrite = i.slice(0, 1) !== '_'
Object.defineProperty(this, i, {
writable: canWrite,
writable: canWrite
});
}
}
}
isEmpty(){
return Object.keys(this).length>=2?false:true;
}
get(key) {
return this[key]
}
set(key, val) {
this[key] = val
uni.setStorageSync(this._name, this)
}
clear() {
Object.keys(this).map(v => {
if (v.slice(0, 1) !== '_') {
this[v] = null
delete this[v]
}
})
uni.removeStorageSync(this._name)
}
}
export const $cache_index = new CACHE({
_name: 'CACHE_index',
...uni.getStorageSync('CACHE_index')
})
export const $cache_video = new CACHE({
_name: 'CACHE_video',
...uni.getStorageSync('CACHE_video')
})
export const $cache_renwu = new CACHE({
_name: 'CACHE_renwu',
...uni.getStorageSync('CACHE_renwu')
})
export const $cache_chasingDrama = new CACHE({
_name: 'CACHE_chasingDrama',
...uni.getStorageSync('CACHE_chasingDrama')
})
export const $cache_user = new CACHE({
_name: 'CACHE_user',
...uni.getStorageSync('CACHE_user')
})
export const $cache_rule = new CACHE({
_name: 'CACHE_rule',
...uni.getStorageSync('CACHE_rule')
})
class CACHE_config extends CACHE {
constructor(data) {
super(data)
for (let i in data) {
if(i!=='_name'){
uni.setStorageSync(i,data[i])
}
}
}
set(key, val) {
this[key] = val
uni.setStorageSync(this._name, this)
}
set(key, val) {
this[key] = val
uni.setStorageSync(key, val)
uni.setStorageSync(this._name, this)
}
clear() {
Object.keys(this).map(v => {
if (v.slice(0, 1) !== '_') {
this[v] = null
delete this[v]
}
})
uni.removeStorageSync(this._name)
}
}
export const $cache_config = new CACHE_config({
_name: 'CACHE_config',
...uni.getStorageSync('CACHE_config')
})
const $cache={
index:$cache_index,
video:$cache_video,
renwu:$cache_renwu,
chasingDrama:$cache_chasingDrama,
user:$cache_user,
rule:$cache_rule,
config:$cache_config
}
export function cacheClearAll() {
for(let i in $cache){
$cache[i].clear()
}
}
export function cacheClear(arr){
if(typeof arr==='string'&&$cache[arr]){
$cache[arr].clear()
}
if(Array.isArray(arr)){
for(let i in arr){
const key=[arr[i]]
if($cache[key]){
$cache[key].clear()
}
}
}
}