页面展示优化

This commit is contained in:
GaoHao
2025-01-09 11:38:37 +08:00
parent 31b37eb1db
commit c686a02931
7 changed files with 125 additions and 173 deletions

View File

@@ -1,5 +1,5 @@
<template> <template>
<view class="containerView"> <view class="container">
<view class="cu-form-group" > <view class="cu-form-group" >
<view class="title">手机号</view> <view class="title">手机号</view>
<input type="number" :value="data.mobile" placeholder="请输入手机号" maxlength="11" data-key="mobile" <input type="number" :value="data.mobile" placeholder="请输入手机号" maxlength="11" data-key="mobile"
@@ -127,6 +127,14 @@
background: #ffffff; background: #ffffff;
} }
.container {
padding-top: 32rpx;
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
background: #ffffff;
}
.cu-form-group{ .cu-form-group{
background-color: #ffffff; background-color: #ffffff;
padding: 1rpx 30rpx; padding: 1rpx 30rpx;
@@ -163,17 +171,13 @@
font-size: 14px; font-size: 14px;
line-height: 30px; line-height: 30px;
background: #ff7581; background: #ff7581;
padding: 0 30rpx;
border: none;
&:after {
border: none;
}
} }
.containerView {
top: 0;
padding-top: 32upx;
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
background: #ffffff;
}
@@ -187,9 +191,9 @@
background: #ff7581; background: #ff7581;
color: #ffffff; color: #ffffff;
font-size: 16px; font-size: 16px;
margin: 0 auto;
&:after { &:after {
border-radius: 60px; border: none;
} }
} }
</style> </style>

View File

@@ -1,19 +1,15 @@
<template> <template>
<view class="containersView"> <view class="containers">
<div style="width: 100%;height: 85%;position: absolute;background: url('/static/download/appeq_bg.png') no-repeat center bottom / cover;"></div> <div class="bg" style="background: url('/static/download/appeq_bg.png') no-repeat center bottom / cover;"></div>
<view style="text-align: center;position: relative;height: 100%;display: flex;flex-direction: column;align-items: center;justify-content: center;"> <view class="content">
<image style="width: 124rpx;height: 124rpx;margin-top: -920rpx;border-radius:20upx;" src="/static/download/appLogo.png"></image> <image class="logo" src="/static/download/appLogo.png"></image>
<view style="font-size: 40rpx;margin-top: 22rpx;color: #FFFFFF;font-weight: bold;">斯耀短剧APP</view> <view style="font-size: 40rpx;margin-top: 22rpx;color: #FFFFFF;font-weight: bold;">斯耀短剧APP</view>
<view style="font-size: 28rpx;margin-top: 16rpx;color: #FFFFFF;font-weight: bold;">海量电子榨菜 免费又过瘾</view> <view style="font-size: 28rpx;margin-top: 16rpx;color: #FFFFFF;font-weight: bold;">海量电子榨菜 免费又过瘾</view>
<button class="confirm-btn" @click="download">{{data.confirmBtn}}</button> <button class="confirm-btn" @click="download">{{data.confirmBtn}}</button>
</view> </view>
<view id="shareit" v-if="data.show_share" @tap="closeShare">
<image class="arrow" src="https://renwu.xiansqx.com/img/20210813/9aa484db4c60458f86deb2a8ab6fe400.png">
</image>
<view id="follow">点击右上角按钮选择浏览器打开下载</view>
</view>
<!-- #ifdef H5 --> <!-- #ifdef H5 -->
<div v-if="data.isWeixin" style="width: 100%;height: 100%;position: absolute;top: 0;background: url('/static/download/open_guide.png') no-repeat center bottom / cover;"></div> <div v-if="data.isWeixin" style="width: 100%;height: 100%;position: absolute;top: 0;background: url('/static/download/open_guide.png') no-repeat center bottom / cover;"></div>
<!-- #endif --> <!-- #endif -->
@@ -26,7 +22,6 @@
import { commonType } from '@/api/init.js'; import { commonType } from '@/api/init.js';
let data = reactive({ let data = reactive({
show_share: false,
openShare: false, openShare: false,
openShares: false, openShares: false,
confirmBtn: '斯耀短剧APP', confirmBtn: '斯耀短剧APP',
@@ -45,9 +40,7 @@
data.isWeixin = true data.isWeixin = true
} }
}) })
function closeShare() {
data.show_share = false;
}
function download() { function download() {
var u = navigator.userAgent; var u = navigator.userAgent;
@@ -113,48 +106,29 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.containersView { .containers {
width: 100%; width: 100%;
height: 100%; height: 100%;
.bg{
width: 100%;
height: 85%;
position: absolute;
}
.content{
position: relative;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.logo{
width: 124rpx;
height: 124rpx;
margin-top: -920rpx;
border-radius: 20rpx;
}
}
} }
#shareit {
-webkit-user-select: none;
position: fixed;
/*width: 100%;*/
height: 2000px;
background: rgba(0, 0, 0, 0.85);
text-align: center;
top: 0;
left: 0;
z-index: 999;
}
#shareit img {
max-width: 100%;
}
.arrow {
width: 100px;
height: 150px;
position: absolute;
right: 5%;
top: 1%;
}
#follow {
margin-right: 60px;
margin-left: 30px;
width: 90%;
height: 50px;
line-height: 50px;
text-align: left;
text-decoration: none;
font-size: 18px;
color: white;
float: left;
margin-top: 160px;
}
.confirm-btn { .confirm-btn {
width: 416rpx; width: 416rpx;
@@ -170,5 +144,6 @@
left: 0; left: 0;
right: 0; right: 0;
bottom: 70rpx; bottom: 70rpx;
margin: auto;
} }
</style> </style>

View File

@@ -1,5 +1,6 @@
<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>
@@ -179,9 +180,7 @@
padding-top: 48rpx; padding-top: 48rpx;
box-sizing: border-box; box-sizing: border-box;
} }
.flex{
display: flex;
}
.footerView { .footerView {
display: flex; display: flex;
justify-content: center; justify-content: center;
@@ -214,6 +213,8 @@
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;
@@ -258,6 +259,9 @@
background-color: #fff; background-color: #fff;
align-items: center; align-items: center;
padding: 22rpx 32rpx 22rpx 24rpx; padding: 22rpx 32rpx 22rpx 24rpx;
display: flex;
align-items: center;
justify-content: space-between;
} }
} }

View File

@@ -1,5 +1,6 @@
<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>
@@ -18,14 +19,14 @@
<view class="input flex" style="padding-left: 0;"> <view class="input flex" style="padding-left: 0;">
<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="forget" style="flex-shrink: 0;">忘记密码</text> <text class="send-msg" @click="linkTo('/pages/login/forgetPwd')" style="flex-shrink: 0;">忘记密码</text>
</view> </view>
</view> </view>
<button class="confirm-btn" @click="toLogin">登录</button> <button class="confirm-btn" @click="toLogin">登录</button>
<view style="margin-top: 32px;text-align: center"> <view style="margin-top: 32px;text-align: center">
<view> <view>
没有账号 没有账号
<text style="color: #ff7581" @click="register()">立即注册</text> <text style="color: #ff7581" @click="linkTo('/pages/login/register')">立即注册</text>
</view> </view>
</view> </view>
</view> </view>
@@ -35,9 +36,9 @@
</u-checkbox-group> </u-checkbox-group>
<view>同意</view> <view>同意</view>
<!-- 协议地址 --> <!-- 协议地址 -->
<navigator url="/pages/me/privacy" open-type="navigate">隐私政策</navigator> <view @click="linkTo('/pages/me/privacy')">隐私政策</view>
<navigator url="/pages/me/agreement" open-type="navigate">用户服务协议</navigator> <view @click="linkTo('/pages/me/agreement')">用户服务协议</view>
</view> </view>
<u-toast ref="uToast" /> <u-toast ref="uToast" />
@@ -49,6 +50,7 @@
import { reactive } from 'vue'; import { reactive } from 'vue';
import { onLoad} from '@dcloudio/uni-app' import { onLoad} from '@dcloudio/uni-app'
import { login } from '@/api/login/login.js'; import { login } from '@/api/login/login.js';
import { linkTo } from '@/utils/app.js';
let data = reactive({ let data = reactive({
mobile: '', mobile: '',
password: '', password: '',
@@ -59,24 +61,6 @@
}) })
/**
* 注册
*/
function register () {
uni.navigateTo({
url: '/pages/login/register'
});
}
/**
* 忘记密码
*/
function forget () {
uni.navigateTo({
url: '/pages/login/forgetPwd'
});
}
/** /**
* 获取手机号/密码 * 获取手机号/密码
*/ */

View File

@@ -1,5 +1,6 @@
<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>
@@ -35,9 +36,10 @@
</u-checkbox-group> </u-checkbox-group>
<view>注册即同意</view> <view>注册即同意</view>
<!-- 协议地址 --> <!-- 协议地址 -->
<navigator url="/pages/me/privacy" open-type="navigate" style="color: #37A6FF;">隐私政策</navigator> <view @click="linkTo('/pages/me/privacy')" style="color: #37A6FF;">隐私政策</view>
<navigator url="/pages/me/agreement" open-type="navigate" style="color: #37A6FF;">用户协议</navigator> <view @click="linkTo('/pages/me/agreement')" style="color: #37A6FF;">用户服务协议</view>
</view> </view>
</view> </view>
</view> </view>
@@ -48,7 +50,7 @@
import { onLoad} from '@dcloudio/uni-app' import { onLoad} from '@dcloudio/uni-app'
import {setSendMsg,registerCode} from '@/api/login/login.js'; import {setSendMsg,registerCode} from '@/api/login/login.js';
import {commonType} from '@/api/init.js'; import {commonType} from '@/api/init.js';
import { linkTo } from '@/utils/app.js';
let data = reactive({ let data = reactive({
code: '', code: '',
@@ -372,6 +374,9 @@
background-color: #fff; background-color: #fff;
align-items: center; align-items: center;
padding: 22rpx 32rpx 22rpx 24rpx; padding: 22rpx 32rpx 22rpx 24rpx;
display: flex;
align-items: center;
justify-content: space-between;
} }
} }

View File

@@ -1,5 +1,6 @@
<template> <template>
<view class="container"> <view class="container">
<!-- <view class="navs" style="width: 100%;height: 96rpx;"></view> -->
<view class="nav"> <view class="nav">
<up-icon name="arrow-left" color="#fff" size="20" @click="back"></up-icon> <up-icon name="arrow-left" color="#fff" size="20" @click="back"></up-icon>
<view class="navTitle">申请提现</view> <view class="navTitle">申请提现</view>
@@ -86,6 +87,7 @@
import { reactive, nextTick, ref } from 'vue'; import { reactive, nextTick, ref } from 'vue';
import { onReady,onLoad,onShow,onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app' import { onReady,onLoad,onShow,onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
import { selectUserMoney, selectPayDetails, canCash, state, withdraw } from '@/api/me/withdraw.js'; import { selectUserMoney, selectPayDetails, canCash, state, withdraw } from '@/api/me/withdraw.js';
import { selectUserById } from '@/api/user/user.js';
import { commonType } from '@/api/init.js'; import { commonType } from '@/api/init.js';
import { linkTo } from '@/utils/app.js'; import { linkTo } from '@/utils/app.js';
@@ -118,6 +120,7 @@
adRewardedVideo: true, adRewardedVideo: true,
adRewardedVideoloadNum: 0, adRewardedVideoloadNum: 0,
isWithdraw: false, isWithdraw: false,
userInfo: null,
}) })
const adRewardedVideo = ref(null); const adRewardedVideo = ref(null);
onLoad(() => { onLoad(() => {
@@ -127,6 +130,7 @@
onShow(() => { onShow(() => {
console.log(uni.getStorageSync('userInfo')) console.log(uni.getStorageSync('userInfo'))
getcashMoney() getcashMoney()
getUserInfo();
}) })
onReady(() => { onReady(() => {
nextTick(()=>{ nextTick(()=>{
@@ -146,6 +150,11 @@
data.list = [] data.list = []
data.getMoneyDetail(); data.getMoneyDetail();
}) })
function getUserInfo() {
selectUserById().then(res=>{
data.userInfo = res;
})
}
function back() { function back() {
uni.navigateBack() uni.navigateBack()
} }
@@ -154,7 +163,7 @@
*/ */
async function getCanCash() { async function getCanCash() {
canCash().then(res => { canCash().then(res => {
data.isWithdraw = res; // data.isWithdraw = res;
}) })
} }
@@ -178,7 +187,7 @@
} }
data.adRewardedVideoloadNum++ data.adRewardedVideoloadNum++
setTimeout(() => { setTimeout(() => {
adRewardedVideo.value.load(); // adRewardedVideo.value.load();
}, 1000); // 10 }, 1000); // 10
console.log("广告加载失败") console.log("广告加载失败")
} }
@@ -310,46 +319,33 @@
function getOut() { function getOut() {
if (uni.getStorageSync('userInfo').zhiFuBao && uni.getStorageSync('userInfo').zhiFuBaoName && uni.getStorageSync('userInfo').certNo) { if (!/^\d+(\.\d{1,2})?$/.test(data.money)) {
if (!/^\d+(\.\d{1,2})?$/.test(data.money)) { uni.showToast({
uni.showToast({ icon: 'none',
icon: 'none', title: '请输入正确金额,不能包含中文,英文,特殊字符和小数'
title: '请输入正确金额,不能包含中文,英文,特殊字符和小数' });
}); return;
return; }
} if (!data.userInfo.accountNo) {
if (uni.getStorageSync('userInfo').zhiFuBao && uni.getStorageSync('userInfo').zhiFuBaoName) { uni.showToast({ icon: 'none', title: "请先实名认证" });
uni.showToast({ icon: 'none', title: "请先绑定支付宝" }); setTimeout(()=>{
setTimeout(()=>{ linkTo('/pages/me/withdraw/realName')
linkTo('/pages/me/withdraw/alipay') },1500)
},1500) return;
return; }
}
if (uni.getStorageSync('userInfo').certName && uni.getStorageSync('userInfo').mobile && uni.getStorageSync('userInfo').certNo && uni.getStorageSync('userInfo').accountNo) { if (parseFloat(data.mayMoney).toFixed(2) >= parseFloat(data.money)) {
uni.showToast({ icon: 'none', title: "请先实名认证" }); if (parseFloat(data.money).toFixed(2) >= parseFloat(data.cashMoney)) {
setTimeout(()=>{ uni.showModal({
linkTo('/pages/me/withdraw/realName') title: "提现申请提示",
},1500) content: '每日只可提现一次',
return; success: (e) => {
} if (e.confirm) {
if (that.zhifubao && that.zhifubaoName) { setTimeout(()=>{
uni.navigateTo({
url: "/me/invite/zhifubao"
})
return;
}
if (parseFloat(data.mayMoney).toFixed(2) >= parseFloat(data.money)) {
if (parseFloat(data.money).toFixed(2) >= parseFloat(data.cashMoney)) {
uni.showModal({
title: "提现申请提示",
content: '每日只可提现一次',
success: (e) => {
if (e.confirm) {
uni.showModal({ uni.showModal({
title: "提现申请提示", title: "提现申请提示",
content: '请仔细确认收款人信息\n\n收款人姓名:' + uni.getStorageSync('userInfo').zhiFuBaoName + '\n\n提现金额:' + data content: '请仔细确认收款人信息\n\n收款人姓名:' + data.userInfo.certName + '\n\n提现金额:' + data
.money + '元\n\n收款人账号' + uni.getStorageSync('userInfo').zhiFuBao + '', .money + '元\n\n收款人账号' + data.userInfo.accountNo + '',
success: (e) => { success: (e) => {
if (e.confirm) { if (e.confirm) {
@@ -358,25 +354,23 @@
} }
} }
}); });
} },200)
} }
}); }
});
} else {
uni.showToast({
icon: 'none',
title: "提现金额必须大于或等于" + data.cashMoney + "元才可提现"
});
}
} else { } else {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: "您的余额不足" title: "提现金额必须大于或等于" + data.cashMoney + "元才可提现"
}); });
} }
} else { } else {
linkTo('/pages/me/withdraw/alipay') uni.showToast({
icon: 'none',
title: "您的余额不足"
});
} }
} }
@@ -390,15 +384,15 @@
width: 100%; width: 100%;
.nav{ .nav{
width: 100%; width: 100%;
height: 96rpx;
line-height: 96rpx; position: fixed;
position: absolute; background-color: #ff7581;
left: 0; left: 0;
top: 0; top: 0;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding: 0 30rpx; padding: 100rpx 30rpx 15rpx 30rpx;
.navTitle{ .navTitle{
color: #fff; color: #fff;
font-size: 32rpx; font-size: 32rpx;
@@ -411,13 +405,13 @@
} }
.content{ .content{
background-color: #ff7581; background-color: #ff7581;
height: 400rpx; height: 500rpx;
border-bottom-right-radius: 40rpx; border-bottom-right-radius: 40rpx;
border-bottom-left-radius: 40rpx; border-bottom-left-radius: 40rpx;
.title{ .title{
font-size: 32rpx; font-size: 32rpx;
color: #FFFFFF; color: #FFFFFF;
padding-top: 140rpx; padding-top: 230rpx;
} }
.mayMoney{ .mayMoney{
font-size: 40rpx; font-size: 40rpx;

View File

@@ -85,17 +85,7 @@
<up-qrcode :size="200" :val="data.erweima" @result="qrR"></up-qrcode> <up-qrcode :size="200" :val="data.erweima" @result="qrR"></up-qrcode>
<canvas id="canvas" canvas-id="poster" :style="{width: data.canvasW+'px', height: data.canvasH+'px'}"></canvas> <canvas id="canvas" canvas-id="poster" :style="{width: data.canvasW+'px', height: data.canvasH+'px'}"></canvas>
</view> </view>
<!-- <up-image :src="data.haibaoImg" alt="" width="400rpx" mode="widthFix"></up-image> -->
<!-- <tki-qrcode ref="qrcode" :val="erweima" :size="200" background="#fff" foreground="#000" pdground="#000"
:onval="true" :loadMake="true" @result="qrR" :show="false"></tki-qrcode> -->
<view class="cu-modal" :class="modalName == 'Image' ? 'show' : 'show'" @tap="hideModal">
<view class="cu-dialog" v-if="bgImg && erweimapath && haibaoShow" @tap="hideModal">
<view class="bg-img">
<!-- <wm-poster @success="posterSuccess" @successH5="successH5" :imgSrc="bgImg"
:Referrer="'我的邀请码:'+invitationCode" :QrSrc="erweimapath" :LineType="false"></wm-poster> -->
</view>
</view>
</view>
</view> </view>
</template> </template>
@@ -115,7 +105,6 @@
}, },
erweimapath: '', erweimapath: '',
haibaoImg: null, haibaoImg: null,
haibaoShow: false,
customStyle: { customStyle: {
background: '#DDDCFF', background: '#DDDCFF',
border: '8rpx', border: '8rpx',
@@ -134,7 +123,6 @@
tuiguang: '', tuiguang: '',
invitationCode: uni.getStorageSync('userInfo').invitationCode, invitationCode: uni.getStorageSync('userInfo').invitationCode,
h5SaveImg: '', h5SaveImg: '',
modalName: '',
haibaoImgH5: '', haibaoImgH5: '',
inviteSignCount:0, inviteSignCount:0,
canvasW: 350, canvasW: 350,
@@ -218,7 +206,6 @@
function posterSuccess(haibaoImg) { function posterSuccess(haibaoImg) {
data.haibaoImg = haibaoImg; data.haibaoImg = haibaoImg;
data.modalName = 'Image';
uni.hideLoading(); uni.hideLoading();
} }
function successH5(haibaoImg) { function successH5(haibaoImg) {
@@ -231,9 +218,7 @@
} }
} }
function hideModal() {
data.modalName = null;
}
function qrR(path) { function qrR(path) {
data.erweimapath = path; data.erweimapath = path;
} }
@@ -297,8 +282,6 @@
canvasId: "poster", canvasId: "poster",
success: res => { success: res => {
data.haibaoImg = res.tempFilePath; data.haibaoImg = res.tempFilePath;
data.modalName = 'Image';
data.haibaoShow = true
// #ifdef H5 // #ifdef H5
uni.previewImage({ uni.previewImage({
urls: [data.haibaoImg], urls: [data.haibaoImg],
@@ -306,14 +289,16 @@
}) })
// #endif // #endif
// #ifndef H5 // #ifndef H5
uni.previewImage({
urls: [data.haibaoImg],
current: 1,
})
uni.saveImageToPhotosAlbum({ uni.saveImageToPhotosAlbum({
filePath: data.haibaoImg, filePath: data.haibaoImg,
success: function() { success: function() {
console.log('save success');
uni.showToast({ uni.showToast({
title: '海报已保存相册', title: '海报已保存相册',
icon: 'success', icon: 'none',
duration: 2000
}); });
} }
}); });
@@ -348,6 +333,7 @@
} }
.container { .container {
background: #F3F4F8; background: #F3F4F8;
min-height: 100vh;
.head{ .head{
position: relative; position: relative;
.top-title { .top-title {