Commit f530b1dc authored by 胡's avatar

feat: 选择登录用户页

parent e68040d9
......@@ -635,7 +635,6 @@ export default {
getDetail () {
let vm = this
let url = process.env.basePath + 'con_contract_detial'
debugger
let param = {
project_id: vm.project_id,
}
......
<template>
<h-view id="choose-user" class="public-style" title="请选择登录用户">
<h-header class="bar-custom">
<div slot="left" class="h-header-btn">
<img src="@/assets/userBind/arrow.png" @click="$router.replace('/login')" />
</div>
<div slot="center" class="top-word">请选择登录用户</div>
</h-header>
<scroll ref="scrollLists" :updateData="[prolists]" :pullUp="false">
<div class="scroll-box">
<div class="box" v-for="item of list" @click="doCheck(item.id)">
<div class="name">
<img v-if="item.person" src="../assets/login/person.png" alt="自然人" />
<img v-else src="../assets/login/bank.png" alt="bank" />
<span>{{ item.name }}</span>
</div>
<div v-show="item.checked">
<img src="../assets/login/gou2.png" alt="gou2" />
</div>
</div>
</div>
</scroll>
<button class="submit" :class="{ checked: hasChecked}" @click="next">
<img src="../assets/login/gou1.png" alt="自然人" /> 确 认
</button>
</h-view>
</template>
<script>
import noImg from '../assets/productQuery/none.png'
export default {
name: 'choose-user',
data() {
return {
prolists: [],
list: [
{
id: 1,
name: '上海汉得信息技术股份有限公司',
checked: false,
person: true
},
{
id: 2,
name: '上海汉得信息技术股份有限公司',
checked: false,
person: true
},
{
id: 3,
name: '上海汉得信息技术股份有限公司',
checked: false,
person: true
},
{
id: 4,
name: '上海汉得信息技术股份有限公司',
checked: false,
person: false
},
]
}
},
computed: {
hasChecked() {
return this.list.some(item => item.checked);
}
},
beforeRouteEnter(to, from, next) {
next(vm => {
})
},
methods: {
doCheck(id) {
this.list = this.list.map(item => {
item.checked = item.id == id;
return item;
})
},
next() {
if(this.hasChecked) {
// 做缓存
this.$router.push('tab');
} else {
this.hlsPopup.showLongCenter('请选择');
}
}
},
}
</script>
<style lang='less'>
#choose-user {
background-color: rgb(242, 242, 242);
.scrollContent {
background-color: rgb(242, 242, 242);
}
.scroll-box {
padding: 8px;
.box {
display: flex;
justify-content: space-between;
width: 99.9%;
height: 60px;
padding: 0 20px 0 10px;
background-color: #fff;
border-radius: 8px;
line-height: 60px;
font-size: 80%;
color: rgb(58, 58, 58);
margin-bottom: 0.15rem;
img {
height: 20px;
vertical-align: text-bottom;
}
}
}
.submit {
position: absolute;
box-sizing: border-box;
height: 35px;
bottom: 10px;
left: 50%;
transform: translateX(-50%);
color: white;
padding: 6px 40px;
font-size: 85%;
border-radius: 20px;
background-color: rgb(194, 199, 204);
img {
height: 18px;
vertical-align: text-bottom;
}
}
.checked {
background-color: #1d3fff;
}
.content {
position: absolute;
top: 0;
}
.scrollContent {
//padding-top: 1.92rem;
padding-bottom: 20px;
}
}
.platform-ios {
#query {
.scrollContent {
padding-top: 2.32rem;
}
}
}
// iPhoneX适配
@media (device-width: 375px) and (device-height: 812px) and (-webkit-min-device-pixel-ratio: 3) {
.platform-ios {
#query {
.scrollContent {
padding-top: 2.72rem;
}
}
}
#choose-user .submit {
bottom: 44px;
}
}
// iPhoneXR适配
@media (device-width: 414px) and (device-height: 896px) {
.platform-ios {
#query {
.scrollContent {
padding-top: 2.72rem;
}
}
}
#choose-user .submit {
bottom: 44px;
}
}
</style>
......@@ -197,8 +197,7 @@ export default {
this.hlsPopup.hideLoading()
let returnData = []
if (res.result === 'S') {
returnData = res.lists
debugger
returnData = res.lists
returnData.forEach((data, index, array) => {
this.todoList.push(data)
})
......
......@@ -140,7 +140,8 @@ export default {
vm.updateVersion() // 版本更新
window.localStorage.setItem('user_phone', vm.username)
window.localStorage.setItem('password', md5passwprd)
vm.$router.push('tab')
// vm.$router.push('tab')
vm.$router.push('/choose-user');
let tagOption = {
'username': vm.username,
}
......
<!-- 自然人绑定 -->
<template>
<h-view id="np-base-info">
<h-header :proportion="[5,1,1]" class="bar-custom">
......
<!--
* @Description: In User Settings Edit
* @Author: your name
* @Author: your name
* @Date: 2019-09-19 09:31:19
* @LastEditTime : 2019-12-24 15:36:17
* @LastEditors : Please set LastEditors
* 企业绑定
-->
<template>
<h-view id="base-info" class="public-style" title="基本信息">
......
......@@ -16,6 +16,7 @@ const PwdForgot = resolve => require.ensure([], () => { resolve(require('@/pages
const PwdReset = resolve => require.ensure([], () => { resolve(require('@/pages/pwd-reset')) }, 'login')
const FingerLogin = resolve => require.ensure([], () => { resolve(require('@/pages/finger-login')) }, 'login')
const Tab = resolve => require.ensure([], () => { resolve(require('@/pages/tab')) }, 'login')
const ChooseUser = resolve => require.ensure([], () => { resolve(require('@/pages/choose-user')) }, 'login')
const HomePage = resolve => require.ensure([], () => { resolve(require('@/pages/home/home-page')) }, 'home')
// 定位
const Location = resolve => require.ensure([], () => { resolve(require('@/pages/home/location')) }, 'home')
......@@ -213,6 +214,12 @@ export default new Router({
name: 'Login',
meta: {keepAlive: true},
},
{
path: '/choose-user',
component: ChooseUser,
name: 'choose-user',
meta: {keepAlive: true},
},
{
path: '/regiester',
component: Regiester,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment