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.

verification.vue 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. <template>
  2. <view class="formBox">
  3. <view class="from_item">
  4. <text class="label">账号验证</text>
  5. <input type="text" placeholder="输入验证码" v-model="model1.uname" placeholder-style="color:#000">
  6. </view>
  7. <view class="from_item">
  8. <text class="label">手机号码</text>
  9. <input type="text" placeholder="" v-model="model1.phone" placeholder-style="color:#000" disabled="true">
  10. </view>
  11. <view class="from_item">
  12. <text class="label">验证码</text>
  13. <input type="text" placeholder="请输入验证码" placeholder-style="color:#000">
  14. <text class="btn" @click="getCode">获取验证码</text>
  15. </view>
  16. <button class="submit" @click="submit">验证</button>
  17. </view>
  18. </template>
  19. <script setup lang="ts">
  20. import {
  21. reactive
  22. } from "vue";
  23. import {
  24. navTo
  25. } from "@/utils/utils"
  26. import {
  27. stringToJson
  28. } from "../../utils/network/encryption.js";
  29. import {
  30. request
  31. } from "../../utils/network/request.js";
  32. import {
  33. CardHangUpStatus
  34. } from "@/utils/network/api.js"
  35. let model1 = reactive({
  36. uname: '输入验证码',
  37. phone: '135****9090',
  38. code: ''
  39. })
  40. const getCode = () => {
  41. console.log(123);
  42. }
  43. const changeCardstatus = (type) => {
  44. //参数说明
  45. let options = {
  46. type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
  47. data: {
  48. cardId: '', //卡号
  49. obuId: "", //签号
  50. reason: "", //原因
  51. provider: '2', //挂起类型 2-有卡挂起,3-无卡挂起
  52. operation: "1", //1-卡挂起, 2-牵挂起, 3-卡签挂起, 4-卡解挂 ,5-签解挂
  53. orderId: '20230225155521777646302', //订单编号
  54. }, //请求参数
  55. method: "POST", //提交方式(默认POST)
  56. showLoading: true, //是否显示加载中(默认显示)
  57. };
  58. //调用方式
  59. request(CardHangUpStatus, options)
  60. .then((res) => {
  61. stringToJson(res.bizContent)
  62. if (stringToJson(res.statusCode) == 0) {
  63. navTo('/after-sale/card-release-pending/result')
  64. }
  65. })
  66. .catch((err) => {
  67. console.log(err);
  68. });
  69. }
  70. const submit = () => {
  71. console.log("111");
  72. changeCardstatus()
  73. }
  74. </script>
  75. <style>
  76. page {
  77. width: 100%;
  78. height: 100%;
  79. }
  80. </style>
  81. <style lang="scss" scoped>
  82. .formBox {
  83. height: 90%;
  84. width: 100%;
  85. // background-color: red;
  86. .from_item {
  87. padding: 30rpx;
  88. padding-top: 60rpx;
  89. position: relative;
  90. .label {
  91. font-size: 28rpx;
  92. font-family: Microsoft YaHei;
  93. font-weight: 400;
  94. color: #777777;
  95. }
  96. input {
  97. font-size: 32rpx;
  98. font-family: Microsoft YaHei;
  99. font-weight: 400;
  100. color: #333333;
  101. line-height: 58rpx;
  102. border-bottom: 1rpx solid #DCDCDC;
  103. margin-top: 50rpx;
  104. padding-bottom: 10rpx;
  105. }
  106. .btn {
  107. position: absolute;
  108. right: 45rpx;
  109. bottom: 48rpx;
  110. background: transparent;
  111. font-size: 30rpx;
  112. color: #15E5C1;
  113. z-index: 999;
  114. }
  115. }
  116. .submit {
  117. background: linear-gradient(to left, #43A1E0 0%, #13E7C1 100%);
  118. width: 670rpx;
  119. height: 80rpx;
  120. line-height: 80rpx;
  121. color: #fff;
  122. border-radius: 100rpx;
  123. position: fixed;
  124. bottom: 100rpx;
  125. left: 50%;
  126. transform: translate(-50%);
  127. font-size: 32rpx;
  128. font-family: Microsoft YaHei;
  129. font-weight: 400;
  130. color: #FFFFFF;
  131. line-height: 80rpx;
  132. }
  133. }
  134. </style>