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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  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('quanjiang/sso/first', {UPId,FId,UserId,UPUserName,UPPass},'加载数据时出错').then(resitem => {
  98. let sysid = resitem.FInterfaceUrl.slice(resitem.FInterfaceUrl.indexOf('=') + 1, resitem
  99. .FInterfaceUrl.indexOf('&'))
  100. let openid = resitem.FInterfaceUrl.slice(resitem.FInterfaceUrl.lastIndexOf('=') + 1)
  101. this.gotolist(sysid, openid)
  102. })
  103. } else {
  104. this.CONFIRM('账号或密码不能为空')
  105. }
  106. }
  107. }
  108. }
  109. </script>
  110. <style lang="less">
  111. .imgwrap {
  112. width: 214rpx;
  113. margin: 0 auto;
  114. padding-top: 100rpx;
  115. font-size: 0;
  116. }
  117. .imgwrap image {
  118. width: 214rpx;
  119. height: 200rpx;
  120. display: block;
  121. }
  122. .title {
  123. font-size: 24rpx;
  124. text-align: center;
  125. margin-top: 50rpx;
  126. color: gray;
  127. }
  128. .titletext {
  129. font-size: 50rpx;
  130. text-align: center;
  131. margin-top: 20rpx;
  132. }
  133. .loading {
  134. font-size: 28rpx;
  135. text-align: center;
  136. margin-top: 50rpx;
  137. color: goldenrod;
  138. }
  139. .logintitle {
  140. font-size: 36rpx;
  141. text-align: center;
  142. margin-top: 90rpx;
  143. color: gray;
  144. }
  145. .logintext {
  146. font-size: 28rpx;
  147. text-align: center;
  148. margin-top: 30rpx;
  149. color: goldenrod;
  150. }
  151. .account {
  152. display: flex;
  153. align-items: center;
  154. margin-top: 20rpx;
  155. justify-content: center;
  156. }
  157. .account view {
  158. font-size: 30rpx;
  159. }
  160. .account input {
  161. border: 1px solid #ccc;
  162. height: 60rpx;
  163. font-size: 30rpx;
  164. width: 380rpx;
  165. padding-left: 20rpx;
  166. }
  167. .btnwrap {}
  168. .btnwrap button {
  169. width: 40%;
  170. line-height: 40px;
  171. background-color: #0c86d8;
  172. text-align: center;
  173. color: #fff;
  174. border-radius: 4px;
  175. margin: 30px auto;
  176. }
  177. </style>