代码合并
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
"version" : "1.0",
|
||||
"configurations" : [
|
||||
{
|
||||
"playground" : "custom",
|
||||
"playground" : "standard",
|
||||
"type" : "uni-app:app-android"
|
||||
},
|
||||
{
|
||||
|
||||
23
App.vue
23
App.vue
@@ -1,6 +1,6 @@
|
||||
<script>
|
||||
import { init } from '@/api/init.js';
|
||||
import http from '@/http/http.js';
|
||||
import { ref } from 'vue';
|
||||
import { init,commonType } from '@/api/init.js';
|
||||
export default {
|
||||
onLaunch: function () {
|
||||
console.log('App Launch');
|
||||
@@ -11,17 +11,20 @@ export default {
|
||||
// } else {
|
||||
// uni.setStorageSync('isAI', false)
|
||||
// }
|
||||
|
||||
|
||||
|
||||
},
|
||||
onShow: function () {
|
||||
init();
|
||||
// ios是否在审核
|
||||
http.request({
|
||||
url: '/common/type/919'
|
||||
}).then((res) => {
|
||||
if (res.code == 0) {
|
||||
uni.setStorageSync('isExamine', res.data.value);
|
||||
}
|
||||
});
|
||||
commonType(919).then(res=>{
|
||||
uni.setStorageSync('isExamine', res.value);
|
||||
})
|
||||
// 热搜词
|
||||
commonType(249).then(res=>{
|
||||
uni.setStorageSync('moreSearch', res.value)
|
||||
})
|
||||
|
||||
},
|
||||
onHide: function () {
|
||||
console.log('App Hide');
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
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>
|
||||
</view>
|
||||
</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>
|
||||
|
||||
<script setup>
|
||||
@@ -65,6 +74,9 @@ import {
|
||||
onReachBottom
|
||||
} from '@dcloudio/uni-app'
|
||||
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({
|
||||
noticeList: [], //公告列表
|
||||
|
||||
@@ -78,9 +90,18 @@ let datas = reactive({
|
||||
rule_content: '', // 首页弹窗内容
|
||||
|
||||
//ios是否在审核 1是审核
|
||||
isExamine: uni.getStorageSync('isExamine')
|
||||
isExamine: uni.getStorageSync('isExamine'),
|
||||
|
||||
version: {
|
||||
show: false,
|
||||
title: "",
|
||||
content: "",
|
||||
confirmText: "",
|
||||
cancelText: "",
|
||||
}
|
||||
})
|
||||
onLoad(() => {
|
||||
versionUpdate()
|
||||
getMsg()
|
||||
getrecomVideo()
|
||||
getPop()
|
||||
@@ -90,6 +111,79 @@ onReachBottom(() => {
|
||||
++datas.page
|
||||
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) {
|
||||
// if (url.indexOf('/pages/') !== -1 || url.indexOf('/me/') !== -1) {
|
||||
|
||||
@@ -29,72 +29,68 @@
|
||||
})
|
||||
|
||||
onLoad(() => {
|
||||
let u = navigator.userAgent;
|
||||
if ( u.indexOf('iPhone') > -1) {
|
||||
// #ifdef H5
|
||||
// #ifdef H5
|
||||
let u = window.navigator.userAgent;
|
||||
if ( uni.getSystemInfoSync().platform == 'ios') {
|
||||
data.confirmBtn = "跳转网页版首页"
|
||||
// #endif
|
||||
}
|
||||
|
||||
if ( u.toLowerCase().indexOf('micromessenger') !== -1) {
|
||||
data.isWeixin = true
|
||||
}
|
||||
// #endif
|
||||
})
|
||||
|
||||
|
||||
function download() {
|
||||
var u = navigator.userAgent;
|
||||
if (u.indexOf('Android') > -1 || u.indexOf('Adr') > -1) {
|
||||
function download() {
|
||||
console.log(uni.getSystemInfoSync().platform == 'android')
|
||||
if (uni.getSystemInfoSync().platform == 'android') {
|
||||
commonType(49).then(res => {
|
||||
if (res.code === 0) {
|
||||
if (res.data && res.data.value) {
|
||||
// #ifndef H5
|
||||
plus.runtime.openURL(res.data.value, function(res) {
|
||||
|
||||
});
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
uni.setClipboardData({
|
||||
data: res.data.value,
|
||||
success: r => {
|
||||
// this.$queue.showToast('邀请码复制成功');
|
||||
uni.showToast({
|
||||
title: '邀请码复制成功',
|
||||
icon: 'none',
|
||||
});
|
||||
}
|
||||
});
|
||||
window.location.href = res.data.value;
|
||||
// #endif
|
||||
}
|
||||
console.log(res)
|
||||
if (res && res.value) {
|
||||
// #ifndef H5
|
||||
plus.runtime.openURL(res.value, function(res) {
|
||||
|
||||
});
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
uni.setClipboardData({
|
||||
data: res.value,
|
||||
success: r => {
|
||||
// this.$queue.showToast('邀请码复制成功');
|
||||
uni.showToast({
|
||||
title: '邀请码复制成功',
|
||||
icon: 'none',
|
||||
});
|
||||
}
|
||||
});
|
||||
window.location.href = res.value;
|
||||
// #endif
|
||||
}
|
||||
});
|
||||
} else {
|
||||
commonType(50).then(res => {
|
||||
if (res.code === 0) {
|
||||
if (res.data && res.data.value) {
|
||||
// #ifndef H5
|
||||
plus.runtime.openURL(res.data.value, function(res) {
|
||||
|
||||
});
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
uni.setClipboardData({
|
||||
data: res.data.value,
|
||||
success: r => {
|
||||
uni.showToast({
|
||||
title: '邀请码复制成功',
|
||||
icon: 'none',
|
||||
});
|
||||
}
|
||||
});
|
||||
if (res && res.value) {
|
||||
// #ifndef H5
|
||||
plus.runtime.openURL(res.value, function(res) {
|
||||
|
||||
uni.switchTab({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
// window.location.href = res.data.value;
|
||||
// #endif
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
uni.setClipboardData({
|
||||
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,
|
||||
relation: "",
|
||||
invitation: '',
|
||||
registerCode: '',
|
||||
isregisterCode: '',
|
||||
qdCodeion: '', //渠道码
|
||||
checked: false,
|
||||
})
|
||||
@@ -72,7 +72,7 @@
|
||||
if (options.invitation ) { data.invitation = options.invitation }
|
||||
|
||||
let res = await commonType(3)
|
||||
data.registerCode = res.value
|
||||
data.isregisterCode = res.value
|
||||
})
|
||||
|
||||
/**
|
||||
@@ -171,7 +171,7 @@
|
||||
code,
|
||||
checked,
|
||||
invitation,
|
||||
registerCode,
|
||||
isregisterCode,
|
||||
qdCodeion
|
||||
} = data;
|
||||
if (!mobile) {
|
||||
@@ -206,7 +206,7 @@
|
||||
})
|
||||
return
|
||||
}
|
||||
if (invitation.length == 0 && registerCode == '是') {
|
||||
if (invitation.length == 0 && isregisterCode == '是') {
|
||||
uni.showToast({
|
||||
title: '请输入邀请码',
|
||||
icon: 'none',
|
||||
@@ -308,7 +308,7 @@
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 78rpx;
|
||||
bottom: 178rpx;
|
||||
|
||||
}
|
||||
.cuIcon::before{
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<!-- <view class="navs" style="width: 100%;height: 96rpx;"></view> -->
|
||||
<view class="nav">
|
||||
<up-icon name="arrow-left" color="#fff" size="20" @click="back"></up-icon>
|
||||
<view class="navTitle">申请提现</view>
|
||||
<view class="ruleBtn" @click="data.ruleShow = true">规则</view>
|
||||
</view>
|
||||
<up-navbar title="申请提现"
|
||||
@rightClick="data.ruleShow = true"
|
||||
bgColor="rgb(255, 117, 129)"
|
||||
leftIconColor="#FFF"
|
||||
:titleStyle ="{color:'#FFF'}" >
|
||||
<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="title">可提现总额</view>
|
||||
<view class="mayMoney">¥ {{ data.mayMoney }}</view>
|
||||
|
||||
@@ -49,11 +49,11 @@
|
||||
</view>
|
||||
<view @click="goNav('/pages/me/withdraw/moneyList?moneyType=2&viewType=1')">
|
||||
<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 @click="goNav('/pages/me/withdraw/moneyList?moneyType=1&viewType=1')">
|
||||
<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 class="u-m-t-16 u-p-b-32" style="text-align: center;color: #999;">好友签到成功可额外获得1元现金红包</view>
|
||||
|
||||
@@ -18,7 +18,9 @@
|
||||
<view>
|
||||
<view v-for="item in datas.signInList" :key="item.id"
|
||||
: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'">
|
||||
{{ item.signDay.substr(5, 8) }}
|
||||
</view>
|
||||
@@ -44,14 +46,15 @@
|
||||
:style="{ backgroundColor: item.buttonBgColor, color: item.buttonFontColor }"
|
||||
@tap="goNav(item)">
|
||||
{{ item.type == 1 ? item.buttonTitle : item.number ? `${item.discNumber}/${item.number}` : (
|
||||
item.discNumber <= 0 ? item.buttonTitle : `剩余${item.discNumber}次`) }} </view>
|
||||
<view v-else class="btn disabled">
|
||||
{{ item.type == 1 ? item.buttonTitle : item.number ? `${item.discNumber}/${item.number}`
|
||||
: (item.discNumber <= 0 ? item.buttonTitle : `剩余${item.discNumber}次`) }} <view
|
||||
v-if="item.buttonUnderContent && item.buttonUnderUrl" class=" tip"
|
||||
@tap="goNav(item, item.buttonUnderUrl)">
|
||||
{{ item.buttonUnderContent }}
|
||||
</view>
|
||||
item.discNumber <= 0 ? item.buttonTitle : `剩余${item.discNumber}次`) }}
|
||||
</view>
|
||||
<view v-else class="btn disabled">
|
||||
{{ item.type == 1 ? item.buttonTitle : item.number ? `${item.discNumber}/${item.number}`
|
||||
: (item.discNumber <= 0 ? item.buttonTitle : `剩余${item.discNumber}次`) }}
|
||||
<view v-if="item.buttonUnderContent && item.buttonUnderUrl" class=" tip"
|
||||
@tap="goNav(item, item.buttonUnderUrl)">
|
||||
{{ item.buttonUnderContent }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -66,350 +69,356 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
reactive,
|
||||
getCurrentInstance, nextTick
|
||||
} from "vue";
|
||||
import {
|
||||
onShow, onReachBottom
|
||||
} from '@dcloudio/uni-app'
|
||||
import { getUserSignData, selectTaskCenter, taskReceive } from '@/api/task/index.js'
|
||||
const currentInstance = getCurrentInstance()
|
||||
let datas = reactive({
|
||||
signDays: 0,
|
||||
signInList: [],
|
||||
list: [],
|
||||
// ios审核
|
||||
isExamine: uni.getStorageSync('isExamine'),
|
||||
urlCallback: {},
|
||||
adRewardedVideo: true,
|
||||
import {
|
||||
reactive,
|
||||
getCurrentInstance,
|
||||
nextTick
|
||||
} from "vue";
|
||||
import {
|
||||
onShow,
|
||||
onReachBottom
|
||||
} from '@dcloudio/uni-app'
|
||||
import {
|
||||
getUserSignData,
|
||||
selectTaskCenter,
|
||||
taskReceive
|
||||
} from '@/api/task/index.js'
|
||||
const currentInstance = getCurrentInstance()
|
||||
let datas = reactive({
|
||||
signDays: 0,
|
||||
signInList: [],
|
||||
list: [],
|
||||
// ios审核
|
||||
isExamine: uni.getStorageSync('isExamine'),
|
||||
urlCallback: {},
|
||||
adRewardedVideo: true,
|
||||
|
||||
})
|
||||
onShow(() => {
|
||||
getTaskdata()
|
||||
getsignIn()
|
||||
})
|
||||
onShow(() => {
|
||||
getTaskdata()
|
||||
getsignIn()
|
||||
|
||||
// nextTick(() => {
|
||||
// currentInstance.ctx.$refs.adRewardedVideo.load();
|
||||
// })
|
||||
})
|
||||
//广告播放成功回调
|
||||
async function onadclose(e) {
|
||||
const detail = e.detail
|
||||
if (detail && detail.isEnded) {
|
||||
// 正常播放结束
|
||||
// /sqx_fast/app/ad/state
|
||||
let res = await this.$Request.getT('app/ad/state', {
|
||||
extraKey: this.urlCallback.extra
|
||||
})
|
||||
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 })
|
||||
// nextTick(() => {
|
||||
// currentInstance.ctx.$refs.adRewardedVideo.load();
|
||||
// })
|
||||
})
|
||||
//广告播放成功回调
|
||||
async function onadclose(e) {
|
||||
const detail = e.detail
|
||||
if (detail && detail.isEnded) {
|
||||
// 正常播放结束
|
||||
// /sqx_fast/app/ad/state
|
||||
let res = await this.$Request.getT('app/ad/state', {
|
||||
extraKey: this.urlCallback.extra
|
||||
})
|
||||
this.$Request.getT('/app/common/type/921').then(res => {
|
||||
if (res.code == 0) {
|
||||
console.log(res)
|
||||
uni.showToast({
|
||||
title: res.id == 15 ? '签到成功' : '领取成功',
|
||||
title: '获得' + res.data.value + '分钟免费时长',
|
||||
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 {
|
||||
// 播放中途退出
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
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)
|
||||
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'
|
||||
}
|
||||
})
|
||||
datas.list = arrData
|
||||
} else {
|
||||
datas.list = res
|
||||
}
|
||||
}
|
||||
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) {
|
||||
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>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.u-absolute {
|
||||
position: absolute;
|
||||
}
|
||||
.u-absolute {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.task_bg {
|
||||
width: 100% !important;
|
||||
height: 494rpx !important;
|
||||
}
|
||||
.task_bg {
|
||||
width: 100% !important;
|
||||
height: 494rpx !important;
|
||||
}
|
||||
|
||||
.icon {
|
||||
position: relative;
|
||||
padding: 32rpx;
|
||||
|
||||
.icon_title {
|
||||
color: #000000;
|
||||
margin-left: 28rpx;
|
||||
top: -20rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
.icon {
|
||||
position: relative;
|
||||
}
|
||||
padding: 32rpx;
|
||||
|
||||
.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: 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 {
|
||||
.icon_title {
|
||||
color: #000000;
|
||||
margin-left: 28rpx;
|
||||
top: -20rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
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 {
|
||||
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;
|
||||
z-index: 9999;
|
||||
position: absolute;
|
||||
top: 110rpx;
|
||||
left: 14rpx;
|
||||
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;
|
||||
|
||||
>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 {
|
||||
border-radius: 16rpx;
|
||||
top: -115rpx;
|
||||
padding: 28rpx;
|
||||
background-color: #ffffff;
|
||||
color: #666666;
|
||||
margin-left: 32rpx;
|
||||
margin-right: 32rpx;
|
||||
position: relative;
|
||||
border-radius: 16rpx;
|
||||
top: -115rpx;
|
||||
padding: 28rpx;
|
||||
.content {
|
||||
border-radius: 16rpx;
|
||||
top: -115rpx;
|
||||
padding: 28rpx;
|
||||
background-color: #ffffff;
|
||||
color: #666666;
|
||||
margin-left: 32rpx;
|
||||
margin-right: 32rpx;
|
||||
position: relative;
|
||||
border-radius: 16rpx;
|
||||
top: -115rpx;
|
||||
padding: 28rpx;
|
||||
|
||||
.cell {
|
||||
padding: 32rpx 0;
|
||||
border-bottom: 2rpx solid #EBEBEB;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.cell {
|
||||
padding: 32rpx 0;
|
||||
border-bottom: 2rpx solid #EBEBEB;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.cell_left {
|
||||
flex-direction: column;
|
||||
margin-top: 10rpx;
|
||||
.cell_left {
|
||||
flex-direction: column;
|
||||
margin-top: 10rpx;
|
||||
|
||||
.cell_title {
|
||||
margin-bottom: 12rpx;
|
||||
color: #333;
|
||||
display: flex;
|
||||
|
||||
.title {
|
||||
.cell_title {
|
||||
margin-bottom: 12rpx;
|
||||
color: #333;
|
||||
display: flex;
|
||||
flex-shrink: 0;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
|
||||
.title {
|
||||
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 {
|
||||
width: 48rpx !important;
|
||||
height: 34rpx !important;
|
||||
margin-left: 16rpx;
|
||||
}
|
||||
|
||||
.tip {
|
||||
margin-left: 22rpx;
|
||||
color: #FC5B67;
|
||||
.subhead {
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.subhead {
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
.cell_right {
|
||||
flex-direction: column;
|
||||
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 {
|
||||
flex-direction: column;
|
||||
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:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.cell:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
Reference in New Issue
Block a user