Merge branch 'test' of https://e.coding.net/g-cphe0354/duanju/new_app into ymf
This commit is contained in:
3
App.vue
3
App.vue
@@ -2,7 +2,8 @@
|
||||
export default {
|
||||
onLaunch: function() {
|
||||
console.log('App Launch');
|
||||
|
||||
uni.setStorageSync('adRewardedNum',0)
|
||||
|
||||
},
|
||||
onShow: function() {
|
||||
},
|
||||
|
||||
15
http/http.js
15
http/http.js
@@ -92,7 +92,7 @@ function commonsProcess(showLoading, httpReqCallback, isreturm) {
|
||||
infoBox.showToast(data.message);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// 加密数据
|
||||
if (!bodyData.data && bodyData.encryptData) {
|
||||
return Promise.resolve({
|
||||
@@ -100,9 +100,18 @@ function commonsProcess(showLoading, httpReqCallback, isreturm) {
|
||||
code: bodyData.code,
|
||||
});
|
||||
}
|
||||
|
||||
let result=null;
|
||||
if(bodyData.hasOwnProperty('data')){
|
||||
result=bodyData.data
|
||||
}
|
||||
else if(bodyData.hasOwnProperty('page')){
|
||||
result=bodyData.page
|
||||
}
|
||||
else{
|
||||
result=bodyData
|
||||
}
|
||||
// 构造请求成功的响应数据
|
||||
return Promise.resolve(bodyData.data || bodyData.page || bodyData);
|
||||
return Promise.resolve(result);
|
||||
})
|
||||
.catch((res) => {
|
||||
|
||||
|
||||
@@ -1,20 +1,23 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="nav" style="width: 100%;height: 96rpx;"></view>
|
||||
<view class="bg" >
|
||||
<image src="../../static/default/i_bg.png" style="width: 100%;height:100%" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="wrapper u-relative" style="padding-top: 48rpx;box-sizing: border-box;">
|
||||
<view class="nav" style="width: 100%;height: 96rpx;"></view>
|
||||
<view class="input-content">
|
||||
<view style="font-size: 58rpx;font-weight: bold;color: #333;margin-bottom: 48rpx;">重置密码</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">手机号</view>
|
||||
<input class="input" type="number" :value="data.mobile" placeholder="请输入手机号" maxlength="11" data-key="mobile"
|
||||
@input="inputChange" />
|
||||
<view class="input" style="padding-left: 20rpx;">
|
||||
<input class="input" type="number" :value="data.mobile" placeholder="请输入手机号" maxlength="11" data-key="mobile"
|
||||
@input="inputChange" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<text class="title">验证码</text>
|
||||
<view class="input flex">
|
||||
<view class="input flex" style="padding-left: 20rpx;padding-right: 20rpx;">
|
||||
<input type="number" :value="data.code" placeholder="请输入验证码" maxlength="6" data-key="code"
|
||||
@input="inputChange" @confirm="reset" />
|
||||
<button class="send-msg" @click="sendMsg" :disabled="data.sending">{{ data.sendTime }}</button>
|
||||
@@ -23,8 +26,11 @@
|
||||
|
||||
<view class="cu-form-group">
|
||||
<text class="title">设置密码</text>
|
||||
<input class="input" type="password" :value="data.password" placeholder="请设置新密码" placeholder-class="input-empty"
|
||||
maxlength="20" minlength="6" data-key="password" @input="inputChange" @confirm="reset" />
|
||||
<view class="input" style="padding-left: 20rpx;">
|
||||
<input class="input" type="password" :value="data.password" placeholder="请设置新密码" placeholder-class="input-empty"
|
||||
maxlength="20" minlength="6" data-key="password" @input="inputChange" @confirm="reset" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<button class="confirm-btn" @click="reset">立即重置</button>
|
||||
</view>
|
||||
@@ -188,10 +194,10 @@
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #333333;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 78rpx;
|
||||
// position: absolute;
|
||||
// left: 0;
|
||||
// right: 0;
|
||||
// bottom: 78rpx;
|
||||
|
||||
}
|
||||
.cuIcon::before{
|
||||
@@ -254,14 +260,20 @@
|
||||
}
|
||||
.input{
|
||||
width: 100%;
|
||||
height: 84rpx;
|
||||
line-height: 84rpx;
|
||||
// height: 84rpx;
|
||||
// line-height: 84rpx;
|
||||
background-color: #fff;
|
||||
align-items: center;
|
||||
padding: 22rpx 32rpx 22rpx 24rpx;
|
||||
// padding: 22rpx 32rpx 22rpx 24rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
input{
|
||||
height: 84rpx!important;
|
||||
}
|
||||
v-deep .uni-input-input{
|
||||
height: 84rpx!important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,22 +1,24 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="nav" style="width: 100%;height: 96rpx;"></view>
|
||||
<view class="bg" >
|
||||
<image src="../../static/default/i_bg.png" style="width: 100%;height:100%" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="wrapper">
|
||||
<view class="nav" style="width: 100%;height: 96rpx;"></view>
|
||||
<view class="input-content">
|
||||
<view style="font-size: 58rpx;font-weight: bold;color: #333;margin-bottom: 48rpx;">登录</view>
|
||||
|
||||
<view class="cu-form-group">
|
||||
<view class="title">手机号</view>
|
||||
<input class="input" type="number" :value="data.mobile" placeholder="请输入手机号" maxlength="11" data-key="mobile"
|
||||
@input="inputChange" />
|
||||
<view class="input" style="padding-left: 20rpx;">
|
||||
<input class="input" type="number" :value="data.mobile" placeholder="请输入手机号" maxlength="11" data-key="mobile"
|
||||
@input="inputChange" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="cu-form-group">
|
||||
<text class="title">密码</text>
|
||||
<view class="input flex" style="padding-left: 0;">
|
||||
<view class="input flex" style="padding-left: 20rpx;padding-right: 20rpx;">
|
||||
<input class="input" type="password" :value="data.password" placeholder="请输入密码" placeholder-class="input-empty"
|
||||
maxlength="20" minlength="6" data-key="password" @input="inputChange" @confirm="toLogin" />
|
||||
<text class="send-msg" @click="linkTo('/pages/login/forgetPwd')" style="flex-shrink: 0;">忘记密码</text>
|
||||
@@ -222,11 +224,17 @@
|
||||
}
|
||||
.cu-form-group .input{
|
||||
width: 100%!important;
|
||||
height: 84rpx;
|
||||
line-height: 84rpx;
|
||||
// height: 84rpx;
|
||||
// line-height: 84rpx;
|
||||
background-color: #fff;
|
||||
align-items: center;
|
||||
padding: 22rpx 32rpx 22rpx 24rpx;
|
||||
// padding: 22rpx 32rpx 22rpx 24rpx!important;
|
||||
input{
|
||||
height: 84rpx!important;
|
||||
}
|
||||
v-deep .uni-input-input{
|
||||
height: 84rpx!important;
|
||||
}
|
||||
}
|
||||
.flex{
|
||||
display: flex;
|
||||
|
||||
@@ -1,21 +1,24 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="nav" style="width: 100%;height: 96rpx;"></view>
|
||||
<view class="bg" >
|
||||
<image src="../../static/default/i_bg.png" style="width: 100%;height:100%" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="wrapper u-relative" style="padding-top: 48rpx;box-sizing: border-box;">
|
||||
<view class="nav" style="width: 100%;height: 96rpx;"></view>
|
||||
<view class="input-content">
|
||||
<view style="font-size: 58rpx;font-weight: bold;color: #333;margin-bottom: 48rpx;">注册</view>
|
||||
|
||||
<view class="cu-form-group">
|
||||
<view class="title">手机号</view>
|
||||
<input class="input" type="number" :value="data.mobile" placeholder="请输入手机号" maxlength="11" data-key="mobile"
|
||||
@input="inputChange" />
|
||||
<view class="input" style="padding-left: 20rpx;">
|
||||
<input class="input" type="number" :value="data.mobile" placeholder="请输入手机号" maxlength="11" data-key="mobile"
|
||||
@input="inputChange" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<text class="title">验证码</text>
|
||||
<view class="input flex">
|
||||
<view class="input flex" style="padding-left: 20rpx;padding-right: 20rpx;">
|
||||
<input type="number" :value="data.code" placeholder="请输入验证码" maxlength="6" data-key="code"
|
||||
@input="inputChange" @confirm="toRegister" />
|
||||
<button class="send-msg" @click="sendMsg" :disabled="data.sending">{{ data.sendTime }}</button>
|
||||
@@ -24,8 +27,11 @@
|
||||
|
||||
<view class="cu-form-group">
|
||||
<text class="title">设置密码</text>
|
||||
<input class="input" type="password" :value="data.password" placeholder="请设置新密码" placeholder-class="input-empty"
|
||||
maxlength="20" minlength="6" data-key="password" @input="inputChange" @confirm="toRegister" />
|
||||
<view class="input" style="padding-left: 20rpx;">
|
||||
<input class="input" type="password" :value="data.password" placeholder="请设置新密码" placeholder-class="input-empty"
|
||||
maxlength="20" minlength="6" data-key="password" @input="inputChange" @confirm="toRegister" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<button class="confirm-btn" @click="toRegister">注册</button>
|
||||
<button class="confirm-btn" @click="toLogin">登录</button>
|
||||
@@ -270,7 +276,7 @@
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" >
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
background: #ffffff;
|
||||
}
|
||||
@@ -299,10 +305,7 @@
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #333333;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 178rpx;
|
||||
margin-top: 50rpx;
|
||||
|
||||
}
|
||||
.cuIcon::before{
|
||||
@@ -324,12 +327,15 @@
|
||||
color: #EC6F48;
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.send-msg::after{
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
|
||||
.container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
@@ -363,14 +369,20 @@
|
||||
}
|
||||
.input{
|
||||
width: 100%;
|
||||
height: 84rpx;
|
||||
line-height: 84rpx;
|
||||
// height: 84rpx;
|
||||
// line-height: 84rpx;
|
||||
background-color: #fff;
|
||||
align-items: center;
|
||||
padding: 22rpx 32rpx 22rpx 24rpx;
|
||||
// padding: 22rpx 32rpx 22rpx 24rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
input{
|
||||
height: 84rpx!important;
|
||||
}
|
||||
v-deep .uni-input-input{
|
||||
height: 84rpx!important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -311,10 +311,10 @@
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #333333;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 178rpx;
|
||||
// position: absolute;
|
||||
// left: 0;
|
||||
// right: 0;
|
||||
// bottom: 178rpx;
|
||||
.cuIcon::before{
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
|
||||
@@ -111,21 +111,19 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive } from 'vue';
|
||||
import { onLoad,onShow, onPullDownRefresh } from '@dcloudio/uni-app';
|
||||
import { onLoad, onShow, onPullDownRefresh } from '@dcloudio/uni-app';
|
||||
import { selectByUserId, collectVideoSummary, selectUserMoney } from '@/api/me/me.js';
|
||||
import { linkTo } from '@/utils/app.js';
|
||||
import {
|
||||
useCommonStore
|
||||
} from '@/store/common.js'
|
||||
const $common = useCommonStore()
|
||||
import { useCommonStore } from '@/store/common.js';
|
||||
const $common = useCommonStore();
|
||||
const userInfo = ref({});
|
||||
|
||||
// 获取最近的三条观看历史
|
||||
const recordThree = ref([]);
|
||||
onShow(()=>{
|
||||
onShow(() => {
|
||||
// 判断ios是否审核
|
||||
$common.init()
|
||||
})
|
||||
$common.init();
|
||||
});
|
||||
async function selectByUserIdAjax() {
|
||||
try {
|
||||
const res = await selectByUserId({ page: 1, limit: 3, classify: 3 });
|
||||
@@ -179,7 +177,7 @@ onPullDownRefresh(async () => {
|
||||
}, 500);
|
||||
});
|
||||
|
||||
onLoad(() => {
|
||||
onShow(() => {
|
||||
selectByUserIdAjax();
|
||||
collectVideoSummaryAjax();
|
||||
selectUserMoneyAjax();
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
import { linkTo } from '@/utils/app.js';
|
||||
|
||||
let data = reactive({
|
||||
ruleShow: true,
|
||||
ruleShow: false,
|
||||
rule_title: "",
|
||||
rule_content: "",
|
||||
money: '',
|
||||
@@ -114,6 +114,7 @@
|
||||
urlCallback: {},
|
||||
adpid: null,
|
||||
adRewardedShow: false,
|
||||
adRewardedNum: 0,
|
||||
adRewardedVideoloadNum: 0,
|
||||
isWithdraw: false,
|
||||
userInfo: null,
|
||||
@@ -131,6 +132,7 @@
|
||||
// }
|
||||
getExtractFei();
|
||||
getMoneyDetail();
|
||||
getCanCash()
|
||||
|
||||
})
|
||||
onShow(() => {
|
||||
@@ -147,7 +149,6 @@
|
||||
data.adRewardedVideoloadNum = 0
|
||||
adRewardedw.value.load();
|
||||
})
|
||||
getCanCash()
|
||||
})
|
||||
onReachBottom(() => {
|
||||
if (data.page * data.limit < data.totalCount) {
|
||||
@@ -184,7 +185,6 @@
|
||||
function ruleConfirm() {
|
||||
data.ruleShow = false
|
||||
data.ruleIndex++
|
||||
console.log(data.ruleIndex >= data.ruleList.length)
|
||||
if( data.ruleIndex >= data.ruleList.length) {
|
||||
data.ruleIndex = 0
|
||||
return
|
||||
@@ -208,7 +208,14 @@
|
||||
*/
|
||||
async function getCanCash() {
|
||||
canCash().then(res => {
|
||||
data.isWithdraw = !res;
|
||||
data.isWithdraw = res;
|
||||
console.log(res)
|
||||
if( uni.getStorageSync('adRewardedNum') >= 3 ){
|
||||
data.isWithdraw = true;
|
||||
// uni.setStorageSync('adRewardedNum',0)
|
||||
} else {
|
||||
uni.setStorageSync('adRewardedNum',((uni.getStorageSync('adRewardedNum')||0)+1))
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
@@ -218,6 +225,7 @@
|
||||
*/
|
||||
function onadload(e) {
|
||||
data.adRewardedShow = true;
|
||||
uni.setStorageSync('adRewardedNum',0)
|
||||
console.log('广告数据加载成功');
|
||||
}
|
||||
|
||||
@@ -244,9 +252,12 @@
|
||||
const detail = e.detail
|
||||
if (detail && detail.isEnded) {
|
||||
// 正常播放结束
|
||||
console.log(data.urlCallback.extra)
|
||||
let res = await state({
|
||||
extraKey: data.urlCallback.extra
|
||||
})
|
||||
console.log(res)
|
||||
uni.setStorageSync('adRewardedNum',0)
|
||||
getCanCash()
|
||||
} else {
|
||||
// 播放中途退出
|
||||
@@ -341,17 +352,22 @@
|
||||
}
|
||||
|
||||
function getMoney() {
|
||||
let data =
|
||||
uni.showLoading({
|
||||
title: '提现中'
|
||||
});
|
||||
withdraw({
|
||||
amount: data.money
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
data.money = ''
|
||||
uni.setStorageSync('adRewardedNum',0)
|
||||
setTimeout(function() {
|
||||
getcashMoney()
|
||||
}, 1500)
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}).catch(res =>{
|
||||
if (res.code == 9991) {
|
||||
uni.showToast({
|
||||
@@ -361,6 +377,7 @@
|
||||
setTimeout(function() {
|
||||
linkTo('/pages/me/withdraw/alipay')
|
||||
}, 1500)
|
||||
}else{
|
||||
|
||||
}
|
||||
})
|
||||
@@ -398,6 +415,7 @@
|
||||
|
||||
success: (e) => {
|
||||
if (e.confirm) {
|
||||
console.log(data.money)
|
||||
getMoney();
|
||||
getMoneyDetail();
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
getInviter()
|
||||
queryInviter()
|
||||
getBgImg()
|
||||
data.erweima = config.baseUrl + `/pages/login/register/?invitation=${data.invitationCode}&qdCode=${uni.getStorageSync('userInfo').qdCode}`
|
||||
data.erweima = config.shareUrl + `/pages/login/register/?invitation=${data.invitationCode}&qdCode=${uni.getStorageSync('userInfo').qdCode}`
|
||||
console.log(data.erweima)
|
||||
})
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<image src="@/static/task/renwubg.png" mode=""></image>
|
||||
<view>已连续签到 <text class="num">{{ datas.signDays }}</text> 天</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="contentTopTwo">
|
||||
<view v-for="item in datas.signInList" :key="item.id"
|
||||
:style="item.status == 1 ? 'color:#EFA765' : 'color:#999'">
|
||||
<text class="" style="font-size: 28rpx;">
|
||||
@@ -295,12 +295,12 @@
|
||||
url: urls
|
||||
})
|
||||
} else {
|
||||
console.log(item, '林区')
|
||||
if (item.jumpType == 0) {
|
||||
if (item.buttonTitle.indexOf("领取") != -1) {
|
||||
let res = await taskReceive({
|
||||
id: item.id
|
||||
})
|
||||
console.log(res,'调试')
|
||||
if (res.code == 0) {
|
||||
uni.showToast({
|
||||
title: res.id == 15 ? '签到成功' : '领取成功',
|
||||
@@ -355,21 +355,45 @@
|
||||
}
|
||||
} 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'
|
||||
|
||||
uni.navigateTo({
|
||||
url: buttonUrl
|
||||
})
|
||||
}
|
||||
if (item.title && item.title.indexOf('每月打卡奖励1') != -1) {
|
||||
buttonUrl = item.buttonUrl + '?source=3'
|
||||
|
||||
uni.navigateTo({
|
||||
url: buttonUrl
|
||||
})
|
||||
}
|
||||
if (item.title && item.title.indexOf('每月打卡奖励2') != -1) {
|
||||
buttonUrl =
|
||||
`${item.buttonUrl}?standard=${item.discNumber == null ? true : false}&taskId=${item.id}`
|
||||
|
||||
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.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
|
||||
// buttonUrl =
|
||||
// `${item.buttonUrl}?standard=${item.discNumber == null ? true : false}&taskId=${item.id}`
|
||||
}
|
||||
|
||||
uni.navigateTo({
|
||||
url: buttonUrl
|
||||
})
|
||||
|
||||
} else if (item.jumpType == 3) {
|
||||
uni.switchTab({
|
||||
@@ -480,7 +504,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
>view:last-child {
|
||||
.contentTopTwo {
|
||||
margin-top: 100rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -490,8 +514,9 @@
|
||||
position: relative;
|
||||
|
||||
>view {
|
||||
display: flex;
|
||||
margin-top: 20rpx;
|
||||
width: 86rpx;
|
||||
width: 100%;
|
||||
height: 94rpx;
|
||||
background: linear-gradient(180deg, #FFF7E3 0%, #FFFFFF 100%);
|
||||
border-radius: 14rpx 14rpx 0rpx 0rpx;
|
||||
@@ -506,6 +531,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.content {
|
||||
|
||||
Reference in New Issue
Block a user