Parcourir la source

海报改善、授权迁移

谢杰标 il y a 2 ans
Parent
commit
9451c6ffb9

+ 0 - 14
App.vue

@@ -1,16 +1,11 @@
 <script>
 import plv from "./pages3/static/polyv-sdk/index";
-// #ifdef H5
-import vconsole from "vconsole";
-// #endif
 export default {
   onLaunch: function (option) {
     let inviteCode = option.inviteCode;
     if (inviteCode && inviteCode != "") {
-      console.log(inviteCode);
       uni.setStorageSync("inviteCode", inviteCode);
     }
-    console.log(plv);
     plv.setApp({
       apiId: "ezl5uy4zei",
       apiSecret: "2bf5bb3c31d34531943df10284edd50b",
@@ -20,15 +15,6 @@ export default {
   methods: {},
   onShow: function (option) {
     this.$store.commit("setScene", option.scene || 0);
-    // #ifdef H5
-    if (process.env.NODE_ENV === "development") {
-      console.log("开发环境");
-      const consoleObj = new vconsole();
-    } else {
-      // console.log('生产环境')
-      // const consoleObj = new vconsole()
-    }
-    // #endif
   },
   onHide: function () {
     uni.$emit("playPause");

+ 7 - 1
common/config.js

@@ -4,7 +4,7 @@ const test = {
   BASE_IMG_URL: "https://file-dev.xyyxt.net/",
   domain: "h.xyyxt.net",
   tenantId: "867735392558919680", //详粤云学堂
-  appid: "wxd3c8ae80cf43a305"
+  appid: "wxd3c8ae80cf43a305",
 };
 const index = 0; // 测试环境
 // const index = 1 // 祥粤云学堂
@@ -56,3 +56,9 @@ const set = [
   },
 ];
 export default set[index];
+// #ifdef H5
+import vconsole from "vconsole";
+if (index == 0) {
+  new vconsole();
+}
+// #endif

+ 1 - 1
manifest.json

@@ -105,7 +105,7 @@
         "enable" : false
     },
     "h5" : {
-        "title" : "祥粤云学堂",
+        "title" : "",
         "domain" : "",
         "router" : {
             "base" : "",

+ 1 - 1
pages.json

@@ -3,7 +3,7 @@
 		{
 			"path": "pages/index/index",
 			"style": {
-				"navigationBarTitleText": "云学堂",
+				"navigationBarTitleText": "首页",
 				"onReachBottomDistance": 50,
 				"app-plus": {
 					"titleNView": false //禁用原生导航栏  

+ 3 - 0
pages/questionBank/index.vue

@@ -158,6 +158,9 @@ export default {
   },
   onLoad(options) {
     this.options = options;
+    if (this.options.isAct) {
+      this.$method.isGoLogin();
+    }
   },
   async onShow() {
     if (this.options.skipPort) {

+ 3 - 3
pages/wd/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <view>
+  <view style="height:100%">
     <!-- <image mode="widthFix" :src="isLogin ? '/static/wd_bg_login.jpg' : '/static/wd_bg.jpg'" :class="isLogin ? 'login_full_img' : 'full_img'"></image> -->
     <u-navbar
       :is-back="false"
@@ -269,6 +269,7 @@ export default {
   color: transparent;
 }
 page {
+  height: 100%;
   background-color: #f0f1f5;
 }
 </style>
@@ -376,10 +377,9 @@ page {
 }
 .loginBox {
   position: relative;
-  padding: 0 30rpx 50rpx 30rpx;
+  padding: 0 30rpx 150rpx 30rpx;
   top: 430rpx;
   width: 100%;
-  height: 100%;
   margin-top: 30rpx;
   .contents {
     width: 100%;

+ 10 - 2
pages2/order/confirm_pay.vue

@@ -160,15 +160,21 @@ export default {
       for (let i = 0; i < arrs.length; i++) {
         this.optObj[arrs[i].split("=")[0]] = arrs[i].split("=")[1];
       }
+      this.$store.commit("setShoppingCartList", {
+        shoppingCartList: uni.getStorageSync("shopList"),
+      });
       uni.setStorageSync("h5_code", this.optObj.code);
       this.OfficialLogin();
     } else {
-      // 没有code,就重定向到地址https://www.xyyxt.net?ask_type=h.xyyxt.net 去获取code,授权后就会把code带上然后访问域名
+      // 没有code,就重定向到地址https://www.xyyxt.net?ask_type=https://api.xyyxt.net/pages2/order/confirm_pay 去获取code,授权后就会把code带上然后访问域名
       // ?fromCart=&code=061F5a1w3aolh03SLe1w3sMsCF4F5a16&state=STATE
       this.$api.checkBindGzh().then((res) => {
         if (!res.data.data && process.env.NODE_ENV !== "development") {
+          uni.setStorageSync("shopList", this.shoppingCartList);
           location.replace(
-            "https://www.xyyxt.net/?ask_type=" + window.location.host
+            "https://www.xyyxt.net/?ask_type=" +
+              window.location.host +
+              "/pages2/order/confirm_pay"
           );
         }
       });
@@ -177,11 +183,13 @@ export default {
   },
   methods: {
     OfficialLogin() {
+      console.log(this.optObj,this.optObj.code, "上传code");
       this.$api
         .OfficialLogin({
           code: this.optObj.code,
         })
         .then((res) => {
+          console.log(res, "接口返回");
           if (res.data.code !== 200) {
             this.$u.toast(res.data.msg);
           }

+ 14 - 2
pages3/course/detail.vue

@@ -484,7 +484,6 @@ export default {
     },
   },
   onLoad(option) {
-    console.log("option:", option);
     if (option.scene) {
       // scene 生成二维码扫码进来的
       let optObj = {};
@@ -960,7 +959,20 @@ export default {
         })
         .then((res) => {
           if (res.data.code == 200) {
-            this.$u.toast("领取成功");
+            // this.$u.toast("领取成功");
+            uni.showModal({
+              title: "提示",
+              content: "领取成功,是否现在去做题?",
+              cancelText: "取消",
+              confirmText: "确定",
+              success: (res) => {
+                if (res.confirm) {
+                  uni.switchTab({
+                    url: "/pages/questionBank/index",
+                  });
+                }
+              },
+            });
           } else {
             this.$u.toast(res.data.msg);
           }

+ 54 - 18
pages5/scan/examact.vue

@@ -2,20 +2,36 @@
   <view class="examact">
     <view class="examact-tname">{{ tenantInfo.name }}</view>
     <img
-      :src="$method.splitImgHost('oss/images/file/20230317/1679036853309.png')"
+      :src="$method.splitImgHost('oss/images/file/20230318/1679109165004.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 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>
 
@@ -25,10 +41,10 @@ const map = {
     name: "测试云学堂",
     qrcodeUrl: "hnjsxt_act.png",
   },
-  "120.79.166.78:19012": {
+  "120.79.166.78:19006": {
     name: "广东省祥粤建设职业培训学校",
     qrcodeUrl: "h_act.png",
-    phone: "报名热线: 020-87085982/87085983",
+    phone: true,
   },
   "h.xyyxt.net": {
     name: "广东省祥粤建设职业培训学校",
@@ -39,6 +55,7 @@ const map = {
     name: "企帮(广州)工程建设咨询服务有限公司",
     qrcodeUrl: "hnjsxt_act.png",
     scheme: "http://",
+    learnUrl: "",
   },
   "zsh5.zzyxt.net": {
     name: "中山市勘设工程咨询有限公司",
@@ -66,6 +83,7 @@ const map = {
   },
 };
 import { actCheck } from "../../common/httpList/act";
+import tkiQrcode from "tki-qrcode";
 export default {
   name: "SaasMiniprogramExamact",
   data() {
@@ -76,6 +94,7 @@ export default {
         "http://localhost:8080/pages5/scan/examact?jump=www.hnjsxt.cn/detail/6",
       jump: undefined,
       tenantInfo: {},
+      val: "",
     };
   },
   onLoad(option) {
@@ -112,10 +131,15 @@ export default {
       let domain = this.jump ? this.jump.split("/")[0] : window.location.host;
       domain = this.$method.checkDomain(domain)
         ? domain
-        : "120.79.166.78:19012";
+        : "120.79.166.78:19006";
+      this.val = this.jump || domain + "/pages/questionBank/index?isAct=1";
+      console.log(this.val)
       return map[domain];
     },
   },
+  components: {
+    tkiQrcode,
+  },
 };
 </script>
 
@@ -150,18 +174,30 @@ export default {
     font-size: 36rpx;
   }
   .examact-qrcode {
-    width: 180rpx;
-    height: 180rpx;
+    width: 396rpx;
+    display: flex;
     position: absolute;
+    justify-content: space-between;
     right: 32rpx;
-    bottom: 52rpx;
+    bottom: 122rpx;
+    img {
+      width: 180rpx;
+      height: 180rpx;
+    }
+    view {
+      background: #ffffff;
+      width: 180rpx;
+      height: 180rpx;
+      padding: 10rpx;
+    }
   }
   .examact-phone {
     position: absolute;
-    bottom: 52rpx;
+    bottom: 46rpx;
     left: 33rpx;
     color: #222222;
-    font-size: 28rpx;
+    font-size: 30rpx;
+    line-height: 40rpx;
   }
 }
 </style>