mycode.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. <!-- 0审核中,1不通过,2通过,9未提交 -->
  2. <template>
  3. <view>
  4. <image class="bg" src="../../static/img/mycode-bg.png" mode="widthFix"></image>
  5. <view class="content" style="padding-top: 20vh;">
  6. <view class="qrimg">
  7. <tki-qrcode
  8. ref="qrcode"
  9. cid="cid"
  10. :showLoading="false"
  11. :val="memberinfo.id"
  12. :size="384"
  13. background="#000"
  14. foreground="#fff"
  15. pdground="#fff"
  16. :usingComponents="true"
  17. :onval="true"
  18. @result="qrR"
  19. />
  20. <!-- :icon="icon"
  21. :iconSize="40" -->
  22. </view>
  23. </view>
  24. <view class="code-text" v-if="memberinfo.auditStatus == 2">
  25. <view class="code-id">{{ memberinfo.id }}</view>
  26. <view class="thanks">
  27. {{memberinfo.name}}{{memberinfo.menSex | verifySexFilter}},感谢您为国家的付出
  28. </view>
  29. <view v-if="!memberinfo.id">还没有退役军人码</view>
  30. </view>
  31. <view class="content fixed" v-if="memberinfo.auditStatus == 9">
  32. <!-- 9未提交 -->
  33. <view class="tip">
  34. 提交退役军人身份审核,获取退役军人码,并享受平台提供的专享培训、就业服务。
  35. </view>
  36. </view>
  37. <view class="content fixed" v-else-if="memberinfo.auditStatus == 0">
  38. <!-- 0审核中 -->
  39. <view class="tip">
  40. 您已提交退役军人身份审核,通过后生成退役军人码,并可享受平台提供的专享培训、就业服务,请耐心等待。
  41. </view>
  42. </view>
  43. <view class="content fixed" v-else-if="memberinfo.auditStatus==1">
  44. <!-- 1不通过 -->
  45. <view class="tip">
  46. 很抱歉,您提交的退役军人身份信息未通过审核,请审查后重新提交。
  47. </view>
  48. </view>
  49. <!-- ########################## -- 底部导航栏 -- ################################ -->
  50. <u-tabbar :list="tabbarConfig.tabbarList" :height="tabbarConfig.height" :mid-button="tabbarConfig.midButton"
  51. :inactive-color="tabbarConfig.inactiveColor" :active-color="tabbarConfig.activeColor"
  52. :mid-button-size="tabbarConfig.midButtonSize"></u-tabbar>
  53. </view>
  54. </template>
  55. <script>
  56. import tkiQrcode from "@/components/tki-qrcode/tki-qrcode.vue";
  57. import tabbarconfig from 'tabbarconfig.js';
  58. export default {
  59. components: {
  60. tkiQrcode
  61. },
  62. data() {
  63. return {
  64. memberinfo: {},
  65. icon: '/static/icons/index.png',
  66. tabbarConfig: tabbarconfig
  67. }
  68. },
  69. onLoad(page) {
  70. },
  71. onShow() {
  72. this.getmemberinfo();
  73. },
  74. filters: {
  75. verifySexFilter(value) {
  76. if (value == 0) {
  77. return '先生';
  78. } else if (value == 1) {
  79. return '女士';
  80. }
  81. }
  82. },
  83. methods: {
  84. getmemberinfo() {
  85. this.$u.api.getmemberinfo().then(res => {
  86. if (res.code == 200) {
  87. this.memberinfo = res.data;
  88. if (this.memberinfo.auditStatus !== 2) {
  89. this.memberinfo.id = null;
  90. this.$refs.qrcode._clearCode()
  91. }
  92. } else {
  93. uni.showToast({
  94. icon: 'none',
  95. title: res.msg
  96. })
  97. }
  98. })
  99. },
  100. qrR(e) {
  101. // console.log(e)
  102. }
  103. }
  104. }
  105. </script>
  106. <style lang="scss" scoped>
  107. .bg {
  108. z-index: -1;
  109. width: 100%;
  110. height: auto;
  111. position: fixed;
  112. left: 0;
  113. top: 100rpx;
  114. opacity: 0.2;
  115. }
  116. .qrimg {
  117. min-height: 100rpx;
  118. }
  119. .content {
  120. text-align: center;
  121. padding: 60vh 24rpx 24rpx;
  122. }
  123. .content.fixed {
  124. position: absolute;
  125. left: 0;
  126. top: 60vh;
  127. right: 0;
  128. padding-top: 0;
  129. }
  130. .content .tip {
  131. font-size: 32rpx;
  132. margin: 0 24rpx;
  133. text-align: left;
  134. text-indent: 2em;
  135. color: #3D5D4C;
  136. }
  137. .code-text {
  138. margin: 0 auto;
  139. text-align: center;
  140. }
  141. .code-id {
  142. font-size: 36rpx;
  143. font-weight: 500;
  144. color: #000000;
  145. }
  146. .thanks {
  147. margin-top: 100rpx;
  148. font-size: 36rpx;
  149. color: #3D5D4C;
  150. }
  151. </style>