examact.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <template>
  2. <view class="examact">
  3. <view class="examact-tname">{{ tenantInfo.name }}</view>
  4. <img :src="$method.splitImgHost('oss/images/file/20230317/1679036853309.png')" alt="" srcset="" />
  5. <view class="examact-btn" @click="collectMerch"> 点击领取真题题库 </view>
  6. <img
  7. class="examact-qrcode"
  8. :src="'../../static/qrcode/' + tenantInfo.qrcodeUrl"
  9. alt=""
  10. srcset=""
  11. />
  12. <view class="examact-phone" v-if="tenantInfo.phone">{{
  13. tenantInfo.phone
  14. }}</view>
  15. </view>
  16. </template>
  17. <script>
  18. const map = {
  19. "120.79.166.78:19012": {
  20. name: "广东省祥粤建设职业培训学校",
  21. qrcodeUrl: "h_act.png",
  22. phone: "报名热线: 020-87085982/87085983",
  23. },
  24. "h.xyyxt.net": {
  25. name: "广东省祥粤建设职业培训学校",
  26. qrcodeUrl: "h_act.png",
  27. phone: "报名热线: 020-87085982/87085983",
  28. },
  29. "www.hnjsxt.cn": {
  30. name: "企帮(广州)工程建设咨询服务有限公司",
  31. qrcodeUrl: "hnjsxt_act.png",
  32. },
  33. "zsh5.zzyxt.net": {
  34. name: "中山市勘设工程咨询有限公司",
  35. qrcodeUrl: "zsh5_act.png",
  36. },
  37. "zh5.zzyxt.net": {
  38. name: "肇庆市建筑业协会",
  39. qrcodeUrl: "zh5_act.png",
  40. },
  41. "sdyxt.gdzzkj.net": {
  42. name: "佛山市顺德区市政建设工程协会",
  43. qrcodeUrl: "sdyxt_act.png",
  44. },
  45. "mh5.zzyxt.net": {
  46. name: "茂名市建设培训学校",
  47. qrcodeUrl: "mh5_act.png",
  48. },
  49. "sxh5.zzyxt.net": {
  50. name: "山西晋锦建族教育咨询有限公司",
  51. qrcodeUrl: "sxh5_act.png",
  52. },
  53. "yf.zzyxt.net": {
  54. name: "云浮市建筑业协会",
  55. qrcodeUrl: "yf_act.png",
  56. },
  57. };
  58. import { actCheck } from "../../common/httpList/act";
  59. export default {
  60. name: "SaasMiniprogramExamact",
  61. data() {
  62. return {
  63. goodsId: "16370",
  64. goodsType: "2",
  65. example:
  66. "http://localhost:8080/pages5/scan/examact?jump=www.hnjsxt.cn/detail/6",
  67. jump: undefined,
  68. tenantInfo: {},
  69. };
  70. },
  71. onLoad(option) {
  72. this.jump = option.jump;
  73. this.tenantInfo = this.backInfo();
  74. },
  75. methods: {
  76. collectMerch() {
  77. actCheck().then((res) => {
  78. if (res.data.code === 200) {
  79. //跳转去对应域名
  80. this.toDatail();
  81. }
  82. });
  83. },
  84. toDatail() {
  85. if (this.jump) {
  86. window.location.href = this.jump;
  87. return;
  88. }
  89. uni.navigateTo({
  90. url:
  91. "/pages3/course/detail?id=" +
  92. this.goodsId +
  93. "&goodsType=" +
  94. this.goodsType +
  95. "&isAct=" +
  96. 1,
  97. });
  98. },
  99. backInfo() {
  100. let domain = this.jump ? this.jump.split("/")[0] : window.location.host;
  101. domain = this.$method.checkDomain(domain)
  102. ? domain
  103. : "120.79.166.78:19012";
  104. return map[domain];
  105. },
  106. },
  107. };
  108. </script>
  109. <style lang="scss" scoped>
  110. .examact {
  111. position: relative;
  112. img {
  113. width: 100vw;
  114. }
  115. .examact-tname {
  116. position: absolute;
  117. top: 41rpx;
  118. left: 48rpx;
  119. font-size: 36rpx;
  120. color: #2e3174;
  121. font-weight: 500;
  122. }
  123. .examact-btn {
  124. width: 620rpx;
  125. height: 102rpx;
  126. position: absolute;
  127. top: 806rpx;
  128. left: 50%;
  129. margin-left: -310rpx;
  130. background: linear-gradient(90deg, #1762ff 0%, #4af7da 100%);
  131. box-shadow: 0px 9px 12px 0px rgba(50, 84, 130, 0.18);
  132. border-radius: 200rpx;
  133. line-height: 104rpx;
  134. text-align: center;
  135. font-weight: bold;
  136. color: #ffffff;
  137. font-size: 36rpx;
  138. }
  139. .examact-qrcode {
  140. width: 180rpx;
  141. height: 180rpx;
  142. position: absolute;
  143. right: 32rpx;
  144. bottom: 52rpx;
  145. }
  146. .examact-phone {
  147. position: absolute;
  148. bottom: 52rpx;
  149. left: 33rpx;
  150. color: #222222;
  151. font-size: 28rpx;
  152. }
  153. }
  154. </style>