弹窗,广告

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) {
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="flex align-center">
<view class="color-333" style="font-size: 40upx;">¥</view>
<input type="number" v-model="money" placeholder="请输入金额" @input="ymfmoneyInput" @blur="ymfymfmoneyBlur"
class="color-333 u-text-left u-m-l-10 u-font-40" style="width: 80%;" />
<input type="number" v-model="money" placeholder="请输入金额" @input="ymfmoneyInput"
@blur="ymfymfmoneyBlur" class="color-333 u-text-left u-m-l-10 u-font-40"
style="width: 80%;" />
</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;">
全部
</view>
@ -41,18 +43,19 @@
<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;">
<!-- 提现 -->
立即提现
<!-- {{ !isWithdraw ? '观看广告提现' : '立即提现' }} -->
{{ !isWithdraw ? '观看广告提现' : '立即提现' }}
</view>
<view class="flex w-full justify-center ">
<!-- <view class="u-flex-1" style="color: grey;padding-bottom: 30px;padding-top: 20upx;" @click="ymfgoaliZhiFuBao">
提现账号
</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 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 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;">
<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: #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>
</view>
@ -75,7 +79,8 @@
<view class="u-m-t-8"> 收款人姓名{{ item.zhifubaoName }}</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 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 }}
</view>
@ -99,7 +104,17 @@
</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)">
<view class="u-p-30 u-text-left">
<scroll-view scroll-y="true" style="max-height: 50vh;">
@ -107,20 +122,30 @@
</scroll-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"
@error="onaderror">
<view class="ad-error" v-if="error">{{ error }}</view>
</ad-rewarded-video> -->
</ad-rewarded-video>
</view>
</template>
<script>
import httpsRequest from '@/common/httpRequest.js'
import {
$cache_config,
$cache_rule
} from '@/store/cashe.js'
export default {
data() {
return {
money: '',
mayMoney: '0',
shouxufei: '',
rule_title: "",
rule_content: "",
money: '',
mayMoney: '0',
shouxufei: '',
@ -157,28 +182,28 @@ export default {
urlCallback: null,
adRewardedVideo: true,
ruleShow: true,
ruleInfo: `
用户在平台中对奖励提现的适用以下规则
<br/>
<br/>
1用户的收益达到最低提现金额要求后可以申请提现每日发起前10笔提现为自动到账超出则需第二个工作日后到账
<br/>
2用户需要通过支付宝提现需按照要求绑定支付宝账号并填写提现金额或其他提现所需信息请确保提供的信息准确无误以免提现失败
<br/>
3如果用户发现显示提现失败需确认当前填写或绑定的支付宝账号或银行卡账号是否正确以及支付宝账号是否可用如果用户发现显示提现成功但没到账
<br/>
(1)如果用户有多个支付宝账号请检查用户是否提现到了其他支付宝账号
<br/>
(2)高峰期提现人数多会导致网络拥堵显示提现成功之后72小时内属于正常现象请耐心等候
<br/>
4每日23:00至次日11:00为系统维护时间活动的对应奖励可能延迟到账提现通常会在72小时内到账如遇双休日节假日提现到账时间可能会延长活动高峰期间由于网络拥堵用户可能存在短时间内无法提现的情况平台将尽最大努力及时恢复提现功能但无需因此承担任何责任
<br/>
`,
ruleIndex: 0,
ruleList: $cache_rule.ruleCash||[],
ruleInfo: ``,
};
},
onLoad() {
this.ymfgetExtractFei();
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() {
this.token = uni.getStorageSync('token')
@ -188,6 +213,8 @@ export default {
this.ymfgetcashMoney()
this.getCanCash()
},
onReachBottom: function() {
if (this.page * this.limit < this.totalCount) {
@ -204,6 +231,12 @@ export default {
// this.list();
},
methods: {
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({
url: '/me/yaoqing/realName'
@ -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) {
let num = e.detail.value.match(/^\d*(\.?\d{0,2})/g)[0] || null;
this.$nextTick(() => {
@ -507,7 +552,8 @@ export default {
let shouxufei = parseFloat(money * this.shouxufei).toFixed(2);
uni.showModal({
title: '提现申请提示',
content: '请仔细确认收款人信息\n\n收款人姓名:' + that.aliZhiFuBaoName + '\n\n提现金额:' + money +
content: '请仔细确认收款人信息\n\n收款人姓名:' + that.aliZhiFuBaoName + '\n\n提现金额:' +
money +
'元\n\n收款人账号' + that.aliZhiFuBao + '',
// content: '\n\n:' + that.aliZhiFuBaoName + '\n\n:' + money +
// '\n\n' + shouxufei +
@ -527,7 +573,8 @@ export default {
} else {
uni.showModal({
title: '提现申请提示',
content: '请仔细确认收款人信息\n\n收款人姓名:' + that.aliZhiFuBaoName + '\n\n提现金额:' + money +
content: '请仔细确认收款人信息\n\n收款人姓名:' + that.aliZhiFuBaoName + '\n\n提现金额:' +
money +
'元\n\n收款人账号' + that.aliZhiFuBao +
'',
success: e => {

View File

@ -57,8 +57,8 @@
:src="`../../static/red-pack-new.gif`"
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' }"
confirm-color="rgb(255, 117, 129)">
<u-modal v-if="isShowMoneyPay" v-model="ruleShow" @confirm="ruleConfirm" confirm-text="知道了" :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>
@ -72,6 +72,10 @@
<script>
import contentlist from './components/contentlist.vue'
import httpsRequest from '@/common/httpRequest.js'
import {
$cache_config,
$cache_rule
} from '@/store/cashe.js'
export default {
components: {
contentlist
@ -86,7 +90,9 @@ export default {
ruleShow: false,
rule_title: '',
rule_content: '',
ruleList: "",
ruleIndex: 0,
ruleList: $cache_rule.ruleIndex || []
}
},
onShow() {
@ -102,14 +108,21 @@ export default {
}
});
httpsRequest.getT("/app/announcement", {}).then(res => {
if (res.code == 0) {
if (res.data && res.data.state == 1) {
httpsRequest.getT("/app/announcement", {
type: 0
}).then(res => {
if (res.code == 0 && res.data.length > 0) {
this.ruleShow = true
this.rule_title = res.data.title
this.rule_content = res.data.content
}
this.ruleList = res.data
$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() {
@ -117,6 +130,22 @@ export default {
this.getrecomVideo()
},
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) {
if (url.indexOf('/pages/') !== -1 || url.indexOf('/me/') !== -1) {

View File

@ -97,11 +97,11 @@
</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"
@error="onaderror">
<view class="ad-error" v-if="error">{{ error }}</view>
</ad-rewarded-video> -->
</ad-rewarded-video>
</view>
</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()
}
}
}
}