first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

View File

@@ -0,0 +1,201 @@
<template>
<view class="login">
<uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" style-type="text" active-color="#4c86f7"></uni-segmented-control>
<view class="content">
<view v-show="current === 0">
<view class="signIn">
<view class="userIcon">
<image src="../../static/icon.png" mode=""></image>
</view>
<view class="txtInput">
<view class="inputBox">
<label for="username">
<span class="inputIcon"><image src="../../static/username.png" mode=""></image></span>
<input type="text" value="" class="username" v-model="loginMessage.username" placeholder="请输入用户名"/>
</label>
</view>
<view class="inputBox">
<label for="password">
<span class="inputIcon"><image src="../../static/password.png" mode=""></image></span>
<input type="text" value="" class=" password" v-model="loginMessage.password" placeholder="请输入密码"/>
</label>
</view>
<button type="primary" form-type="submit" >登录</button>
</view>
</view>
</view>
<view v-show="current === 1">
<view class="signOut">
<view class="inputBox">
<label for="username">
<span>用户名</span>
<input type="text" value="" class="username" v-model="signOutmessage.username" placeholder="请输入用户名"/>
</label>
<label for="phone">
<span>手机号</span>
<input type="text" value="" class="phone" v-model="signOutmessage.phone" placeholder="请输入手机号"/>
</label>
<label for="password">
<span>密码</span>
<input type="text" value="" class="password" v-model="signOutmessage.password" placeholder="请输入密码"/>
</label>
</view>
<button type="primary" form-type="submit" >注册</button>
</view>
</view>
</view>
</view>
</template>
<script>
import uniSegmentedControl from "@/components/uni-segmented-control/uni-segmented-control.vue"
export default{
components: {uniSegmentedControl},
data() {
return {
items: ['登录','注册'],
current: 0,
loginMessage: {
username: '',
userpwd: ''
},
signOutmessage:{
username:'',
phone:'',
userpwd:''
}
}
},
methods:{
onClickItem(index) {
// 列表切换
if (this.current !== index) {
this.current = index;
}
uni.setNavigationBarTitle({
title: this.items[index]
});
},
async login(){
let data = await this.$http.userLogin({
data: this.loginMessage
});
console.log(data)
this.$utils.setLocalStorage("LoginStatus",data)
}
}
}
</script>
<!-- ffb400 -->
<style lang="less">
.login{
padding: 20upx;
.content{
.signIn{
.userIcon{
width: 100%;
height: 300upx;
display: flex;
justify-content: center;
align-items: center;
image{
width: 180upx;
height: 180upx;
}
}
.txtInput{
padding: 20upx;
.inputBox{
label{
width: 80%;
margin: 0 auto;
display: flex;
align-items: center;
margin-top: 20upx;
.inputIcon{
image{width: 60upx; height: 60upx;}
}
input{
color: #999999;
font-size: 28upx;
margin-left: 20upx;
display: inline-block;
background: none;
padding: 10upx 0;
position: relative;
}
input::after{
content: "";
width: 0;
height: 2upx;
background-color: #4c86f7;
position: absolute;
left: 50%;
bottom: 0;
opacity: 0;
transition: all 0.3s ease-in-out;
}
}
label:hover input::after{
width: 100%;
left: 0;
opacity: 1;
}
}
uni-button{
height: 70upx;
margin-top: 100upx;
box-shadow: 0 0 10upx #4c86f7;
border-radius: 50upx;
line-height: 70upx;
font-size: 32upx;
}
}
}
.signOut{
min-height: 540upx;
background: url("./../../static/novel.png") top left no-repeat;
background-size: 100%;
position: relative;
margin-top: 20upx;
.inputBox{
padding-top: 540upx;
label{
width: 68%;
margin: 0 auto;
display: flex;
align-items: center;
margin-top: 30upx;
display: flex;
justify-content: space-between;
span{
color: #999999;
}
input{
color: #999999;
font-size: 28upx;
margin-left: 20upx;
display: inline-block;
background: none;
padding: 10upx;
position: relative;
border-radius: 20upx;
box-shadow: 0 0 6upx #4c86f7;
}
}
}
uni-button{
height: 70upx;
margin-top: 100upx;
box-shadow: 0 0 10upx #4c86f7;
border-radius: 50upx;
line-height: 70upx;
font-size: 32upx;
}
}
}
}
</style>

View File

@@ -0,0 +1,229 @@
<template>
<view class="my">
<view class="logined" v-if="isLogin">
<view class="myTitle">
<image src="../../static/defaulticon.png" mode="aspectFit"></image>
<view class="userMsg">
<h3>Mr.Right</h3>
<p>这家伙真懒,签名都不设置</p>
</view>
</view>
<view class="nav">
<ul>
<li><image src="../../static/collection.png" mode="aspectFit"></image><p>收藏</p></li>
<li><image src="../../static/read.png" mode="aspectFit"></image><p>阅读</p></li>
<li><image src="../../static/message.png" mode="aspectFit"></image><p>消息</p></li>
</ul>
</view>
<view class="other">
<view class="vip">
<view class="otherTitle"> <image src="../../static/vip.png" mode="aspectFit"></image> vip会员</view>
<p>立即开通 > </p>
</view>
<ul>
<li>
<view class="icon"><image src="../../static/like.png" mode="aspectFit"></image>想读</view>
<p>0</p>
</li>
<li>
<view class="icon"><image src="../../static/upload.png" mode="aspectFit"></image> 上传</view>
<p>0</p>
</li>
<li>
<view class="icon"><image src="../../static/buy.png" mode="aspectFit"></image> 已购买</view>
<p>0</p>
</li>
<li>
<view class="icon"><image src="../../static/histroy.png" mode="aspectFit"></image>浏览记录</view>
<p>0</p>
</li>
<li>
<view class="icon"><image src="../../static/help.png" mode="aspectFit"></image>帮助中心</view>
<p>0</p>
</li>
</ul>
</view>
<button type="primary">退出</button>
</view>
<view class="unlogin" v-else="">
<view class="myTitle">
<image src="../../static/defaulticon.png" mode="aspectFit"></image>
<view class="userMsg">
<h3>您还未登录</h3>
<view class="toLogin" @click="toLogin()">登录</view>
</view>
</view>
<view class="nav">
<ul>
<li><image src="../../static/collection.png" mode="aspectFit"></image><p>收藏</p></li>
<li><image src="../../static/read.png" mode="aspectFit"></image><p>阅读</p></li>
<li><image src="../../static/message.png" mode="aspectFit"></image><p>消息</p></li>
</ul>
</view>
<view class="other">
<view class="vip">
<view class="otherTitle"> <image src="../../static/vip.png" mode="aspectFit"></image> vip会员</view>
<p>立即开通 > </p>
</view>
<ul>
<li>
<view class="icon"><image src="../../static/like.png" mode="aspectFit"></image>想读</view>
<p>0</p>
</li>
<li>
<view class="icon"><image src="../../static/upload.png" mode="aspectFit"></image> 上传</view>
<p>0</p>
</li>
<li>
<view class="icon"><image src="../../static/buy.png" mode="aspectFit"></image> 已购买</view>
<p>0</p>
</li>
<li>
<view class="icon"><image src="../../static/histroy.png" mode="aspectFit"></image>浏览记录</view>
<p>0</p>
</li>
<li>
<view class="icon"><image src="../../static/help.png" mode="aspectFit"></image>帮助中心</view>
<p>0</p>
</li>
</ul>
</view>
</view>
</view>
</template>
<script>
import { mapGetters, mapMutations, mapActions } from 'vuex'
export default {
data() {
return {
isLogin: false
}
},
created() {
},
onShow() {
// this.$utils.AuthenticateLogin()
},
methods: {
toLogin(){
uni.navigateTo({
url: './login'
});
}
},
computed: {
}
}
</script>
<style lang="less">
.my{
.myTitle{
height: 200upx;
display: flex;
align-items: center;
flex-flow: row;
padding: 0upx 40upx;
.toLogin{
text-align: center;
border-radius: 50upx;
width: 180upx;
height: 50upx;
color: #ffffff;
background-color: #efa716;
}
image{
width: 120upx;
}
.userMsg{
margin-left: 40upx;
h3{
font-size: 36upx;
color: #3c3c3c;
font-weight: bold;
}
p{
font-size: 28upx;
color: #999999;
}
}
}
.nav{
height: 100upx;
padding: 20upx 0;
border-top: 1upx solid #f3f3f3;
border-bottom: 1upx solid #f3f3f3;
ul{
height: 100%;
display: flex;
flex-flow: row;
flex-wrap: nowrap;
align-items: center;
justify-content: space-around;
li{
height: 100%;
display: inline-flex;
justify-content: center;
align-items: center;
flex-flow: column;
color: #999999;
image{
width: 72upx;
}
}
}
}
.other{
display: flex;
flex-flow: column;
color: #999999;
.vip{
height: 100upx;
display: flex;
flex-flow: row;
align-items: center;
justify-content: space-between;
padding: 0 20upx;
border-top: 8upx solid #f3f3f3;
border-bottom: 10upx solid #f3f3f3;
.otherTitle{
height: 100%;
display: inline-flex;
justify-content: center;
align-items: center;
}
}
image{
width: 32upx;
height: 32upx;
margin-right: 20upx;
}
ul{
li{
height: 100upx;
border-bottom: 1upx solid #f3f3f3;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 20upx;
.icon{
display: flex;
justify-content: center;
flex-flow: row;
align-items: center;
}
}
}
}
uni-button{
width: 600upx;
height: 80upx;
border-radius: 40upx;
line-height: 80upx;
margin-top: 20upx;
}
}
</style>