Browse Source

修改样式

master
longjieli 9 months ago
parent
commit
43d0383550
16 changed files with 226 additions and 253 deletions
  1. +0
    -2
      locale/en.js
  2. +0
    -2
      locale/es.js
  3. +1
    -1
      pages/home/home.vue
  4. +116
    -116
      pages/login/login.vue
  5. +109
    -132
      pages/register/register.vue
  6. BIN
      static/home/About-us.png
  7. BIN
      static/home/Event.png
  8. BIN
      static/home/FAQ.png
  9. BIN
      static/home/TC.png
  10. BIN
      static/home/menu.png
  11. BIN
      static/home/menu1.png
  12. BIN
      static/home/menu2.png
  13. BIN
      static/home/menu3.png
  14. BIN
      static/home/menu4.png
  15. BIN
      static/login/language.png
  16. BIN
      static/login/logo.png

+ 0
- 2
locale/en.js View File

@ -166,8 +166,6 @@ export default {
"ok": "OK"
},
"login": {
"title": "Login",
"please-login": "Please login to access more content",
"username": "Username",
"username-placeholder": "username",
"password": "Password",


+ 0
- 2
locale/es.js View File

@ -166,8 +166,6 @@ export default {
"ok": "OK"
},
"login": {
"title": "Inicio de sesión",
"please-login": "Por favor, inicie sesión para acceder a más contenido",
"username": "Nombre de usuario",
"username-placeholder": "nombre de usuario",
"password": "Contraseña",


+ 1
- 1
pages/home/home.vue View File

@ -43,7 +43,7 @@
<view class="status-icon">
<view v-if="item.current" class="current">current</view>
<uni-icons v-else type="locked" size="20" color="#aec438"></uni-icons>
<uni-icons v-else type="locked" size="20" color="#000"></uni-icons>
</view>
<view class="img-box">


+ 116
- 116
pages/login/login.vue View File

@ -1,64 +1,51 @@
<!-- 登录页面 -->
<template>
<view class="login bx">
<div class="language">
<image @click="showSelectLanguageProp" src="@/static/login/language.png" mode="aspectFit"></image>
</div>
<!-- 背景图片 -->
<view class="bg-box">
<image @click="showSelectLanguageProp" class="language" src="@/static/login/language.png" mode="aspectFit"></image>
<image src="@/static/login/logo.png" mode="aspectFit"></image>
<view class="logo-box">
<image class="logo content" src="@/static/login/logo.png" mode="widthFix"></image>
</view>
<!-- 加载效果 -->
<loading :loading="loading" @close="closeLoading"></loading>
<view v-if="!loading" class="main">
<!-- 登录标题 -->
<view class="login-title">
<view class="title">{{ $t('page.login.title') }}</view>
<view class="login-descript">{{ $t('page.login.please-login') }}</view>
<view class="title">TikTok shop</view>
<view class="shop-desc">Online rebate mall.</view>
</view>
<!-- 输入框列表 -->
<view class="input-list">
<view class="input-item">
<view class="input-descript">{{ $t('page.login.username') }}</view>
<input v-model="form.account" type="text" :placeholder="$t('page.login.username-placeholder')" />
</view>
<view class="input-item">
<view class="input-descript">{{ $t('page.login.password') }}</view>
<input v-model="form.pass" type="password" :placeholder="$t('page.login.password-placeholder')" />
</view>
</view>
<!-- 忘记密码 -->
<view class="forgot-password">
<text @click="forgetPass">{{ $t('page.login.forgot-password') }}</text>
<input v-model="form.account" type="text" :placeholder="$t('page.login.username-placeholder')" />
<input v-model="form.pass" type="password" :placeholder="$t('page.login.password-placeholder')" />
</view>
<!-- 按钮组 -->
<view class="btns">
<view @click="Login" class="now-login-btn">{{ $t('page.login.login') }}</view>
<view @click="toRegister" class="now-register-btn">{{ $t('page.login.register') }}</view>
<view class="now-register-btn">
<text @click="toRegister">{{ $t('page.login.register') }}</text>
</view>
</view>
</view>
<!-- 切换语言 -->
<changeLanguage :show.sync="showSelectLanguage" @close="closeSelectLanguageProp"></changeLanguage>
<!-- 客服列表 -->
<serviceList :show="showService" :serverList="serverList" @close="closeServiceList"></serviceList>
<!-- 初始页面 -->
<!-- <pageInit></pageInit> -->
@ -70,20 +57,25 @@
import serviceList from '@/components/serviceList/serviceList.vue';
import pageInit from '@/components/pageInit/pageInit.vue'
import loading from '@/components/pageInit/loading.vue'
export default {
components : { changeLanguage , serviceList , pageInit , loading },
components: {
changeLanguage,
serviceList,
pageInit,
loading
},
data() {
return {
form: {
account: '',
pass: '',
loginIp : ''
loginIp: ''
},
showSelectLanguage : false,
showService : false,
serverList : [],
loading : false
showSelectLanguage: false,
showService: false,
serverList: [],
loading: false
}
},
created() {
@ -94,21 +86,30 @@
Login() {
this.$play()
let _self = this;
let { account , pass } = this.form
if(account.trim() == ''){
return uni.showToast({title: this.$t('page.login.accountEmpty'),icon : 'none'});
let {
account,
pass
} = this.form
if (account.trim() == '') {
return uni.showToast({
title: this.$t('page.login.accountEmpty'),
icon: 'none'
});
}
if(pass.trim() == ''){
return uni.showToast({title: this.$t('page.login.passEmpty'),icon : 'none'});
if (pass.trim() == '') {
return uni.showToast({
title: this.$t('page.login.passEmpty'),
icon: 'none'
});
}
return uni.request({
url: 'https://api.ipify.org?format=json',
success: function(res) {
_self.form.loginIp = res.data.ip;
_self.request('login', {}, _self.form).then(res => {
if(res.code == 200){
localStorage.setItem("userInfo",JSON.stringify(res.result.userInfo))
if (res.code == 200) {
localStorage.setItem("userInfo", JSON.stringify(res.result.userInfo))
localStorage.setItem("token", res.result.token)
uni.navigateTo({
url: '/pages/home/home'
@ -117,7 +118,7 @@
})
}
});
},
//
@ -127,38 +128,38 @@
url: '/pages/register/register'
})
},
//
showSelectLanguageProp(){
showSelectLanguageProp() {
this.$play()
this.showSelectLanguage = true
},
//
closeSelectLanguageProp(){
closeSelectLanguageProp() {
this.showSelectLanguage = false
},
//
revealServiceList(){
revealServiceList() {
this.$play()
this.showService = true;
},
//
closeServiceList(){
closeServiceList() {
this.showService = false;
},
//
closeLoading(){
closeLoading() {
this.loading = false;
},
//
forgetPass(){
forgetPass() {
this.request('forgetPass').then(res => {
if(res.code == 200){
if (res.code == 200) {
this.serverList = res.result
this.revealServiceList()
}
@ -173,44 +174,55 @@
width: 750rpx;
height: 100vh;
margin: 0px auto;
// background: black;
// background-image: url('@/static/login/bg.png');
background: linear-gradient(to bottom, #fcedff 0%, #ffffff 100%);
background-size: 100%;
background-repeat: no-repeat;
box-sizing: border-box;
padding: 0rpx 20rpx;
.bg-box {
position: relative;
.content {
width: 96%;
margin: 0rpx auto;
}
.language {
display: flex;
justify-content: flex-end;
align-items: center;
justify-content: center;
height: 40%;
height: 160rpx;
.language {
position: absolute;
top: 30rpx;
right: 30rpx;
image {
width: 60rpx;
height: 60rpx;
z-index: 999;
}
}
.logo-box {
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 40rpx;
.logo {
border-radius: 10rpx;
}
}
.login-title {
padding: 0rpx 10rpx;
box-sizing: border-box;
text-align: center;
.title {
font-size: 36rpx;
font-weight: bold;
font-size: 30rpx;
color: $uni-bg-color-app;
margin-bottom: 10rpx;
font-weight: bold;
}
.login-descript {
font-size: 32rpx;
color: white;
.shop-desc {
font-size: 28rpx;
color: #333;
margin-bottom: 20rpx;
}
}
@ -220,61 +232,49 @@
box-sizing: border-box;
margin: 40rpx 0rpx;
.input-item {
display: flex;
justify-content: space-between;
align-items: center;
border: 1px solid $uni-bg-color-app;
padding: 20rpx;
border-radius: 5rpx;
margin-bottom: 25rpx;
box-sizing: border-box;
font-size: 28rpx;
.input-descript {
color: $uni-bg-color-app;
}
input {
display: block;
width: 90%;
margin: 0rpx auto;
color: $uni-bg-color-app;
border: 1px solid #eeeeee;
height: 80rpx;
border-radius: 40rpx;
background: #fff;
margin-bottom: 20rpx;
text-align: center;
text-indent: 1em;
padding: 0rpx 15rpx;
input {
color: $uni-bg-color-app;
&:focus {
border-color: #6d00be !important;
background: pink !important;
}
}
}
.forgot-password {
color: $uni-bg-color-app;
text-align: center;
text {
border-bottom: 1rpx solid #ccc;
}
}
.btns {
padding: 0rpx 10rpx;
margin-top: 40rpx;
color: $uni-bg-color;
.now-login-btn,
.now-register-btn {
.now-login-btn {
background: $uni-bg-color-app;
border-radius: 10rpx;
border-radius: 60rpx;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 20rpx;
font-weight: bold;
}
.now-login-btn {
height: 90rpx;
font-size: 40rpx;
}
.now-register-btn {
height: 60rpx;
width: 90%;
font-size: 28rpx;
margin: 0 auto;
display: flex;
justify-content: center;
align-items: center;
color: $uni-bg-color-app;
}
}
}

+ 109
- 132
pages/register/register.vue View File

@ -1,13 +1,9 @@
<!-- 注册页面 -->
<template>
<view class="register bx">
<!-- 背景图片 -->
<view class="bg-box">
<image @click="showSelectLanguageProp" class="language" src="@/static/login/language.png" mode="aspectFit">
</image>
<image src="@/static/login/logo.png" mode="aspectFit"></image>
</view>
<div class="language">
<image @click="showSelectLanguageProp" src="@/static/login/language.png" mode="aspectFit"></image>
</div>
<!-- 加载效果 -->
<!-- <loading :loading="loading" @close="closeLoading"></loading> -->
@ -15,70 +11,32 @@
<view v-if="!loading" class="main">
<!-- 登录标题 -->
<view class="register-title">
<view class="title">{{ $t('page.register.title') }}</view>
<view class="register-descript">{{ $t('page.register.please-register') }}</view>
<view class="title">TikTok shop</view>
<view class="shop-desc">Online rebate mall.</view>
</view>
<!-- 输入框列表 -->
<view class="input-list">
<view class="input-item">
<view class="input-descript">{{ $t('page.register.username') }}</view>
<input v-model="form.account" type="text" :placeholder="$t('page.register.username-placeholder')" />
</view>
<view class="input-item">
<view class="input-descript">{{ $t('page.register.password') }}</view>
<input v-model="form.password" type="password"
:placeholder="$t('page.register.password-placeholder')" />
</view>
<view class="input-item">
<view class="input-descript">{{ $t('page.register.confirm-password') }}</view>
<input v-model="form.okPassword" type="password"
:placeholder="$t('page.register.confirm-password')" />
</view>
<view class="input-item">
<view class="input-descript">{{ $t('page.register.PaymentPassword') }}</view>
<input v-model="form.payPass" type="password" :placeholder="$t('page.register.PaymentPassword-placeholder')" />
</view>
<view class="input-item">
<view class="input-descript">{{ $t('page.register.confirm-PaymentPassword') }}</view>
<input v-model="form.okPayPass" type="password"
:placeholder="$t('page.register.PaymentPassword-placeholder')" />
</view>
<view class="input-item">
<view class="input-descript">{{ $t('page.register.invitation-code') }}</view>
<input v-model="form.invitationCode" :placeholder="$t('page.register.invitation-code')" />
</view>
<input v-model="form.account" type="text" :placeholder="$t('page.register.username-placeholder')" />
<input v-model="form.password" type="password"
:placeholder="$t('page.register.password-placeholder')" />
<input v-model="form.okPassword" type="password" :placeholder="$t('page.register.confirm-password')" />
<input v-model="form.payPass" type="password"
:placeholder="$t('page.register.PaymentPassword-placeholder')" />
<input v-model="form.okPayPass" type="password"
:placeholder="$t('page.register.PaymentPassword-placeholder')" />
<input v-model="form.invitationCode" :placeholder="$t('page.register.invitation-code')" />
</view>
<!-- 勾选协议 -->
<view class="check-box">
<!-- <view class="check-box">
<u-checkbox-group v-model="agree" @change="$play">
<u-checkbox activeColor="#B0C73B"
shape="circle" :label="$t('page.register.agreen')"
<u-checkbox activeColor="#B0C73B" shape="circle" :label="$t('page.register.agreen')"
name="agree"></u-checkbox>
</u-checkbox-group>
<view @click.stop="toAgreement" class="agreement-content">{{ $t('page.register.agreement') }}</view>
</view>
<!-- 忘记密码
<view class="forgot-password">
<text>{{ $t('page.register.forgot-password') }}</text>
</view> -->
<!-- 按钮组 -->
@ -89,6 +47,7 @@
<view @click.stop="toLogin" class="now-login-btn">{{ $t('page.register.login') }}</view>
</view>
</view>
<!-- 切换语言 -->
@ -143,8 +102,10 @@
},
//
toLogin(sound) { //
if(sound){this.$play()}
toLogin(sound) { //
if (sound) {
this.$play()
}
uni.navigateTo({
url: '/pages/login/login'
})
@ -160,35 +121,59 @@
okPayPass
} = this.form
if (account.trim() == '') {
uni.showToast({title: this.$t('page.register.accountEmpty'),icon : 'none'});
uni.showToast({
title: this.$t('page.register.accountEmpty'),
icon: 'none'
});
return false;
}
if (password.trim() == '') {
uni.showToast({title: this.$t('page.register.passEmpty'),icon : 'none'});
uni.showToast({
title: this.$t('page.register.passEmpty'),
icon: 'none'
});
return false;
}
if (okPassword.trim() == '') {
uni.showToast({title: this.$t('page.register.okPassEmpty'),icon : 'none'});
uni.showToast({
title: this.$t('page.register.okPassEmpty'),
icon: 'none'
});
return false;
}
if (password.trim() != okPassword.trim()) {
uni.showToast({title: this.$t('page.register.passInconsistency'),icon : 'none'});
uni.showToast({
title: this.$t('page.register.passInconsistency'),
icon: 'none'
});
return false;
}
if (payPass.trim() == '') {
uni.showToast({title: this.$t('page.register.payPassEmpty'),icon : 'none'});
uni.showToast({
title: this.$t('page.register.payPassEmpty'),
icon: 'none'
});
return false;
}
if (okPayPass.trim() == '') {
uni.showToast({title: this.$t('page.register.okPayPassEmpty'),icon : 'none'});
uni.showToast({
title: this.$t('page.register.okPayPassEmpty'),
icon: 'none'
});
return false;
}
if (payPass.trim() != okPayPass.trim()) {
uni.showToast({title: this.$t('page.register.payPassInconsistency'),icon : 'none'});
uni.showToast({
title: this.$t('page.register.payPassInconsistency'),
icon: 'none'
});
return false;
}
if (this.agree.length <= 0 && this.agree[0] != 'agree') {
uni.showToast({title: this.$t('page.register.tickProtocol'),icon : 'none'});
uni.showToast({
title: this.$t('page.register.tickProtocol'),
icon: 'none'
});
return false;
}
return true
@ -209,9 +194,9 @@
closeLoading() {
this.loading = false;
},
//
toAgreement(){
toAgreement() {
this.$play()
uni.navigateTo({
url: '/pages/instructions/instructions?index=4'
@ -226,119 +211,111 @@
width: 750rpx;
height: 100vh;
margin: 0px auto;
// background: black;
// background-image: url('@/static/login/bg.png');
background: linear-gradient(to bottom, #fcedff 0%, #ffffff 100%);
background-size: 100%;
background-repeat: no-repeat;
box-sizing: border-box;
padding: 0rpx 20rpx;
.bg-box {
position: relative;
.language {
display: flex;
justify-content: flex-end;
align-items: center;
justify-content: center;
height: 25%;
.language {
position: absolute;
top: 30rpx;
right: 30rpx;
height: 160rpx;
image {
width: 60rpx;
height: 60rpx;
z-index: 999;
}
}
.register-title {
padding: 0rpx 10rpx;
box-sizing: border-box;
text-align: center;
.title {
font-size: 36rpx;
font-weight: bold;
color: #B0C73B;
font-size: 30rpx;
color: $uni-bg-color-app;
margin-bottom: 10rpx;
font-weight: bold;
}
.register-descript {
font-size: 32rpx;
color: white;
.shop-desc {
font-size: 28rpx;
color: #333;
margin-bottom: 20rpx;
}
}
.input-list {
padding: 0rpx 10rpx;
box-sizing: border-box;
margin: 40rpx 0rpx;
.input-item {
display: flex;
justify-content: space-between;
align-items: center;
border: 1px solid #B0C73B;
padding: 20rpx;
border-radius: 5rpx;
margin-bottom: 25rpx;
box-sizing: border-box;
font-size: 28rpx;
.input-descript {
color: #B0C73B;
}
input {
color: #B0C73B;
input {
display: block;
width: 90%;
margin: 0rpx auto;
color: $uni-bg-color-app;
border: 1px solid #eeeeee;
height: 80rpx;
border-radius: 40rpx;
background: #fff;
margin-bottom: 20rpx;
text-align: center;
text-indent: 1em;
padding: 0rpx 15rpx;
&:focus {
border-color: #6d00be !important;
background: pink !important;
}
}
}
.forgot-password {
color: #B0C73B;
text-align: center;
text {
border-bottom: 1rpx solid #ccc;
}
}
.check-box{
.check-box {
display: flex;
color: rgb(96, 98, 102);
.agreement-content{
.agreement-content {
text-decoration: underline;
font-size: 28rpx;
}
}
.btns {
padding: 0rpx 10rpx;
margin-top: 40rpx;
.now-login-btn,
color: $uni-bg-color;
.now-register-btn {
background: #B0C73B;
border-radius: 10rpx;
background: $uni-bg-color-app;
border-radius: 60rpx;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 20rpx;
font-weight: bold;
}
.now-login-btn {
height: 60rpx;
width: 90%;
font-size: 28rpx;
margin: 0 auto;
}
.now-register-btn {
height: 90rpx;
font-size: 40rpx;
}
.now-login-btn {
display: flex;
justify-content: center;
align-items: center;
color: $uni-bg-color-app;
}
}
}
</style>

BIN
static/home/About-us.png View File

Before After
Width: 150  |  Height: 150  |  Size: 11 KiB Width: 150  |  Height: 150  |  Size: 6.4 KiB

BIN
static/home/Event.png View File

Before After
Width: 150  |  Height: 150  |  Size: 6.0 KiB Width: 150  |  Height: 150  |  Size: 4.4 KiB

BIN
static/home/FAQ.png View File

Before After
Width: 150  |  Height: 150  |  Size: 9.4 KiB Width: 150  |  Height: 150  |  Size: 4.4 KiB

BIN
static/home/TC.png View File

Before After
Width: 150  |  Height: 150  |  Size: 8.2 KiB Width: 150  |  Height: 150  |  Size: 4.9 KiB

BIN
static/home/menu.png View File

Before After
Width: 46  |  Height: 46  |  Size: 14 KiB Width: 46  |  Height: 46  |  Size: 13 KiB

BIN
static/home/menu1.png View File

Before After
Width: 198  |  Height: 198  |  Size: 16 KiB Width: 150  |  Height: 150  |  Size: 4.9 KiB

BIN
static/home/menu2.png View File

Before After
Width: 198  |  Height: 198  |  Size: 20 KiB Width: 150  |  Height: 150  |  Size: 4.3 KiB

BIN
static/home/menu3.png View File

Before After
Width: 198  |  Height: 198  |  Size: 14 KiB Width: 132  |  Height: 132  |  Size: 1.3 KiB

BIN
static/home/menu4.png View File

Before After
Width: 198  |  Height: 198  |  Size: 13 KiB Width: 132  |  Height: 132  |  Size: 1.2 KiB

BIN
static/login/language.png View File

Before After
Width: 60  |  Height: 60  |  Size: 3.2 KiB Width: 71  |  Height: 71  |  Size: 2.3 KiB

BIN
static/login/logo.png View File

Before After
Width: 553  |  Height: 120  |  Size: 42 KiB Width: 1200  |  Height: 675  |  Size: 116 KiB

Loading…
Cancel
Save