binding.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <template>
  2. <view class="container">
  3. <!-- 图片区域 -->
  4. <img src="../../static/my/shopImg2.png" />
  5. <!-- 表格区域 -->
  6. <view class="form">
  7. <view class="form_title">{{ type === '2' ? '账户解绑' : '账户绑定' }}</view>
  8. <view class="form_name">
  9. 账户
  10. <view class="name_input">
  11. <input type="text" placeholder="请输入账号" v-model="formName" />
  12. </view>
  13. </view>
  14. <view class="form_password">
  15. 密码
  16. <view class="password_input">
  17. <input type="text" password placeholder="请输入密码" v-model="formPassword" />
  18. </view>
  19. </view>
  20. <view class="form_msg">{{ info }}</view>
  21. <view class="form_btn" @click="handleClickBtn">{{ type === '2' ? '解绑' : '绑定' }}</view>
  22. </view>
  23. </view>
  24. </template>
  25. <script>
  26. export default {
  27. data() {
  28. return {
  29. // 绑定解绑类型
  30. type: '',
  31. // 身份类型
  32. status: '',
  33. // 绑定失败,请输入正确的账号或者密码
  34. info: '',
  35. // 账户
  36. formName: '',
  37. // 密码
  38. formPassword: ''
  39. }
  40. },
  41. onLoad(options) {
  42. this.status = options.status
  43. if (options.type) {
  44. this.type = options.type
  45. uni.setNavigationBarTitle({
  46. title: '验证解绑'
  47. })
  48. }
  49. },
  50. methods: {
  51. handleClickBtn() {
  52. if (!this.formName) {
  53. uni.showToast({
  54. title: '请输入账户名',
  55. icon: 'none',
  56. mask: true
  57. })
  58. return
  59. }
  60. if (!this.formPassword) {
  61. uni.showToast({
  62. title: '请输入密码',
  63. icon: 'none',
  64. mask: true
  65. })
  66. return
  67. }
  68. uni.navigateTo({
  69. url: `/pagesSub/web/web?url=https://www.jinganrenjiams.com/hotelReservation/getLoginCode/&formName=${this.formName}&formPassword=${this.formPassword}&type=${this.type}&status=${this.status}`
  70. })
  71. }
  72. }
  73. }
  74. </script>
  75. <style lang="scss" scoped>
  76. .container {
  77. display: flex;
  78. flex-direction: column;
  79. align-items: center;
  80. height: 100vh;
  81. background-color: #fff;
  82. img {
  83. margin-top: 20rpx;
  84. width: 347rpx;
  85. height: 387rpx;
  86. }
  87. .form {
  88. box-sizing: border-box;
  89. padding: 0 30rpx;
  90. margin-top: 35rpx;
  91. width: 690rpx;
  92. height: 548rpx;
  93. border-radius: 23rpx;
  94. box-shadow: 0px 0px 9px rgba(0, 0, 0, 0.25);
  95. .form_title {
  96. line-height: 120rpx;
  97. font-size: 32rpx;
  98. font-weight: bold;
  99. }
  100. .form_name {
  101. display: flex;
  102. align-items: center;
  103. font-size: 28rpx;
  104. .name_input {
  105. display: flex;
  106. align-items: center;
  107. box-sizing: border-box;
  108. padding: 0 24rpx;
  109. margin-left: 25rpx;
  110. width: 545rpx;
  111. height: 80rpx;
  112. border-radius: 15rpx;
  113. border: 1rpx solid #a6a6a6;
  114. input {
  115. width: 100%;
  116. }
  117. }
  118. }
  119. .form_password {
  120. display: flex;
  121. align-items: center;
  122. margin-top: 46rpx;
  123. font-size: 28rpx;
  124. .password_input {
  125. display: flex;
  126. align-items: center;
  127. box-sizing: border-box;
  128. padding: 0 24rpx;
  129. margin-left: 25rpx;
  130. width: 545rpx;
  131. height: 80rpx;
  132. border-radius: 15rpx;
  133. border: 1rpx solid #a6a6a6;
  134. input {
  135. width: 100%;
  136. }
  137. }
  138. }
  139. .form_msg {
  140. margin-top: 23rpx;
  141. height: 32rpx;
  142. color: #d43030;
  143. font-size: 24rpx;
  144. text-align: center;
  145. }
  146. .form_btn {
  147. display: flex;
  148. justify-content: center;
  149. align-items: center;
  150. margin-top: 28rpx;
  151. width: 624rpx;
  152. height: 96rpx;
  153. border-radius: 64rpx;
  154. color: #fff;
  155. font-size: 32rpx;
  156. background-color: #096562;
  157. }
  158. }
  159. }
  160. </style>