瀏覽代碼

二建活动

谢杰标 2 年之前
父節點
當前提交
24ede67f3f

+ 9 - 0
common/httpList/act.js

@@ -0,0 +1,9 @@
+import { myRequest } from "../request.js";
+export function actCheck(data) {
+  return myRequest({
+    url: "/app/common/check",
+    method: "get",
+    data: data,
+    noToken: true,
+  });
+}

+ 1 - 1
common/httpList/goods.js

@@ -63,7 +63,7 @@ export default {
 			data: data,
 		})
 	},
-
+   
 
 	goodsDetail(data) {
 		return myRequest({

+ 8 - 0
common/httpList/order.js

@@ -55,6 +55,14 @@ export default {
 			data: data
 		})
 	},
+	// 活动领取商品
+	drowActGoods(data) {
+		return myRequest({
+			url: '/order/activity/goods',
+			method: 'post',
+			data: data
+		})
+	},
 	// h5继续支付订单
 	resumePlaceGzhOrder(data) {
 		return myRequest({

+ 14 - 0
pages.json

@@ -1095,7 +1095,21 @@
 							"bounce": "none"
 						}
 					}
+				},
+				// #ifdef H5
+				{
+					"path": "scan/examact",
+					"style": {
+						"navigationBarTitleText": "考前活动",
+						"navigationBarBackgroundColor": "#0386FD",
+						"navigationStyle": "custom", // 隐藏系统导航栏
+						"app-plus": {
+							"titleNView": false, //禁用原生导航栏 
+							"bounce": "none"
+						}
+					}
 				}
+				// #endif
 			]
 		}
 	],

+ 6 - 9
pages2/register/register.vue

@@ -41,7 +41,7 @@
               placeholder-style="color:#999999"
               placeholder="请输入登录密码"
           /></u-form-item>
-          <u-form-item prop="idcard"
+          <u-form-item prop="idcard" v-if="!isAct"
             ><u-input
               v-model="form.idcard"
               placeholder-style="color:#999999"
@@ -654,6 +654,7 @@ export default {
       },
       isUse: false,
       isBack: false,
+      isAct: undefined,
       // scanCode: '', // 标识码
     };
   },
@@ -690,6 +691,7 @@ export default {
             code: this.form.code,
             pwd: this.form.pwd,
             idcard: this.form.idcard,
+            isActivity: this.isAct,
           };
           if (uni.getStorageSync("newUser_sc")) {
             datas["shareCode"] = uni.getStorageSync("newUser_sc");
@@ -709,8 +711,6 @@ export default {
                   content: "注册成功",
                   showCancel: false,
                   success: (resst) => {
-                    // uni.navigateBack()
-
                     that.$api
                       .accountLogin({
                         account: that.form.tel,
@@ -738,10 +738,7 @@ export default {
                           that.$api.getInfo({ fromPlat: 1 }).then((resdata) => {
                             if (resdata.data.code == 200) {
                               that.$store.state.userInfo = resdata.data.data;
-                              // if (this.scanCode) { // pc扫码进来登录成功
-                              // 	this.submitCode()
-                              // } else
-                              // !that.isBack
+
                               if (!that.isBack) {
                                 uni.reLaunch({
                                   url: "/pages/index/index",
@@ -826,6 +823,7 @@ export default {
       this.$refs.uForm.setRules(this.rules);
     });
     this.isBack = option.isBack;
+    this.isAct = option.isAct;
     // option.scanCode && (this.scanCode = option.scanCode)
     uni.login({
       provider: "weixin",
@@ -879,12 +877,11 @@ export default {
 }
 .login_box {
   width: 100%;
-  height: 580rpx;
   background: #ffffff;
   box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(1, 99, 235, 0.1);
   border-radius: 24rpx;
   margin-top: 30rpx;
-  padding: 40rpx 35rpx;
+  padding: 40rpx 35rpx 100rpx;
 }
 /deep/ .u-item-bg {
   border-radius: 32px !important;

+ 51 - 19
pages3/course/detail.vue

@@ -270,25 +270,35 @@
     </view>
 
     <view class="bottomBox" v-if="!hideBuyState">
-      <view class="icons">
-        <view class="icon_item ones">
-          <image src="/static/index/share.png" class="share"></image>
-          <button type="default" open-type="share" class="bt_share"></button>
-          <view class="share_w">分享</view>
+      <template v-if="!isAct">
+        <view class="icons">
+          <view class="icon_item ones">
+            <image src="/static/index/share.png" class="share"></image>
+            <button type="default" open-type="share" class="bt_share"></button>
+            <view class="share_w">分享</view>
+          </view>
+          <view class="icon_item">
+            <image
+              src="/static/index/shopcar.png"
+              class="shopcar"
+              @click="toShopcar()"
+            ></image>
+            <view class="share_w">购物车</view>
+          </view>
         </view>
-        <view class="icon_item">
-          <image
-            src="/static/index/shopcar.png"
-            class="shopcar"
-            @click="toShopcar()"
-          ></image>
-          <view class="share_w">购物车</view>
+        <view style="display: flex; color: #ffffff; align-items: center">
+          <view class="btn1" @click="addCart()">加购物车</view>
+          <view class="btn2" @click="buy()">立即购买 </view>
         </view>
-      </view>
-      <view style="display: flex; color: #ffffff; align-items: center">
-        <view class="btn1" @click="addCart()">加购物车</view>
-        <view class="btn2" @click="buy()">立即购买 </view>
-      </view>
+      </template>
+      <template v-else>
+        <view
+          class="btn2"
+          style="color: #ffffff; position: absolute; right: 24rpx"
+          @click="drawBuy()"
+          >立即领取
+        </view>
+      </template>
     </view>
 
     <!-- 已购买过课程的弹窗 -->
@@ -439,6 +449,7 @@ export default {
       checkedAttrs: [],
       selectGoodIndex: 0,
       specAttrPriceList: [],
+      isAct: undefined, //活动 区分是否隐藏身份证注册
     };
   },
   computed: {
@@ -494,6 +505,7 @@ export default {
       // this.id => goodsId
       this.id = option.id;
       this.goodsType = option.goodsType || option.gt;
+      this.isAct = option.isAct;
       if (option.sac) {
         uni.setStorageSync("shareActivityCode", option.sac);
         if (this.$method.isLogin()) {
@@ -934,6 +946,26 @@ export default {
       }
       this.$navTo.togo("/pages2/order/confirm_list?id=" + this.id);
     },
+    drawBuy() {
+      if (!this.$method.isLogin()) {
+        uni.navigateTo({
+          url: "/pages4/login/login?isBack=" + true + "&isAct=" + this.isAct,
+        });
+        return;
+      }
+      this.$api
+        .drowActGoods({
+          url: location.href,
+          goodsList: [this.detail],
+        })
+        .then((res) => {
+          if (res.data.code == 200) {
+            this.$u.toast("领取成功");
+          } else {
+            this.$u.toast(res.data.msg);
+          }
+        });
+    },
     addCart() {
       if (this.$method.isGoLogin()) {
         return;
@@ -1249,7 +1281,7 @@ export default {
   },
 };
 </script>
-<style >
+<style>
 page {
   background-color: #f2f2f2;
 }
@@ -1528,4 +1560,4 @@ page {
     }
   }
 }
-</style>
+</style>

+ 1 - 1
pages3/polyv/detail.vue

@@ -2283,7 +2283,7 @@ export default {
       let pre = duration;
       if (totalVideoTime > 300) {
         while (pre <= totalVideoTime) {
-          pre += this.randomNum(600, 900);
+          pre += this.randomNum(780, 900);
           pre <= totalVideoTime && photoList.push(pre);
         }
         if (totalVideoTime - 300 > photoList.slice(-1)[0]) {

+ 8 - 3
pages4/login/login.vue

@@ -229,12 +229,14 @@ export default {
       shareActivityCode: "", // 用户扫码进来详情页获取的
       isBack: false,
       isDualAuth: false,
+      isAct: undefined,
     };
   },
   onLoad(option) {
     if (option.isBack) {
       this.isBack = option.isBack;
     }
+    this.isAct = option.isAct;
     if (uni.getStorageSync("newUser_sc")) {
       this.newUser_sc = uni.getStorageSync("newUser_sc");
     }
@@ -266,11 +268,15 @@ export default {
     toRegister() {
       if (this.isBack) {
         uni.redirectTo({
-          url: "/pages2/register/register?isBack=" + this.isBack,
+          url:
+            "/pages2/register/register?isBack=" +
+            this.isBack +
+            "&isAct=" +
+            this.isAct,
         });
       } else {
         uni.navigateTo({
-          url: "/pages2/register/register",
+          url: "/pages2/register/register?isAct=" + this.isAct,
         });
       }
     },
@@ -519,7 +525,6 @@ export default {
     },
     // 微信、密码、验证码 登录成功的回调
     loginCallback(res, types) {
-      console.log("登录页面:", this.isBack);
       // if(res.data.data && res.data.data.full_info){
       uni.removeStorageSync("newUser_sc");
       uni.removeStorageSync("shareActivityCode");

+ 156 - 0
pages5/scan/examact.vue

@@ -0,0 +1,156 @@
+<template>
+  <view class="examact">
+    <view class="examact-tname">{{ tenantInfo.name }}</view>
+    <img src="../../static/acbg.png" alt="" srcset="" />
+    <view class="examact-btn" @click="collectMerch"> 点击领取真题题库 </view>
+    <img
+      class="examact-qrcode"
+      :src="'../../static/qrcode/' + tenantInfo.qrcodeUrl"
+      alt=""
+      srcset=""
+    />
+    <view class="examact-phone" v-if="tenantInfo.phone">{{
+      tenantInfo.phone
+    }}</view>
+  </view>
+</template>
+
+<script>
+const map = {
+  "120.79.166.78:19012": {
+    name: "广东省祥粤建设职业培训学校",
+    qrcodeUrl: "h_act.png",
+    phone: "报名热线: 020-87085982/87085983",
+  },
+  "h.xyyxt.net": {
+    name: "广东省祥粤建设职业培训学校",
+    qrcodeUrl: "h_act.png",
+    phone: "报名热线: 020-87085982/87085983",
+  },
+  "www.hnjsxt.cn": {
+    name: "企帮(广州)工程建设咨询服务有限公司",
+    qrcodeUrl: "hnjsxt_act.png",
+  },
+  "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";
+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: {},
+    };
+  },
+  onLoad(option) {
+    this.jump = option.jump;
+    this.tenantInfo = this.backInfo();
+  },
+  methods: {
+    collectMerch() {
+      actCheck().then((res) => {
+        if (res.data.code === 200) {
+          //跳转去对应域名
+          this.toDatail();
+        }
+      });
+    },
+    toDatail() {
+      if (this.jump) {
+        window.location.href = 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:19012";
+      return map[domain];
+    },
+  },
+};
+</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: 806rpx;
+    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: 180rpx;
+    height: 180rpx;
+    position: absolute;
+    right: 32rpx;
+    bottom: 52rpx;
+  }
+  .examact-phone {
+    position: absolute;
+    bottom: 52rpx;
+    left: 33rpx;
+    color: #222222;
+    font-size: 28rpx;
+  }
+}
+</style>

二進制
static/acbg.png


二進制
static/qrcode/h_act.png


二進制
static/qrcode/hnjsxt_act.png


二進制
static/qrcode/mh5_act.png


二進制
static/qrcode/sdyxt_act.png


二進制
static/qrcode/sxh5_act.png


二進制
static/qrcode/yf_act.png


二進制
static/qrcode/zh5_act.png


二進制
static/qrcode/zsh5_act.png