登录页样式修改

This commit is contained in:
2024-02-23 18:03:59 +08:00
parent 9cef00a472
commit 9df8b4b10f
22 changed files with 157 additions and 134 deletions

View File

@@ -1,4 +1,20 @@
/** iconfont */ /** iconfont */
@font-face {
font-family: "YouSheBiaoTiHei";
src: url('@/static/font/YouSheBiaoTiHei.ttf') format('truetype');
}
@font-face {
font-family: "SourceHanSansCN-Bold";
src: url('@/static/font/SourceHanSansCN-Bold.otf') format('truetype');
}
@font-face {
font-family: "SourceHanSansCN-Regular";
src: url('@/static/font/SourceHanSansCN-Regular.otf') format('truetype');
}
@font-face {
font-family: "SourceHanSansCN-Medium";
src: url('@/static/font/SourceHanSansCN-Medium.otf') format('truetype');
}
@font-face { @font-face {
font-family: 'iconfont'; font-family: 'iconfont';
src: url('@/static/iconfont/iconfont.woff2') format('woff2'), src: url('@/static/iconfont/iconfont.woff2') format('woff2'),

View File

@@ -137,4 +137,10 @@ input[type="button"], input[type="submit"], input[type="search"], input[type="re
} }
.mgr5 { .mgr5 {
margin-right: 5px; margin-right: 5px;
}
.mgt40 {
margin-top: 40rpx
}
.mgb40 {
margin-bottom: 40rpx
} }

View File

@@ -1,6 +1,10 @@
<template> <template>
<view class="content"> <view class="home_content">
<view class="header">首页</view> <view class="zd-row header">
<view class="zd-col-8 home_title"></view>
<view class="zd-col-8 home_title">首页</view>
<view class="zd-col-8 home_title">首页</view>
</view>
<view class="userInfo-wrap"> <view class="userInfo-wrap">
<view class="userInfo"> <view class="userInfo">
<text class="p1">{{userName}}</text> <text class="p1">{{userName}}</text>
@@ -35,7 +39,7 @@
</template> </template>
<script> <script>
import {authority} from '@/utils/getData2.js' import {authority, getBillsCount} from '@/utils/getData2.js'
export default { export default {
data() { data() {
return { return {
@@ -47,12 +51,18 @@
}, },
created () { created () {
this._authority() this._authority()
this._getBillsCount()
}, },
methods: { methods: {
async _authority () { async _authority () {
let res = await authority() let res = await authority()
this.menuList = [...res.sonTree] this.menuList = [...res.sonTree]
},
async _getBillsCount () {
let res = await getBillsCount()
console.log(res)
}, },
toPage1 (e) { toPage1 (e) {
if (e.sonTree.length > 0) { if (e.sonTree.length > 0) {
@@ -83,11 +93,19 @@
<style lang="stylus"> <style lang="stylus">
@import '../../common/style/mixin.styl'; @import '../../common/style/mixin.styl';
.home_content
position relative
_wh(100%, 100%)
_bis(,'../../static/images/home_bg.jpg', 100%, 100%,bottom)
.zd_content .zd_content
padding-top 0 padding-top 0
.header .header
height 42px height 120rpx
_font(16px,42px,#333,,center) padding 0 30rpx 50rpx 30rpx
_bis(,'../../static/images/header_bg.png', 100%, 100%,bottom)
.home_title
_font(50rpx,60rpx,#fff,,center)
font-family: YouSheBiaoTiHei;
.userInfo-wrap .userInfo-wrap
_fj() _fj()
_wh(calc(100% - 30px),80px) _wh(calc(100% - 30px),80px)

View File

@@ -1,48 +1,62 @@
<template> <template>
<view class="login_bg"> <view class="login-bg relative">
<view class="logo-wraper">
<img src="../../static/images/logo.png" alt="">
</view>
<view class="login_wrap"> <view class="login_wrap">
<view class="login_tab"> <view class="login_w">
<view class="login_tab_line drift" :style="{'left': drift+'%'}"></view> <view class="zd-row jcflexstart login_tab">
<view class="login_tab_item" @tap="_tabChange(0)">登录</view> <view class="login_tab_item" :class="{'login_tab_active': drift === 0}" @tap="_tabChange(0)">登录</view>
<view class="login_tab_item" @tap="_tabChange(50)">配置</view> <view class="login_tab_item" :class="{'login_tab_active': drift === 50}" @tap="_tabChange(50)">配置</view>
</view>
<view class="login_cnt drift" :style="{'left': '-'+drift*2+'%'}">
<view class="login_card">
<view class="card_wrap">
<view class="inputOuter">
<input type="text" placeholder="用户名" v-model="loginname" class="inputStyle">
<text v-show="showBtn3" class="iconfont login_icon delete_icon" @tap="clearData(3)"></text>
</view>
<view class="inputOuter">
<input :type="inputType" placeholder="密码" v-model="password" class="inputStyle">
<text class="iconfont login_icon" :class="eyeOpen ? 'eye_colse_icon' : 'eye_open_icon'" @click="passwordShow"></text>
</view>
</view>
<view class="submit">
<button class="primary-button" :disabled="disabled" @click="toLogin">&nbsp;&nbsp;</button>
</view>
<view class="scanBox">
<!-- <view class="iconfont scan_icon"></view> -->
<!-- <text class="san_text">扫码登录</text> -->
<text class="san_text" @tap="isUpdate">升级版本</text>
</view>
</view> </view>
<view class="login_card"> <view class="login_cnt drift" :style="{'left': '-'+drift*2+'%'}">
<view class="card_wrap"> <view class="login_card">
<view class="inputOuter"> <view class="card_wrap">
<input type="text" placeholder="域名地址" v-model="baseUrl" class="inputStyle"> <view class="zd-row mgb40">
<text v-show="showBtn1" class="iconfont login_icon delete_icon" @tap="clearData(1)"></text> <view class="zd-col-4 login_label">账号</view>
<view class="zd-col-20">
<input type="text" placeholder="用户名" v-model="loginname" class="inputStyle">
</view>
</view>
<view class="zd-row mgb40">
<view class="zd-col-4 login_label">密码</view>
<view class="zd-col-20 relative">
<input :type="inputType" placeholder="密码" v-model="password" class="inputStyle">
<text class="iconfont login_icon" :class="eyeOpen ? 'eye_colse_icon' : 'eye_open_icon'" @click="passwordShow"></text>
</view>
</view>
</view>
<view class="zd-row mgt40 mgb40">
<button class="primary-button" :disabled="disabled" @click="toLogin">&nbsp;&nbsp;</button>
</view>
<view class="zd-row">
<!-- <view class="iconfont scan_icon"></view> -->
<!-- <text class="san_text">扫码登录</text> -->
<text class="zd-col-24 san_text" @tap="isUpdate">升级版本</text>
</view> </view>
<!-- <view class="inputOuter">
<input type="text" placeholder="图片域名地址" v-model="imgBaseUrl" class="inputStyle">
<text v-show="showBtn2" class="iconfont login_icon delete_icon" @tap="clearData(2)"></text>
</view> -->
</view> </view>
<view class="submit"> <view class="login_card">
<button class="primary-button" :disabled="disabled" @tap="toConfig">&nbsp;&nbsp;</button> <view class="card_wrap">
<view class="zd-row mgb40">
<view class="zd-col-4 login_label">域名</view>
<view class="zd-col-20">
<input type="text" placeholder="域名地址" v-model="baseUrl" class="inputStyle">
</view>
</view>
<view class="zd-row mgb40">
<view class="zd-col-6 login_label">刷新时间</view>
<view class="zd-col-18">
<input type="number" placeholder="刷新时间" v-model="setTime" class="inputStyle">
</view>
</view>
</view>
<view class="zd-row mgt40 mgb40">
<button class="primary-button" :disabled="disabled" @tap="toConfig">&nbsp;&nbsp;</button>
</view>
</view> </view>
</view> </view>
</view> </view>
<view class="daoying_bg"></view>
</view> </view>
<view v-if="version !== ''" class="version-name">v{{version}}</view> <view v-if="version !== ''" class="version-name">v{{version}}</view>
<Up-grade v-if="grade === true" @closeUpdate="closeUpdate" :androidUrl="androidUrl"></up-grade> <Up-grade v-if="grade === true" @closeUpdate="closeUpdate" :androidUrl="androidUrl"></up-grade>
@@ -63,7 +77,7 @@
loginname: '', loginname: '',
password: '', password: '',
baseUrl: this.$store.getters.baseUrl, baseUrl: this.$store.getters.baseUrl,
imgBaseUrl: this.$store.getters.imgBaseUrl, setTime: this.$store.getters.setTime / 1000,
inputType: 'password', inputType: 'password',
eyeOpen: true, eyeOpen: true,
drift: 0, drift: 0,
@@ -77,34 +91,10 @@
androidUrl: '' androidUrl: ''
}; };
}, },
computed: {
showBtn1 () {
return this.baseUrl !== ''
},
showBtn2 () {
return this.imgBaseUrl !== ''
},
showBtn3 () {
return this.loginname !== ''
}
},
methods: { methods: {
_tabChange (num) { _tabChange (num) {
this.drift = num this.drift = num
}, },
clearData (t) {
switch (t) {
case 1:
this.baseUrl = ''
break
case 2:
this.imgBaseUrl = ''
break
case 3:
this.loginname = ''
break
}
},
passwordShow () { passwordShow () {
this.eyeOpen = !this.eyeOpen this.eyeOpen = !this.eyeOpen
if (this.eyeOpen) { if (this.eyeOpen) {
@@ -116,12 +106,15 @@
toConfig () { toConfig () {
let obj = { let obj = {
baseUrl: this.baseUrl, baseUrl: this.baseUrl,
imgBaseUrl: this.imgBaseUrl setTime: this.setTime * 1000
} }
this.$store.dispatch('setConfig', obj) this.$store.dispatch('setConfig', obj)
this._tabChange(0) this._tabChange(0)
}, },
async toLogin() { async toLogin() {
uni.redirectTo({
url: '/pages/home/home'
})
this.disabled = true this.disabled = true
if (this.loginname === '') { if (this.loginname === '') {
uni.showToast({ uni.showToast({
@@ -175,34 +168,39 @@
<style lang="stylus" scoped> <style lang="stylus" scoped>
@import '../../common/style/mixin.styl'; @import '../../common/style/mixin.styl';
.login_bg .login-bg
_wh(100%, 100%) _wh(100%, 100%)
_bis(#fff,'../../static/images/bg_01.png', 100%,,bottom) _bis(#fff,'../../static/images/login_bg.jpg', 100%, 100%,bottom)
.logo-wraper
_wh(90%, auto)
margin 0 auto
text-align center
_bis(,'../../static/images/login_bg.png', 100%, 100%,bottom)
img
_wh(30%, auto)
.login_wrap .login_wrap
position fixed position fixed
left 50% left 50%
top 50% top 50%
width 44% width 50%
padding 5% 6%
transform translate3d(-50%, -50%, 0) transform translate3d(-50%, -50%, 0)
border-radius 5px _bis(,'../../static/images/form_bg.png', 100%, 100%,bottom)
.login_w
_wh(100%, 100%)
overflow hidden overflow hidden
.login_tab .login_tab
position relative height 100rpx
height 35px padding 0 10rpx 50rpx 10%
border-bottom 1px solid #E2E2E2
margin-bottom 15px margin-bottom 15px
_bis(,'../../static/images/login_tabs_bg.png', 100%, 100%,bottom)
.login_tab_item .login_tab_item
float left _font(50rpx,66rpx,#99B1DD,,center)
width 50% font-family: YouSheBiaoTiHei;
_font(16px,35px,#444444,,center) padding 0 50rpx 0 10rpx
cursor pointer .login_tab_active
.login_tab_line color #fff
position absolute _bis(,'../../static/images/login_tab_active.png', 100%, 100%,bottom)
width 50%
height 2px
background-color #D7592F
left 0
bottom -1px
.login_cnt .login_cnt
position relative position relative
width 200% width 200%
@@ -212,39 +210,40 @@
float left float left
.card_wrap .card_wrap
overflow hidden overflow hidden
.inputOuter .login_label
position relative _font(36rpx, 90rpx, #AFBED8,,)
width 100%
margin 15px auto
.inputStyle .inputStyle
_wh(100%,35px) _font(36rpx, 90rpx, #fff,,)
_font(16px,35px,#999,,) _wh(100%, 90rpx)
text-indent 10px background: rgba(45,88,184,0.1);
border-bottom 1px solid #E2E2E2 border: 2rpx solid #4980BD;
box-sizing border-box padding 0 22rpx
.inputStyle[focus]
background: rgba(45,88,184,0.25);
border: 2rpx solid #21D0F2;
line-height 90rpx
.login_icon .login_icon
position absolute position absolute
top 0 top 0
right 10px right 10px
.submit
width 100%
margin 15px auto
text-align center
.primary-button .primary-button
_wh(100%, 35px) _wh(auto, 100rpx)
background-color #d7592f padding 0 100rpx
border-radius 35px _font(50rpx,100rpx,#fff,,center)
_font(16px,35px,#fff,,center) _bis(,'../../static/images/button.png', 100%, 100%,bottom)
.scanBox
_fj()
flex-direction column
.san_text .san_text
_font(16px,24px,#D7592F,,center) _font(36rpx,36px,#fff,,center)
.drift .drift
transition left .3s linear transition left .3s linear
.version-name .version-name
width 100% width 100%
position: absolute position: absolute
bottom: 15px bottom 3%
_font(15px, 30px, #999,,center) _font(30rpx, 60rpx, #fff,,center)
.daoying_bg
position: absolute
bottom -30%
left 0
_wh(100%, 30%)
_bis(,'../../static/images/daoy.png', 100%, 100%,bottom)
</style> </style>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 297 KiB

BIN
static/images/button.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

BIN
static/images/daoy.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
static/images/form_bg.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 KiB

BIN
static/images/header_bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

BIN
static/images/home_bg.jpg Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

BIN
static/images/login_bg.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

BIN
static/images/login_bg.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
static/images/login_tabs_bg.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

BIN
static/images/logo.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
static/images/page_bg.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

View File

@@ -26,29 +26,15 @@ export const authority = () => {
let res = { let res = {
sonTree: [ sonTree: [
{menu_id: '1', path: 'RF01', name: '入库', router: '/pages/management/in-storage', sonTree: []}, {menu_id: '1', path: 'RF01', name: '入库', router: '/pages/management/in-storage', sonTree: []},
{menu_id: '1', path: 'RF02', name: '出库', router: '/pages/management/out-storage', sonTree: []}, {menu_id: '1', path: 'RF02', name: '出库', router: '/pages/management/out-storage', sonTree: []}
{menu_id: '3', path: 'RF03', name: '出入库管理', sonTree: [
{menu_id: '1', name: '半成品入库', path: '/pages/management/HalfFinishedInStore'},
{menu_id: '2', name: '成品入库', path: '/pages/management/FinishedInStore'},
{menu_id: '3', name: '发货确认', path: '/pages/management/DeliveryConfirm'},
{menu_id: '4', name: '半成品入库', path: '/pages/management/SemifinishedInStore'},
{menu_id: '5', name: '半成品出库', path: '/pages/management/SemifinishedOutStore'},
{menu_id: '6', name: '半成品盘点', path: '/pages/management/semifinishedcheck'},
{menu_id: '7', name: '半成品拼盘', path: '/pages/management/semifinishedcompose'}
]
}
] ]
} }
return res return res
} }
// 首页显示出入库单据数量
/** 扫码异常 */ export const getBillsCount = (area) => request({
// 1.1缓存线下拉框 url:'api/easOutInBill/getBillsCount',
export const getCacheLine = (area) => request({ data: {}
url:'api/cacheLineHand/getCacheLine',
data: {
product_area: area
}
}) })
// 1.2指令查询 // 1.2指令查询
export const inOutExceptionInstQuery = (wcode) => request({ export const inOutExceptionInstQuery = (wcode) => request({

View File

@@ -1,11 +1,11 @@
import * as types from '../types' import * as types from '../types'
const baseUrl = process.env.NODE_ENV === 'development' ? 'http://43.139.166.161:8011' : 'http://192.168.81.252:8010' const baseUrl = process.env.NODE_ENV === 'development' ? 'http://47.111.78.178:27017/mock/55' : 'http://192.168.81.252:8010'
const imgBaseUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.81.252:8010' : 'http://192.168.81.252:8010' const imgBaseUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.81.252:8010' : 'http://192.168.81.252:8010'
const state = { const state = {
baseUrl: uni.getStorageSync('baseUrl') || baseUrl, baseUrl: uni.getStorageSync('baseUrl') || baseUrl,
imgBaseUrl: uni.getStorageSync('imgBaseUrl') || imgBaseUrl, imgBaseUrl: uni.getStorageSync('imgBaseUrl') || imgBaseUrl,
setTime: uni.getStorageSync('setTime') || 5000, setTime: uni.getStorageSync('setTime') || 10000,
loginName: uni.getStorageSync('loginName') ? uni.getStorageSync('loginName') : '', loginName: uni.getStorageSync('loginName') ? uni.getStorageSync('loginName') : '',
userInfo: uni.getStorageSync('userInfo') ? uni.getStorageSync('userInfo') : '', userInfo: uni.getStorageSync('userInfo') ? uni.getStorageSync('userInfo') : '',
saveToken: uni.getStorageSync('saveToken') || '' saveToken: uni.getStorageSync('saveToken') || ''
@@ -21,8 +21,7 @@ const getters = {
const actions = { const actions = {
setConfig ({commit}, res) { setConfig ({commit}, res) {
uni.setStorageSync('baseUrl', res.baseUrl) uni.setStorageSync('baseUrl', res.baseUrl)
uni.setStorageSync('imgBaseUrl', res.imgBaseUrl) uni.setStorageSync('setTime', res.setTime)
// uni.setStorageSync('setTime', res.setTime)
commit(types.COM_CONFIG, res) commit(types.COM_CONFIG, res)
}, },
saveLoginName({commit}, res) { saveLoginName({commit}, res) {
@@ -49,8 +48,7 @@ const actions = {
const mutations = { const mutations = {
[types.COM_CONFIG] (state, res) { [types.COM_CONFIG] (state, res) {
state.baseUrl = res.baseUrl state.baseUrl = res.baseUrl
state.imgBaseUrl = res.imgBaseUrl state.setTime = res.setTime
// state.setTime = res.setTime
}, },
[types.SAVE_LOGIN_NAME] (state, res) { [types.SAVE_LOGIN_NAME] (state, res) {
state.loginName = res state.loginName = res