|
|
@@ -1,191 +1,281 @@
|
|
|
-<!-- 蓝色简洁登录页面 -->
|
|
|
<template>
|
|
|
<view class="">
|
|
|
- <view class="t-login">
|
|
|
- <u-top-tips ref="uTips"></u-top-tips>
|
|
|
- <u-toast ref="uToast"></u-toast>
|
|
|
- <!-- 页面装饰图片 -->
|
|
|
- <!-- <image class="img-a" src="@/static/login/2.png"></image> -->
|
|
|
- <!-- <image class="img-b" src="@/static/login/3.png"></image> -->
|
|
|
- <!-- 标题 -->
|
|
|
- <view class="t-b">欢迎回来!</view>
|
|
|
- <form class="cl">
|
|
|
- <!-- 员工登陆 -->
|
|
|
- <block v-if="typeIndex==0">
|
|
|
- <view class="t-a" >
|
|
|
- <image src="@/static/login/sj.png"></image>
|
|
|
- <input class="input" type="number" placeholder="请输入手机号" maxlength="11" v-model="phone" />
|
|
|
- </view>
|
|
|
- <view class="t-a" >
|
|
|
- <image src="@/static/login/yz.png"></image>
|
|
|
- <input class="input" type="number" maxlength="6" placeholder="请输入验证码" v-model="yzm" />
|
|
|
- <view :style="showText?'':'background-color: #A7A7A7;'" class="t-c" @click="getCode()">{{tips}}</view>
|
|
|
- </view>
|
|
|
- </block>
|
|
|
- <!-- 企业登陆 -->
|
|
|
- <block v-if="typeIndex==1">
|
|
|
- <view class="t-a">
|
|
|
- <image style="width: 50rpx;height: 58rpx;padding-bottom: 10rpx;top: 20rpx;" src="@/static/login/qiye1.png"></image>
|
|
|
- <input class="input" disabled type="text" @click="enterpriseShow = true" placeholder="请选择企业" v-model="enterpriseName" />
|
|
|
- </view>
|
|
|
- <view class="t-a" >
|
|
|
- <image src="@/static/login/yz.png"></image>
|
|
|
- <input class="input" type="password" maxlength="6" placeholder="请输入登录密码" v-model="password" />
|
|
|
- </view>
|
|
|
- </block>
|
|
|
- <!-- 管理员登录 -->
|
|
|
- <view class="t-a" v-if="typeIndex==2">
|
|
|
- <image style="width: 50rpx;height: 58rpx;padding-bottom: 10rpx;top: 20rpx;" src="@/static/login/yuanqu.png"></image>
|
|
|
- <input class="input" disabled type="text" @click="ganderSelectShow = true" placeholder="请选择园区" v-model="ganderInfo.agencyName" />
|
|
|
- </view>
|
|
|
- <view class="t-a" v-if="typeIndex==2">
|
|
|
- <image src="@/static/login/yz.png"></image>
|
|
|
- <input class="input" type="password" maxlength="8" placeholder="请输入登录密码" v-model="inputGanderPsw" />
|
|
|
- </view>
|
|
|
-
|
|
|
- <!-- 登录类型 -->
|
|
|
- <view class="flex padding-bottom-50" style="text-align: left">
|
|
|
- <view @click="typeShow=true" style="border: 1px solid #e9e9e9;background-color: #f8f7fc;" class="cu-btn df round">
|
|
|
- <text class="text-black">{{typeList[typeIndex].text}}</text>
|
|
|
- <text class="text-black cuIcon-triangledownfill " style="font-size: 40rpx;padding-left: 4rpx;"></text>
|
|
|
- </view>
|
|
|
+ <view class="top">
|
|
|
+
|
|
|
+ </view>
|
|
|
+ <view class="content" style="height: 85vh;">
|
|
|
+ <scroll-view style="border-radius: 20rpx;padding-left: 20rpx;" scroll-x class="bg-white nav" scroll-with-animation :scroll-left="scrollLeft">
|
|
|
+ <view class="cu-item text-lg" :class="index==current?'text-checked text-bold cur':''" v-for="(item,index) in list" :key="index" @tap="tabSelect(index)" >
|
|
|
+ {{item.name}}
|
|
|
</view>
|
|
|
- <!-- 七天免登录 -->
|
|
|
- <view class="checkbox">
|
|
|
- <u-checkbox
|
|
|
- @change="checkboxChange"
|
|
|
- v-model="checked"
|
|
|
- >七天内免登录</u-checkbox>
|
|
|
+ </scroll-view>
|
|
|
+ <view class="item">
|
|
|
+ <swiper :circular="true" style="height: 100%;" :current="current" @change="swiperChange"
|
|
|
+ @animationfinish="animationfinish">
|
|
|
+ <swiper-item style="height: 100%;">
|
|
|
+ <view class="flex justify-center flex-direction align-center">
|
|
|
+ <image style="width: 120rpx;height: 120rpx;" src="../../static/login/yuangong.png" ></image>
|
|
|
+ </view>
|
|
|
+ <view class="input">
|
|
|
+ <image src="../../static/login/yuanqu.png" mode=""></image>
|
|
|
+ <input disabled v-model="agencyName" @click="agencyShow = true" placeholder="请选择您所在的园区" type="text" value="" />
|
|
|
+ </view>
|
|
|
+ <view class="input">
|
|
|
+ <image class="phone" src="../../static/login/phone.png" mode=""></image>
|
|
|
+ <input v-model="phone" placeholder="请输入您的手机号码" type="text" value="" />
|
|
|
+ </view>
|
|
|
+ <view class="input" style="position: relative;">
|
|
|
+ <image src="../../static/login/code.png" mode=""></image>
|
|
|
+ <input v-model="yzm" style="width: 60%;" placeholder="请输入验证码" type="text" value="" />
|
|
|
+ <view :style="showText?'':'background-color: #A7A7A7;'" class="code" @click="getCode()">{{tips}}</view>
|
|
|
+ </view>
|
|
|
+ </swiper-item>
|
|
|
+ <swiper-item >
|
|
|
+ <view class="flex justify-center flex-direction align-center">
|
|
|
+ <image style="width: 90rpx;height: 90rpx;" src="../../static/login/qiye.png" ></image>
|
|
|
+ </view>
|
|
|
+ <view class="input">
|
|
|
+ <image src="../../static/login/yuanqu.png" mode=""></image>
|
|
|
+ <input disabled v-model="agencyName" @click="agencyShow = true" placeholder="请选择您所在的园区" type="text" value="" />
|
|
|
+ </view>
|
|
|
+ <view class="input">
|
|
|
+ <image class="qiye" src="../../static/login/qiye.png" mode=""></image>
|
|
|
+ <input disabled v-model="enterpriseName" @click="enterpriseShow = true" placeholder="请选择您所在的企业" type="text" value="" />
|
|
|
+ </view>
|
|
|
+ <view class="input" >
|
|
|
+ <image src="../../static/login/account.png" mode=""></image>
|
|
|
+ <input v-model="enterpriseAccount" style="width: 60%;" placeholder="请输入您的登录账号" type="text" value="" />
|
|
|
+ </view>
|
|
|
+ <view class="input" >
|
|
|
+ <image src="../../static/login/password.png" mode=""></image>
|
|
|
+ <input v-model="enterprisePassword" style="width: 60%;" placeholder="请输入您的登录密码" type="password" value="" />
|
|
|
+ </view>
|
|
|
+ </swiper-item>
|
|
|
+ <swiper-item >
|
|
|
+ <view class="flex justify-center " >
|
|
|
+ <image style="width: 120rpx;height: 120rpx;" src="../../static/login/guanliyuan.png" ></image>
|
|
|
+ </view>
|
|
|
+ <view class="input">
|
|
|
+ <image src="../../static/login/yuanqu.png" mode=""></image>
|
|
|
+ <input disabled v-model="agencyName" @click="agencyShow = true" placeholder="请选择您所在的园区" type="text" value="" />
|
|
|
+ </view>
|
|
|
+ <view class="input" >
|
|
|
+ <image src="../../static/login/account.png" mode=""></image>
|
|
|
+ <input v-model="agencyAccount" style="width: 60%;" placeholder="请输入您的登录账号" type="text" value="" />
|
|
|
+ </view>
|
|
|
+ <view class="input" >
|
|
|
+ <image src="../../static/login/password.png" mode=""></image>
|
|
|
+ <input type="password" v-model="agencyPassword" style="width: 60%;" placeholder="请输入您的登录密码" value="" />
|
|
|
+ </view>
|
|
|
+ </swiper-item>
|
|
|
+ <swiper-item >
|
|
|
+ <view class="flex justify-center flex-direction align-center">
|
|
|
+ <image style="width: 100rpx;height: 100rpx;" src="../../static/login/fangke.png"></image>
|
|
|
+ </view>
|
|
|
+ <view class="input">
|
|
|
+ <image class="qiye" src="../../static/login/time.png" mode=""></image>
|
|
|
+ <input disabled v-model="interviewTime" @click="interviewTimeShow = true" placeholder="请选择访问时间" type="text" value="" />
|
|
|
+ </view>
|
|
|
+ <view class="input">
|
|
|
+ <image src="../../static/login/yuanqu.png" mode=""></image>
|
|
|
+ <input disabled v-model="agencyName" @click="agencyShow = true" placeholder="请选择您要访问的园区" type="text" value="" />
|
|
|
+ </view>
|
|
|
+ <view class="input">
|
|
|
+ <image class="qiye" src="../../static/login/qiye.png" mode=""></image>
|
|
|
+ <input disabled v-model="enterpriseName" @click="enterpriseShow = true" placeholder="请选择您要访问的企业 (选填)" type="text" value="" />
|
|
|
+ </view>
|
|
|
+ <view @click="jump('/pages/guest/records/records')" class="text-center base-color padding-top-50 text-lg">
|
|
|
+ <text style="text-decoration: underline;">申请记录</text>
|
|
|
+ </view>
|
|
|
+ </swiper-item>
|
|
|
+ </swiper>
|
|
|
+ </view>
|
|
|
+ <button v-if="current!=3" class="button" @click="login()">登 录</button>
|
|
|
+ <button v-else class="button" @click="applyOpenDoor">申请开门</button>
|
|
|
+ </view>
|
|
|
+ <!-- 园区 -->
|
|
|
+ <u-popup border-radius="60" height="60%" mode="bottom" v-model="agencyShow">
|
|
|
+ <view class="fixed cu-bar search bg-white">
|
|
|
+ <view class="search-form round">
|
|
|
+ <text class="cuIcon-search"></text>
|
|
|
+ <u-input style="width: 90%;" v-model="agencyKeyWord" type="text" :adjust-position="false" placeholder="请输入关键字搜索" confirm-type="search"/>
|
|
|
</view>
|
|
|
- <button class="button" @click="login()">登 录</button>
|
|
|
- </form>
|
|
|
- <view v-if="typeIndex==0">
|
|
|
- <view class="t-f">
|
|
|
- <u-divider color="#aaa" border-color="#aaa">微信快速登陆</u-divider>
|
|
|
+ </view>
|
|
|
+ <scroll-view v-if="!$isEmpty(agencyList)" style="padding-top: 110rpx;height: 100%;" :scroll-y="true" >
|
|
|
+ <view @click="selectAgency(item)" hover-class="hoverClass" class="text-center padding-30 solid-bottom" v-for="(item,index) in agencyList" :key="index">
|
|
|
+ <text>{{item.agencyName}}</text>
|
|
|
</view>
|
|
|
- <!-- <view class="t-f"><text>————— 微信快速登录 —————</text></view> -->
|
|
|
- <view style="display: flex;justify-content: center;padding-top: 50rpx;">
|
|
|
- <view @click="wxLogin()"><image style="width: 88rpx;height: 88rpx;" src="@/static/login/wx.png"></image></view>
|
|
|
+ <u-divider v-if="agencyList.length>=20" height="80">只显示20条数据</u-divider>
|
|
|
+ </scroll-view>
|
|
|
+ <u-empty v-else name="search"></u-empty>
|
|
|
+ </u-popup>
|
|
|
+ <!-- 企业列表 -->
|
|
|
+ <u-popup border-radius="60" height="60%" mode="bottom" v-model="enterpriseShow">
|
|
|
+ <view class="fixed cu-bar search bg-white">
|
|
|
+ <view class="search-form round">
|
|
|
+ <text class="cuIcon-search"></text>
|
|
|
+ <u-input style="width: 90%;" v-model="enterpriseKeyword" type="text" :adjust-position="false" placeholder="请输入关键字搜索" confirm-type="search"/>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <u-popup border-radius="60" height="60%" mode="bottom" v-model="enterpriseShow">
|
|
|
- <view class="fixed cu-bar search bg-white">
|
|
|
- <view class="search-form round">
|
|
|
- <text class="cuIcon-search"></text>
|
|
|
- <u-input style="width: 90%;" v-model="keyword" type="text" :adjust-position="false" placeholder="请输入关键字搜索" confirm-type="search"/>
|
|
|
- </view>
|
|
|
- <!-- <view @click="fetchEnterpriseList" class="action">
|
|
|
- <button class="cu-btn bg-blue shadow-blur round">搜索</button>
|
|
|
- </view> -->
|
|
|
+ <scroll-view v-if="!$isEmpty(enterpriseList)" style="padding-top: 110rpx;height: 100%;" :scroll-y="true" >
|
|
|
+ <view @click="selectEnterprise(item)" hover-class="hoverClass" class="text-center padding-30 solid-bottom" v-for="(item,index) in enterpriseList" :key="index">
|
|
|
+ <text>{{item.enterpriseName}}</text>
|
|
|
</view>
|
|
|
- <scroll-view v-if="!$isEmpty(enterpriseList)" @scrolltolower="scrolltolower" style="padding-top: 110rpx;height: 100%;" :scroll-y="true" >
|
|
|
- <view @click="selectEnterprise(item)" hover-class="hoverClass" class="text-center padding-30 solid-bottom" v-for="(item,index) in enterpriseList" :key="index">
|
|
|
- <text>{{item.enterpriseName}}</text>
|
|
|
- </view>
|
|
|
- <u-divider v-if="flag" height="80">没有更多了</u-divider>
|
|
|
- </scroll-view>
|
|
|
- <u-empty v-else name="search"></u-empty>
|
|
|
- </u-popup>
|
|
|
-
|
|
|
- <!-- 园区列表 -->
|
|
|
- <u-picker v-model="ganderSelectShow" @confirm="ganderSelectCallback" :range="ganderSelectList" range-key="agencyName" mode="selector"></u-picker>
|
|
|
-
|
|
|
- <u-action-sheet @click="typeClick" :list="typeList" v-model="typeShow"></u-action-sheet>
|
|
|
- <u-verification-code seconds="60" @end="end" @start="start" ref="uCode" @change="codeChange"></u-verification-code>
|
|
|
- </view>
|
|
|
+ <u-divider v-if="enterpriseList.length>=20" height="80">只显示20条数据</u-divider>
|
|
|
+ </scroll-view>
|
|
|
+ <u-empty v-else name="search"></u-empty>
|
|
|
+ </u-popup>
|
|
|
+ <!-- 访问时间 -->
|
|
|
+ <u-picker @confirm="interviewTimeConfirm" :params="params" v-model="interviewTimeShow" mode="time"></u-picker>
|
|
|
+ <!-- 验证码 -->
|
|
|
+ <u-verification-code seconds="60" @end="end" @start="start" ref="uCode" @change="codeChange"></u-verification-code>
|
|
|
+
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
-let that;
|
|
|
+var that;
|
|
|
export default {
|
|
|
+ name: 'card',
|
|
|
data() {
|
|
|
return {
|
|
|
- keyword:'',
|
|
|
- enterpriseShow:false,
|
|
|
- enterpriseList:[],
|
|
|
-
|
|
|
- checked:false,//七天免登录
|
|
|
-
|
|
|
- //登录类型
|
|
|
- typeList:[{text:'员工登录',value:'0'},{text:'企业登录',value:'1'},{text:'管理员登录',value:'2'}],
|
|
|
- typeShow:false,
|
|
|
- typeIndex:0,
|
|
|
-
|
|
|
- //员工登录:手机号码+验证码登录
|
|
|
- phone: '',
|
|
|
- yzm: '' ,
|
|
|
+ contentHeight:'',
|
|
|
|
|
|
+ list: [{
|
|
|
+ name: '员工'
|
|
|
+ }, {
|
|
|
+ name: '企业'
|
|
|
+ }, {
|
|
|
+ name: '管理员',
|
|
|
+ }, {
|
|
|
+ name: '访客',
|
|
|
+ }],
|
|
|
+ current: 0,
|
|
|
//发送验证码
|
|
|
tips: '',
|
|
|
showText:true,
|
|
|
|
|
|
- //企业登录:统一信用代码+密码登录
|
|
|
- enterpriseName:'',
|
|
|
- creditCode:'',
|
|
|
- password:'',
|
|
|
+ //园区下拉框
|
|
|
+ agencyName:'',
|
|
|
+ agencyList:[],
|
|
|
+ agencyKeyWord:'',
|
|
|
+ agencyShow:false,
|
|
|
+
|
|
|
+ //园区登录
|
|
|
+ agencyId:'',
|
|
|
+ agencyAccount:'',
|
|
|
+ agencyPassword:'',
|
|
|
+
|
|
|
+ //企业下拉框
|
|
|
+ enterpriseName:'',//回显
|
|
|
+ enterpriseShow:false,
|
|
|
+ enterpriseList:[],
|
|
|
+ enterpriseKeyword:'',
|
|
|
|
|
|
- //园区管理员登陆
|
|
|
- ganderInfo:'',//选择的园区对象信息
|
|
|
- inputGanderPsw:'',//输入的密码
|
|
|
- ganderSelectList: [],//园区列表
|
|
|
- ganderSelectShow: false,
|
|
|
+ //企业登录
|
|
|
+ creditCode:'',
|
|
|
+ enterpriseId:'',
|
|
|
+ enterpriseAccount:'',
|
|
|
+ enterprisePassword:'',
|
|
|
|
|
|
- //微信快速登陆
|
|
|
openId:'',
|
|
|
+ //员工登录
|
|
|
+ phone:'',
|
|
|
+ yzm:'',
|
|
|
|
|
|
- //分页
|
|
|
- current:1,
|
|
|
- flag:false,
|
|
|
+ //访客
|
|
|
+ interviewTimeShow:false,
|
|
|
+ interviewTime:'',
|
|
|
+ params: {
|
|
|
+ year: true,
|
|
|
+ month: true,
|
|
|
+ day: true,
|
|
|
+ hour: false,
|
|
|
+ minute: false,
|
|
|
+ second: false
|
|
|
+ },
|
|
|
};
|
|
|
},
|
|
|
- watch:{
|
|
|
- keyword(){
|
|
|
- let that=this
|
|
|
- //节流函数
|
|
|
- if (this.timer){
|
|
|
- clearTimeout(this.timer)//阻止setTimeout函数的执行
|
|
|
- }
|
|
|
- this.timer = setTimeout(() => {
|
|
|
- that.enterpriseList=[]
|
|
|
- that.current=1
|
|
|
- that.fetchEnterpriseList()
|
|
|
- }, 500)
|
|
|
- },
|
|
|
- },
|
|
|
onLoad() {
|
|
|
+ this.contentHeight=this.$u.sys().windowHeight+'px'
|
|
|
that=this
|
|
|
- this.getOpenid()
|
|
|
if (this.$isAuth()) {
|
|
|
- //免登录
|
|
|
- uni.switchTab({
|
|
|
- url:"/pages/index/index"
|
|
|
+ uni.reLaunch({
|
|
|
+ url:'/pages/index/index'
|
|
|
})
|
|
|
+ //免登录
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.$isEmpty(this.$cache.get('openId'))){
|
|
|
+ this.getOpenId()
|
|
|
+ }else{
|
|
|
+ this.openId=this.$cache.get('openId')
|
|
|
}
|
|
|
+ this.getAgencyList()
|
|
|
},
|
|
|
onShow() {
|
|
|
+ this.handelNoToken()
|
|
|
this.getAppletStatus()
|
|
|
},
|
|
|
- methods: {
|
|
|
- getAppletStatus(){
|
|
|
- this.$api.wxApi.getAppletStatus({id:1}).then(res=>{
|
|
|
- uni.setStorageSync("appletStatus",res.data.isOnline)
|
|
|
- })
|
|
|
+ watch:{
|
|
|
+ agencyKeyWord(){
|
|
|
+ let that=this
|
|
|
+ //节流函数
|
|
|
+ if (this.timer){
|
|
|
+ clearTimeout(this.timer)
|
|
|
+ }
|
|
|
+ this.timer = setTimeout(() => {
|
|
|
+ that.agencyList=[]
|
|
|
+ that.getAgencyList()
|
|
|
+ }, 500)
|
|
|
},
|
|
|
- scrolltolower(e){
|
|
|
- if(this.enterpriseList.length<this.current*10){
|
|
|
- this.flag=true
|
|
|
- return
|
|
|
- }else{
|
|
|
- this.current++
|
|
|
- this.fetchEnterpriseList()
|
|
|
+ enterpriseKeyword(){
|
|
|
+ let that=this
|
|
|
+ //节流函数
|
|
|
+ if (this.timer){
|
|
|
+ clearTimeout(this.timer)
|
|
|
}
|
|
|
-
|
|
|
+ this.timer = setTimeout(() => {
|
|
|
+ that.enterpriseList=[]
|
|
|
+ that.getEnterpriseList()
|
|
|
+ }, 500)
|
|
|
+ },
|
|
|
+ },
|
|
|
+ methods:{
|
|
|
+ //处理没token但是却选择了园区的情况
|
|
|
+ //访客从申请列表返回登录页时,是没有token的,这样导致其他接口报错
|
|
|
+ async handelNoToken(){
|
|
|
+ let that=this
|
|
|
+ if(!this.$cache.get('tokenObj')&&!this.$isEmpty(this.agencyId)){
|
|
|
+ //如果没有token,且园区id不为空
|
|
|
+ this.agencyList.forEach(item=>{
|
|
|
+ if(item.id==that.agencyId){
|
|
|
+ let params={
|
|
|
+ tenantId:item.tenantId,
|
|
|
+ username:item.account,
|
|
|
+ password:item.password
|
|
|
+ }
|
|
|
+ //放进缓存中,并获取token
|
|
|
+ that.$cache.put('tokenObj',params)
|
|
|
+ //获取token
|
|
|
+ that.$api.getToken(that.$u.queryParams(params)).then(res=>{
|
|
|
+ let token=res.token_type+" "+res.access_token
|
|
|
+ uni.setStorageSync('token', token)
|
|
|
+ //获取企业列表
|
|
|
+ that.getEnterpriseList()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //访问时间
|
|
|
+ interviewTimeConfirm(e){
|
|
|
+ this.interviewTime=e.year+'-'+e.month+'-'+e.day
|
|
|
},
|
|
|
/**
|
|
|
* 获取openid
|
|
|
*/
|
|
|
- getOpenid(){
|
|
|
- let that=this
|
|
|
+ getOpenId(){
|
|
|
uni.login({
|
|
|
success: (res) => {
|
|
|
let data={
|
|
|
@@ -196,60 +286,41 @@ export default {
|
|
|
this.$api.wxApi.getOpenId(data).then(res=>{
|
|
|
let resData= JSON.parse(res.data)
|
|
|
this.openId=resData.openid
|
|
|
+ this.$cache.put('openId',this.openId)
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- /**
|
|
|
- * 加载企业列表
|
|
|
- */
|
|
|
- fetchEnterpriseList(){
|
|
|
+ //获取园区列表
|
|
|
+ getAgencyList(){
|
|
|
let params={
|
|
|
- current:this.current,
|
|
|
- enterpriseName:this.keyword
|
|
|
+ size:20,
|
|
|
+ agencyName:this.agencyKeyWord
|
|
|
}
|
|
|
- this.$api.enterprise.page(params).then(res=>{
|
|
|
- this.enterpriseList = [...this.enterpriseList,...res.data.records]
|
|
|
+ this.$api.agency.getAgencyTenantList(params).then(res=>{
|
|
|
+ this.agencyList = res.data
|
|
|
})
|
|
|
},
|
|
|
- /**
|
|
|
- * 选择公司的回调
|
|
|
- */
|
|
|
- selectEnterprise(item){
|
|
|
- this.$cache.put('enterpriseName',item.enterpriseName)
|
|
|
- this.enterpriseShow=false
|
|
|
- this.creditCode=item.creditCode
|
|
|
- this.enterpriseName=item.enterpriseName
|
|
|
- },
|
|
|
- /**
|
|
|
- * 登陆类型
|
|
|
- * @param {Object} index
|
|
|
- */
|
|
|
- typeClick(index){
|
|
|
- this.typeIndex=index
|
|
|
- if (this.typeIndex==1) {
|
|
|
- //企业登录,加载企业数据
|
|
|
- this.fetchEnterpriseList()
|
|
|
- }else if (this.typeIndex==2) {
|
|
|
- //园区管理员登陆
|
|
|
- this.fetchAgencyList()
|
|
|
+ //选择园区
|
|
|
+ selectAgency(item){
|
|
|
+ console.log(item);
|
|
|
+ let params={
|
|
|
+ tenantId:item.tenantId,
|
|
|
+ username:item.account,
|
|
|
+ password:item.password
|
|
|
}
|
|
|
- },
|
|
|
- /**
|
|
|
- * 获取园区列表
|
|
|
- */
|
|
|
- fetchAgencyList(){
|
|
|
- this.$api.agency.page({size:200}).then(res=>{
|
|
|
- this.ganderSelectList=res.data
|
|
|
+ this.agencyId=item.id
|
|
|
+ this.agencyName=item.agencyName
|
|
|
+ this.agencyShow=false
|
|
|
+ this.$cache.put('tokenObj',params)
|
|
|
+ //获取token
|
|
|
+ this.$api.getToken(this.$u.queryParams(params)).then(res=>{
|
|
|
+ let token=res.token_type+" "+res.access_token
|
|
|
+ uni.setStorageSync('token', token)
|
|
|
+ //获取企业列表
|
|
|
+ this.getEnterpriseList()
|
|
|
})
|
|
|
},
|
|
|
- /**
|
|
|
- * 选择园区后的回调
|
|
|
- */
|
|
|
- ganderSelectCallback(e) {
|
|
|
- let index=e[0]
|
|
|
- this.ganderInfo=this.ganderSelectList[index]
|
|
|
- },
|
|
|
/**
|
|
|
* 获取验证码
|
|
|
*/
|
|
|
@@ -294,9 +365,6 @@ export default {
|
|
|
this.$u.toast('倒计时结束后再发送');
|
|
|
}
|
|
|
},
|
|
|
- checkboxChange(e){
|
|
|
- this.checked=e.value
|
|
|
- },
|
|
|
codeChange(text) {
|
|
|
this.tips = text;
|
|
|
},
|
|
|
@@ -308,62 +376,28 @@ export default {
|
|
|
},
|
|
|
//当前登录按钮操作
|
|
|
async login() {
|
|
|
- if (this.typeIndex==0) {
|
|
|
+ if (this.current==0) {
|
|
|
//员工登录
|
|
|
this.staffLogin()
|
|
|
- }else if (this.typeIndex==1) {
|
|
|
+ }else if (this.current==1) {
|
|
|
//企业登录
|
|
|
this.enterpriseLogin()
|
|
|
- }else if (this.typeIndex==2) {
|
|
|
+ }else if (this.current==2) {
|
|
|
//管理员登陆
|
|
|
this.ganderLogin()
|
|
|
}
|
|
|
},
|
|
|
- /**
|
|
|
- * 登录成功的处理方式
|
|
|
- * 如果是从其他地方跳转回的登录页,则登录后跳转回原页面
|
|
|
- * 否则跳转到首页
|
|
|
- */
|
|
|
- handelSuccessLogin(loginType){
|
|
|
- //储存必要信息
|
|
|
- if (that.checked) {
|
|
|
- //七天内免登录
|
|
|
- //存储登录类型,用于判断用户的登录类型和是否登录
|
|
|
- that.$cache.put("loginType",loginType,1*24*60*60*7)
|
|
|
- }else{
|
|
|
- //三十分内钟免登录
|
|
|
- that.$cache.put("loginType",loginType,1*60*30)
|
|
|
- }
|
|
|
- //跳转
|
|
|
- uni.showLoading({
|
|
|
- title: '登陆中...'
|
|
|
- })
|
|
|
- setTimeout(()=>{
|
|
|
- uni.hideLoading()
|
|
|
- if (that.$isEmpty(that.$Route.query.fullPath)) {
|
|
|
- uni.switchTab({
|
|
|
- url:"/pages/index/index"
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- if (that.$Route.query.fullPath.indexOf('login')) {
|
|
|
- uni.switchTab({
|
|
|
- url:"/pages/index/index"
|
|
|
- })
|
|
|
- }else{
|
|
|
- uni.reLaunch({
|
|
|
- url:that.$Route.query.fullPath
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
- },1200)
|
|
|
- },
|
|
|
//员工登录
|
|
|
async staffLogin(){
|
|
|
+ //15622205184
|
|
|
if (this.phone=='15622205184') {
|
|
|
this.userLogin()
|
|
|
return
|
|
|
}
|
|
|
+ if (this.$isEmpty(this.agencyId)) {
|
|
|
+ this.$u.toast('请选择您所在的园区')
|
|
|
+ return
|
|
|
+ }
|
|
|
if (!this.phone) {
|
|
|
uni.showToast({ title: '请输入手机号', icon: 'none' });
|
|
|
return;
|
|
|
@@ -394,14 +428,13 @@ export default {
|
|
|
//用户登陆
|
|
|
async userLogin(){
|
|
|
//通过手机号查找该员工信息
|
|
|
- let staffRes=await this.$api.enterprisestaff.page({phone:this.phone})
|
|
|
- let records=staffRes.data.records
|
|
|
+ let staffRes=await this.$api.login({loginType:0,phone:this.phone})
|
|
|
+ let records=staffRes.data
|
|
|
if (this.$isEmpty(records)) {
|
|
|
- let data={
|
|
|
- phone:this.phone
|
|
|
- }
|
|
|
//如果没有员工信息。新用户。跳转到注册认证界面
|
|
|
- this.$Router.push({name:'auth',params:data})
|
|
|
+ uni.navigateTo({
|
|
|
+ url:'/pages/auth/auth?phone='+this.phone
|
|
|
+ })
|
|
|
}else{
|
|
|
let userInfo=records[0]
|
|
|
if (userInfo.examine==0) {
|
|
|
@@ -431,62 +464,62 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- /**
|
|
|
- * 微信快速登陆
|
|
|
- */
|
|
|
- wxLogin(){
|
|
|
- if (this.$isEmpty(this.openId)) {
|
|
|
- this.$showModel('获取微信openId失败,请用手机号登录',false)
|
|
|
- return
|
|
|
+ //获取企业列表
|
|
|
+ getEnterpriseList(){
|
|
|
+ let params={
|
|
|
+ size:20,
|
|
|
+ enterpriseName:this.enterpriseKeyword
|
|
|
}
|
|
|
- this.$api.enterprisestaff.page({openId:this.openId,examine:1}).then(res=>{
|
|
|
- if (this.$isEmpty(res.data.records)) {
|
|
|
- this.$refs.uTips.show({
|
|
|
- title: '请先用绑定的手机号登陆!',
|
|
|
- type: 'primary',
|
|
|
- duration: '2500'
|
|
|
- })
|
|
|
- }else{
|
|
|
- let userInfo=res.data.records[0]
|
|
|
- getApp().globalData.userInfo=userInfo
|
|
|
- //存储手机号,便于拉取用户信息
|
|
|
- this.$cache.put('agencyTenantId',userInfo.tenantId)
|
|
|
- this.$cache.put('phone',userInfo.phone)
|
|
|
- this.$cache.put('agencyId',userInfo.agencyId)
|
|
|
- this.$cache.put('enterpriseId',userInfo.enterpriseId)
|
|
|
- this.handelSuccessLogin('staff')
|
|
|
- }
|
|
|
+ this.$api.enterprise.page(params).then(res=>{
|
|
|
+ this.enterpriseList =res.data.records
|
|
|
})
|
|
|
},
|
|
|
+ //选择企业
|
|
|
+ selectEnterprise(item){
|
|
|
+ this.creditCode=item.creditCode
|
|
|
+ this.enterpriseShow=false
|
|
|
+ this.enterpriseName=item.enterpriseName
|
|
|
+ this.enterpriseId=item.id
|
|
|
+ },
|
|
|
/**
|
|
|
* 企业登录
|
|
|
*/
|
|
|
async enterpriseLogin(){
|
|
|
- if (this.$isEmpty(this.creditCode)) {
|
|
|
+ if(this.$isEmpty(this.agencyId)){
|
|
|
+ this.$u.toast('请选择园区')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.$isEmpty(this.enterpriseId)) {
|
|
|
this.$u.toast('请选择企业')
|
|
|
return
|
|
|
}
|
|
|
- if (this.$isEmpty(this.password)) {
|
|
|
+ if (this.$isEmpty(this.enterpriseAccount)) {
|
|
|
+ this.$u.toast("请输入账号")
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.$isEmpty(this.enterprisePassword)) {
|
|
|
this.$u.toast("请输入密码")
|
|
|
return
|
|
|
}
|
|
|
- this.$api.enterprise.page({creditCode:this.creditCode,password:this.password}).then(res=>{
|
|
|
- if (this.$isEmpty(res.data.records)) {
|
|
|
- if (this.$isEmpty(res.data.data)) {
|
|
|
- this.$u.toast('登录失败,密码错误')
|
|
|
- return
|
|
|
- }
|
|
|
+ let params={
|
|
|
+ "loginType":1,
|
|
|
+ "enterpriseId": this.enterpriseId,
|
|
|
+ "enterpriseAccount": this.enterpriseAccount,
|
|
|
+ "enterprisePassword": this.enterprisePassword
|
|
|
+ }
|
|
|
+ this.$api.login(params).then(res=>{
|
|
|
+ if (this.$isEmpty(res.data)) {
|
|
|
+ this.$u.toast('账号或密码错误')
|
|
|
+ return
|
|
|
}else{
|
|
|
//公司信息
|
|
|
- let userInfo=res.data.records[0]
|
|
|
- this.$api.agency.page({residentialId:userInfo.residentialId}).then(agencyRes=>{
|
|
|
- this.$cache.put('agencyId',agencyRes.data[0].id)
|
|
|
- })
|
|
|
+ let userInfo=res.data[0]
|
|
|
+ this.$cache.put('agencyId',userInfo.agencyId)
|
|
|
getApp().globalData.userInfo=userInfo
|
|
|
- //存储公司统一信用代码,便于拉取企业信息
|
|
|
+ this.$cache.put('loginAccount',this.enterpriseAccount)
|
|
|
this.$cache.put('agencyTenantId',userInfo.tenantId)
|
|
|
this.$cache.put('creditCode',this.creditCode)
|
|
|
- this.$cache.put('enterpriseId',userInfo.id)
|
|
|
+ this.$cache.put('enterpriseId',userInfo.enterpriseId)
|
|
|
this.handelSuccessLogin('enterprise')
|
|
|
}
|
|
|
})
|
|
|
@@ -494,180 +527,247 @@ export default {
|
|
|
/**
|
|
|
* 管理员登陆
|
|
|
*/
|
|
|
- ganderLogin(){
|
|
|
- if (this.$isEmpty(this.ganderInfo)) {
|
|
|
- this.$u.toast('请选择园区')
|
|
|
+ async ganderLogin(){
|
|
|
+ if (this.$isEmpty(this.agencyId)) {
|
|
|
+ this.$u.toast('请选择您所在的园区')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.$isEmpty(this.agencyAccount)) {
|
|
|
+ this.$u.toast('请输入账号')
|
|
|
return
|
|
|
}
|
|
|
- if (this.$isEmpty(this.inputGanderPsw)) {
|
|
|
+ if (this.$isEmpty(this.agencyPassword)) {
|
|
|
this.$u.toast('请输入密码')
|
|
|
return
|
|
|
}
|
|
|
- /**
|
|
|
- * 后台直接返回了明文的园区密码,也没写密码校验的接口
|
|
|
- * 就直接在前端校验好了
|
|
|
- * 安全性差!!!!
|
|
|
- */
|
|
|
- if (this.inputGanderPsw==this.ganderInfo.password) {
|
|
|
- //输入密码成功
|
|
|
- //园区信息
|
|
|
- this.$cache.put('agencyId',this.ganderInfo.id)
|
|
|
- this.$cache.put('agency',this.ganderInfo.agencyName)
|
|
|
- this.$cache.put('agencyTenantId',this.ganderInfo.tenantId)
|
|
|
- getApp().globalData.userInfo=this.ganderInfo
|
|
|
- this.handelSuccessLogin('agency')
|
|
|
- }else{
|
|
|
- this.$u.toast('登录失败,密码错误')
|
|
|
+ let params={
|
|
|
+ "loginType":2,
|
|
|
+ "agencyId": this.agencyId,
|
|
|
+ "agencyAccount": this.agencyAccount,
|
|
|
+ "agencyPassword": this.agencyPassword
|
|
|
+ }
|
|
|
+ let res=await this.$api.login(params)
|
|
|
+ let ganderInfo=res.data[0]
|
|
|
+ if (this.$isEmpty(ganderInfo)) {
|
|
|
+ this.$u.toast('账号或密码错误')
|
|
|
return
|
|
|
}
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
+ //订阅消息通知
|
|
|
+ await this.$mpi.subscribe(this.$adminTmplIds)
|
|
|
+ //输入密码成功
|
|
|
+ //园区信息
|
|
|
+ this.$cache.put('loginAccount',this.agencyAccount)
|
|
|
+ this.$cache.put('agencyId',ganderInfo.agencyId)
|
|
|
+ this.$cache.put('agency',ganderInfo.agencyName)
|
|
|
+ this.$cache.put('agencyTenantId',ganderInfo.tenantId)
|
|
|
+ getApp().globalData.userInfo=ganderInfo
|
|
|
+ this.handelSuccessLogin('agency')
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 登录成功的处理方式
|
|
|
+ * 如果是从其他地方跳转回的登录页,则登录后跳转回原页面
|
|
|
+ * 否则跳转到首页
|
|
|
+ */
|
|
|
+ handelSuccessLogin(loginType){
|
|
|
+ that.$cache.put("loginType",loginType)
|
|
|
+ //跳转
|
|
|
+ uni.showLoading({
|
|
|
+ title: '登陆中...'
|
|
|
+ })
|
|
|
+ uni.switchTab({
|
|
|
+ url:"/pages/index/index"
|
|
|
+ })
|
|
|
+ // setTimeout(()=>{
|
|
|
+ // uni.hideLoading()
|
|
|
+ // if (that.$isEmpty(that.$Route.query.fullPath)) {
|
|
|
+ // uni.switchTab({
|
|
|
+ // url:"/pages/index/index"
|
|
|
+ // })
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if (that.$Route.query.fullPath.indexOf('login')) {
|
|
|
+ // uni.switchTab({
|
|
|
+ // url:"/pages/index/index"
|
|
|
+ // })
|
|
|
+ // }else{
|
|
|
+ // uni.reLaunch({
|
|
|
+ // url:that.$Route.query.fullPath
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+
|
|
|
+ // },1200)
|
|
|
+ },
|
|
|
+ async applyOpenDoor(){
|
|
|
+ if (this.$isEmpty(this.interviewTime)) {
|
|
|
+ this.$u.toast('请选择访问时间')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.$isEmpty(this.agencyId)) {
|
|
|
+ this.$u.toast('请选择要访问的园区')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let params={
|
|
|
+ interviewTime:this.interviewTime,
|
|
|
+ agencyId:this.agencyId,
|
|
|
+ openId:this.openId
|
|
|
+ }
|
|
|
+ let res=await this.$api.guest.page(params)
|
|
|
+ let data=res.data.records[0]
|
|
|
+ if (this.$isEmpty(data)) {
|
|
|
+ that.reApply(params)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ uni.showModal({
|
|
|
+ content:"检测到您有该园区的申请记录,是否立即去开门?",
|
|
|
+ cancelText:"重新申请",
|
|
|
+ confirmText:'去开门',
|
|
|
+ success: (res) => {
|
|
|
+ if (res.confirm) {
|
|
|
+ console.log("去开门")
|
|
|
+ }else{
|
|
|
+ that.reApply(params)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ reApply(params){
|
|
|
+ params.enterpriseId=this.enterpriseId,
|
|
|
+ params.agencyName=this.agencyName
|
|
|
+ params.enterpriseName=this.enterpriseName
|
|
|
+ uni.navigateTo({
|
|
|
+ url:"/pages/guest/guest"+this.$u.queryParams(params)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ jump(url){
|
|
|
+ if (!this.$isEmpty(url)) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ isToday(str){
|
|
|
+ var d = new Date(str.replace(/-/g,"/"));
|
|
|
+ var todaysDate = new Date();
|
|
|
+ if(d.setHours(0,0,0,0) == todaysDate.setHours(0,0,0,0)){
|
|
|
+ return true;
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getAppletStatus(){
|
|
|
+ this.$api.wxApi.getAppletStatus({id:1}).then(res=>{
|
|
|
+ uni.setStorageSync("appletStatus",res.data.isOnline)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ tabSelect(index){
|
|
|
+ this.current=index
|
|
|
+ },
|
|
|
+ swiperChange(e) {
|
|
|
+ this.current = e.detail.current
|
|
|
+ },
|
|
|
+ animationfinish({detail: { current }}) {
|
|
|
+ this.current = current;
|
|
|
+ },
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
-<style lang="scss" >
|
|
|
-page{
|
|
|
- background-color: #FFFFFF;
|
|
|
-}
|
|
|
-
|
|
|
-.hoverClass{
|
|
|
- background-color: #eee;
|
|
|
-}
|
|
|
-.checkbox{
|
|
|
- padding-bottom: 50rpx;
|
|
|
- padding-left: 20rpx;
|
|
|
- margin-top: -10rpx;
|
|
|
-}
|
|
|
-
|
|
|
-.cu-btn.lg {
|
|
|
- padding: 0 50upx;
|
|
|
- font-size: 30upx;
|
|
|
- height: 70upx;
|
|
|
-}
|
|
|
-
|
|
|
-.img-a {
|
|
|
- position: absolute;
|
|
|
- width: 100%;
|
|
|
- top: -300rpx;
|
|
|
- right: -100rpx;
|
|
|
-}
|
|
|
-.img-b {
|
|
|
- position: absolute;
|
|
|
- width: 50%;
|
|
|
- bottom: 0;
|
|
|
- left: -50rpx;
|
|
|
- margin-bottom: -200rpx;
|
|
|
-}
|
|
|
-.t-login {
|
|
|
- width: 600rpx;
|
|
|
- margin: -200rpx auto;
|
|
|
- font-size: 28rpx;
|
|
|
- color: #000;
|
|
|
-}
|
|
|
-
|
|
|
-.t-login .button {
|
|
|
- font-size: 28rpx;
|
|
|
- background: #5677fc;
|
|
|
- color: #fff;
|
|
|
- height: 90rpx;
|
|
|
- line-height: 90rpx;
|
|
|
- border-radius: 50rpx;
|
|
|
- box-shadow: 0 5px 7px 0 rgba(86, 119, 252, 0.2);
|
|
|
-}
|
|
|
-
|
|
|
-.t-login .input {
|
|
|
- padding: 0 20rpx 0 120rpx;
|
|
|
- height: 90rpx;
|
|
|
- line-height: 90rpx;
|
|
|
- margin-bottom: 50rpx;
|
|
|
- background: #f8f7fc;
|
|
|
- border: 1px solid #e9e9e9;
|
|
|
- font-size: 28rpx;
|
|
|
- border-radius: 50rpx;
|
|
|
-}
|
|
|
|
|
|
-.t-login .t-a {
|
|
|
- position: relative;
|
|
|
-}
|
|
|
-
|
|
|
-.t-login .t-a image {
|
|
|
- width: 40rpx;
|
|
|
- height: 42rpx;
|
|
|
- position: absolute;
|
|
|
- left: 30rpx;
|
|
|
- top: 26rpx;
|
|
|
- padding-right:4rpx;
|
|
|
-}
|
|
|
-
|
|
|
-.t-login .t-b {
|
|
|
- text-align: left;
|
|
|
- font-size: 46rpx;
|
|
|
- color: #000;
|
|
|
- padding: 300rpx 0 120rpx 0;
|
|
|
- font-weight: bold;
|
|
|
-}
|
|
|
-.t-login .t-c {
|
|
|
- position: absolute;
|
|
|
- right: 22rpx;
|
|
|
- top: 22rpx;
|
|
|
- background: #5677fc;
|
|
|
- color: #fff;
|
|
|
- font-size: 24rpx;
|
|
|
- border-radius: 50rpx;
|
|
|
- height: 50rpx;
|
|
|
- line-height: 50rpx;
|
|
|
- padding: 0 25rpx;
|
|
|
- z-index: 1000;
|
|
|
-}
|
|
|
-
|
|
|
-.t-login .t-d {
|
|
|
- text-align: center;
|
|
|
- color: #999;
|
|
|
- margin: 80rpx 0;
|
|
|
-}
|
|
|
-
|
|
|
-.t-login .t-e {
|
|
|
- text-align: center;
|
|
|
- width: 250rpx;
|
|
|
- margin: 80rpx auto;
|
|
|
-}
|
|
|
-
|
|
|
-.t-login .t-g {
|
|
|
- float: left;
|
|
|
- width: 50%;
|
|
|
-}
|
|
|
-
|
|
|
-.t-login .t-e image {
|
|
|
- width: 50rpx;
|
|
|
- height: 50rpx;
|
|
|
-}
|
|
|
-
|
|
|
-.t-login .t-f {
|
|
|
- text-align: center;
|
|
|
- margin: 100rpx 0 0 0;
|
|
|
- color: #666;
|
|
|
-}
|
|
|
-
|
|
|
-.t-login .t-f text {
|
|
|
- margin-left: 20rpx;
|
|
|
- color: #aaaaaa;
|
|
|
- font-size: 27rpx;
|
|
|
-}
|
|
|
-
|
|
|
-.t-login .uni-input-placeholder {
|
|
|
- color: #000;
|
|
|
-}
|
|
|
-
|
|
|
-.cl {
|
|
|
- zoom: 1;
|
|
|
-}
|
|
|
-
|
|
|
-.cl:after {
|
|
|
- clear: both;
|
|
|
- display: block;
|
|
|
- visibility: hidden;
|
|
|
- height: 0;
|
|
|
- content: '\20';
|
|
|
-}
|
|
|
+<style lang="scss">
|
|
|
+
|
|
|
+ page{
|
|
|
+ background-color: #FFFFFF;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+ .text-checked{
|
|
|
+ font-size: 36rpx;
|
|
|
+ // color: #333;
|
|
|
+ color: $base-color;
|
|
|
+ }
|
|
|
+
|
|
|
+ .button{
|
|
|
+ position: fixed;
|
|
|
+ bottom: 5%;
|
|
|
+ left: 0;
|
|
|
+ right: 0;
|
|
|
+ font-size: 28rpx;
|
|
|
+ background: $base-color;
|
|
|
+ color: #fff;
|
|
|
+ height: 90rpx;
|
|
|
+ margin:0rpx 30rpx;
|
|
|
+ line-height: 90rpx;
|
|
|
+ border-radius: 50rpx;
|
|
|
+ box-shadow: 0 5px 7px 0 rgba(86, 119, 252, 0.2);
|
|
|
+ }
|
|
|
+
|
|
|
+ .guest{
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: #fff;
|
|
|
+ background: $base-color;
|
|
|
+ height: 90rpx;
|
|
|
+ margin:120rpx 30rpx;
|
|
|
+ line-height: 90rpx;
|
|
|
+ border-radius: 50rpx;
|
|
|
+ box-shadow: 0 5px 7px 0 rgba(86, 119, 252, 0.2);
|
|
|
+ }
|
|
|
+
|
|
|
+ .top{
|
|
|
+ height: 220rpx;
|
|
|
+ background-color: #5064eb;
|
|
|
+ }
|
|
|
+
|
|
|
+ .content{
|
|
|
+ border-radius: 20rpx;
|
|
|
+ background-color: #FFFFFF;
|
|
|
+ margin: -120rpx 20rpx 0;
|
|
|
+ .item{
|
|
|
+ height: 100%;
|
|
|
+ padding-top: 15%;
|
|
|
+ .input{
|
|
|
+ margin:40rpx 30rpx;
|
|
|
+ border-radius: 50rpx;
|
|
|
+ background-color: rgba(80, 100, 235,.1);
|
|
|
+ display: flex;
|
|
|
+ padding: 20rpx 30rpx;
|
|
|
+
|
|
|
+ image{
|
|
|
+ width: 30rpx;
|
|
|
+ height: 36rpx;
|
|
|
+ margin-top: 4rpx;
|
|
|
+ margin-right: 20rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .phone{
|
|
|
+ width: 40rpx;
|
|
|
+ height: 40rpx;
|
|
|
+ margin-top: 4rpx;
|
|
|
+ margin-right: 22rpx;
|
|
|
+ }
|
|
|
+ .qiye{
|
|
|
+ width: 38rpx;
|
|
|
+ height: 38rpx;
|
|
|
+ margin-top: 4rpx;
|
|
|
+ margin-right: 22rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ input{
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+
|
|
|
+ .code{
|
|
|
+ position: absolute;
|
|
|
+ right: 22rpx;
|
|
|
+ top: 18rpx;
|
|
|
+ background: $base-color;
|
|
|
+ color: #fff;
|
|
|
+ font-size: 24rpx;
|
|
|
+ border-radius: 50rpx;
|
|
|
+ height: 50rpx;
|
|
|
+ line-height: 50rpx;
|
|
|
+ padding: 0 25rpx;
|
|
|
+ z-index: 1000;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|