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.

content.vue 4.0 KiB

4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. <template>
  2. <view id="sQrCode">
  3. <view class="sQrCode">
  4. <view class="sQrLogo">
  5. <image mode="widthFix" class="sQrLogoBg" src="@/common/images/xcBg.jpg"></image>
  6. <view class="sQrLogoImg1"><image mode="widthFix" src="@/common/images/logoXc.png"></image></view>
  7. <view class="sQrLogoImg2"><image mode="widthFix" src="@/common/images/logoXcTxt.png"></image></view>
  8. </view>
  9. <view class="sQrBox">
  10. <view class="sQrT">健康通行登记</view>
  11. <view class="sQrList">
  12. <view>
  13. <text>姓名</text>
  14. <text class="sQrListTxt">{{ data.stuInfo.StuName }}</text>
  15. </view>
  16. <view>
  17. <text>专业</text>
  18. <text class="sQrListTxt">{{ data.majorInfo.MajorName }}</text>
  19. </view>
  20. <view>
  21. <text>班级</text>
  22. <text class="sQrListTxt">{{ data.classInfo.ClassName }}</text>
  23. </view>
  24. <view>
  25. <text>学号</text>
  26. <text class="sQrListTxt">{{ data.stuInfo.StuNo }}</text>
  27. </view>
  28. <view>
  29. <text>宿舍</text>
  30. <text style="font-weight: bold;">{{ data.roomInfo }}</text>
  31. </view>
  32. </view>
  33. <view id="lr_mycode_qrcode" class="sQrImg"><tki-qrcode ref="qrcode" :val="data.stuInfo.StuNo" :size="size" :onval="true" :loadMake="true" /></view>
  34. <view class="sQrTxt">请使用数字校园扫码并出示通行凭证</view>
  35. <view class="sQrText">
  36. 温馨提示:因疫情防控需要,校园实行封闭管理,目前暂仅限经许可的校内师生员工通行。师生出入学校各个公共场所,请使用数字校园扫码,出示通行凭证接受核验。谢谢配合!
  37. </view>
  38. </view>
  39. </view>
  40. </view>
  41. </template>
  42. <script>
  43. import tkiQrcode from '@/components/tki-qrcode/tki-qrcode.vue';
  44. export default {
  45. name: 'stuqrCode',
  46. components: { tkiQrcode },
  47. props: {
  48. stuNo: {
  49. type: String
  50. }
  51. },
  52. data() {
  53. return {
  54. data: {
  55. stuInfo: {},
  56. majorInfo: {},
  57. classInfo: {}
  58. },
  59. size: 300
  60. };
  61. },
  62. methods: {
  63. init() {
  64. let _this = this;
  65. console.log(_this.stuNo);
  66. _this.LOADING('加载数据中…');
  67. _this.HTTP_GET('learun/adms/EducationalAdministration/StuInfoBasic/stuinfoDetail', _this.stuNo, '加载数据时出错').then(res => {
  68. this.HIDE_LOADING();
  69. console.log(res);
  70. _this.data = res;
  71. });
  72. }
  73. },
  74. created() {
  75. this.init();
  76. }
  77. };
  78. </script>
  79. <style lang="less" scoped>
  80. #sQrCode {
  81. height: 100%;
  82. background-color: #eef2f3;
  83. padding-bottom: 30px;
  84. }
  85. .sTabBox {
  86. line-height: 24px;
  87. text-align: center;
  88. margin-bottom: 18px;
  89. color: #333;
  90. }
  91. .sTabBox view {
  92. display: inline-block;
  93. width: 80px;
  94. background-color: rgba(255, 255, 255, 0.7);
  95. margin: 0 5px;
  96. font-size: 14px;
  97. border-radius: 2px;
  98. }
  99. .sQrLogoBg {
  100. position: absolute;
  101. left: 0;
  102. top: 0;
  103. right: 0;
  104. width: 100%;
  105. }
  106. .sQrLogo {
  107. background-size: 100% 100%;
  108. text-align: center;
  109. line-height: 0;
  110. padding: 20px 0 70px;
  111. position: relative;
  112. }
  113. .sQrLogo view {
  114. position: relative;
  115. z-index: 2;
  116. }
  117. .sQrLogoImg1 image {
  118. width: 20%;
  119. }
  120. .sQrLogoImg1 {
  121. margin-bottom: 10px;
  122. }
  123. .sQrLogoImg2 image {
  124. width: 50%;
  125. }
  126. .sQrBox {
  127. position: relative;
  128. z-index: 3;
  129. margin: -50px 20px 0;
  130. background-color: #fff;
  131. padding: 30px 10px;
  132. border-radius: 10px;
  133. -webkit-box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  134. -moz-box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  135. box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  136. }
  137. .sQrT {
  138. font-weight: bold;
  139. text-align: center;
  140. font-size: 22px;
  141. margin-bottom: 20px;
  142. color: #000;
  143. }
  144. .sQrList {
  145. background-color: #f8f8f8;
  146. margin: 0 10px;
  147. padding: 10px 15px;
  148. border-radius: 4px;
  149. }
  150. .sQrList view {
  151. padding: 7px 10px;
  152. font-size: 14px;
  153. color: #000;
  154. border-top: 1px solid #d7d7d7;
  155. }
  156. .sQrList view:first-child {
  157. border: 0;
  158. }
  159. .sQrList view text:first-child {
  160. color: #aeaeae;
  161. margin-right: 10px;
  162. }
  163. .sQrImg {
  164. width: 145px;
  165. height: 145px;
  166. line-height: 0;
  167. margin: 20px auto;
  168. }
  169. .sQrImg image {
  170. width: 100%;
  171. }
  172. .sQrTxt {
  173. margin-bottom: 10px;
  174. text-align: center;
  175. font-size: 16px;
  176. font-weight: bold;
  177. color: #aeaeae;
  178. }
  179. .sQrText {
  180. font-size: 14px;
  181. color: #aeaeae;
  182. }
  183. .sQrListTxt {
  184. color: #000;
  185. font-weight: bold;
  186. }
  187. </style>