This commit is contained in:
duan 2025-01-17 10:17:26 +08:00
commit 503f1d4594
9 changed files with 103 additions and 56 deletions

View File

@ -2,7 +2,7 @@
"version" : "1.0", "version" : "1.0",
"configurations" : [ "configurations" : [
{ {
"playground" : "standard", "playground" : "custom",
"type" : "uni-app:app-android" "type" : "uni-app:app-android"
}, },
{ {

View File

@ -92,7 +92,7 @@ function commonsProcess(showLoading, httpReqCallback, isreturm) {
infoBox.showToast(data.message); infoBox.showToast(data.message);
return; return;
} }
// 加密数据 // 加密数据
if (!bodyData.data && bodyData.encryptData) { if (!bodyData.data && bodyData.encryptData) {
return Promise.resolve({ return Promise.resolve({
@ -100,9 +100,18 @@ function commonsProcess(showLoading, httpReqCallback, isreturm) {
code: bodyData.code, 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) => { .catch((res) => {

View File

@ -1,20 +1,23 @@
<template> <template>
<view class="container"> <view class="container">
<view class="nav" style="width: 100%;height: 96rpx;"></view>
<view class="bg" > <view class="bg" >
<image src="../../static/default/i_bg.png" style="width: 100%;height:100%" mode="aspectFill"></image> <image src="../../static/default/i_bg.png" style="width: 100%;height:100%" mode="aspectFill"></image>
</view> </view>
<view class="wrapper u-relative" style="padding-top: 48rpx;box-sizing: border-box;"> <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 class="input-content">
<view style="font-size: 58rpx;font-weight: bold;color: #333;margin-bottom: 48rpx;">重置密码</view> <view style="font-size: 58rpx;font-weight: bold;color: #333;margin-bottom: 48rpx;">重置密码</view>
<view class="cu-form-group"> <view class="cu-form-group">
<view class="title">手机号</view> <view class="title">手机号</view>
<input class="input" type="number" :value="data.mobile" placeholder="请输入手机号" maxlength="11" data-key="mobile" <view class="input" style="padding-left: 20rpx;">
@input="inputChange" /> <input class="input" type="number" :value="data.mobile" placeholder="请输入手机号" maxlength="11" data-key="mobile"
@input="inputChange" />
</view>
</view> </view>
<view class="cu-form-group"> <view class="cu-form-group">
<text class="title">验证码</text> <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 type="number" :value="data.code" placeholder="请输入验证码" maxlength="6" data-key="code"
@input="inputChange" @confirm="reset" /> @input="inputChange" @confirm="reset" />
<button class="send-msg" @click="sendMsg" :disabled="data.sending">{{ data.sendTime }}</button> <button class="send-msg" @click="sendMsg" :disabled="data.sending">{{ data.sendTime }}</button>
@ -23,8 +26,11 @@
<view class="cu-form-group"> <view class="cu-form-group">
<text class="title">设置密码</text> <text class="title">设置密码</text>
<input class="input" type="password" :value="data.password" placeholder="请设置新密码" placeholder-class="input-empty" <view class="input" style="padding-left: 20rpx;">
maxlength="20" minlength="6" data-key="password" @input="inputChange" @confirm="reset" /> <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> </view>
<button class="confirm-btn" @click="reset">立即重置</button> <button class="confirm-btn" @click="reset">立即重置</button>
</view> </view>
@ -188,10 +194,10 @@
font-weight: 400; font-weight: 400;
font-size: 24rpx; font-size: 24rpx;
color: #333333; color: #333333;
position: absolute; // position: absolute;
left: 0; // left: 0;
right: 0; // right: 0;
bottom: 78rpx; // bottom: 78rpx;
} }
.cuIcon::before{ .cuIcon::before{
@ -254,14 +260,20 @@
} }
.input{ .input{
width: 100%; width: 100%;
height: 84rpx; // height: 84rpx;
line-height: 84rpx; // line-height: 84rpx;
background-color: #fff; background-color: #fff;
align-items: center; align-items: center;
padding: 22rpx 32rpx 22rpx 24rpx; // padding: 22rpx 32rpx 22rpx 24rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
input{
height: 84rpx!important;
}
v-deep .uni-input-input{
height: 84rpx!important;
}
} }
} }

View File

@ -1,22 +1,24 @@
<template> <template>
<view class="container"> <view class="container">
<view class="nav" style="width: 100%;height: 96rpx;"></view>
<view class="bg" > <view class="bg" >
<image src="../../static/default/i_bg.png" style="width: 100%;height:100%" mode="aspectFill"></image> <image src="../../static/default/i_bg.png" style="width: 100%;height:100%" mode="aspectFill"></image>
</view> </view>
<view class="wrapper"> <view class="wrapper">
<view class="nav" style="width: 100%;height: 96rpx;"></view>
<view class="input-content"> <view class="input-content">
<view style="font-size: 58rpx;font-weight: bold;color: #333;margin-bottom: 48rpx;">登录</view> <view style="font-size: 58rpx;font-weight: bold;color: #333;margin-bottom: 48rpx;">登录</view>
<view class="cu-form-group"> <view class="cu-form-group">
<view class="title">手机号</view> <view class="title">手机号</view>
<input class="input" type="number" :value="data.mobile" placeholder="请输入手机号" maxlength="11" data-key="mobile" <view class="input" style="padding-left: 20rpx;">
@input="inputChange" /> <input class="input" type="number" :value="data.mobile" placeholder="请输入手机号" maxlength="11" data-key="mobile"
@input="inputChange" />
</view>
</view> </view>
<view class="cu-form-group"> <view class="cu-form-group">
<text class="title">密码</text> <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" <input class="input" type="password" :value="data.password" placeholder="请输入密码" placeholder-class="input-empty"
maxlength="20" minlength="6" data-key="password" @input="inputChange" @confirm="toLogin" /> 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> <text class="send-msg" @click="linkTo('/pages/login/forgetPwd')" style="flex-shrink: 0;">忘记密码</text>
@ -222,11 +224,17 @@
} }
.cu-form-group .input{ .cu-form-group .input{
width: 100%!important; width: 100%!important;
height: 84rpx; // height: 84rpx;
line-height: 84rpx; // line-height: 84rpx;
background-color: #fff; background-color: #fff;
align-items: center; 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{ .flex{
display: flex; display: flex;

View File

@ -1,21 +1,24 @@
<template> <template>
<view class="container"> <view class="container">
<view class="nav" style="width: 100%;height: 96rpx;"></view>
<view class="bg" > <view class="bg" >
<image src="../../static/default/i_bg.png" style="width: 100%;height:100%" mode="aspectFill"></image> <image src="../../static/default/i_bg.png" style="width: 100%;height:100%" mode="aspectFill"></image>
</view> </view>
<view class="wrapper u-relative" style="padding-top: 48rpx;box-sizing: border-box;"> <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 class="input-content">
<view style="font-size: 58rpx;font-weight: bold;color: #333;margin-bottom: 48rpx;">注册</view> <view style="font-size: 58rpx;font-weight: bold;color: #333;margin-bottom: 48rpx;">注册</view>
<view class="cu-form-group"> <view class="cu-form-group">
<view class="title">手机号</view> <view class="title">手机号</view>
<input class="input" type="number" :value="data.mobile" placeholder="请输入手机号" maxlength="11" data-key="mobile" <view class="input" style="padding-left: 20rpx;">
@input="inputChange" /> <input class="input" type="number" :value="data.mobile" placeholder="请输入手机号" maxlength="11" data-key="mobile"
@input="inputChange" />
</view>
</view> </view>
<view class="cu-form-group"> <view class="cu-form-group">
<text class="title">验证码</text> <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 type="number" :value="data.code" placeholder="请输入验证码" maxlength="6" data-key="code"
@input="inputChange" @confirm="toRegister" /> @input="inputChange" @confirm="toRegister" />
<button class="send-msg" @click="sendMsg" :disabled="data.sending">{{ data.sendTime }}</button> <button class="send-msg" @click="sendMsg" :disabled="data.sending">{{ data.sendTime }}</button>
@ -24,8 +27,11 @@
<view class="cu-form-group"> <view class="cu-form-group">
<text class="title">设置密码</text> <text class="title">设置密码</text>
<input class="input" type="password" :value="data.password" placeholder="请设置新密码" placeholder-class="input-empty" <view class="input" style="padding-left: 20rpx;">
maxlength="20" minlength="6" data-key="password" @input="inputChange" @confirm="toRegister" /> <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> </view>
<button class="confirm-btn" @click="toRegister">注册</button> <button class="confirm-btn" @click="toRegister">注册</button>
<button class="confirm-btn" @click="toLogin">登录</button> <button class="confirm-btn" @click="toLogin">登录</button>
@ -270,7 +276,7 @@
</script> </script>
<style lang="scss" > <style lang="scss" scoped>
page { page {
background: #ffffff; background: #ffffff;
} }
@ -299,10 +305,7 @@
font-weight: 400; font-weight: 400;
font-size: 24rpx; font-size: 24rpx;
color: #333333; color: #333333;
position: absolute; margin-top: 50rpx;
left: 0;
right: 0;
bottom: 178rpx;
} }
.cuIcon::before{ .cuIcon::before{
@ -324,12 +327,15 @@
color: #EC6F48; color: #EC6F48;
border: none; border: none;
background-color: transparent; background-color: transparent;
margin: 0;
padding: 0;
} }
.send-msg::after{ .send-msg::after{
border: none; border: none;
background-color: transparent; background-color: transparent;
} }
.container { .container {
position: relative; position: relative;
width: 100%; width: 100%;
@ -363,14 +369,20 @@
} }
.input{ .input{
width: 100%; width: 100%;
height: 84rpx; // height: 84rpx;
line-height: 84rpx; // line-height: 84rpx;
background-color: #fff; background-color: #fff;
align-items: center; align-items: center;
padding: 22rpx 32rpx 22rpx 24rpx; // padding: 22rpx 32rpx 22rpx 24rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
input{
height: 84rpx!important;
}
v-deep .uni-input-input{
height: 84rpx!important;
}
} }
} }

View File

@ -311,10 +311,10 @@
font-weight: 400; font-weight: 400;
font-size: 24rpx; font-size: 24rpx;
color: #333333; color: #333333;
position: absolute; // position: absolute;
left: 0; // left: 0;
right: 0; // right: 0;
bottom: 178rpx; // bottom: 178rpx;
.cuIcon::before{ .cuIcon::before{
width: 30rpx; width: 30rpx;
height: 30rpx; height: 30rpx;

View File

@ -111,21 +111,19 @@
<script setup> <script setup>
import { ref, reactive } from 'vue'; 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 { selectByUserId, collectVideoSummary, selectUserMoney } from '@/api/me/me.js';
import { linkTo } from '@/utils/app.js'; import { linkTo } from '@/utils/app.js';
import { import { useCommonStore } from '@/store/common.js';
useCommonStore const $common = useCommonStore();
} from '@/store/common.js'
const $common = useCommonStore()
const userInfo = ref({}); const userInfo = ref({});
// //
const recordThree = ref([]); const recordThree = ref([]);
onShow(()=>{ onShow(() => {
// ios // ios
$common.init() $common.init();
}) });
async function selectByUserIdAjax() { async function selectByUserIdAjax() {
try { try {
const res = await selectByUserId({ page: 1, limit: 3, classify: 3 }); const res = await selectByUserId({ page: 1, limit: 3, classify: 3 });
@ -179,7 +177,7 @@ onPullDownRefresh(async () => {
}, 500); }, 500);
}); });
onLoad(() => { onShow(() => {
selectByUserIdAjax(); selectByUserIdAjax();
collectVideoSummaryAjax(); collectVideoSummaryAjax();
selectUserMoneyAjax(); selectUserMoneyAjax();

View File

@ -101,7 +101,7 @@
import { linkTo } from '@/utils/app.js'; import { linkTo } from '@/utils/app.js';
let data = reactive({ let data = reactive({
ruleShow: true, ruleShow: false,
rule_title: "", rule_title: "",
rule_content: "", rule_content: "",
money: '', money: '',
@ -185,7 +185,6 @@
function ruleConfirm() { function ruleConfirm() {
data.ruleShow = false data.ruleShow = false
data.ruleIndex++ data.ruleIndex++
console.log(data.ruleIndex >= data.ruleList.length)
if( data.ruleIndex >= data.ruleList.length) { if( data.ruleIndex >= data.ruleList.length) {
data.ruleIndex = 0 data.ruleIndex = 0
return return
@ -209,7 +208,8 @@
*/ */
async function getCanCash() { async function getCanCash() {
canCash().then(res => { canCash().then(res => {
data.isWithdraw = !res; data.isWithdraw = res;
console.log(res)
if( uni.getStorageSync('adRewardedNum') >= 3 ){ if( uni.getStorageSync('adRewardedNum') >= 3 ){
data.isWithdraw = true; data.isWithdraw = true;
// uni.setStorageSync('adRewardedNum',0) // uni.setStorageSync('adRewardedNum',0)
@ -252,9 +252,11 @@
const detail = e.detail const detail = e.detail
if (detail && detail.isEnded) { if (detail && detail.isEnded) {
// //
console.log(data.urlCallback.extra)
let res = await state({ let res = await state({
extraKey: data.urlCallback.extra extraKey: data.urlCallback.extra
}) })
console.log(res)
uni.setStorageSync('adRewardedNum',0) uni.setStorageSync('adRewardedNum',0)
getCanCash() getCanCash()
} else { } else {
@ -350,18 +352,22 @@
} }
function getMoney() { function getMoney() {
let data =
uni.showLoading({ uni.showLoading({
title: '提现中' title: '提现中'
}); });
withdraw({ withdraw({
amount: data.money amount: data.money
}).then(res => { }).then(res => {
console.log(res)
data.money = '' data.money = ''
uni.setStorageSync('adRewardedNum',0) uni.setStorageSync('adRewardedNum',0)
setTimeout(function() { setTimeout(function() {
getcashMoney() getcashMoney()
}, 1500) }, 1500)
uni.showToast({
title: res.msg,
icon: 'none'
})
}).catch(res =>{ }).catch(res =>{
if (res.code == 9991) { if (res.code == 9991) {
uni.showToast({ uni.showToast({
@ -371,6 +377,7 @@
setTimeout(function() { setTimeout(function() {
linkTo('/pages/me/withdraw/alipay') linkTo('/pages/me/withdraw/alipay')
}, 1500) }, 1500)
}else{
} }
}) })
@ -408,6 +415,7 @@
success: (e) => { success: (e) => {
if (e.confirm) { if (e.confirm) {
console.log(data.money)
getMoney(); getMoney();
getMoneyDetail(); getMoneyDetail();
} }

View File

@ -133,7 +133,7 @@
getInviter() getInviter()
queryInviter() queryInviter()
getBgImg() 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) console.log(data.erweima)
}) })