123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203 |
- <template>
- <view class="examact">
- <view class="examact-tname">{{ tenantInfo.name }}</view>
- <img
- :src="$method.splitImgHost('oss/images/file/20230318/1679109165004.png')"
- alt=""
- srcset=""
- />
- <view class="examact-btn" @click="collectMerch"> 点击领取真题题库 </view>
- <view class="examact-phone" v-if="tenantInfo.phone">
- 报名热线:
- <view>020-87085982</view>
- <view>020-87085983</view>
- </view>
- <view class="examact-qrcode">
- <tki-qrcode
- :show="true"
- :size="160"
- cid="qrcode1"
- ref="qrcode"
- :val="val"
- :showLoading="false"
- :loadMake="true"
- :usingComponents="true"
- />
- <img
- class="examact-qrcode111"
- :src="'../../static/qrcode/' + tenantInfo.qrcodeUrl"
- alt=""
- srcset=""
- />
- </view>
- </view>
- </template>
- <script>
- const map = {
- "test.jqbao.net": {
- name: "测试云学堂",
- qrcodeUrl: "hnjsxt_act.png",
- },
- "120.79.166.78:19006": {
- name: "广东省祥粤建设职业培训学校",
- qrcodeUrl: "h_act.png",
- phone: true,
- },
- "h.xyyxt.net": {
- name: "广东省祥粤建设职业培训学校",
- qrcodeUrl: "h_act.png",
- phone: "报名热线: 020-87085982/87085983",
- },
- "www.hnjsxt.cn": {
- name: "企帮(广州)工程建设咨询服务有限公司",
- qrcodeUrl: "hnjsxt_act.png",
- scheme: "http://",
- learnUrl: "",
- },
- "zsh5.zzyxt.net": {
- name: "中山市勘设工程咨询有限公司",
- qrcodeUrl: "zsh5_act.png",
- },
- "zh5.zzyxt.net": {
- name: "肇庆市建筑业协会",
- qrcodeUrl: "zh5_act.png",
- },
- "sdyxt.gdzzkj.net": {
- name: "佛山市顺德区市政建设工程协会",
- qrcodeUrl: "sdyxt_act.png",
- },
- "mh5.zzyxt.net": {
- name: "茂名市建设培训学校",
- qrcodeUrl: "mh5_act.png",
- },
- "sxh5.zzyxt.net": {
- name: "山西晋锦建族教育咨询有限公司",
- qrcodeUrl: "sxh5_act.png",
- },
- "yf.zzyxt.net": {
- name: "云浮市建筑业协会",
- qrcodeUrl: "yf_act.png",
- },
- };
- import { actCheck } from "../../common/httpList/act";
- import tkiQrcode from "tki-qrcode";
- export default {
- name: "SaasMiniprogramExamact",
- data() {
- return {
- goodsId: "16370",
- goodsType: "2",
- example:
- "http://localhost:8080/pages5/scan/examact?jump=www.hnjsxt.cn/detail/6",
- jump: undefined,
- tenantInfo: {},
- val: "",
- };
- },
- onLoad(option) {
- this.jump = option.jump;
- this.tenantInfo = this.backInfo();
- },
- methods: {
- collectMerch() {
- actCheck().then((res) => {
- if (res.data.code === 200) {
- //跳转去对应域名
- this.toDatail();
- }else{
- this.$u.toast(res.data.msg);
- }
- });
- },
- toDatail() {
- if (this.jump) {
- window.location.href =
- (this.tenantInfo.scheme || "https://") + this.jump;
- return;
- }
- uni.navigateTo({
- url:
- "/pages3/course/detail?id=" +
- this.goodsId +
- "&goodsType=" +
- this.goodsType +
- "&isAct=" +
- 1,
- });
- },
- backInfo() {
- let domain = this.jump ? this.jump.split("/")[0] : window.location.host;
- domain = this.$method.checkDomain(domain)
- ? domain
- : "120.79.166.78:19006";
- this.val = this.jump || domain + "/pages/questionBank/index?isAct=1";
- return map[domain];
- },
- },
- components: {
- tkiQrcode,
- },
- };
- </script>
- <style lang="scss" scoped>
- .examact {
- position: relative;
- img {
- width: 100vw;
- }
- .examact-tname {
- position: absolute;
- top: 41rpx;
- left: 48rpx;
- font-size: 36rpx;
- color: #2e3174;
- font-weight: 500;
- }
- .examact-btn {
- width: 620rpx;
- height: 102rpx;
- position: absolute;
- top: 786rpx;
- left: 50%;
- margin-left: -310rpx;
- background: linear-gradient(90deg, #1762ff 0%, #4af7da 100%);
- box-shadow: 0px 9px 12px 0px rgba(50, 84, 130, 0.18);
- border-radius: 200rpx;
- line-height: 104rpx;
- text-align: center;
- font-weight: bold;
- color: #ffffff;
- font-size: 36rpx;
- }
- .examact-qrcode {
- width: 396rpx;
- display: flex;
- position: absolute;
- justify-content: space-between;
- right: 32rpx;
- bottom: 122rpx;
- img {
- width: 180rpx;
- height: 180rpx;
- }
- view {
- background: #ffffff;
- width: 180rpx;
- height: 180rpx;
- padding: 10rpx;
- }
- }
- .examact-phone {
- position: absolute;
- bottom: 46rpx;
- left: 33rpx;
- color: #222222;
- font-size: 30rpx;
- line-height: 40rpx;
- }
- }
- </style>
|