代码合并
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
"version" : "1.0",
|
"version" : "1.0",
|
||||||
"configurations" : [
|
"configurations" : [
|
||||||
{
|
{
|
||||||
"playground" : "custom",
|
"playground" : "standard",
|
||||||
"type" : "uni-app:app-android"
|
"type" : "uni-app:app-android"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
23
App.vue
23
App.vue
@@ -1,6 +1,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { init } from '@/api/init.js';
|
import { ref } from 'vue';
|
||||||
import http from '@/http/http.js';
|
import { init,commonType } from '@/api/init.js';
|
||||||
export default {
|
export default {
|
||||||
onLaunch: function () {
|
onLaunch: function () {
|
||||||
console.log('App Launch');
|
console.log('App Launch');
|
||||||
@@ -11,17 +11,20 @@ export default {
|
|||||||
// } else {
|
// } else {
|
||||||
// uni.setStorageSync('isAI', false)
|
// uni.setStorageSync('isAI', false)
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
onShow: function () {
|
onShow: function () {
|
||||||
init();
|
|
||||||
// ios是否在审核
|
// ios是否在审核
|
||||||
http.request({
|
commonType(919).then(res=>{
|
||||||
url: '/common/type/919'
|
uni.setStorageSync('isExamine', res.value);
|
||||||
}).then((res) => {
|
})
|
||||||
if (res.code == 0) {
|
// 热搜词
|
||||||
uni.setStorageSync('isExamine', res.data.value);
|
commonType(249).then(res=>{
|
||||||
}
|
uni.setStorageSync('moreSearch', res.value)
|
||||||
});
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
onHide: function () {
|
onHide: function () {
|
||||||
console.log('App Hide');
|
console.log('App Hide');
|
||||||
|
|||||||
@@ -1,5 +1,16 @@
|
|||||||
import http from '@/http/http.js'
|
import http from '@/http/http.js'
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取APP版本信息
|
||||||
|
*/
|
||||||
|
export const selectNewApp = (data) => {
|
||||||
|
return http.request({
|
||||||
|
url: '/user/selectNewApp',
|
||||||
|
data: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取用户信息
|
* 获取用户信息
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -53,6 +53,15 @@
|
|||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</u-modal>
|
</u-modal>
|
||||||
|
|
||||||
|
<u-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>
|
||||||
|
</u-modal>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
@@ -65,6 +74,9 @@ import {
|
|||||||
onReachBottom
|
onReachBottom
|
||||||
} from '@dcloudio/uni-app'
|
} from '@dcloudio/uni-app'
|
||||||
import contentlist from './components/contentlist.vue'
|
import contentlist from './components/contentlist.vue'
|
||||||
|
import { selectNewApp } from '@/api/user/user.js';
|
||||||
|
import config from '@/commons/config.js';
|
||||||
|
import { linkTo } from '@/utils/app.js';
|
||||||
let datas = reactive({
|
let datas = reactive({
|
||||||
noticeList: [], //公告列表
|
noticeList: [], //公告列表
|
||||||
|
|
||||||
@@ -78,9 +90,18 @@ let datas = reactive({
|
|||||||
rule_content: '', // 首页弹窗内容
|
rule_content: '', // 首页弹窗内容
|
||||||
|
|
||||||
//ios是否在审核 1是审核
|
//ios是否在审核 1是审核
|
||||||
isExamine: uni.getStorageSync('isExamine')
|
isExamine: uni.getStorageSync('isExamine'),
|
||||||
|
|
||||||
|
version: {
|
||||||
|
show: false,
|
||||||
|
title: "",
|
||||||
|
content: "",
|
||||||
|
confirmText: "",
|
||||||
|
cancelText: "",
|
||||||
|
}
|
||||||
})
|
})
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
|
versionUpdate()
|
||||||
getMsg()
|
getMsg()
|
||||||
getrecomVideo()
|
getrecomVideo()
|
||||||
getPop()
|
getPop()
|
||||||
@@ -90,6 +111,79 @@ onReachBottom(() => {
|
|||||||
++datas.page
|
++datas.page
|
||||||
getrecomVideo()
|
getrecomVideo()
|
||||||
})
|
})
|
||||||
|
function versionUpdate(){
|
||||||
|
//#ifdef APP-PLUS
|
||||||
|
plus.screen.lockOrientation('portrait-primary'); //竖屏正方向锁定
|
||||||
|
//获取当前系统版本信息
|
||||||
|
plus.runtime.getProperty(plus.runtime.appid, widgetInfo => {
|
||||||
|
//请求后台接口 解析数据 对比版本
|
||||||
|
selectNewApp().then(res => {
|
||||||
|
res = res[0];
|
||||||
|
let version;
|
||||||
|
if (uni.getSystemInfoSync().platform == 'android') {
|
||||||
|
version = res.version
|
||||||
|
}
|
||||||
|
if (uni.getSystemInfoSync().platform == 'ios') {
|
||||||
|
version = res.iosVersion
|
||||||
|
}
|
||||||
|
console.log(widgetInfo.version+'---'+version)
|
||||||
|
version = res.version
|
||||||
|
// && uni.getSystemInfoSync().platform == 'android'
|
||||||
|
if (widgetInfo.version < version) {
|
||||||
|
let downloadLink = '';
|
||||||
|
let androidLink = res.androidWgtUrl;
|
||||||
|
let iosLink = res.iosWgtUrl;
|
||||||
|
datas.version.show = true;
|
||||||
|
datas.version.title = "发现新版本";
|
||||||
|
datas.version.content = res.des;
|
||||||
|
if (res.method == "true") {
|
||||||
|
datas.version.confirmText = "立即更新"
|
||||||
|
} else {
|
||||||
|
datas.version.confirmText = "立即更新"
|
||||||
|
datas.version.cancelText = "下次更新"
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
//#endif
|
||||||
|
}
|
||||||
|
function confirmUpdateVersion(){
|
||||||
|
// plus.runtime.openURL(config.baseUrl + '/pages/login/appEq')
|
||||||
|
linkTo('/pages/login/download')
|
||||||
|
return
|
||||||
|
uni.showLoading({
|
||||||
|
title: '下载中...',
|
||||||
|
mask: true
|
||||||
|
});
|
||||||
|
if (uni.getSystemInfoSync().platform == 'android') {
|
||||||
|
uni.downloadFile({
|
||||||
|
url: androidLink,
|
||||||
|
success: downloadResult => {
|
||||||
|
console.log(downloadResult)
|
||||||
|
if (downloadResult.statusCode === 200) {
|
||||||
|
plus.runtime .install(
|
||||||
|
downloadResult.tempFilePath, {
|
||||||
|
force: false
|
||||||
|
},
|
||||||
|
d => {
|
||||||
|
console.log('install success...');
|
||||||
|
plus.runtime
|
||||||
|
.restart();
|
||||||
|
},
|
||||||
|
e => {
|
||||||
|
console.log(e)
|
||||||
|
console.error('install fail...');
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (uni.getSystemInfoSync().platform == 'ios') {
|
||||||
|
plus.runtime.openURL(iosLink, function(res) {});
|
||||||
|
}
|
||||||
|
}
|
||||||
// 跳转公告链接
|
// 跳转公告链接
|
||||||
function goMsg(url) {
|
function goMsg(url) {
|
||||||
// if (url.indexOf('/pages/') !== -1 || url.indexOf('/me/') !== -1) {
|
// if (url.indexOf('/pages/') !== -1 || url.indexOf('/me/') !== -1) {
|
||||||
|
|||||||
@@ -29,72 +29,68 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
let u = navigator.userAgent;
|
// #ifdef H5
|
||||||
if ( u.indexOf('iPhone') > -1) {
|
let u = window.navigator.userAgent;
|
||||||
// #ifdef H5
|
if ( uni.getSystemInfoSync().platform == 'ios') {
|
||||||
data.confirmBtn = "跳转网页版首页"
|
data.confirmBtn = "跳转网页版首页"
|
||||||
// #endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( u.toLowerCase().indexOf('micromessenger') !== -1) {
|
if ( u.toLowerCase().indexOf('micromessenger') !== -1) {
|
||||||
data.isWeixin = true
|
data.isWeixin = true
|
||||||
}
|
}
|
||||||
|
// #endif
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
function download() {
|
function download() {
|
||||||
var u = navigator.userAgent;
|
console.log(uni.getSystemInfoSync().platform == 'android')
|
||||||
if (u.indexOf('Android') > -1 || u.indexOf('Adr') > -1) {
|
if (uni.getSystemInfoSync().platform == 'android') {
|
||||||
commonType(49).then(res => {
|
commonType(49).then(res => {
|
||||||
if (res.code === 0) {
|
console.log(res)
|
||||||
if (res.data && res.data.value) {
|
if (res && res.value) {
|
||||||
// #ifndef H5
|
// #ifndef H5
|
||||||
plus.runtime.openURL(res.data.value, function(res) {
|
plus.runtime.openURL(res.value, function(res) {
|
||||||
|
|
||||||
});
|
});
|
||||||
// #endif
|
// #endif
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
uni.setClipboardData({
|
uni.setClipboardData({
|
||||||
data: res.data.value,
|
data: res.value,
|
||||||
success: r => {
|
success: r => {
|
||||||
// this.$queue.showToast('邀请码复制成功');
|
// this.$queue.showToast('邀请码复制成功');
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '邀请码复制成功',
|
title: '邀请码复制成功',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
window.location.href = res.data.value;
|
window.location.href = res.value;
|
||||||
// #endif
|
// #endif
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
commonType(50).then(res => {
|
commonType(50).then(res => {
|
||||||
if (res.code === 0) {
|
if (res && res.value) {
|
||||||
if (res.data && res.data.value) {
|
// #ifndef H5
|
||||||
// #ifndef H5
|
plus.runtime.openURL(res.value, function(res) {
|
||||||
plus.runtime.openURL(res.data.value, function(res) {
|
|
||||||
|
|
||||||
});
|
|
||||||
// #endif
|
|
||||||
// #ifdef H5
|
|
||||||
uni.setClipboardData({
|
|
||||||
data: res.data.value,
|
|
||||||
success: r => {
|
|
||||||
uni.showToast({
|
|
||||||
title: '邀请码复制成功',
|
|
||||||
icon: 'none',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
uni.switchTab({
|
});
|
||||||
url: '/pages/index/index'
|
// #endif
|
||||||
})
|
// #ifdef H5
|
||||||
// window.location.href = res.data.value;
|
uni.setClipboardData({
|
||||||
// #endif
|
data: res.value,
|
||||||
}
|
success: r => {
|
||||||
|
uni.showToast({
|
||||||
|
title: '邀请码复制成功',
|
||||||
|
icon: 'none',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
uni.switchTab({
|
||||||
|
url: '/pages/index/index'
|
||||||
|
})
|
||||||
|
// window.location.href = res.data.value;
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,7 +61,7 @@
|
|||||||
count: 60,
|
count: 60,
|
||||||
relation: "",
|
relation: "",
|
||||||
invitation: '',
|
invitation: '',
|
||||||
registerCode: '',
|
isregisterCode: '',
|
||||||
qdCodeion: '', //渠道码
|
qdCodeion: '', //渠道码
|
||||||
checked: false,
|
checked: false,
|
||||||
})
|
})
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
if (options.invitation ) { data.invitation = options.invitation }
|
if (options.invitation ) { data.invitation = options.invitation }
|
||||||
|
|
||||||
let res = await commonType(3)
|
let res = await commonType(3)
|
||||||
data.registerCode = res.value
|
data.isregisterCode = res.value
|
||||||
})
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -171,7 +171,7 @@
|
|||||||
code,
|
code,
|
||||||
checked,
|
checked,
|
||||||
invitation,
|
invitation,
|
||||||
registerCode,
|
isregisterCode,
|
||||||
qdCodeion
|
qdCodeion
|
||||||
} = data;
|
} = data;
|
||||||
if (!mobile) {
|
if (!mobile) {
|
||||||
@@ -206,7 +206,7 @@
|
|||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (invitation.length == 0 && registerCode == '是') {
|
if (invitation.length == 0 && isregisterCode == '是') {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请输入邀请码',
|
title: '请输入邀请码',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
@@ -308,7 +308,7 @@
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 78rpx;
|
bottom: 178rpx;
|
||||||
|
|
||||||
}
|
}
|
||||||
.cuIcon::before{
|
.cuIcon::before{
|
||||||
|
|||||||
@@ -1,11 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<!-- <view class="navs" style="width: 100%;height: 96rpx;"></view> -->
|
<up-navbar title="申请提现"
|
||||||
<view class="nav">
|
@rightClick="data.ruleShow = true"
|
||||||
<up-icon name="arrow-left" color="#fff" size="20" @click="back"></up-icon>
|
bgColor="rgb(255, 117, 129)"
|
||||||
<view class="navTitle">申请提现</view>
|
leftIconColor="#FFF"
|
||||||
<view class="ruleBtn" @click="data.ruleShow = true">规则</view>
|
:titleStyle ="{color:'#FFF'}" >
|
||||||
</view>
|
<template #right>
|
||||||
|
<view class="u-p-r-30 u-flex u-col-center" style="color: #fff;">
|
||||||
|
<text class="rule-btn" @click="data.ruleShow = true">规则</text>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
</up-navbar>
|
||||||
|
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="title">可提现总额</view>
|
<view class="title">可提现总额</view>
|
||||||
<view class="mayMoney">¥ {{ data.mayMoney }}</view>
|
<view class="mayMoney">¥ {{ data.mayMoney }}</view>
|
||||||
|
|||||||
@@ -49,11 +49,11 @@
|
|||||||
</view>
|
</view>
|
||||||
<view @click="goNav('/pages/me/withdraw/moneyList?moneyType=2&viewType=1')">
|
<view @click="goNav('/pages/me/withdraw/moneyList?moneyType=2&viewType=1')">
|
||||||
<view class="">金币收益</view>
|
<view class="">金币收益</view>
|
||||||
<!-- <view class="text-red u-m-t-16 "><text class=" u-font-40">{{earning.inviteGoldMoney||0}}</text></view> -->
|
<view class="text-red u-m-t-16 "><text class=" u-font-40">{{data.earning.inviteGoldMoney||0}}</text></view>
|
||||||
</view>
|
</view>
|
||||||
<view @click="goNav('/pages/me/withdraw/moneyList?moneyType=1&viewType=1')">
|
<view @click="goNav('/pages/me/withdraw/moneyList?moneyType=1&viewType=1')">
|
||||||
<view class="">红包收益</view>
|
<view class="">红包收益</view>
|
||||||
<!-- <view class="text-red u-m-t-16 "><text class=" u-font-40">{{earning.inviteMoney||0}}</text></view> -->
|
<view class="text-red u-m-t-16 "><text class=" u-font-40">{{data.earning.inviteMoney||0}}</text></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-m-t-16 u-p-b-32" style="text-align: center;color: #999;">好友签到成功可额外获得1元现金红包</view>
|
<view class="u-m-t-16 u-p-b-32" style="text-align: center;color: #999;">好友签到成功可额外获得1元现金红包</view>
|
||||||
|
|||||||
@@ -18,7 +18,9 @@
|
|||||||
<view>
|
<view>
|
||||||
<view v-for="item in datas.signInList" :key="item.id"
|
<view v-for="item in datas.signInList" :key="item.id"
|
||||||
:style="item.status == 1 ? 'color:#EFA765' : 'color:#999'">
|
:style="item.status == 1 ? 'color:#EFA765' : 'color:#999'">
|
||||||
{{ item.status == 1 ? '已签到' : '待签到' }}
|
<text class="" style="font-size: 28rpx;">
|
||||||
|
{{ item.status == 1 ? '已签到' : '待签到' }}
|
||||||
|
</text>
|
||||||
<view :style="item.status == 1 ? 'color:#999' : 'color:#EFA765'">
|
<view :style="item.status == 1 ? 'color:#999' : 'color:#EFA765'">
|
||||||
{{ item.signDay.substr(5, 8) }}
|
{{ item.signDay.substr(5, 8) }}
|
||||||
</view>
|
</view>
|
||||||
@@ -44,14 +46,15 @@
|
|||||||
:style="{ backgroundColor: item.buttonBgColor, color: item.buttonFontColor }"
|
:style="{ backgroundColor: item.buttonBgColor, color: item.buttonFontColor }"
|
||||||
@tap="goNav(item)">
|
@tap="goNav(item)">
|
||||||
{{ item.type == 1 ? item.buttonTitle : item.number ? `${item.discNumber}/${item.number}` : (
|
{{ item.type == 1 ? item.buttonTitle : item.number ? `${item.discNumber}/${item.number}` : (
|
||||||
item.discNumber <= 0 ? item.buttonTitle : `剩余${item.discNumber}次`) }} </view>
|
item.discNumber <= 0 ? item.buttonTitle : `剩余${item.discNumber}次`) }}
|
||||||
<view v-else class="btn disabled">
|
</view>
|
||||||
{{ item.type == 1 ? item.buttonTitle : item.number ? `${item.discNumber}/${item.number}`
|
<view v-else class="btn disabled">
|
||||||
: (item.discNumber <= 0 ? item.buttonTitle : `剩余${item.discNumber}次`) }} <view
|
{{ item.type == 1 ? item.buttonTitle : item.number ? `${item.discNumber}/${item.number}`
|
||||||
v-if="item.buttonUnderContent && item.buttonUnderUrl" class=" tip"
|
: (item.discNumber <= 0 ? item.buttonTitle : `剩余${item.discNumber}次`) }}
|
||||||
@tap="goNav(item, item.buttonUnderUrl)">
|
<view v-if="item.buttonUnderContent && item.buttonUnderUrl" class=" tip"
|
||||||
{{ item.buttonUnderContent }}
|
@tap="goNav(item, item.buttonUnderUrl)">
|
||||||
</view>
|
{{ item.buttonUnderContent }}
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -66,350 +69,356 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {
|
import {
|
||||||
reactive,
|
reactive,
|
||||||
getCurrentInstance, nextTick
|
getCurrentInstance,
|
||||||
} from "vue";
|
nextTick
|
||||||
import {
|
} from "vue";
|
||||||
onShow, onReachBottom
|
import {
|
||||||
} from '@dcloudio/uni-app'
|
onShow,
|
||||||
import { getUserSignData, selectTaskCenter, taskReceive } from '@/api/task/index.js'
|
onReachBottom
|
||||||
const currentInstance = getCurrentInstance()
|
} from '@dcloudio/uni-app'
|
||||||
let datas = reactive({
|
import {
|
||||||
signDays: 0,
|
getUserSignData,
|
||||||
signInList: [],
|
selectTaskCenter,
|
||||||
list: [],
|
taskReceive
|
||||||
// ios审核
|
} from '@/api/task/index.js'
|
||||||
isExamine: uni.getStorageSync('isExamine'),
|
const currentInstance = getCurrentInstance()
|
||||||
urlCallback: {},
|
let datas = reactive({
|
||||||
adRewardedVideo: true,
|
signDays: 0,
|
||||||
|
signInList: [],
|
||||||
|
list: [],
|
||||||
|
// ios审核
|
||||||
|
isExamine: uni.getStorageSync('isExamine'),
|
||||||
|
urlCallback: {},
|
||||||
|
adRewardedVideo: true,
|
||||||
|
|
||||||
})
|
})
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
getTaskdata()
|
getTaskdata()
|
||||||
getsignIn()
|
getsignIn()
|
||||||
|
|
||||||
// nextTick(() => {
|
// nextTick(() => {
|
||||||
// currentInstance.ctx.$refs.adRewardedVideo.load();
|
// currentInstance.ctx.$refs.adRewardedVideo.load();
|
||||||
// })
|
// })
|
||||||
})
|
})
|
||||||
//广告播放成功回调
|
//广告播放成功回调
|
||||||
async function onadclose(e) {
|
async function onadclose(e) {
|
||||||
const detail = e.detail
|
const detail = e.detail
|
||||||
if (detail && detail.isEnded) {
|
if (detail && detail.isEnded) {
|
||||||
// 正常播放结束
|
// 正常播放结束
|
||||||
// /sqx_fast/app/ad/state
|
// /sqx_fast/app/ad/state
|
||||||
let res = await this.$Request.getT('app/ad/state', {
|
let res = await this.$Request.getT('app/ad/state', {
|
||||||
extraKey: this.urlCallback.extra
|
extraKey: this.urlCallback.extra
|
||||||
})
|
})
|
||||||
this.$Request.getT('/app/common/type/921').then(res => {
|
this.$Request.getT('/app/common/type/921').then(res => {
|
||||||
if (res.code == 0) {
|
|
||||||
console.log(res)
|
|
||||||
uni.showToast({
|
|
||||||
title: '获得' + res.data.value + '分钟免费时长',
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
// 播放中途退出
|
|
||||||
}
|
|
||||||
}
|
|
||||||
async function goNav(item, url) {
|
|
||||||
// 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'
|
|
||||||
}
|
|
||||||
if (url == '/pages/task/receiveMember') {
|
|
||||||
urls = url + `?standard=${item.discNumber == null ? true : false}&taskId=${item.id}`
|
|
||||||
}
|
|
||||||
uni.navigateTo({
|
|
||||||
url: urls
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
if (item.jumpType == 0) {
|
|
||||||
if (item.title.indexOf("新人福利") != -1) {
|
|
||||||
let res = await taskReceive({ id: item.id })
|
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
|
console.log(res)
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.id == 15 ? '签到成功' : '领取成功',
|
title: '获得' + res.data.value + '分钟免费时长',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
setTimeout(() => {
|
|
||||||
getTaskdata()
|
|
||||||
getsignIn()
|
|
||||||
}, 1000)
|
|
||||||
} else {
|
|
||||||
uni.switchTab({
|
|
||||||
url: '/pages/index/index'
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
} else if (item.buttonTitle.indexOf("观看视频") != -1) {
|
|
||||||
// 首次加载广告
|
|
||||||
datas.urlCallback = {
|
|
||||||
userId: uni.getStorageSync('userId'),
|
|
||||||
extra: uni.getStorageSync('userId') + "" + new Date().getTime(),
|
|
||||||
}
|
|
||||||
currentInstance.ctx.$refs.adRewardedVideo.show();
|
|
||||||
} else {
|
|
||||||
uni.switchTab({
|
|
||||||
url: "/pages/index/index"
|
|
||||||
})
|
|
||||||
}
|
|
||||||
} else if (item.jumpType == 1) {
|
|
||||||
let buttonUrl = item.buttonUrl
|
|
||||||
console.log(buttonUrl, 'debug')
|
|
||||||
if (item.title && item.title.indexOf('每周打卡奖励') != -1) {
|
|
||||||
buttonUrl = item.buttonUrl + '?source=2'
|
|
||||||
}
|
|
||||||
if (item.title && item.title.indexOf('每月打卡奖励1') != -1) {
|
|
||||||
buttonUrl = item.buttonUrl + '?source=3'
|
|
||||||
}
|
|
||||||
if (item.title && item.title.indexOf('每月打卡奖励2') != -1) {
|
|
||||||
buttonUrl = `${item.buttonUrl}?standard=${item.discNumber == null ? true : false}&taskId=${item.id}`
|
|
||||||
}
|
|
||||||
|
|
||||||
uni.navigateTo({
|
|
||||||
url: buttonUrl
|
|
||||||
})
|
|
||||||
|
|
||||||
} else if (item.jumpType == 3) {
|
|
||||||
uni.switchTab({
|
|
||||||
url: item.buttonUrl
|
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
// 播放中途退出
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
async function goNav(item, url) {
|
||||||
}
|
// jumpType (integer, optional): 跳转类型 1 内部路径 2 外部路径 ,
|
||||||
function onadload(e) {
|
// type (integer, optional): 任务类型 1 普通任务 2 打卡任务 9 其它 ,
|
||||||
datas.adRewardedVideo = true;
|
if (url) {
|
||||||
}
|
console.log(url, 'debug12')
|
||||||
// 获得签到
|
let urls = ''
|
||||||
async function getsignIn() {
|
if (url == '/pages/task/prizeList') {
|
||||||
let res = await getUserSignData()
|
urls = url + '?source=2'
|
||||||
datas.signInList = res.recordList
|
|
||||||
datas.signDays = res.signDays
|
|
||||||
}
|
|
||||||
// 获取任务列表
|
|
||||||
async function getTaskdata() {
|
|
||||||
let res = await selectTaskCenter()
|
|
||||||
if (!datas.isExamine) {
|
|
||||||
let arrData = []
|
|
||||||
res.forEach(ele => {
|
|
||||||
if (ele.title.indexOf('分享奖励') == -1 && ele.title.indexOf('新人福利') == -1 &&
|
|
||||||
ele.title.indexOf('观看视频奖励') == -1) {
|
|
||||||
arrData.push(ele)
|
|
||||||
}
|
}
|
||||||
})
|
if (url == '/pages/task/receiveMember') {
|
||||||
datas.list = arrData
|
urls = url + `?standard=${item.discNumber == null ? true : false}&taskId=${item.id}`
|
||||||
} else {
|
}
|
||||||
datas.list = res
|
uni.navigateTo({
|
||||||
}
|
url: urls
|
||||||
}
|
})
|
||||||
|
} else {
|
||||||
|
if (item.jumpType == 0) {
|
||||||
|
if (item.title.indexOf("新人福利") != -1) {
|
||||||
|
let res = await taskReceive({
|
||||||
|
id: item.id
|
||||||
|
})
|
||||||
|
if (res.code == 0) {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.id == 15 ? '签到成功' : '领取成功',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
getTaskdata()
|
||||||
|
getsignIn()
|
||||||
|
}, 1000)
|
||||||
|
} else {
|
||||||
|
uni.switchTab({
|
||||||
|
url: '/pages/index/index'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else if (item.buttonTitle.indexOf("观看视频") != -1) {
|
||||||
|
// 首次加载广告
|
||||||
|
datas.urlCallback = {
|
||||||
|
userId: uni.getStorageSync('userId'),
|
||||||
|
extra: uni.getStorageSync('userId') + "" + new Date().getTime(),
|
||||||
|
}
|
||||||
|
currentInstance.ctx.$refs.adRewardedVideo.show();
|
||||||
|
} else {
|
||||||
|
uni.switchTab({
|
||||||
|
url: "/pages/index/index"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else if (item.jumpType == 1) {
|
||||||
|
let buttonUrl = item.buttonUrl
|
||||||
|
console.log(buttonUrl, 'debug')
|
||||||
|
if (item.title && item.title.indexOf('每周打卡奖励') != -1) {
|
||||||
|
buttonUrl = item.buttonUrl + '?source=2'
|
||||||
|
}
|
||||||
|
if (item.title && item.title.indexOf('每月打卡奖励1') != -1) {
|
||||||
|
buttonUrl = item.buttonUrl + '?source=3'
|
||||||
|
}
|
||||||
|
if (item.title && item.title.indexOf('每月打卡奖励2') != -1) {
|
||||||
|
buttonUrl =
|
||||||
|
`${item.buttonUrl}?standard=${item.discNumber == null ? true : false}&taskId=${item.id}`
|
||||||
|
}
|
||||||
|
|
||||||
|
uni.navigateTo({
|
||||||
|
url: buttonUrl
|
||||||
|
})
|
||||||
|
|
||||||
|
} else if (item.jumpType == 3) {
|
||||||
|
uni.switchTab({
|
||||||
|
url: item.buttonUrl
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function onadload(e) {
|
||||||
|
datas.adRewardedVideo = true;
|
||||||
|
}
|
||||||
|
// 获得签到
|
||||||
|
async function getsignIn() {
|
||||||
|
let res = await getUserSignData()
|
||||||
|
datas.signInList = res.recordList
|
||||||
|
datas.signDays = res.signDays
|
||||||
|
}
|
||||||
|
// 获取任务列表
|
||||||
|
async function getTaskdata() {
|
||||||
|
let res = await selectTaskCenter()
|
||||||
|
if (!datas.isExamine) {
|
||||||
|
let arrData = []
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.u-absolute {
|
.u-absolute {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
|
|
||||||
.task_bg {
|
.task_bg {
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
height: 494rpx !important;
|
height: 494rpx !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
position: relative;
|
|
||||||
padding: 32rpx;
|
|
||||||
|
|
||||||
.icon_title {
|
|
||||||
color: #000000;
|
|
||||||
margin-left: 28rpx;
|
|
||||||
top: -20rpx;
|
|
||||||
font-size: 32rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
padding: 32rpx;
|
||||||
|
|
||||||
.task_icon1 {
|
.icon_title {
|
||||||
width: 74rpx !important;
|
color: #000000;
|
||||||
height: 78rpx !important;
|
margin-left: 28rpx;
|
||||||
margin-left: 235rpx;
|
top: -20rpx;
|
||||||
position: relative;
|
font-size: 32rpx;
|
||||||
}
|
font-weight: bold;
|
||||||
|
|
||||||
.task_icon2 {
|
|
||||||
width: 126rpx !important;
|
|
||||||
height: 120rpx !important;
|
|
||||||
top: -40rpx;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.contentTop {
|
|
||||||
border-radius: 16rpx;
|
|
||||||
top: -115rpx;
|
|
||||||
padding: 28rpx;
|
|
||||||
|
|
||||||
|
|
||||||
margin-bottom: 32rpx;
|
|
||||||
position: relative;
|
|
||||||
background-color: #ffffff;
|
|
||||||
color: #666666;
|
|
||||||
margin-left: 32rpx;
|
|
||||||
margin-right: 32rpx;
|
|
||||||
|
|
||||||
>view:first-child {
|
|
||||||
>image {
|
|
||||||
width: 100%;
|
|
||||||
height: 78rpx;
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
z-index: 1
|
|
||||||
}
|
|
||||||
|
|
||||||
>view {
|
|
||||||
z-index: 9999;
|
|
||||||
position: absolute;
|
|
||||||
text-align: center;
|
|
||||||
width: 98%;
|
|
||||||
|
|
||||||
.num {
|
|
||||||
color: #EC6F48;
|
|
||||||
margin: 0 10rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
>view:last-child {
|
|
||||||
margin-top: 100rpx;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
|
|
||||||
>view {
|
|
||||||
position: relative;
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.task_icon1 {
|
||||||
|
width: 74rpx !important;
|
||||||
|
height: 78rpx !important;
|
||||||
|
margin-left: 235rpx;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.task_icon2 {
|
||||||
|
width: 126rpx !important;
|
||||||
|
height: 120rpx !important;
|
||||||
|
top: -40rpx;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.contentTop {
|
||||||
|
border-radius: 16rpx;
|
||||||
|
top: -115rpx;
|
||||||
|
padding: 20rpx;
|
||||||
|
margin-bottom: 32rpx;
|
||||||
|
position: relative;
|
||||||
|
background-color: #ffffff;
|
||||||
|
color: #666666;
|
||||||
|
margin: 32rpx;
|
||||||
|
|
||||||
|
>view:first-child {
|
||||||
|
>image {
|
||||||
|
width: 100%;
|
||||||
|
height: 78rpx;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
z-index: 1
|
||||||
|
}
|
||||||
|
|
||||||
>view {
|
>view {
|
||||||
margin-top: 20rpx;
|
z-index: 9999;
|
||||||
width: 86rpx;
|
|
||||||
height: 94rpx;
|
|
||||||
background: linear-gradient(180deg, #FFF7E3 0%, #FFFFFF 100%);
|
|
||||||
border-radius: 14rpx 14rpx 0rpx 0rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
>image {
|
|
||||||
width: 52rpx;
|
|
||||||
height: 48rpx;
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 110rpx;
|
text-align: center;
|
||||||
left: 14rpx;
|
width: 98%;
|
||||||
|
|
||||||
|
.num {
|
||||||
|
color: #EC6F48;
|
||||||
|
margin: 0 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
>view:last-child {
|
||||||
|
margin-top: 100rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
>view {
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
>view {
|
||||||
|
margin-top: 20rpx;
|
||||||
|
width: 86rpx;
|
||||||
|
height: 94rpx;
|
||||||
|
background: linear-gradient(180deg, #FFF7E3 0%, #FFFFFF 100%);
|
||||||
|
border-radius: 14rpx 14rpx 0rpx 0rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
>image {
|
||||||
|
width: 52rpx;
|
||||||
|
height: 48rpx;
|
||||||
|
position: absolute;
|
||||||
|
top: 110rpx;
|
||||||
|
left: 14rpx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
top: -115rpx;
|
top: -115rpx;
|
||||||
padding: 28rpx;
|
padding: 28rpx;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
margin-left: 32rpx;
|
margin-left: 32rpx;
|
||||||
margin-right: 32rpx;
|
margin-right: 32rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
top: -115rpx;
|
top: -115rpx;
|
||||||
padding: 28rpx;
|
padding: 28rpx;
|
||||||
|
|
||||||
.cell {
|
.cell {
|
||||||
padding: 32rpx 0;
|
padding: 32rpx 0;
|
||||||
border-bottom: 2rpx solid #EBEBEB;
|
border-bottom: 2rpx solid #EBEBEB;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
.cell_left {
|
.cell_left {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
|
|
||||||
.cell_title {
|
.cell_title {
|
||||||
margin-bottom: 12rpx;
|
margin-bottom: 12rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
display: flex;
|
|
||||||
|
|
||||||
.title {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-shrink: 0;
|
|
||||||
font-size: 28rpx;
|
.title {
|
||||||
font-weight: bold;
|
display: flex;
|
||||||
|
flex-shrink: 0;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cell_icon {
|
||||||
|
width: 48rpx !important;
|
||||||
|
height: 34rpx !important;
|
||||||
|
margin-left: 16rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tip {
|
||||||
|
margin-left: 22rpx;
|
||||||
|
color: #FC5B67;
|
||||||
|
font-size: 24rpx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.cell_icon {
|
.subhead {
|
||||||
width: 48rpx !important;
|
color: #999;
|
||||||
height: 34rpx !important;
|
|
||||||
margin-left: 16rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tip {
|
|
||||||
margin-left: 22rpx;
|
|
||||||
color: #FC5B67;
|
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.subhead {
|
.cell_right {
|
||||||
color: #999;
|
flex-direction: column;
|
||||||
font-size: 24rpx;
|
align-items: center;
|
||||||
|
flex-shrink: 0;
|
||||||
|
margin-left: 20rpx;
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
width: 148rpx;
|
||||||
|
height: 56rpx;
|
||||||
|
line-height: 56rpx;
|
||||||
|
text-align: center;
|
||||||
|
background-color: #EC6F48;
|
||||||
|
color: #FFFFFF;
|
||||||
|
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tip {
|
||||||
|
color: #EC6F48;
|
||||||
|
height: 44rpx;
|
||||||
|
line-height: 44rpx;
|
||||||
|
margin-top: 5rpx;
|
||||||
|
font-size: 22rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.opt {
|
||||||
|
color: #D39B7E;
|
||||||
|
background-color: #FBF3EB;
|
||||||
|
}
|
||||||
|
|
||||||
|
.disabled {
|
||||||
|
color: #999999;
|
||||||
|
background-color: #E2E2E2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.cell_right {
|
.cell:last-child {
|
||||||
flex-direction: column;
|
border-bottom: none;
|
||||||
align-items: center;
|
|
||||||
flex-shrink: 0;
|
|
||||||
margin-left: 20rpx;
|
|
||||||
|
|
||||||
.btn {
|
|
||||||
width: 148rpx;
|
|
||||||
height: 56rpx;
|
|
||||||
line-height: 56rpx;
|
|
||||||
text-align: center;
|
|
||||||
background-color: #EC6F48;
|
|
||||||
color: #FFFFFF;
|
|
||||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
|
||||||
font-size: 24rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tip {
|
|
||||||
color: #EC6F48;
|
|
||||||
height: 44rpx;
|
|
||||||
line-height: 44rpx;
|
|
||||||
margin-top: 5rpx;
|
|
||||||
font-size: 22rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.opt {
|
|
||||||
color: #D39B7E;
|
|
||||||
background-color: #FBF3EB;
|
|
||||||
}
|
|
||||||
|
|
||||||
.disabled {
|
|
||||||
color: #999999;
|
|
||||||
background-color: #E2E2E2;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
</style>
|
||||||
.cell:last-child {
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
Reference in New Issue
Block a user