You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

attestation.vue 4.2 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. <template>
  2. <view class="wrap">
  3. <view class="imgwrap">
  4. <image src="@/static/SSO/attes.png" mode=""></image>
  5. </view>
  6. <view class="title">IDENTITY AUTHENTICATION</view>
  7. <view class="titletext">统一身份认证平台</view>
  8. <view>
  9. <view v-if="firsttype">
  10. <view class="loading">系统认证中,请耐心等待......</view>
  11. </view>
  12. <view v-else>
  13. <view class="logintitle">用户登录</view>
  14. <view class="logintext">首次登录,请输入账号密码。</view>
  15. <view class="account" style="margin-top: 30rpx;">
  16. <view>账号:</view>
  17. <input v-model="UPUserName" class="uni-input" focus placeholder="请输入账号" />
  18. </view>
  19. <view class="account">
  20. <view>密码:</view>
  21. <input v-model="UPPass" class="uni-input" password="" placeholder="请输入密码" />
  22. </view>
  23. <view class="btnwrap">
  24. <button @click="register">登录</button>
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. </template>
  30. <script>
  31. export default {
  32. data() {
  33. return {
  34. dataitem: '',
  35. sysid: '',
  36. openid: '',
  37. firsttype: true,
  38. UPUserName: '',
  39. UPPass: '',
  40. UPId: '',
  41. FId: '',
  42. UserId: ''
  43. }
  44. },
  45. onLoad(data) {
  46. this.dataitem = JSON.parse(data.item)
  47. this.sysid = this.dataitem.sysid;
  48. this.openid = this.dataitem.openid;
  49. setTimeout(() => {
  50. this.gotolist(this.sysid, this.openid)
  51. }, 1000)
  52. },
  53. methods: {
  54. gotolist(sysid, openid) {
  55. let _this = this
  56. // const { sysid,openid } = this
  57. this.HTTP_GET(
  58. 'quanjiang/sso/goto', {
  59. sysid,
  60. openid
  61. },
  62. '加载数据时出错'
  63. ).then(res => {
  64. let item = {
  65. FInterfaceUrl: res.FInterfaceUrl,
  66. FName: _this.dataitem.FName
  67. }
  68. if (res.FInterfaceUrl.indexOf('http') != -1) {
  69. uni.redirectTo({
  70. // url:`/pages/SSO/MyApp/listview?FInterfaceUrl=${item.FInterfaceUrl}&FName=${item.FName}`
  71. url: `/pages/SSO/MyApp/listview?data=` + encodeURIComponent(JSON.stringify(
  72. item))
  73. })
  74. } else {
  75. let sysid = item.FInterfaceUrl.slice(item.FInterfaceUrl.indexOf('=') + 1, item
  76. .FInterfaceUrl.indexOf('&'))
  77. let openid = item.FInterfaceUrl.slice(item.FInterfaceUrl.lastIndexOf('=') + 1)
  78. this.HTTP_GET(
  79. 'quanjiang/sso/first', {
  80. sysid,
  81. openid
  82. },
  83. '加载数据时出错'
  84. ).then(resitem => {
  85. _this.firsttype = false
  86. _this.UPId = resitem.UPId
  87. _this.FId = resitem.FId
  88. _this.UserId = resitem.UserId
  89. })
  90. }
  91. })
  92. },
  93. register() {
  94. let _this = this
  95. let {UPId,UPUserName,UPPass,FId,UserId} = this
  96. if (UPUserName && UPPass) {
  97. _this.HTTP_POST(
  98. 'quanjiang/sso/first', {UPId,FId,UserId,UPUserName,UPPass},'加载数据时出错').then(resitem => {
  99. let sysid = resitem.FInterfaceUrl.slice(resitem.FInterfaceUrl.indexOf('=') + 1, resitem
  100. .FInterfaceUrl.indexOf('&'))
  101. let openid = resitem.FInterfaceUrl.slice(resitem.FInterfaceUrl.lastIndexOf('=') + 1)
  102. this.gotolist(sysid, openid)
  103. })
  104. } else {
  105. this.CONFIRM('账号或密码不能为空')
  106. }
  107. }
  108. }
  109. }
  110. </script>
  111. <style lang="less">
  112. .imgwrap {
  113. width: 214rpx;
  114. margin: 0 auto;
  115. padding-top: 100rpx;
  116. font-size: 0;
  117. }
  118. .imgwrap image {
  119. width: 214rpx;
  120. height: 200rpx;
  121. display: block;
  122. }
  123. .title {
  124. font-size: 24rpx;
  125. text-align: center;
  126. margin-top: 40rpx;
  127. color: gray;
  128. }
  129. .titletext {
  130. font-size: 50rpx;
  131. text-align: center;
  132. margin-top: 20rpx;
  133. }
  134. .loading {
  135. font-size: 28rpx;
  136. text-align: center;
  137. margin-top: 50rpx;
  138. color: goldenrod;
  139. }
  140. .logintitle {
  141. font-size: 36rpx;
  142. text-align: center;
  143. margin-top: 90rpx;
  144. color: gray;
  145. }
  146. .logintext {
  147. font-size: 28rpx;
  148. text-align: center;
  149. margin-top: 30rpx;
  150. color: goldenrod;
  151. }
  152. .account {
  153. display: flex;
  154. align-items: center;
  155. margin-top: 30rpx;
  156. justify-content: center;
  157. }
  158. .account view {
  159. font-size: 38rpx;
  160. }
  161. .account input {
  162. border: 1px solid #ccc;
  163. height: 80rpx;
  164. font-size: 30rpx;
  165. width: 450rpx;
  166. padding-left: 20rpx;
  167. }
  168. .btnwrap {}
  169. .btnwrap button {
  170. width: 50%;
  171. line-height: 50px;
  172. background-color: #0c86d8;
  173. text-align: center;
  174. color: #fff;
  175. border-radius: 4px;
  176. margin: 40px auto;
  177. font-size: 40rpx;
  178. }
  179. </style>