wages.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <template>
  2. <div>
  3. <cu-custom bgColor="bg-gradual-pink" :isBack="true">
  4. <block slot="backText">返回</block>
  5. <block slot="content">薪资查询</block>
  6. </cu-custom>
  7. <br>
  8. <view class="cu-form-group" >
  9. <view ><image src="../../static/cards.png" class="imgs"></image></view>
  10. <view style="margin-left: 10px;">{{cardName}}****</view>
  11. <input placeholder="请输入身份证后6位" v-model="name" ></input>
  12. </view>
  13. <!-- <div class="dt">
  14. <ul style="margin-left: -45px;">
  15. <view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.1s'}]">
  16. <li >
  17. <view class="cu-form-group" >
  18. <view class="title" style="margin-top: 10px;"><image src="../../static/eml.png" class="imgs"></image></view>
  19. <input placeholder="请输入邮箱" v-model="name" ></input>
  20. </view>
  21. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;"></div>
  22. </li>
  23. </view>
  24. <view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
  25. <li >
  26. <view class="cu-form-group" >
  27. <view class="title" style="margin-top: 10px;"><image src="../../static/yzm.png" class="imgs"></image></view>
  28. <input placeholder="邮箱验证码" v-model="code" ></input>
  29. <button class='cu-btn bg-blue shadow'@click="getCode" v-if="show">验证码</button>
  30. <span v-if="!show" style="color: #D7D9E0;float: right;font-size: 15px;">已发送({{ times }})</span>
  31. </view>
  32. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;"></div>
  33. </li>
  34. </view>
  35. </ul>
  36. </div> -->
  37. <br>
  38. <view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.5s'}]">
  39. <button style="background-color: #3C7AD8;color: #FFFFFF; width: 90%;" @click="save()">确定</button>
  40. <br>
  41. </view>
  42. </div>
  43. </template>
  44. <script>
  45. export default {
  46. data() {
  47. return {
  48. name: null,
  49. code: null,
  50. times: 60,
  51. show: true,
  52. cardName:"",
  53. userUrl: '/sys/user/sendEamilCode',
  54. emlCode: '/sys/user/GetEamilCode'
  55. }
  56. },
  57. created() {
  58. this.getCode()
  59. // var bankCode=uni.getStorageSync('bankCode');
  60. // if(bankCode!=null&&bankCode!=""){
  61. // this.$router.push({
  62. // name: 'wagesdetails'
  63. // });
  64. // }else{
  65. // this.getCode()
  66. // }
  67. },
  68. methods: {
  69. getCode() {
  70. var userid=this.$store.getters.userid;
  71. this.$http.get(this.userUrl, {
  72. params: {
  73. userid: userid
  74. }
  75. }).then(res => {
  76. if (res.data!=""&&res.data!=null) {
  77. this.cardName=res.data;
  78. } else {
  79. this.$tip.alert('暂无身份证信息!')
  80. }
  81. }).catch(err => {
  82. console.log(err);
  83. });
  84. },
  85. save() {
  86. if (this.name == "" || this.name == null) {
  87. this.$tip.alert("身份证不能为空");
  88. return false;
  89. }
  90. var userid=this.$store.getters.userid;
  91. this.$http.get(this.emlCode, {
  92. params: {
  93. userid: userid,
  94. card: this.name
  95. }
  96. }).then(res => {
  97. console.log(res)
  98. if (res.data == "ok") {
  99. uni.setStorageSync('bankCode',this.name);
  100. this.$router.push({
  101. name: 'wagesdetails'
  102. });
  103. }else{
  104. this.$tip.alert('身份证后6位错误!')
  105. }
  106. }).catch(err => {
  107. console.log(err);
  108. });
  109. }
  110. }
  111. }
  112. </script>
  113. <style>
  114. .dt{
  115. background-color: #FFFFFF;
  116. width: 90%;
  117. margin: 0 auto;
  118. margin-top: 20px;
  119. }
  120. .top {
  121. background-color: #5677AC;
  122. width: 100%;
  123. height: 40px;
  124. }
  125. ul li {
  126. list-style-type: none;
  127. }
  128. /* .img {
  129. width: 25px;
  130. height: 25px;
  131. background-size: 100% 100%;
  132. } */
  133. .img{
  134. width: 25px;
  135. height: 25px;
  136. background-size:100% 100%;
  137. }
  138. .imgs{
  139. width: 20px;
  140. height: 20px;
  141. background-size:100% 100%;
  142. }
  143. </style>