|
|
@@ -0,0 +1,198 @@ |
|
|
|
<template> |
|
|
|
<view class="wrap"> |
|
|
|
<view class="imgwrap"> |
|
|
|
<image src="@/static/SSO/attes.png" mode=""></image> |
|
|
|
</view> |
|
|
|
<view class="title">IDENTITY AUTHENTICATION</view> |
|
|
|
<view class="titletext">统一身份认证平台</view> |
|
|
|
|
|
|
|
<view> |
|
|
|
<view v-if="firsttype"> |
|
|
|
<view class="loading">系统认证中,请耐心等待......</view> |
|
|
|
</view> |
|
|
|
<view v-else> |
|
|
|
<view class="logintitle">用户登录</view> |
|
|
|
<view class="logintext">首次登录,请输入账号密码。</view> |
|
|
|
<view class="account" style="margin-top: 30rpx;"> |
|
|
|
<view>账号:</view> |
|
|
|
<input v-model="UPUserName" class="uni-input" focus placeholder="请输入账号" /> |
|
|
|
</view> |
|
|
|
<view class="account"> |
|
|
|
<view>密码:</view> |
|
|
|
<input v-model="UPPass" class="uni-input" password="" placeholder="请输入密码" /> |
|
|
|
</view> |
|
|
|
<view class="btnwrap"> |
|
|
|
<button @click="register">登录</button> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
dataitem: '', |
|
|
|
sysid: '', |
|
|
|
openid: '', |
|
|
|
firsttype: true, |
|
|
|
UPUserName: '', |
|
|
|
UPPass: '', |
|
|
|
UPId: '', |
|
|
|
FId: '', |
|
|
|
UserId: '' |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad(data) { |
|
|
|
this.dataitem = JSON.parse(data.item) |
|
|
|
this.sysid = this.dataitem.sysid; |
|
|
|
this.openid = this.dataitem.openid; |
|
|
|
setTimeout(() => { |
|
|
|
this.gotolist(this.sysid, this.openid) |
|
|
|
}, 1000) |
|
|
|
|
|
|
|
}, |
|
|
|
methods: { |
|
|
|
gotolist(sysid, openid) { |
|
|
|
let _this = this |
|
|
|
// const { sysid,openid } = this |
|
|
|
this.HTTP_GET( |
|
|
|
'quanjiang/sso/goto', { |
|
|
|
sysid, |
|
|
|
openid |
|
|
|
}, |
|
|
|
'加载数据时出错' |
|
|
|
).then(res => { |
|
|
|
let item = { |
|
|
|
FInterfaceUrl: res.FInterfaceUrl, |
|
|
|
FName: _this.dataitem.FName |
|
|
|
} |
|
|
|
if (res.FInterfaceUrl.indexOf('http') != -1) { |
|
|
|
uni.redirectTo({ |
|
|
|
// url:`/pages/SSO/MyApp/listview?FInterfaceUrl=${item.FInterfaceUrl}&FName=${item.FName}` |
|
|
|
url: `/pages/SSO/MyApp/listview?data=` + encodeURIComponent(JSON.stringify( |
|
|
|
item)) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
let sysid = item.FInterfaceUrl.slice(item.FInterfaceUrl.indexOf('=') + 1, item |
|
|
|
.FInterfaceUrl.indexOf('&')) |
|
|
|
let openid = item.FInterfaceUrl.slice(item.FInterfaceUrl.lastIndexOf('=') + 1) |
|
|
|
this.HTTP_GET( |
|
|
|
'quanjiang/sso/first', { |
|
|
|
sysid, |
|
|
|
openid |
|
|
|
}, |
|
|
|
'加载数据时出错' |
|
|
|
).then(resitem => { |
|
|
|
_this.firsttype = false |
|
|
|
_this.UPId = resitem.UPId |
|
|
|
_this.FId = resitem.FId |
|
|
|
_this.UserId = resitem.UserId |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
register() { |
|
|
|
let _this = this |
|
|
|
let {UPId,UPUserName,UPPass,FId,UserId} = this |
|
|
|
if (UPUserName && UPPass) { |
|
|
|
_this.HTTP_POST('quanjiang/sso/first', {UPId,FId,UserId,UPUserName,UPPass},'加载数据时出错').then(resitem => { |
|
|
|
let sysid = resitem.FInterfaceUrl.slice(resitem.FInterfaceUrl.indexOf('=') + 1, resitem |
|
|
|
.FInterfaceUrl.indexOf('&')) |
|
|
|
let openid = resitem.FInterfaceUrl.slice(resitem.FInterfaceUrl.lastIndexOf('=') + 1) |
|
|
|
this.gotolist(sysid, openid) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.CONFIRM('账号或密码不能为空') |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="less"> |
|
|
|
.imgwrap { |
|
|
|
width: 214rpx; |
|
|
|
margin: 0 auto; |
|
|
|
padding-top: 100rpx; |
|
|
|
font-size: 0; |
|
|
|
} |
|
|
|
|
|
|
|
.imgwrap image { |
|
|
|
width: 214rpx; |
|
|
|
height: 200rpx; |
|
|
|
display: block; |
|
|
|
} |
|
|
|
|
|
|
|
.title { |
|
|
|
font-size: 24rpx; |
|
|
|
text-align: center; |
|
|
|
margin-top: 50rpx; |
|
|
|
color: gray; |
|
|
|
} |
|
|
|
|
|
|
|
.titletext { |
|
|
|
font-size: 50rpx; |
|
|
|
text-align: center; |
|
|
|
margin-top: 20rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.loading { |
|
|
|
font-size: 28rpx; |
|
|
|
text-align: center; |
|
|
|
margin-top: 50rpx; |
|
|
|
color: goldenrod; |
|
|
|
} |
|
|
|
|
|
|
|
.logintitle { |
|
|
|
font-size: 36rpx; |
|
|
|
text-align: center; |
|
|
|
margin-top: 90rpx; |
|
|
|
color: gray; |
|
|
|
} |
|
|
|
|
|
|
|
.logintext { |
|
|
|
font-size: 28rpx; |
|
|
|
text-align: center; |
|
|
|
margin-top: 30rpx; |
|
|
|
color: goldenrod; |
|
|
|
} |
|
|
|
|
|
|
|
.account { |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
margin-top: 20rpx; |
|
|
|
justify-content: center; |
|
|
|
} |
|
|
|
|
|
|
|
.account view { |
|
|
|
font-size: 30rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.account input { |
|
|
|
border: 1px solid #ccc; |
|
|
|
height: 60rpx; |
|
|
|
font-size: 30rpx; |
|
|
|
width: 380rpx; |
|
|
|
padding-left: 20rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.btnwrap {} |
|
|
|
|
|
|
|
.btnwrap button { |
|
|
|
width: 40%; |
|
|
|
line-height: 40px; |
|
|
|
background-color: #0c86d8; |
|
|
|
text-align: center; |
|
|
|
color: #fff; |
|
|
|
border-radius: 4px; |
|
|
|
margin: 30px auto; |
|
|
|
} |
|
|
|
</style> |