您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

cardloss.vue 3.3KB

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