examact.vue 4.5 KB

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