examact.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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. scheme: "http://",
  41. },
  42. "zsh5.zzyxt.net": {
  43. name: "中山市勘设工程咨询有限公司",
  44. qrcodeUrl: "zsh5_act.png",
  45. },
  46. "zh5.zzyxt.net": {
  47. name: "肇庆市建筑业协会",
  48. qrcodeUrl: "zh5_act.png",
  49. },
  50. "sdyxt.gdzzkj.net": {
  51. name: "佛山市顺德区市政建设工程协会",
  52. qrcodeUrl: "sdyxt_act.png",
  53. },
  54. "mh5.zzyxt.net": {
  55. name: "茂名市建设培训学校",
  56. qrcodeUrl: "mh5_act.png",
  57. },
  58. "sxh5.zzyxt.net": {
  59. name: "山西晋锦建族教育咨询有限公司",
  60. qrcodeUrl: "sxh5_act.png",
  61. },
  62. "yf.zzyxt.net": {
  63. name: "云浮市建筑业协会",
  64. qrcodeUrl: "yf_act.png",
  65. },
  66. };
  67. import { actCheck } from "../../common/httpList/act";
  68. export default {
  69. name: "SaasMiniprogramExamact",
  70. data() {
  71. return {
  72. goodsId: "16370",
  73. goodsType: "2",
  74. example:
  75. "http://localhost:8080/pages5/scan/examact?jump=www.hnjsxt.cn/detail/6",
  76. jump: undefined,
  77. tenantInfo: {},
  78. };
  79. },
  80. onLoad(option) {
  81. this.jump = option.jump;
  82. this.tenantInfo = this.backInfo();
  83. },
  84. methods: {
  85. collectMerch() {
  86. actCheck().then((res) => {
  87. if (res.data.code === 200) {
  88. //跳转去对应域名
  89. this.toDatail();
  90. }
  91. });
  92. },
  93. toDatail() {
  94. if (this.jump) {
  95. window.location.href = this.tenantInfo.scheme
  96. ? this.tenantInfo.scheme
  97. : "https://" + this.jump;
  98. return;
  99. }
  100. uni.navigateTo({
  101. url:
  102. "/pages3/course/detail?id=" +
  103. this.goodsId +
  104. "&goodsType=" +
  105. this.goodsType +
  106. "&isAct=" +
  107. 1,
  108. });
  109. },
  110. backInfo() {
  111. let domain = this.jump ? this.jump.split("/")[0] : window.location.host;
  112. domain = this.$method.checkDomain(domain)
  113. ? domain
  114. : "120.79.166.78:19012";
  115. return map[domain];
  116. },
  117. },
  118. };
  119. </script>
  120. <style lang="scss" scoped>
  121. .examact {
  122. position: relative;
  123. img {
  124. width: 100vw;
  125. }
  126. .examact-tname {
  127. position: absolute;
  128. top: 41rpx;
  129. left: 48rpx;
  130. font-size: 36rpx;
  131. color: #2e3174;
  132. font-weight: 500;
  133. }
  134. .examact-btn {
  135. width: 620rpx;
  136. height: 102rpx;
  137. position: absolute;
  138. top: 806rpx;
  139. left: 50%;
  140. margin-left: -310rpx;
  141. background: linear-gradient(90deg, #1762ff 0%, #4af7da 100%);
  142. box-shadow: 0px 9px 12px 0px rgba(50, 84, 130, 0.18);
  143. border-radius: 200rpx;
  144. line-height: 104rpx;
  145. text-align: center;
  146. font-weight: bold;
  147. color: #ffffff;
  148. font-size: 36rpx;
  149. }
  150. .examact-qrcode {
  151. width: 180rpx;
  152. height: 180rpx;
  153. position: absolute;
  154. right: 32rpx;
  155. bottom: 52rpx;
  156. }
  157. .examact-phone {
  158. position: absolute;
  159. bottom: 52rpx;
  160. left: 33rpx;
  161. color: #222222;
  162. font-size: 28rpx;
  163. }
  164. }
  165. </style>