修改
This commit is contained in:
@@ -12,12 +12,6 @@
|
|||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
,{
|
|
||||||
"path" : "pages/login/setup",
|
|
||||||
"style": {
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
,{
|
,{
|
||||||
"path" : "pages/login/upgrade",
|
"path" : "pages/login/upgrade",
|
||||||
"style": {
|
"style": {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<view class="userInfo-wrap">
|
<view class="userInfo-wrap">
|
||||||
<view class="userInfo">
|
<view class="userInfo">
|
||||||
<text class="p1">{{$store.getters.userInfo !== '' ? JSON.parse($store.getters.userInfo).user_name : ''}}</text>
|
<text class="p1">{{$store.getters.userInfo !== '' ? JSON.parse($store.getters.userInfo).user_name : ''}}</text>
|
||||||
<text class="p2">欢迎进入立讯手持系统!</text>
|
<text class="p2">欢迎进入恒森ACS手持系统!</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="exit" @tap="Quit">
|
<view class="exit" @tap="Quit">
|
||||||
<view class="icon-exit"></view>
|
<view class="icon-exit"></view>
|
||||||
|
|||||||
@@ -1,30 +1,20 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="zd_content bg">
|
<view class="zd_content bg">
|
||||||
<view class="p1">欢迎来到</view>
|
<view class="p1">欢迎来到</view>
|
||||||
<view class="p2">立讯手持系统!</view>
|
<view class="p2">恒森ACS手持系统!</view>
|
||||||
<view class="input-box">
|
<view class="input-box" style="margin-bottom: 20px">
|
||||||
<input class="large-input" type="text" placeholder="请输入用户名" v-model="user">
|
<view class="input-wrap">
|
||||||
|
<view class="input-label">服务器地址</view>
|
||||||
|
<input type="text" class="setup-input" placeholder="请输入服务器地址" v-model="addrip">
|
||||||
</view>
|
</view>
|
||||||
<div class="input-box">
|
|
||||||
<input class="large-input" :password="!showPassword" placeholder="请输入密码" v-model="password">
|
|
||||||
<span class="iconfont icon_eye_close" :class="[showPassword ? 'icon_eye_active' : '']" @tap="changePassword"></span>
|
|
||||||
</div>
|
|
||||||
<view class="radio-box">
|
|
||||||
<view class="radio-wrap">
|
|
||||||
<span class="iconfont icon_unchecked" :class="{'icon_checked': saveUser}" @tap="toSaveUser"></span>
|
|
||||||
<text class="radio-label">记住用户名</text>
|
|
||||||
</view>
|
</view>
|
||||||
<text class="setup-text" @tap="setup">设置</text>
|
<button class="login-btn" @tap="toLogin">进入</button>
|
||||||
<text class="setup-text" @tap="isUpdate">升级版本</text>
|
|
||||||
</view>
|
|
||||||
<button class="login-btn" :disabled="disabled" @tap="toLogin">确认登录</button>
|
|
||||||
<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>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { RSAencrypt } from '@/utils/jsencrypt.js'
|
|
||||||
import {handLogin, pdaUpdate} from '@/utils/getData2.js'
|
import {handLogin, pdaUpdate} from '@/utils/getData2.js'
|
||||||
import UpGrade from './upgrade.vue'
|
import UpGrade from './upgrade.vue'
|
||||||
export default {
|
export default {
|
||||||
@@ -33,11 +23,7 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
user: this.$store.getters.loginName ? this.$store.getters.loginName : '',
|
addrip: this.$store.getters.baseUrl,
|
||||||
password: '',
|
|
||||||
showPassword: false,
|
|
||||||
saveUser: this.$store.getters.loginName ? true : false,
|
|
||||||
disabled: false,
|
|
||||||
version: '',
|
version: '',
|
||||||
versionCode: '',
|
versionCode: '',
|
||||||
grade: false,
|
grade: false,
|
||||||
@@ -55,57 +41,18 @@
|
|||||||
//#endif
|
//#endif
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
isUpdate () {
|
toLogin() {
|
||||||
this._pdaUpdate()
|
if (this.addrip === '') {
|
||||||
},
|
|
||||||
toSaveUser() {
|
|
||||||
this.saveUser = !this.saveUser
|
|
||||||
},
|
|
||||||
changePassword() {
|
|
||||||
this.showPassword = !this.showPassword
|
|
||||||
},
|
|
||||||
setup () {
|
|
||||||
uni.redirectTo({
|
|
||||||
url: '/pages/login/setup'
|
|
||||||
})
|
|
||||||
},
|
|
||||||
async toLogin() {
|
|
||||||
// uni.redirectTo({
|
|
||||||
// url: '/pages/home/home'
|
|
||||||
// })
|
|
||||||
this.disabled = true
|
|
||||||
if (this.user === '') {
|
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '用户名不能为空',
|
title: '服务器地址不能为空',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
this.disabled = false
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.password === '') {
|
this.$store.dispatch('setConfig',{baseUrl: this.addrip})
|
||||||
uni.showToast({
|
|
||||||
title: '密码不能为空',
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
this.disabled = false
|
|
||||||
return
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
let res = await handLogin(this.user, RSAencrypt(this.password))
|
|
||||||
if (this.saveUser) {
|
|
||||||
this.$store.dispatch('saveLoginName', this.user)
|
|
||||||
} else {
|
|
||||||
this.$store.dispatch('delLoginName', '')
|
|
||||||
}
|
|
||||||
this.$store.dispatch('saveUserInfo', JSON.stringify(res.result))
|
|
||||||
// this.$store.dispatch('saveToken', res.token)
|
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: '/pages/home/home'
|
url: '/pages/home/home'
|
||||||
})
|
})
|
||||||
this.disabled = false
|
|
||||||
} catch (e) {
|
|
||||||
this.disabled = false
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
async _pdaUpdate () {
|
async _pdaUpdate () {
|
||||||
let res = await pdaUpdate()
|
let res = await pdaUpdate()
|
||||||
@@ -129,37 +76,27 @@
|
|||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
@import '../../common/style/mixin.styl';
|
@import '../../common/style/mixin.styl';
|
||||||
.p1
|
.p1
|
||||||
_font(60rpx,75rpx,#444)
|
_font(60rpx,75rpx,#222)
|
||||||
padding-top: 90rpx
|
padding-top: 90rpx
|
||||||
.p2
|
.p2
|
||||||
_font(50rpx,1,#444)
|
_font(50rpx,1,#222)
|
||||||
padding: 40rpx 0 25rpx
|
padding: 40rpx 0 25rpx
|
||||||
.input-box
|
margin-bottom 10vh
|
||||||
_fj()
|
.input-wrap
|
||||||
margin-top 68rpx
|
width 100%
|
||||||
height 75rpx
|
margin-bottom 10vh
|
||||||
border-bottom 1rpx solid #e2e2e2
|
.input-label
|
||||||
.large-input
|
_font(30rpx,70rpx,#333)
|
||||||
_wh(calc(100% - 40rpx), 74rpx)
|
margin-bottom 2vh
|
||||||
_font(32rpx,74rpx,#999)
|
.setup-input
|
||||||
padding-left 10rpx
|
height 70rpx
|
||||||
.radio-box
|
background #fff
|
||||||
_fj()
|
_font(30rpx,70rpx,#787878)
|
||||||
margin: 25rpx 0 70rpx 0
|
border-bottom 1px solid #eeeeee
|
||||||
height: 34rpx
|
|
||||||
.radio-wrap
|
|
||||||
_fj(flex-start)
|
|
||||||
height: 34rpx
|
|
||||||
flex: 2
|
|
||||||
.radio-label
|
|
||||||
_font(28rpx, 28rpx,#333)
|
|
||||||
padding-left: 10rpx
|
|
||||||
.setup-text
|
|
||||||
_font(28rpx, 28rpx,$red,,right)
|
|
||||||
padding-left 25rpx
|
|
||||||
.bg
|
.bg
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
_bis('../../static/image/login_bg.png', 100%,,bottom)
|
_bis('../../static/image/login_bg.png', 100%,,bottom)
|
||||||
|
padding: 92rpx 30rpx 82rpx 30rpx;
|
||||||
.login-btn
|
.login-btn
|
||||||
width 100%
|
width 100%
|
||||||
border-radius 46rpx
|
border-radius 46rpx
|
||||||
|
|||||||
@@ -1,80 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="zd_container">
|
|
||||||
<nav-bar title="设置" :inner2="true" @goIn="goIn" :show1="false"></nav-bar>
|
|
||||||
<view class="zd_content">
|
|
||||||
<view class="zd_wrapper">
|
|
||||||
<view class="input-wrap">
|
|
||||||
<view class="input-label">服务器地址</view>
|
|
||||||
<input type="text" class="setup-input" placeholder="请输入服务器地址" v-model="addrip">
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<!-- <view class="zd_wrapper">
|
|
||||||
<view class="input-wrap">
|
|
||||||
<view class="input-label">刷新时间(s)</view>
|
|
||||||
<input type="text" class="setup-input" placeholder="请输入刷新时间" v-model="setTime">
|
|
||||||
</view>
|
|
||||||
</view> -->
|
|
||||||
</view>
|
|
||||||
<view class="submit-bar">
|
|
||||||
<button class="submit-button" @click="_submit">确认</button>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import NavBar from '@/components/NavBar.vue'
|
|
||||||
export default {
|
|
||||||
components: {
|
|
||||||
NavBar
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
addrip: this.$store.getters.baseUrl,
|
|
||||||
setTime: this.$store.getters.setTime / 1000
|
|
||||||
};
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
goIn () {
|
|
||||||
uni.redirectTo({
|
|
||||||
url: '/pages/login/login'
|
|
||||||
})
|
|
||||||
},
|
|
||||||
_submit () {
|
|
||||||
if (this.addrip === '') {
|
|
||||||
uni.showToast({
|
|
||||||
title: '服务器地址',
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
// if (this.setTime === '') {
|
|
||||||
// uni.showToast({
|
|
||||||
// title: '请填写刷新时间',
|
|
||||||
// icon: 'none'
|
|
||||||
// })
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
// 存值
|
|
||||||
this.$store.dispatch('setConfig',{baseUrl: this.addrip, setTime: this.setTime * 1000})
|
|
||||||
uni.redirectTo({
|
|
||||||
url: '/pages/login/login'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="stylus">
|
|
||||||
@import '../../common/style/mixin.styl';
|
|
||||||
.input-wrap
|
|
||||||
width 100%
|
|
||||||
_fj()
|
|
||||||
.input-label
|
|
||||||
wh(200rpx, 58rpx)
|
|
||||||
_font(28rpx,58rpx,#464646)
|
|
||||||
.setup-input
|
|
||||||
_wh(calc(100% - 200rpx), 58rpx)
|
|
||||||
background #fff
|
|
||||||
_font(28rpx,58rpx,#323232)
|
|
||||||
padding 0 10rpx
|
|
||||||
</style>
|
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
<view class="content-header"></view>
|
<view class="content-header"></view>
|
||||||
<view class="content-body">
|
<view class="content-body">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
<text>立讯又有新版本了,升级到最新版本,享受更丰富、稳定、快速的功能和体验!</text>
|
<text>恒森ACS又有新版本了,升级到最新版本,享受更丰富、稳定、快速的功能和体验!</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="footer flex-center">
|
<view class="footer flex-center">
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
@@ -18,7 +18,6 @@
|
|||||||
<view class="site_item" v-for="(el, i) in e.pointArr" :key="i">
|
<view class="site_item" v-for="(el, i) in e.pointArr" :key="i">
|
||||||
<view class="site_item_box" :class="['bggray', 'bggreen'][Number(el.status)]" @click="setcode(el)">
|
<view class="site_item_box" :class="['bggray', 'bggreen'][Number(el.status)]" @click="setcode(el)">
|
||||||
<text class="title_1">{{el.device_name}}</text>
|
<text class="title_1">{{el.device_name}}</text>
|
||||||
<text class="title_2">来源:{{el.source_device}}</text>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -28,11 +27,11 @@
|
|||||||
<view class="submit-bar">
|
<view class="submit-bar">
|
||||||
<view class="dot_item">
|
<view class="dot_item">
|
||||||
<view class="p1">起始点</view>
|
<view class="p1">起始点</view>
|
||||||
<view class="p2">设备号:{{sObj.device_name}}</view>
|
<view class="p2">{{sObj.device_name}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="dot_item">
|
<view class="dot_item">
|
||||||
<view class="p1">目标点</view>
|
<view class="p1">目标点</view>
|
||||||
<view class="p2">设备号:{{nObj.device_name}}</view>
|
<view class="p2">{{nObj.device_name}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn_block">
|
<view class="btn_block">
|
||||||
<button class="submit-button" :class="{'btn-disabled': JSON.stringify(sObj) === '{}' && JSON.stringify(nObj) === '{}'}" @click="cancle">清空</button>
|
<button class="submit-button" :class="{'btn-disabled': JSON.stringify(sObj) === '{}' && JSON.stringify(nObj) === '{}'}" @click="cancle">清空</button>
|
||||||
@@ -59,8 +58,7 @@
|
|||||||
regobj: {},
|
regobj: {},
|
||||||
disabled1: false,
|
disabled1: false,
|
||||||
sObj: {},
|
sObj: {},
|
||||||
nObj: {},
|
nObj: {}
|
||||||
isS: false
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
@@ -111,12 +109,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
setcode (el) {
|
setcode (el) {
|
||||||
if (this.isS === false) {
|
if (JSON.stringify(this.sObj) === '{}') {
|
||||||
this.sObj = el
|
this.sObj = el
|
||||||
this.isS = true
|
} else if (JSON.stringify(this.sObj) !== '{}' && JSON.stringify(this.nObj) === '{}') {
|
||||||
} else if (this.isS) {
|
|
||||||
this.nObj = el
|
this.nObj = el
|
||||||
this.isS = false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/** 清空点位选择 */
|
/** 清空点位选择 */
|
||||||
@@ -199,17 +195,10 @@
|
|||||||
_font(30rpx,40rpx,#333,bold)
|
_font(30rpx,40rpx,#333,bold)
|
||||||
font-style italic
|
font-style italic
|
||||||
.title_1
|
.title_1
|
||||||
_wh(100%, 60%)
|
_wh(100%, 100%)
|
||||||
_fj(center)
|
_fj(center)
|
||||||
overflow hidden
|
overflow hidden
|
||||||
_font(28rpx,28rpx,#303133,500, center)
|
_font(28rpx,28rpx,#303133,500, center)
|
||||||
.title_2
|
|
||||||
_wh(100%, 40%)
|
|
||||||
_fj(center)
|
|
||||||
overflow hidden
|
|
||||||
_font(24rpx,25rpx,#303133,500, center)
|
|
||||||
opacity .69
|
|
||||||
white-space: nowrap
|
|
||||||
.submit-bar
|
.submit-bar
|
||||||
justify-content space-between
|
justify-content space-between
|
||||||
padding 10rpx
|
padding 10rpx
|
||||||
|
|||||||
@@ -18,7 +18,6 @@
|
|||||||
<view class="site_item" v-for="(el, i) in e.pointArr" :key="i">
|
<view class="site_item" v-for="(el, i) in e.pointArr" :key="i">
|
||||||
<view class="site_item_box" :class="['bggray', 'bggreen'][Number(el.status)]" @click="setcode(el)">
|
<view class="site_item_box" :class="['bggray', 'bggreen'][Number(el.status)]" @click="setcode(el)">
|
||||||
<text class="title_1">{{el.device_name}}</text>
|
<text class="title_1">{{el.device_name}}</text>
|
||||||
<text class="title_2">来源:{{el.source_device}}</text>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -201,7 +200,7 @@
|
|||||||
_font(30rpx,40rpx,#333,bold)
|
_font(30rpx,40rpx,#333,bold)
|
||||||
font-style italic
|
font-style italic
|
||||||
.title_1
|
.title_1
|
||||||
_wh(100%, 60%)
|
_wh(100%, 100%)
|
||||||
_fj(center)
|
_fj(center)
|
||||||
overflow hidden
|
overflow hidden
|
||||||
_font(28rpx,28rpx,#303133,500, center)
|
_font(28rpx,28rpx,#303133,500, center)
|
||||||
|
|||||||
Reference in New Issue
Block a user