examact.vue 3.7 KB

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