Ver código fonte

Merge branch 'master' into dev

谢杰标 2 anos atrás
pai
commit
434858050b
52 arquivos alterados com 2394 adições e 1035 exclusões
  1. 1 0
      App.vue
  2. 71 178
      common/compressPhoto.js
  3. 8 0
      common/httpList/course.js
  4. 7 0
      common/httpList/goods.js
  5. 28 0
      common/methodTool.js
  6. 28 0
      common/navTo.js
  7. 116 0
      common/util.js
  8. 10 0
      components/course/handoutsBox.vue
  9. 11 7
      components/course/handoutsTree.vue
  10. 85 0
      components/tabbar/index.vue
  11. 1 1
      index.html
  12. 2 0
      main.js
  13. 56 21
      pages.json
  14. 35 13
      pages/course/index.vue
  15. 24 8
      pages/index/index.vue
  16. 297 0
      pages/information/index.vue
  17. 5 5
      pages/learn/index.vue
  18. 3 0
      pages/questionBank/index.vue
  19. 12 0
      pages/wd/index.vue
  20. 4 1
      pages/webview/sdlink.vue
  21. 1 0
      pages2/bank/detail.vue
  22. 6 3
      pages2/bank/questionBank.vue
  23. 4 1
      pages2/bank/question_report.vue
  24. 5 1
      pages2/class/questionBank.vue
  25. 27 80
      pages2/invoice/index.vue
  26. 6 1
      pages2/learn/my_learn.vue
  27. 7 1
      pages2/order/confirm_pay.vue
  28. 18 4
      pages2/order/confirm_success.vue
  29. 441 0
      pages2/wd/stuff.vue
  30. 41 23
      pages3/course/detail.vue
  31. 78 0
      pages3/course/jydetail.vue
  32. 18 61
      pages3/polyv/detail.vue
  33. 15 0
      pages4/login/login.vue
  34. 91 67
      pages4/shopping/shoppingCart.vue
  35. 6 3
      pages5/examBank/index.vue
  36. 4 1
      pages5/examReport/index.vue
  37. 636 554
      pages5/liveDetail/index.vue
  38. 181 0
      pages5/scan/packPage.vue
  39. BIN
      static/icon/my_icon14.png
  40. BIN
      static/nav1.png
  41. BIN
      static/nav1_on.png
  42. BIN
      static/nav2.png
  43. BIN
      static/nav2_on.png
  44. BIN
      static/nav3.png
  45. BIN
      static/nav3_on.png
  46. BIN
      static/nav4.png
  47. BIN
      static/nav4_on.png
  48. BIN
      static/nav5.png
  49. BIN
      static/nav5_on.png
  50. BIN
      static/nav6.png
  51. BIN
      static/nav6_on.png
  52. 5 1
      static/style/index.scss

+ 1 - 0
App.vue

@@ -2,6 +2,7 @@
 import plv from "./pages3/static/polyv-sdk/index";
 export default {
   onLaunch: function (option) {
+    uni.hideTabBar()
     let inviteCode = option.inviteCode;
     if (inviteCode && inviteCode != "") {
       uni.setStorageSync("inviteCode", inviteCode);

+ 71 - 178
common/compressPhoto.js

@@ -1,201 +1,94 @@
-//通过canvas将图片压缩至指定大小
+import methods from "@/common/methodTool";
+let num = 1;
+let _resolve;
+let _reject;
 
-//判断图片大小是否满足需求,limitSize的单位是kb
-function imageSizeIsLessLimitSize(
-  imagePath,
-  limitSize,
-  lessCallback,
-  moreCallback
-) {
-  //获取文件信息
-  wx.getFileSystemManager().getFileInfo({
-    filePath: imagePath,
-    success: (res) => {
-      console.log("压缩前图片大小", res, res.size / 1024, "kb");
-      if (res.size > limitSize) {
-        moreCallback();
-      } else {
-        lessCallback();
-      }
-    },
-  });
+function getBase64Size(base64) {
+  if (base64) {
+    base64 = base64.split(",")[1].split("=")[0];
+    var strLength = base64.length;
+    var fileLength = strLength - (strLength / 8) * 2;
+    return Math.floor(fileLength); // 向下取整
+  } else {
+    return null;
+  }
 }
-
-//将图片画在画布上并获取画好之后的图片的路径
-function getCanvasImage(canvasId, imagePath, imageW, imageH, getImgSuccess) {
-  //创建画布内容
-  const ctx = wx.createCanvasContext(canvasId);
-  //图片画上去,imageW和imageH是画上去的尺寸,图像和画布间隔都是0
-  ctx.drawImage(imagePath, 0, 0, imageW, imageH);
-  //这里一定要加定时器,给足够的时间去画(所以每次递归最少要耗时200ms,多次递归很耗时!)
-  ctx.draw(
-    false,
-    setTimeout(() => {
-      //把当前画布指定区域的内容导出生成指定大小的图片,并返回文件路径
-      wx.canvasToTempFilePath({
-        canvasId: canvasId,
-        x: 0,
-        y: 0,
-        width: imageW,
-        height: imageH,
-        quality: 1, // 取0-1,1最高质量
-        fileType: "jpg",
-        success: (res) => {
-          console.log(res, 989898);
-          //将取出的图片路径通过回调函数返回
-          getImgSuccess(res.tempFilePath);
-        },
-      });
-    }, 200)
-  );
+//获得图片大小
+function imageSizeIsLessLimitSize(imagePath, limitSize) {
+  return new Promise((resolve, reject) => {
+    wx.getFileSystemManager().getFileInfo({
+      filePath: imagePath,
+      success: (res) => {
+        resolve(res.size);
+      },
+    });
+  });
 }
 
 //主函数,默认限制大小2048kb即2mb,drawWidth是绘画区域的大小
 //初始值传入为画布自身的边长(我们这是一个正方形的画布)
-function getLessLimitSizeImage(
-  canvasId,
-  imagePath,
-  limitSize = 1024,
-  drawWidth,
-  callback
-) {
-  //判断图片尺寸是否满足要求
-  imageSizeIsLessLimitSize(
-    imagePath,
-    limitSize,
-    (lessRes) => {
-      //满足要求走callback,将压缩后的文件路径返回
-      console.log("满足要求走callback:", imagePath);
-      callback(imagePath);
-    },
-    (moreRes) => {
-      //不满足要求需要压缩的时候
-      wx.getImageInfo({
-        src: imagePath,
-        success: (imageInfo) => {
-          let maxSide = Math.max(imageInfo.width, imageInfo.height);
-          let windowW = drawWidth;
-          let scale = 1;
-          /*
-            这里的目的是当绘画区域缩小的比图片自身尺寸还要小的时候
-            取图片长宽的最大值,然后和当前绘画区域计算出需要放缩的比例
-            然后再画经过放缩后的尺寸,保证画出的一定是一个完整的图片。由于每次递归绘画区域都会缩小,
-            所以不用担心scale永远都是1绘画尺寸永远不变的情况,只要不满足压缩后体积的要求
-            就会缩小绘画区域,早晚会有绘画区域小于图片尺寸的情况发生
-            */
-          if (maxSide > windowW) {
-            scale = windowW / maxSide;
-          }
-          //trunc是去掉小数
-          let imageW = Math.trunc(imageInfo.width * scale);
-          let imageH = Math.trunc(imageInfo.height * scale);
-          // console.log('调用压缩',imageW,imageH);
-          //图片在规定绘画区域上画并获取新的图片的path
-          getCanvasImage(
-            canvasId,
-            imagePath,
-            imageW,
-            imageH,
-            (pressImgPath) => {
-              /*
-                再去检查是否满足要求,始终缩小绘画区域,让图片适配绘画区域
-                这里乘以0.95是必须的,如果不缩小绘画区域,会出现尺寸比绘画区域小,
-                而体积比要求压缩体积大的情况出现,就会无穷递归下去,因为scale的值永远是1
-                但0.95不是固定的,你可以根据需要自己改,0到1之间,越小则绘画区域缩小的越快
-                但不建议取得太小,绘画区域缩小的太快,压出来的将总是很糊的
-                */
-              getLessLimitSizeImage(
-                canvasId,
-                pressImgPath,
-                limitSize,
-                drawWidth * 0.95,
-                callback
-              );
-            }
-          );
-        },
-      });
-    }
-  );
-}
-function compressWx(url, quality, cb) {
-  //不满足要求需要压缩的时候
-  wx.getImageInfo({
-    src: url,
-    success: (imageInfo) => {
-      let maxSide = Math.max(imageInfo.width, imageInfo.height);
-      let windowW = drawWidth;
-      let scale = 1;
-      if (maxSide > windowW) {
-        scale = windowW / maxSide;
-      }
-      //trunc是去掉小数
-      let imageW = Math.trunc(imageInfo.width * scale);
-      let imageH = Math.trunc(imageInfo.height * scale);
-      //创建画布内容
-      const ctx = wx.createCanvasContext(canvasId);
-      //图片画上去,imageW和imageH是画上去的尺寸,图像和画布间隔都是0
-      ctx.drawImage(imagePath, 0, 0, imageW, imageH);
-      //这里一定要加定时器,给足够的时间去画(所以每次递归最少要耗时200ms,多次递归很耗时!)
-      ctx.draw(
-        false,
-        setTimeout(() => {
-          //把当前画布指定区域的内容导出生成指定大小的图片,并返回文件路径
-          wx.canvasToTempFilePath({
-            canvasId: canvasId,
-            x: 0,
-            y: 0,
-            width: imageW,
-            height: imageH,
-            quality: quality, // 取0-1,1最高质量
-            fileType: "jpg",
-            success: (res) => {
-              cb(res.tempFilePath);
-            },
-          });
-        }, 200)
-      );
+function getLessLimitSizeImage(imagePath, quality) {
+  uni.compressImage({
+    src: imagePath,
+    quality,
+    success: (res) => {
+      console.log(res.tempFilePath, res, "压缩后");
+      _resolve(res.tempFilePath);
     },
   });
 }
-function compressH5(url, quality, cb) {
+function compressH5(url, quality) {
   let image = new Image();
   image.onload = function () {
-    var h = this.height * (quality / 1); // 默认按比例压缩
-    var w = this.width * (quality / 1);
     var canvas = document.createElement("canvas");
+    canvas.width = image.width;
+    canvas.height = image.height;
     var ctx = canvas.getContext("2d");
-    var anw = document.createAttribute("width");
-    anw.nodeValue = w;
-    var anh = document.createAttribute("height");
-    anh.nodeValue = h;
-    canvas.setAttributeNode(anw);
-    canvas.setAttributeNode(anh);
-    ctx.drawImage(image, 0, 0, w, h); //压缩比例
+    ctx.drawImage(image, 0, 0, this.height, this.width); //压缩比例
     var base64 = canvas.toDataURL("image/jpeg", quality);
-    cb(base64);
+    _resolve(base64);
   };
   image.src = url;
   image.setAttribute("crossOrigin", "Anonymous");
   image.onerror = () => {
-    reject(new Error("urlToBase64 error"));
+    _reject(new Error("zip error"));
   };
 }
-function myCompressImage(url, limitSize = 2048, cb) {
-  limitSize = limitSize * 1024;
-  const size = url.size;
-  if (size < limitSize) {
-    return cb(url);
-  }
-  const quality = limitSize / size;
-  // #ifdef MP-WEIXIN
-  let canvasId = "zipCanvas";
-  let drawWidth = wx.getSystemInfoSync().windowWidth;
-  getLessLimitSizeImage(canvasId, url.path, limitSize, drawWidth, cb);
-  // #endif
-  // #ifdef H5
-  compressH5(url.path, quality, cb);
-  // #endif
+function myCompressImage(url, limitSize = 2048) {
+  return new Promise(async (resolve, reject) => {
+    _resolve = resolve;
+    _reject = resolve;
+    limitSize = limitSize * 1024;
+    // 获得size
+    if (typeof url == "string") {
+      // base64
+      if (methods.isBase64(url)) {
+        url = {
+          path: url,
+          size: getBase64Size(url),
+        };
+      }
+      // #ifdef MP-WEIXIN
+      url = {
+        path: url,
+        size: await imageSizeIsLessLimitSize(url),
+      };
+      // #endif
+    }
+    const size = url.size;
+    console.log(size, "压缩前");
+    if (size < limitSize) {
+      return _resolve(url);
+    }
+    num++;
+    const quality = limitSize / size;
+    // #ifdef MP-WEIXIN
+    getLessLimitSizeImage(url.path, quality);
+    // #endif
+    // #ifdef H5
+    compressH5(url.path, quality);
+    // #endif
+  });
 }
 
 export default myCompressImage;

+ 8 - 0
common/httpList/course.js

@@ -85,6 +85,14 @@ export default {
 			data: data
 		})
 	},
+	// 购买讲义列表
+	goodsHandoutsList(data) {
+		return myRequest({
+			url: '/course/goodsHandoutsList',
+			method: 'get',
+			data: data
+		})
+	},
 	courseCourseList(data) {
 		return myRequest({
 			url: '/course/courseList',

+ 7 - 0
common/httpList/goods.js

@@ -452,6 +452,13 @@ export default {
       data: data,
     });
   },
+  updateCartCheckStatus(data) {
+    return myRequest({
+      url: "/base/cart/updateBatchChoice",
+      method: "post",
+      data: data,
+    });
+  },
   cartList(data) {
     return myRequest({
       url: "/base/cart/list",

+ 28 - 0
common/methodTool.js

@@ -764,4 +764,32 @@ export default {
         });
     });
   },
+  examClientCanLearn(examLimitClient) {
+    // 限制学习
+    if (!examLimitClient) {
+      return true;
+    }
+    // #ifdef MP-WEIXIN
+    if (examLimitClient.includes("2")) {
+      return true;
+    }
+    // #endif
+    // #ifdef H5
+    if (examLimitClient.includes("1") && this.isWeixin()) {
+      return true;
+    }
+    // #endif
+    uni.showModal({
+      title: "提示",
+      showCancel: false,
+      content:
+        "请去" + (examLimitClient == 2 ? "微信小程序" : "公众号") + "学习",
+      success: (k) => {
+        if (k.confirm) {
+          uni.navigateBack();
+        }
+      },
+    });
+    return false;
+  },
 };

+ 28 - 0
common/navTo.js

@@ -31,4 +31,32 @@ export function getQueryString(name) {
   return theRequest;
 }
 
+// webview打开缩放
+export function metaSetScalable(type = "yes") {
+  let setContent = "";
+  let meta = document.querySelector("meta[name='viewport']");
+  const content = meta.getAttribute("content");
+  if (type == "yes") {
+    if (!content.includes("user-scalable=no")) {
+      return;
+    }
+    setContent = "width=device-width, initial-scale=1.0, minimum-scale=1.0";
+  } else {
+    if (
+      content.includes("user-scalable") &&
+      content.includes("user-scalable=no")
+    ) {
+      return;
+    }
+    var coverSupport =
+      "CSS" in window &&
+      typeof CSS.supports === "function" &&
+      (CSS.supports("top: env(a)") || CSS.supports("top: constant(a)"));
+    setContent = `width=device-width, initial-scale=1.0, user-scalable=no, initial-scale=1.0, maximum-scale=1.0${
+      coverSupport ? ", viewport-fit=cover" : ""
+    }`;
+  }
+  meta.content = setContent;
+}
+
 export { togo };

+ 116 - 0
common/util.js

@@ -0,0 +1,116 @@
+import methods from "@/common/methodTool";
+export function download(url) {
+  url = methods.splitImgHost(url);
+  // #ifdef H5
+  window.location.href = url;
+  // #endif
+  // #ifdef MP-WEIXIN
+  const _s = saveImgToLoca;
+  uni.getSetting({
+    success: (res) => {
+      if (!res.authSetting["scope.writePhotosAlbum"]) {
+        uni.authorize({
+          scope: "scope.writePhotosAlbum",
+          success() {
+            _s(url);
+          },
+          fail() {},
+        });
+      } else {
+        _s(url);
+      }
+    },
+  });
+  // #endif
+}
+
+function saveImgToLoca(url) {
+  uni.downloadFile({
+    url: url, //图片地址
+    success: ({ statusCode, tempFilePath }) => {
+      if (statusCode === 200) {
+        const type = tempFilePath.substr(tempFilePath.lastIndexOf(".") + 1);
+        console.log("🚀 ~ file: util.js:32 ~ saveImgToLoca ~ type:", type);
+        if (type === "pdf") {
+          uni.getFileSystemManager().saveFile({
+            tempFilePath,
+            success: function (res) {
+              console.log(
+                "🚀 ~ file: util.js:37 ~ uni.getFileSystemManager ~ res:",
+                res
+              );
+              uni.showToast({
+                title: "保存成功",
+                icon: "none",
+              });
+            },
+            fail: function () {
+              uni.showToast({
+                title: "保存失败",
+                icon: "none",
+              });
+            },
+          });
+          return;
+        }
+        uni.showModal({
+          title: "提示",
+          content: "确定保存到相册吗",
+          success: (res) => {
+            if (res.confirm) {
+              uni.saveImageToPhotosAlbum({
+                filePath: tempFilePath,
+                success: function () {
+                  uni.showToast({
+                    title: "保存成功",
+                    icon: "none",
+                  });
+                },
+                fail: function () {
+                  uni.showToast({
+                    title: "保存失败",
+                    icon: "none",
+                  });
+                },
+              });
+            }
+          },
+        });
+      }
+    },
+  });
+}
+export function preview(url) {
+  url = methods.splitImgHost(url);
+  // #ifdef H5
+  uni.navigateTo({
+    url: `/pages/webview/sdlink?url=https://preview.xyyxt.net?src=${url}`,
+  });
+  // #endif
+  // #ifdef MP-WEIXIN
+  uni.downloadFile({
+    url: url,
+    success: ({ tempFilePath }) => {
+      uni.openDocument({
+        filePath: tempFilePath,
+        showMenu: true,
+        success: (res) => {},
+        fail: (err) => {
+          uni.showToast({
+            icon: "none",
+            title: "文档地址错误",
+          });
+        },
+      });
+    },
+    fail: (err) => {
+      this.downLoading = false;
+      uni.showModal({
+        title: "提示",
+        content: "文档错误," + err.errMsg,
+        showCancel: false,
+      });
+    },
+  });
+  // #endif
+}

+ 10 - 0
components/course/handoutsBox.vue

@@ -2,6 +2,7 @@
   <view>
     <template v-if="courseHandoutsData.handoutsId">
       <u-search
+        v-if="isShowSearch"
         placeholder="搜索讲义名称"
         bg-color="#ffffff"
         margin="0 0 20rpx"
@@ -17,6 +18,7 @@
       >
         <handouts-tree
           :canDownload="courseHandoutsData.canDownload"
+          :isShowDownIcon="isShowDownIcon"
           :fileInfo="item"
         ></handouts-tree>
       </view>
@@ -33,6 +35,14 @@ export default {
     handoutsId: {
       type: Number,
     },
+    isShowSearch: {
+      type: Boolean,
+      default: true,
+    },
+    isShowDownIcon: {
+      type: Boolean,
+      default: true,
+    },
   },
   data() {
     return {

+ 11 - 7
components/course/handoutsTree.vue

@@ -18,6 +18,7 @@
       <view v-show="!down">
         <view v-for="item in fileInfo.children" :key="item.fileId">
           <handouts-tree
+            :isShowDownIcon="isShowDownIcon"
             :canDownload="canDownload"
             :fileInfo="item"
           ></handouts-tree>
@@ -33,7 +34,7 @@
           </view>
         </view>
 
-        <view @click="openDocument">
+        <view @click="openDocument" v-if="isShowDownIcon">
           <image
             v-if="!downLoading"
             src="/pages3/static/imgs/downLoad.png"
@@ -63,6 +64,10 @@ export default {
     canDownload: {
       type: Number,
     },
+    isShowDownIcon: {
+      type: Boolean,
+      default: true,
+    },
   },
   data() {
     return {
@@ -78,10 +83,9 @@ export default {
     openDocument() {
       let url = this.$method.splitImgHost(this.fileInfo.url);
       // #ifdef H5
-      window.location.href = url;
-      //   uni.navigateTo({
-      //     url: `/pages/webview/sdlink?url=` + url,
-      //   });
+      uni.navigateTo({
+        url: `/pages/webview/sdlink?url=https://preview.xyyxt.net?src=${url}`,
+      });
       // #endif
       // #ifdef MP-WEIXIN
       this.downLoading = true;
@@ -89,7 +93,6 @@ export default {
         url: url,
         success: (res) => {
           var filePath = res.tempFilePath;
-          // h5不支持
           uni.openDocument({
             filePath: filePath,
             showMenu: this.canDownload == 1 ? true : false,
@@ -140,7 +143,8 @@ export default {
   height: 78rpx;
   padding-right: 20rpx;
   .title {
-    flex: 1;
+    // flex: 1;
+    width: 90%;
     font-size: 26rpx;
     color: #333;
     .pathtips {

+ 85 - 0
components/tabbar/index.vue

@@ -0,0 +1,85 @@
+<template>
+  <u-tabbar
+    v-model="current"
+    :before-switch="beforeSwitch"
+    :list="list"
+    @change="change"
+  ></u-tabbar>
+</template>
+<script>
+import config from "@/common/config";
+export default {
+  name: "myTabbar",
+  options: { styleIsolation: "shared" },
+  data() {
+    return {
+      list: [
+        {
+          pagePath: "/pages/index/index",
+          iconPath: config.BASE_IMG_URL + "web/icon/nav1.png",
+          selectedIconPath: config.BASE_IMG_URL + "web/icon/nav1_on.png",
+          text: "首页",
+        },
+        {
+          pagePath: "/pages/course/index",
+          iconPath: config.BASE_IMG_URL + "/web/icon/nav2.png",
+          selectedIconPath: config.BASE_IMG_URL + "/web/icon/nav2_on.png",
+          text: "选课",
+        },
+        {
+          pagePath: "/pages/learn/index",
+          iconPath: config.BASE_IMG_URL + "/web/icon/nav6.png",
+          selectedIconPath: config.BASE_IMG_URL + "/web/icon/nav6_on.png",
+          text: "学习",
+        },
+        {
+          pagePath: "/pages/questionBank/index",
+          iconPath: config.BASE_IMG_URL + "/web/icon/nav3.png",
+          selectedIconPath: config.BASE_IMG_URL + "/web/icon/nav3_on.png",
+          text: "题库",
+        },
+        {
+          pagePath: "/pages/information/index",
+          iconPath: config.BASE_IMG_URL + "/web/icon/nav4.png",
+          selectedIconPath: config.BASE_IMG_URL + "/web/icon/nav4_on.png",
+          text: "资料",
+        },
+        {
+          pagePath: "/pages/wd/index",
+          iconPath: config.BASE_IMG_URL + "/web/icon/nav5.png",
+          selectedIconPath: config.BASE_IMG_URL + "/web/icon/nav5_on.png",
+          text: "我的",
+        },
+      ],
+      current: 0,
+    };
+  },
+
+  mounted() {},
+
+  methods: {
+    beforeSwitch(index) {
+      return true; // 或者根据逻辑返回false
+    },
+    change(index) {
+      this.current = index;
+      if (index === 4) {
+        this.toInformation();
+      }
+    },
+    toInformation() {
+      uni.reLaunch({
+        url: "/pages/information/index",
+      });
+    },
+  },
+};
+</script>
+
+<style lang="scss">
+.u-tabbar {
+  ::v-deep &__content {
+    z-index: 10000 !important;
+  }
+}
+</style>

+ 1 - 1
index.html

@@ -15,7 +15,7 @@
         typeof CSS.supports === "function" &&
         (CSS.supports("top: env(a)") || CSS.supports("top: constant(a)"));
       document.write(
-        '<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
+        '<meta name="viewport" content="width=device-width,  initial-scale=1.0,  user-scalable=no, initial-scale=1.0, maximum-scale=1.0' +
           (coverSupport ? ", viewport-fit=cover" : "") +
           '" />'
       );

+ 2 - 0
main.js

@@ -27,6 +27,8 @@ Vue.use(uView);
 import navLogo from "@/components/nav-bar/nav-logo.vue";
 Vue.component('navLogo', navLogo)
 
+import myTabbar from "@/components/tabbar/index.vue";
+Vue.component('myTabbar', myTabbar)
 // 全局过滤器
 Vue.filter('formate', filters['formDate'])
 

+ 56 - 21
pages.json

@@ -82,6 +82,17 @@
           "bounce": "none"
         }
       }
+    },
+    {
+      "path": "pages/information/index",
+      "style": {
+        "navigationBarTitleText": "资料",
+        "navigationStyle": "custom", // 隐藏系统导航栏
+        "app-plus": {
+          "titleNView": false, //禁用原生导航栏
+          "bounce": "none"
+        }
+      }
     }
   ],
   "subPackages": [
@@ -268,6 +279,17 @@
             }
           }
         },
+        {
+          "path": "wd/stuff",
+          "style": {
+            "navigationBarTitleText": "我的资料",
+            "navigationStyle": "custom", // 隐藏系统导航栏
+            "app-plus": {
+              "titleNView": false, //禁用原生导航栏
+              "bounce": "none"
+            }
+          }
+        },
         {
           "path": "bank/my_question",
           "style": {
@@ -784,6 +806,22 @@
             }
           }
         },
+        {
+          "path": "course/jydetail",
+          "style": {
+            "navigationBarTitleText": "祥粤云学堂",
+            "navigationStyle": "custom", // 隐藏系统导航栏
+            "app-plus": {
+              "titleNView": false, //禁用原生导航栏
+              "bounce": "none"
+            },
+            "mp-weixin": {
+              "usingComponents": {
+                "polyv-player": "plugin://polyv-player/player"
+              }
+            }
+          }
+        },
         {
           "path": "live/detail",
           "style": {
@@ -1108,6 +1146,18 @@
               "bounce": "none"
             }
           }
+        },
+        {
+          "path": "scan/packPage",
+          "style": {
+            "navigationBarTitleText": "活动",
+            "navigationBarBackgroundColor": "#0386FD",
+            "navigationStyle": "custom", // 隐藏系统导航栏
+            "app-plus": {
+              "titleNView": false, //禁用原生导航栏
+              "bounce": "none"
+            }
+          }
         }
       ]
     }
@@ -1127,39 +1177,24 @@
   },
   "tabBar": {
     "color": "#AAAAAA",
-    "selectedColor": "#222", //007AFF
+    "selectedColor": "#222",
     "borderStyle": "black",
     "backgroundColor": "#fff",
     "list": [
       {
-        "pagePath": "pages/index/index",
-        "iconPath": "static/nav1.png",
-        "selectedIconPath": "static/nav1_on.png",
-        "text": "首页"
+        "pagePath": "pages/index/index"
       },
       {
-        "pagePath": "pages/course/index",
-        "iconPath": "static/nav2.png",
-        "selectedIconPath": "static/nav2_on.png",
-        "text": "选课"
+        "pagePath": "pages/course/index"
       },
       {
-        "pagePath": "pages/learn/index",
-        "iconPath": "static/nav6.png",
-        "selectedIconPath": "static/nav6_on.png",
-        "text": "学习"
+        "pagePath": "pages/learn/index"
       },
       {
-        "pagePath": "pages/questionBank/index",
-        "iconPath": "static/nav3.png",
-        "selectedIconPath": "static/nav3_on.png",
-        "text": "题库"
+        "pagePath": "pages/questionBank/index"
       },
       {
-        "pagePath": "pages/wd/index",
-        "iconPath": "static/nav5.png",
-        "selectedIconPath": "static/nav5_on.png",
-        "text": "我的"
+        "pagePath": "pages/wd/index"
       }
     ]
   },

+ 35 - 13
pages/course/index.vue

@@ -373,6 +373,8 @@
         </view>
       </view>
     </u-popup>
+    <!-- tabbar -->
+    <myTabbar></myTabbar>
   </view>
 </template>
 
@@ -393,7 +395,6 @@ export default {
           name: "直播课",
         },
       ],
-      // array:['全部','建设工程施工管理','机电全科','机电工程管理与实','机电全科','全科'],
       current: 0,
       menuIndex: 0,
       menuIndex1: 0,
@@ -441,6 +442,8 @@ export default {
       },
       imgwidth: 0,
       imgheight: 0,
+      ename: "",
+      bname: "",
     };
   },
   onPullDownRefresh() {
@@ -450,16 +453,17 @@ export default {
     }, 500);
   },
   onLoad(option) {
+    uni.hideTabBar();
     let eduStr = null;
     // 小程序分享跳转
     if (option.scene) {
       let arrs = decodeURIComponent(option.scene).split("&");
       for (let i = 0; i < arrs.length; i++) {
-        option[arrs[i].split("=")[0]] = arrs[i].split("=")[1]*1;
+        option[arrs[i].split("=")[0]] = arrs[i].split("=")[1] * 1;
       }
     }
     // 默认值
-    let { bid, pid, eid, cur } = option;
+    let { bid, pid, eid, cur, ename, bname } = option;
     if (bid && pid && eid) {
       uni.setStorageSync(
         "eduObj",
@@ -471,6 +475,12 @@ export default {
       );
     }
     cur && (this.current = cur);
+    if (ename && bname) {
+      this.ename = ename;
+      this.bname = bname;
+      this.initList();
+      return;
+    }
     eduStr = uni.getStorageSync("eduObj");
     if (eduStr) {
       this.selObj = JSON.parse(eduStr);
@@ -534,11 +544,18 @@ export default {
       this.initList();
     },
     businessList(data) {
-      var self = this;
-      // /app/common/course/business/list
       this.$api.businessList(data).then((res) => {
         if (res.data.code == 200) {
-          self.bList = res.data.rows;
+          this.bList = res.data.rows;
+          if (this.bname) {
+            const item = this.bList.find((e) => e.aliasName == this.bname);
+            this.bname = "";
+            if (item) {
+              this.active2(item);
+            } else {
+              this.show = true;
+            }
+          }
         }
       });
     },
@@ -547,15 +564,20 @@ export default {
       this.businessList({ educationId: item.id });
     },
     educationList() {
-      var self = this;
-      // /app/common/course/educationType/list
       this.$api.educationTypeList().then((res) => {
         if (res.data.code == 200) {
-          self.eList = res.data.rows;
-          if (self.selObj.eId) {
-            self.businessList({ educationId: self.selObj.eId });
+          this.eList = res.data.rows;
+          if (this.ename) {
+            const item = this.eList.find((e) => e.educationName == this.ename);
+            this.ename = "";
+            if (item) {
+              this.selObj.eId = item.id;
+            }
+          }
+          if (this.selObj.eId) {
+            this.businessList({ educationId: this.selObj.eId });
           } else {
-            this.active1(self.eList[0]);
+            this.active1(this.eList[0]);
           }
         }
       });
@@ -719,7 +741,7 @@ page {
 .contents {
   position: relative;
   left: 0;
-  top: 320rpx;
+  top: 300rpx;
 }
 .emptyTip {
   color: #999999;

+ 24 - 8
pages/index/index.vue

@@ -327,6 +327,12 @@
       </view>
     </view>
     <!-- #endif -->
+    <view class="u-page">
+      <!-- 所有内容的容器 -->
+    </view>
+
+    <!-- tabbar -->
+    <myTabbar></myTabbar>
   </view>
 </template>
 
@@ -342,7 +348,7 @@ export default {
       tabCurrent: 0,
       date: ["日", "一", "二", "三", "四", "五", "六"],
       date_num: [],
-      current: 0,
+      current: 2,
       indicatorDots: true,
       autoplay: true,
       interval: 2000,
@@ -407,6 +413,7 @@ export default {
     };
   },
   async onLoad(option) {
+    uni.hideTabBar();
     // #ifdef H5
     uni.setNavigationBarTitle({
       title: this.config.companyName,
@@ -612,15 +619,23 @@ export default {
         });
       } else if (swiper.jumpType == 3) {
         //内部接口
-        const { jumpUrl } = swiper
-        const map = ["pages/index/index", "pages/course/index", "pages/learn/index", "pages/questionBank/index"]
-        const isSwitch = map.find(e => jumpUrl.includes(e))
+        const { jumpUrl } = swiper;
+        const map = [
+          "pages/index/index",
+          "pages/course/index",
+          "pages/learn/index",
+          "pages/questionBank/index",
+          "pages/wd/index",
+          "pages/information/index",
+        ];
+        const isSwitch = map.find((e) => jumpUrl.includes(e));
         // tab页
         if (isSwitch) {
-          uni.switchTab({
-            url: jumpUrl
-          })
-          return
+          // 解决携带参数问题
+          uni.reLaunch({
+            url: jumpUrl,
+          });
+          return;
         }
         uni.navigateTo({
           url: jumpUrl,
@@ -1068,6 +1083,7 @@ page {
   white-space: nowrap;
 }
 .index {
+  padding-bottom: 110rpx;
   .swiper {
     width: 100%;
     position: relative;

+ 297 - 0
pages/information/index.vue

@@ -0,0 +1,297 @@
+<template>
+  <view>
+    <nav-logo title="资料"></nav-logo>
+    <view class="goods-warp">
+      <view class="search-box fl">
+        <u-search
+          bg-color="#ffffff"
+          placeholder="搜索"
+          v-model="goodsName"
+          @custom="comfirmSearch"
+          @search="comfirmSearch"
+        ></u-search>
+      </view>
+      <view class="goods-list">
+        <template v-if="goodsList.length">
+          <!-- hover-class="none" -->
+          <view
+            class="list_item"
+            v-for="(item, index) in goodsList"
+            :key="index"
+            @click="tobuy(item)"
+          >
+            <view class="list_item_content">
+              <view class="c_title">{{ item.goodsName }}</view>
+              <view class="c_downs">
+                <view class="img">
+                  <image
+                    :src="$method.splitImgHost(item.coverUrl, true)"
+                  ></image>
+                  <view class="time" v-if="item.year">{{
+                    item.year ? item.year : ""
+                  }}</view>
+                </view>
+                <view class="text">
+                  <view class="desc">
+                    <view class="left">
+                      <view
+                        class="mon_t"
+                        :class="item.standPrice === 0 ? 'free' : ''"
+                        v-if="
+                          !item.specTemplateId ||
+                          (!item.maxPrice && !item.minPrice)
+                        "
+                      >
+                        {{
+                          item.standPrice === 0
+                            ? "免费"
+                            : `¥${item.standPrice}`
+                        }}
+                      </view>
+                      <!-- 范围价格 -->
+                      <view v-else class="mon_t">
+                        <view>{{ item.minPrice }}</view>
+                        <template v-if="item.minPrice != item.maxPrice">
+                          <text>-</text>
+                          <view>{{ item.maxPrice }}</view>
+                        </template>
+                      </view>
+                      <text v-if="item.linePrice" class="sale"> ¥ </text>
+                      <text v-if="item.linePrice" class="price_line"
+                        >&nbsp;{{ item.linePrice }}</text
+                      >
+                    </view>
+                    <view class="right">
+                      <view v-if="!hideBuyState" class="regiser_row"
+                        >立即购买</view
+                      >
+                    </view>
+                  </view>
+                  <view v-if="item.buyUserNum" class="joins">
+                    <!-- <image class="people" src="/static/index/people.png"></image> -->
+                    <!-- 为0时,不显示 -->
+                    <view class="people">{{ item.buyUserNum }}人参与</view>
+                  </view>
+                </view>
+              </view>
+            </view>
+          </view>
+        </template>
+        <template v-else>
+          <u-empty text="暂无资料" mode="list" margin-top="100"></u-empty>
+        </template>
+      </view>
+    </view>
+    <!-- tabbar -->
+    <myTabbar></myTabbar>
+  </view>
+</template>
+
+<script>
+import { mapGetters } from "vuex";
+export default {
+  name: "SaasMiniprogramIndex",
+
+  data() {
+    return {
+      goodsName: "",
+      goodsList: [],
+      param: {},
+      total: 0,
+    };
+  },
+  onLoad(option) {
+    uni.hideTabBar();
+    this.init();
+  },
+  onPullDownRefresh() {
+    this.init();
+  },
+  onReachBottom() {
+    if (this.goodsList.length < this.total) {
+      this.param.pageNum++;
+      this.getGoodsList();
+    }
+  },
+  methods: {
+    init(goodsName = "") {
+      this.param = {
+        pageNum: 1,
+        pageSize: 10,
+        goodsType: 8,
+        goodsName,
+      };
+      this.goodsList = [];
+      this.getGoodsList();
+    },
+    comfirmSearch() {
+      this.param.goodsName = this.goodsName;
+      this.init(this.goodsName);
+    },
+    getGoodsList() {
+      this.$api.goodsList(this.param).then((res) => {
+        this.goodsList.push(...res.data.rows);
+        this.total = res.data.total;
+      });
+    },
+    tobuy(item) {
+      uni.navigateTo({
+        url:
+          "/pages3/course/detail?id=" +
+          item.goodsId +
+          "&goodsType=" +
+          item.goodsType,
+      });
+    },
+  },
+  computed: {
+    ...mapGetters(["userInfo", "hideBuyState"]),
+  },
+};
+</script>
+<style>
+page {
+  background: #eaeef1;
+}
+</style>
+<style lang="scss" scoped>
+.goods-warp {
+  padding: 16rpx;
+  position: relative;
+  .search-box {
+    height: 106rpx;
+    width: calc(100% - 32rpx);
+    position: fixed;
+    background: #eaeef1;
+    z-index: 10;
+    margin-top: -16rpx;
+  }
+}
+.goods-list {
+  margin-top: 46px;
+  .list_item {
+    padding: 24rpx;
+    background: #ffffff;
+    box-shadow: 0rpx 0rpx 20rpx 1rpx rgba(1, 99, 235, 0.1);
+    border-radius: 24rpx;
+    background: #fff;
+    margin-bottom: 32rpx;
+    display: flex;
+    align-items: center;
+    .list_item_content {
+      width: 100%;
+    }
+    .c_title {
+      font-size: 32rpx;
+      font-weight: bold;
+      margin-bottom: 24rpx;
+      font-weight: bold;
+      color: #222222;
+    }
+    .c_downs {
+      display: flex;
+    }
+    .img {
+      position: relative;
+      margin-right: 24rpx;
+      border-radius: 16rpx;
+      overflow: hidden;
+      width: 204rpx;
+      height: 120rpx;
+      image {
+        width: 100%;
+        height: 100%;
+      }
+
+      .time {
+        position: absolute;
+        bottom: 0;
+        right: 0;
+        width: 80rpx;
+        height: 32rpx;
+        background: rgba(1, 25, 45, 0.4);
+        color: #fff;
+        text-align: center;
+        line-height: 32rpx;
+        font-size: 24rpx;
+        border-radius: 10rpx 0px 10rpx 0px;
+      }
+    }
+
+    .text {
+      flex: 1;
+      position: relative;
+      display: flex;
+      flex-direction: column;
+      justify-content: space-between;
+      height: 120rpx;
+      .joins {
+        .people {
+          width: 160rpx;
+          font-size: 20rpx;
+          color: #999999;
+          padding: 0rpx 8rpx;
+          text-align: center;
+          height: 36rpx;
+          line-height: 36rpx;
+          background: #f6f7fb;
+          border-radius: 4px;
+        }
+      }
+      .desc {
+        margin-top: 10rpx;
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        width: 100%;
+        .left {
+          flex: 1;
+          color: #333;
+          font-size: 26rpx;
+          .mon_t {
+            display: flex;
+            font-weight: bold;
+            color: #fc3f3f;
+            font-size: 36rpx;
+            view::before {
+              content: "¥";
+              font-size: 24rpx;
+              font-weight: bold;
+            }
+          }
+          .free {
+            font-size: 24rpx;
+          }
+          .sale {
+            color: #999999;
+            font-size: 24rpx;
+            margin-left: 8rpx;
+          }
+          .price_line {
+            color: #999999;
+            font-size: 24rpx;
+            text-decoration: line-through;
+            font-weight: 400;
+          }
+        }
+
+        .right {
+          font-size: 24rpx;
+          font-weight: bold;
+          .regiser_row {
+            width: 144rpx;
+            height: 52rpx;
+            line-height: 52rpx;
+            text-align: center;
+            border-radius: 16rpx;
+            background-color: #fc3f3f;
+            color: #fff;
+            font-weight: 500;
+            font-size: 26rpx;
+          }
+        }
+      }
+    }
+  }
+}
+</style>

+ 5 - 5
pages/learn/index.vue

@@ -661,18 +661,17 @@ export default {
         secAllNum,
         examNum,
         periodPlush,
+        studyStatus,
       }) => {
         let text = "";
         let color = "";
         if (periodStatus === -1) {
-          const stuAll = stuAllNum + recordNum;
-          const secAll = secAllNum + examNum;
           let index = 0;
-          if (stuAll == 0) {
+          if (studyStatus == 1) {
             index = 0;
-          } else if (stuAll > 0 && stuAll < secAll) {
+          } else if (stuAllNum + recordNum < secAllNum + examNum) {
             index = 1;
-          } else if (stuAll >= secAll) {
+          } else {
             index = 2;
           }
           text = ["未开始", "学习中", "已学完"][index];
@@ -714,6 +713,7 @@ export default {
     },
   },
   onLoad() {
+    uni.hideTabBar();
     // 1668873600 ,2022.11.20的时间戳
     this.leftDays = 1668873600 - parseInt(curTime / 1000);
     this.sysTime = +this.$method.timest();

+ 3 - 0
pages/questionBank/index.vue

@@ -122,6 +122,8 @@
       <text class="word_tip">暂无题库</text>
       <view class="choose" @click="toChoose()">立即去选购</view>
     </view>
+    <!-- tabbar -->
+    <myTabbar></myTabbar>
   </view>
 </template>
 
@@ -144,6 +146,7 @@ export default {
     ...mapGetters(["userInfo", "config"]),
   },
   onLoad(options) {
+    uni.hideTabBar()
     this.options = options;
     if (this.options.isAct && !this.$method.isLogin()) {
       uni.navigateTo({

+ 12 - 0
pages/wd/index.vue

@@ -140,9 +140,20 @@
             <u-icon name="arrow-right" color="#999" size="24"></u-icon>
           </view>
         </navigator>
+        <navigator hover-class="none" url="/pages2/wd/stuff" class="menu_box">
+          <view class="box_left">
+            <image src="/static/icon/my_icon14.png" class="my_icon"></image>
+            <view>讲义资料</view>
+          </view>
+          <view class="box_right">
+            <u-icon name="arrow-right" color="#999" size="24"></u-icon>
+          </view>
+        </navigator>
       </view>
       <view class="logout" @click="logout">退出</view>
     </view>
+    <!-- tabbar -->
+    <myTabbar></myTabbar>
   </view>
 </template>
 
@@ -163,6 +174,7 @@ export default {
     };
   },
   onLoad(option) {
+    uni.hideTabBar()
     // console.log(option,987)
   },
   onShow() {

+ 4 - 1
pages/webview/sdlink.vue

@@ -5,6 +5,7 @@
 </template>
 
 <script>
+import { metaSetScalable } from "../../common/navTo";
 export default {
   data() {
     return {
@@ -18,7 +19,9 @@ export default {
   },
   onLoad(option) {
     this.url = option.url;
-    console.log(this.url, "123");
+    // #ifdef H5
+    metaSetScalable();
+    // #endif
   },
 };
 </script>

+ 1 - 0
pages2/bank/detail.vue

@@ -611,6 +611,7 @@ export default {
       this.$api
         .addCart({
           goodsId: goodsId,
+          choiceStatus: 1,
         })
         .then((res) => {
           if (res.data.code == 200) {

+ 6 - 3
pages2/bank/questionBank.vue

@@ -1060,13 +1060,17 @@ export default {
      * bank/exam + data
      */
     bankExam() {
-      return new Promise((resolve) => {
+      return new Promise((resolve, reject) => {
         this.$api.bankExam(this.id).then((res) => {
+          const { examLimitClient, doType } = res.data.data;
+          if (!this.$method.examClientCanLearn(examLimitClient)) {
+            reject();
+          }
           if (this.entryType == "daily") {
             // 每日一练类型都是为练习
             this.bankType = 1;
           } else {
-            this.bankType = res.data.data.doType;
+            this.bankType = doType;
           }
           this.examData = res.data.data;
           this.allTimes = this.examData.answerTime * 60;
@@ -1075,7 +1079,6 @@ export default {
           if (this.bankType == 2) {
             this.needBack = true;
           }
-
           resolve();
         });
       });

+ 4 - 1
pages2/bank/question_report.vue

@@ -526,8 +526,11 @@ export default {
     },
     bankExam() {
       // '/bank/exam/'+data
-      return new Promise((resolve) => {
+      return new Promise((resolve, reject) => {
         this.$api.bankExam(this.examId).then((res) => {
+          if (!this.$method.examClientCanLearn(res.data.data.examLimitClient)) {
+            reject();
+          }
           this.examData = res.data.data;
           resolve();
         });

+ 5 - 1
pages2/class/questionBank.vue

@@ -1515,7 +1515,11 @@ export default {
      */
     bankExam() {
       return this.$api.bankExam(this.id).then((res) => {
-        this.bankType = res.data.data.doType;
+        const { examLimitClient, doType } = res.data.data;
+        if (!this.$method.examClientCanLearn(examLimitClient)) {
+          return
+        }
+        this.bankType = doType;
         this.examData = res.data.data;
         this.allTimes = this.examData.answerTime * 60;
         this.lastTime =

+ 27 - 80
pages2/invoice/index.vue

@@ -56,7 +56,10 @@
                 />
               </u-form-item>
               <u-form-item label="发票备注" label-width="150">
-                <u-input placeholder="请输入发票备注" v-model="form.invoiceRemark" />
+                <u-input
+                  placeholder="请输入发票备注"
+                  v-model="form.invoiceRemark"
+                />
               </u-form-item>
               <u-form-item label="邮箱" label-width="150" required prop="email">
                 <u-input placeholder="请输入邮箱" v-model="form.email" />
@@ -182,7 +185,10 @@
                 />
               </u-form-item>
               <u-form-item label="发票备注" label-width="150">
-                <u-input placeholder="请输入发票备注" v-model="form.invoiceRemark" />
+                <u-input
+                  placeholder="请输入发票备注"
+                  v-model="form.invoiceRemark"
+                />
               </u-form-item>
               <u-form-item label="邮箱" label-width="150" required prop="email">
                 <u-input placeholder="请输入邮箱" v-model="form.email" />
@@ -625,7 +631,7 @@
                         invoiceDetail.invoiceImg
                       "
                     >
-                      <view slot="title">发票预览:</view>
+                      <!-- <view slot="title">发票预览:</view>
                       <view>
                         <image
                           class="preview"
@@ -637,7 +643,15 @@
                           @click="download(invoiceDetail)"
                           >下载电子发票</view
                         >
-                      </view>
+                      </view> -->
+                      <view class="download-btn" @click="preview(invoiceDetail)"
+                        >预览电子发票</view
+                      >
+                      <view
+                        class="download-btn"
+                        @click="download(invoiceDetail)"
+                        >下载电子发票</view
+                      >
                     </u-cell-item>
 
                     <u-cell-item
@@ -722,6 +736,7 @@
 
 <script>
 import { mapGetters } from "vuex";
+import { download, preview } from "../../common/util";
 export default {
   components: {},
   data() {
@@ -747,7 +762,7 @@ export default {
         taxRegistryNumber: "",
         companyAddress: "",
         email: "",
-        invoiceRemark:"",
+        invoiceRemark: "",
         phone: "",
         bankName: "",
         bankAccount: "",
@@ -767,10 +782,6 @@ export default {
             validator: (rule, value, callback) => {
               // 上面有说,返回true表示校验通过,返回false表示不通过
               // this.$u.test.mobile()就是返回true或者false的
-              console.log(
-                this.$u.test.mobile(value),
-                "this.$u.test.mobile(value)"
-              );
               return this.$u.test.mobile(value);
             },
             message: "手机号码格式不正确",
@@ -830,7 +841,8 @@ export default {
           {
             validator: (rule, value, callback) => {
               // 上面有说,返回true表示校验通过,返回false表示不通过
-              var reg = /^([a-zA-Z\d][\w-]{2,})@(\w{2,})\.([a-z]{2,})(\.[a-z]{2,})?$/;
+              var reg =
+                /^([a-zA-Z\d][\w-]{2,})@(\w{2,})\.([a-z]{2,})(\.[a-z]{2,})?$/;
               return reg.test(value);
             },
             message: "邮箱格式不正确",
@@ -991,7 +1003,6 @@ export default {
       this.invoiceDetail = item;
     },
     toFixed(number) {
-      console.log(number.toFixed(2));
       return number.toFixed(2);
     },
     /**
@@ -1020,8 +1031,6 @@ export default {
      */
     formSubmit() {
       this.$refs.uForm.validate((valid) => {
-        console.log(valid, "valid");
-        console.log(this.form, "this.form");
         if (valid) {
           if (this.invoicePirce > 10000) {
             uni.showModal({
@@ -1084,7 +1093,6 @@ export default {
      * 发票类型修改
      */
     formTypeChange(e) {
-      console.log(e);
       if (e == "2") {
         this.$set(this.form, "subject", "2");
       } else {
@@ -1095,9 +1103,7 @@ export default {
      * tabs 切换
      */
     change(e) {
-      console.log(e);
       this.current = e;
-
       if (this.current == 1) {
         this.orderInvoiceList();
       } else {
@@ -1155,7 +1161,6 @@ export default {
       this.$nextTick(() => {
         this.$refs.orderGoodsIds.onFieldChange();
       });
-      console.log(this.$refs.orderGoodsIds);
     },
 
     deleteOrder(index) {
@@ -1182,15 +1187,7 @@ export default {
         urls: [this.$method.splitImgHost(item.invoiceImg, true, 1000)],
         longPressActions: {
           itemList: ["发送给朋友", "保存图片", "收藏"],
-          success: function (data) {
-            console.log(
-              "选中了第" +
-                (data.tapIndex + 1) +
-                "个按钮,第" +
-                (data.index + 1) +
-                "张图片"
-            );
-          },
+          success: function (data) {},
           fail: function (err) {
             console.log(err.errMsg);
           },
@@ -1199,60 +1196,10 @@ export default {
     },
 
     download(item) {
-      //获取相册授权
-      uni.getSetting({
-        success: (res) => {
-          if (!res.authSetting["scope.writePhotosAlbum"]) {
-            uni.authorize({
-              scope: "scope.writePhotosAlbum",
-              success() {
-                //这里是用户同意授权后的回调
-                this.saveImgToLocal(item);
-              },
-              fail() {
-                //这里是用户拒绝授权后的回调
-              },
-            });
-          } else {
-            //用户已经授权过了
-            this.saveImgToLocal(item);
-          }
-        },
-      });
+      download(item.invoiceImg);
     },
-
-    saveImgToLocal(item) {
-      uni.showModal({
-        title: "提示",
-        content: "确定保存到相册吗",
-        success: (res) => {
-          if (res.confirm) {
-            uni.downloadFile({
-              url: this.$method.splitImgHost(item.invoiceImg, true, 1000), //图片地址
-              success: (res) => {
-                if (res.statusCode === 200) {
-                  uni.saveImageToPhotosAlbum({
-                    filePath: res.tempFilePath,
-                    success: function () {
-                      uni.showToast({
-                        title: "保存成功",
-                        icon: "none",
-                      });
-                    },
-                    fail: function () {
-                      uni.showToast({
-                        title: "保存失败",
-                        icon: "none",
-                      });
-                    },
-                  });
-                }
-              },
-            });
-          } else if (res.cancel) {
-          }
-        },
-      });
+    preview(item) {
+      preview(item.invoiceImg);
     },
   },
   computed: {
@@ -1610,7 +1557,7 @@ page {
             }
 
             .download-btn {
-              margin: 10rpx 0 0;
+              margin: 10rpx 0 20rpx;
               text-align: center;
               line-height: 56rpx;
               color: #fff;

+ 6 - 1
pages2/learn/my_learn.vue

@@ -519,8 +519,13 @@ export default {
         success: (res) => {
           if (res.confirm) {
             uni.downloadFile({
-              url: this.$method.splitImgHost(item.certificatePath, true, 1000), //图片地址
+              url: this.$method.splitImgHost(item.certificatePath), //图片地址
               success: (res) => {
+                console.log(
+                  res,
+                  res.tempFilePath,
+                  this.$method.splitImgHost(item.certificatePath)
+                );
                 if (res.statusCode === 200) {
                   uni.saveImageToPhotosAlbum({
                     filePath: res.tempFilePath,

+ 7 - 1
pages2/order/confirm_pay.vue

@@ -324,7 +324,7 @@ export default {
               ? "继续选课"
               : type == 2
               ? "继续选题"
-              : type == 3
+              : type == 3 || type == 8
               ? "继续选购"
               : "";
         }
@@ -400,6 +400,12 @@ export default {
             url: "/pages4/shopping/shoppingCart",
           });
         } else {
+          if (this.shoppingCartList[0].goodsType == 8) {
+            uni.reLaunch({
+              url: "/pages/information/index",
+            });
+            return;
+          }
           uni.switchTab({
             url: "/pages/course/index",
           });

+ 18 - 4
pages2/order/confirm_success.vue

@@ -116,14 +116,23 @@ export default {
       });
     },
     goCourse() {
+      if (this.isHaveJy) {
+        uni.reLaunch({
+          url: "/pages/information/index",
+        });
+        return;
+      }
       uni.switchTab({
         url: "/pages/course/index",
       });
     },
     goOrder() {
-      // uni.redirectTo({
-      //     url: '/pages2/order/index?current=1'
-      // });
+      if (this.isHaveJy) {
+        uni.redirectTo({
+          url: "/pages2/wd/stuff",
+        });
+        return;
+      }
       uni.switchTab({
         url: "/pages/learn/index",
       });
@@ -143,7 +152,12 @@ export default {
     },
   },
   onReachBottom() {},
-  computed: { ...mapGetters(["userInfo", "shoppingCartList", "config"]) },
+  computed: {
+    ...mapGetters(["userInfo", "shoppingCartList", "config"]),
+    isHaveJy() {
+      return this.shoppingCartList.some((e) => e.goodsType == 8);
+    },
+  },
 };
 </script>
 <style>

+ 441 - 0
pages2/wd/stuff.vue

@@ -0,0 +1,441 @@
+<template>
+  <view>
+    <nav-bar title="我的资料"></nav-bar>
+    <view v-if="goodsList.length" class="my_courses">
+      <view v-for="(item, index) in goodsList" :key="index" class="course_item">
+        <view class="c_downs">
+          <view class="lefts">
+            <image
+              class="lefet_img"
+              :src="$method.splitImgHost(item.coverUrl, true)"
+              mode=""
+            ></image>
+          </view>
+          <view class="rights">
+            <view class="learn_progress">
+              <view class="progress_up">
+                <view class="cou_titles line2">{{ item.goodsName }}</view>
+              </view>
+            </view>
+          </view>
+        </view>
+        <view class="course_item_info" v-if="item.goodsType !== 6">
+          <view>
+            <text>商品有效期:</text>
+            <template v-if="item.validityEndTime">
+              <text
+                :class="{
+                  'line-through':
+                    sysTime <= item.validityStartTime ||
+                    sysTime >= item.validityEndTime,
+                }"
+              >
+                {{ $method.formDate(item.validityStartTime, "yyyy/mm/dd") }}至{{
+                  $method.formDate(item.validityEndTime, "yyyy/mm/dd")
+                }}</text
+              >
+            </template>
+            <text v-else>——</text>
+          </view>
+        </view>
+        <view class="study_btns">
+          <view @click="studyIn(item)" class="exam_word intos">进入学习</view>
+        </view>
+      </view>
+    </view>
+    <view v-else class="no_datas">
+      <image class="courses" src="/static/learn/no_course.png" mode=""></image>
+      <view class="no_learns">您目前没有可学习的课程</view>
+      <view class="choose" @click="toChoose()">立即去选购</view>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  name: "SaasMiniprogramStuff",
+
+  data() {
+    return {
+      param: {},
+      goodsList: [],
+      total: 0,
+      sysTime: "",
+    };
+  },
+
+  onLoad() {
+    this.init();
+  },
+  onReachBottom() {
+    if (this.goodsList.length < this.total) {
+      this.param.pageNum++;
+      this.getGoodsHandoutsList();
+    }
+  },
+  methods: {
+    init() {
+      this.param = {
+        pageNum: 1,
+        pageSize: 10,
+      };
+      this.sysTime = +this.$method.timest();
+      this.goodsList = [];
+      this.getGoodsHandoutsList();
+    },
+    getGoodsHandoutsList() {
+      this.$api.goodsHandoutsList(this.param).then((res) => {
+        this.goodsList.push(...res.data.rows);
+        this.total = res.data.total;
+      });
+    },
+    studyIn(item) {
+      if (
+        item.validityStartTime &&
+        (this.sysTime <= item.validityStartTime ||
+          this.sysTime >= item.validityEndTime)
+      ) {
+        uni.showToast({
+          icon: "none",
+          title: "不在商品有效期,不能进入学习",
+        });
+        return;
+      }
+      uni.navigateTo({
+        url: "/pages3/course/jydetail?id=" + item.goodsId,
+      });
+    },
+    toChoose() {
+      uni.reLaunch({
+        url: "/pages/information/index",
+      });
+    },
+  },
+};
+</script>
+<style>
+page {
+  background: #eaeef1;
+}
+</style>
+<style lang="scss" scoped>
+.my_courses {
+  padding: 24rpx;
+  .titles {
+    font-size: 32rpx;
+    color: #333333;
+    margin: 44rpx 0rpx 24rpx 43rpx;
+    font-weight: bold;
+    display: block;
+  }
+  .course_item {
+    width: 100%;
+    // height: 278rpx;
+    background: #ffffff;
+    box-shadow: 0rpx 0rpx 20rpx 1rpx rgba(1, 99, 235, 0.1);
+    border-radius: 24rpx;
+    padding: 29rpx 29rpx 20rpx 24rpx;
+    margin-bottom: 20rpx;
+    .course_item_info {
+      border-radius: 16rpx;
+      background: #f8f8f8;
+      padding: 24rpx 24rpx 10rpx;
+      margin-top: 24rpx;
+      & > view {
+        margin-bottom: 10rpx;
+      }
+      view {
+        text {
+          font-size: 24rpx;
+          &:nth-of-type(1) {
+            color: #969696;
+          }
+          &:nth-of-type(2) {
+            color: #4b4b4b;
+          }
+        }
+        .eb {
+          color: #eb5757 !important;
+        }
+      }
+    }
+    .titlews {
+      padding-bottom: 24rpx;
+    }
+    .cou_titles {
+      color: #222222;
+      font-size: 28rpx;
+      font-weight: bold;
+      width: 100%;
+    }
+    .learn_ranges {
+      color: #666;
+      font-size: 24rpx;
+      .l_range {
+        width: 20rpx;
+        height: 24rpx;
+        margin-right: 9rpx;
+      }
+      .l_time {
+        color: #333;
+      }
+    }
+    .c_downs {
+      display: flex;
+      align-items: center;
+    }
+    // 状态
+    .all_status {
+      width: 654rpx;
+      background: #f8f8f8;
+      border-radius: 16rpx;
+    }
+    .class-warm {
+      display: flex;
+      align-items: flex-start;
+
+      &__icon {
+        margin-right: 10rpx;
+      }
+
+      &__text {
+        .date {
+          color: #ff3b30;
+          font-size: 22rpx;
+          font-weight: 400;
+        }
+      }
+    }
+    .box_progress {
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+      margin-top: 20rpx;
+      // .disabled {
+      // 	opacity: 0.6;
+      // }
+    }
+    .study_tips {
+      color: #eb5757;
+      font-size: 24rpx;
+      margin-top: 20rpx;
+    }
+    .study_btns {
+      width: 100%;
+      margin-top: 40rpx;
+      display: flex;
+      align-items: center;
+      justify-content: flex-end;
+      .exam_btns {
+        // width: 64%;
+        display: flex;
+        justify-content: flex-end;
+        align-items: center;
+      }
+    }
+    .box_appoint {
+      // width: 35%;
+      display: flex;
+      align-items: center;
+      justify-content: flex-end;
+      .img {
+        width: 32rpx;
+        height: 32rpx;
+        margin-right: 10rpx;
+      }
+    }
+    .exam_word {
+      font-size: 24rpx;
+      font-weight: 500;
+      width: 144rpx;
+      height: 56rpx;
+      line-height: 56rpx;
+      text-align: center;
+      background: #ffffff;
+      border-radius: 66rpx;
+      margin-left: 32rpx;
+    }
+    .ones {
+      color: #484848;
+      border: 2rpx solid #b9b9b9;
+    }
+    .intos {
+      color: #498afe;
+      border: 2rpx solid #498afe;
+    }
+  }
+  .lefts {
+    width: 204rpx;
+    height: 120rpx;
+    border-radius: 12rpx;
+    margin-right: 26rpx;
+    position: relative;
+    top: 0;
+    left: 0;
+    .lefet_img {
+      width: 100%;
+      height: 100%;
+      display: block;
+      border-radius: 16rpx;
+    }
+    .live_icon {
+      width: 65rpx;
+      height: 35rpx;
+      line-height: 35rpx;
+      border-radius: 12rpx 0rpx 12rpx 0rpx;
+      background-color: #ffb102;
+      color: #fff;
+      font-size: 20rpx;
+      text-align: center;
+      position: absolute;
+      top: 0;
+      left: 0;
+    }
+  }
+  .rights {
+    width: 400rpx;
+    height: 120rpx;
+    display: flex;
+    flex-direction: column;
+    justify-content: space-between;
+
+    .learn_progress {
+      width: 100%;
+      height: 100%;
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+    }
+    .progress_up {
+      width: 100%;
+      .classHour {
+        padding-top: 16rpx;
+        font-size: 24rpx;
+        color: #666666;
+      }
+      .scheduling {
+        display: flex;
+        align-items: center;
+      }
+      .sche_bar {
+        font-size: 24rpx;
+        color: #999999;
+        margin-right: 20rpx;
+      }
+      .progress_bar {
+        flex: 1;
+      }
+    }
+    .progress_down {
+      // width: 100%;
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+    }
+    .enter_into {
+      width: 144rpx;
+      height: 52rpx;
+      line-height: 52rpx;
+      background: #ffb102;
+      border-radius: 16rpx;
+      font-size: 26rpx;
+      font-weight: 500;
+      color: #ffffff;
+      text-align: center;
+    }
+  }
+  // 收藏集,做题记录
+  .bottoms {
+    display: flex;
+    justify-content: space-between;
+    margin-bottom: 32rpx;
+    .item {
+      width: 335rpx;
+      &.collect {
+        position: relative;
+        font-size: 32rpx;
+        color: #ffffff;
+        height: 240rpx;
+        border-radius: 24rpx;
+        padding: 32rpx;
+
+        .text {
+          position: relative;
+          z-index: 10;
+          font-size: 32rpx;
+          font-weight: bold;
+          color: #ffffff;
+        }
+
+        .img {
+          position: absolute;
+          left: 0;
+          top: 0;
+          width: 100%;
+          height: 100%;
+        }
+      }
+
+      &.list {
+        .list-in {
+          position: relative;
+          width: 335rpx;
+          height: 112rpx;
+          background: #007aff;
+          border-radius: 24rpx;
+          display: flex;
+          align-items: center;
+          font-size: 32rpx;
+          color: #fff;
+
+          &:first-of-type {
+            margin-bottom: 16rpx;
+          }
+
+          .text {
+            padding-left: 91rpx;
+            position: relative;
+            z-index: 10;
+            font-size: 32rpx;
+            font-weight: bold;
+            color: #ffffff;
+          }
+
+          .img {
+            position: absolute;
+            left: 0;
+            top: 0;
+            width: 100%;
+            height: 100%;
+          }
+        }
+      }
+    }
+  }
+}
+.no_datas {
+  margin-top: 70rpx;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  .courses {
+    width: 360rpx;
+    height: 349rpx;
+  }
+  .no_learns {
+    font-size: 32rpx;
+    color: #999;
+    margin: 46rpx 0rpx 56rpx;
+  }
+  .choose {
+    width: 280rpx;
+    height: 64rpx;
+    line-height: 62rpx;
+    border-radius: 32rpx;
+    background-color: #007aff;
+    color: #fff;
+    font-size: 30rpx;
+    text-align: center;
+  }
+}
+</style>

+ 41 - 23
pages3/course/detail.vue

@@ -1,5 +1,5 @@
 <template>
-  <view>
+  <view style="padding-bottom: 140rpx">
     <nav-bar title="课程详情"></nav-bar>
     <view class="videoBox">
       <!-- <view > -->
@@ -74,7 +74,7 @@
               {{ detail.linePrice }}</text
             >
           </view>
-          <view class="noteTag">
+          <view class="noteTag" v-if="!isJx">
             <text class="blackFont"
               >{{ courseList.length }} 课程 {{ detail.classHours || "-" }}</text
@@ -85,7 +85,7 @@
       </view>
       <!-- </view> -->
     </view>
-    <view class="contents">
+    <view class="contents" v-if="list.length">
       <!-- <u-line color="#D6D6DB" /> -->
       <!-- <view style="height: 80rpx;">
 				<view><u-tabs :list="list" :item-width="itemWidth()" font-size="30" bar-width="24"  :current="current" @change="change" active-color="#007AFF"></u-tabs></view>
@@ -95,11 +95,8 @@
           v-for="(item, index) in list"
           :key="index"
           class="tab_item"
-          :class="[
-            list.length == 2 ? 'twoBtn' : list.length == 3 ? 'threeBtn' : '',
-            { nactive: current == index },
-          ]"
-          @click="change(index)"
+          :class="[{ nactive: current == item.value }]"
+          @click="change(item.value)"
           >{{ item.name }}</view
         >
       </view>
@@ -257,7 +254,6 @@
         style="padding: 20rpx; padding-bottom: 100rpx; position: relative"
         v-show="current == 2"
       >
-        <!-- <view > -->
         <view v-for="(item, index) in freeMenuList" :key="index">
           <view class="courseItemBox">
             <view class="courseItem">
@@ -265,7 +261,15 @@
             </view>
           </view>
         </view>
-        <!-- </view> -->
+      </view>
+      <!-- 讲义资料 -->
+      <view v-show="current == 3" style="padding: 0 10rpx">
+        <handouts-box
+          :isShowSearch="false"
+          :isShowDownIcon="false"
+          :handoutsId="detail.handoutsId"
+          v-if="detail.handoutsId"
+        />
       </view>
     </view>
 
@@ -408,12 +412,14 @@
 import courseModule from "@/components/course/courseModule.vue";
 import courseChapter from "@/components/course/courseChapter.vue";
 import courseSection from "@/components/course/courseSection.vue";
+import handoutsBox from "@/components/course/handoutsBox.vue";
 import { mapGetters, mapMutations } from "vuex";
 export default {
   components: {
     courseModule,
     courseChapter,
     courseSection,
+    handoutsBox,
   },
   data() {
     return {
@@ -485,6 +491,10 @@ export default {
     disCode() {
       return this.options.distributionCode;
     },
+    isJx() {
+      // 8 讲义资料商品
+      return this.goodsType == 8;
+    },
   },
   onLoad(option) {
     if (option.scene) {
@@ -518,8 +528,20 @@ export default {
       }
     }
     this.disCode ? this.getFxDetail() : this.getDetail();
-    this.goodsCourseList();
-    this.appCommonGoodsCourseModuleFreeExamList();
+    // 非讲义商品
+    if (!this.isJx) {
+      this.goodsCourseList();
+      this.appCommonGoodsCourseModuleFreeExamList();
+    } else {
+      this.list = [
+        {
+          name: "资料目录",
+          value: 3,
+        },
+      ];
+      this.current = 3;
+    }
+
     // #ifdef MP-WEIXIN
     wx.showShareMenu({
       withShareTicket: true,
@@ -603,7 +625,6 @@ export default {
     },
     // 修改用户活动邀请码
     editShareActivityCode() {
-      goodsIds;
       console.log("修改用户活动邀请码");
       this.$http({
         url: "/app/user/edit/shareActivityCode",
@@ -624,21 +645,26 @@ export default {
           this.list = [
             {
               name: "课程介绍",
+              value: 0,
             },
             {
               name: "课程目录",
+              value: 1,
             },
             {
               name: "赠送",
+              value: 2,
             },
           ];
         } else {
           this.list = [
             {
               name: "课程介绍",
+              value: 0,
             },
             {
               name: "课程目录",
+              value: 1,
             },
           ];
         }
@@ -655,7 +681,6 @@ export default {
     },
     select(val) {
       val.check = !val.check;
-      console.log(val, 6666);
     },
     checkboxChange(val) {
       if (!this.isSingleChoice) return;
@@ -726,6 +751,7 @@ export default {
       this.$api
         .addCart({
           goodsIds: goodsIds,
+          choiceStatus: 1,
         })
         .then((res) => {
           if (res.data.code == 200) {
@@ -1453,7 +1479,7 @@ page {
   padding: 0rpx 5rpx;
 
   .tab_item {
-    width: 345rpx;
+    flex: 1;
     height: 65rpx;
     line-height: 65rpx;
     font-size: 28rpx;
@@ -1466,14 +1492,6 @@ page {
       color: #fff;
       background-color: #3577e8;
     }
-
-    &.twoBtn {
-      width: 50%;
-    }
-
-    &.threeBtn {
-      width: 33%;
-    }
   }
 
   // /deep/  .u-tabs {

+ 78 - 0
pages3/course/jydetail.vue

@@ -0,0 +1,78 @@
+<template>
+  <view class="detail_wrap">
+    <nav-bar title="祥粤云学堂"></nav-bar>
+    <view class="detail_wrap_title">{{ goodsDetail.goodsName }}</view>
+    <view class="content">
+      <handouts-box
+        :handoutsId="goodsDetail.handoutsId"
+        v-if="goodsDetail.handoutsId"
+      />
+    </view>
+  </view>
+</template>
+
+<script>
+import handoutsBox from "@/components/course/handoutsBox.vue";
+import { metaSetScalable } from "../../common/navTo";
+export default {
+  name: "SaasMiniprogramJydetail",
+
+  data() {
+    return {
+      options: {},
+      goodsDetail: {},
+    };
+  },
+  onShow() {
+    // #ifdef H5
+    metaSetScalable("no");
+    // #endif
+  },
+  async onLoad(options) {
+    this.options = options;
+    if (this.options.skipPort) {
+      await this.$method.skipLogin(this.options.skipPort);
+    }
+    if (this.$method.isGoLogin()) {
+      return;
+    }
+    this.getGoodsDetail();
+  },
+
+  methods: {
+    getGoodsDetail() {
+      this.$api.goodsDetail(this.options.id).then((res) => {
+        this.goodsDetail = res.data.data;
+      });
+    },
+    metaSetScalable1() {
+      let meta = document.querySelector(".meta_scalable_yes");
+      console.log("🚀 ~ file: jydetail.vue:47 ~ metaSetScalable ~ meta:", meta);
+      if (meta) {
+        meta.remove();
+      }
+      document.querySelector(".meta_scalable_yes");
+      console.log("12321321", meta);
+    },
+  },
+  components: {
+    handoutsBox,
+  },
+};
+</script>
+<style>
+page {
+  background: #eaeef1;
+}
+</style>
+<style lang="scss" scoped>
+.content {
+  padding: 16rpx;
+}
+.detail_wrap_title {
+  background: #ffffff;
+  color: #222222;
+  font-size: 32rpx;
+  padding: 30rpx 106rpx 28rpx 22rpx;
+}
+</style>

+ 18 - 61
pages3/polyv/detail.vue

@@ -799,6 +799,7 @@ import courseChapter from "@/components/course/courseChapter.vue";
 import courseSection from "@/components/course/courseSection.vue";
 import handoutsBox from "@/components/course/handoutsBox.vue";
 import PopupPhoto from "@/components/popup/index.vue";
+import myCompressImage from "@/common/compressPhoto.js";
 import { mapGetters, mapMutations } from "vuex";
 var polyvPlayerContext = null;
 export default {
@@ -2960,7 +2961,6 @@ export default {
           filePath = new File([url], "a.jpg", {
             type: "image/jpg",
           });
-
           uni.uploadFile({
             url: ossToken.host,
             name: "file",
@@ -2980,7 +2980,7 @@ export default {
             success: (result) => {
               this.$u.toast("上传成功");
               self.ossAvatarUrl = ossToken.dir;
-              resolve();
+              resolve(ossToken.dir);
             },
             fail: (error) => {
               uni.showToast({
@@ -3014,7 +3014,7 @@ export default {
               // if (result.statusCode === 200) {
               this.$u.toast("上传成功");
               self.ossAvatarUrl = ossToken.dir;
-              resolve();
+              resolve(ossToken.dir);
             },
             fail: (error) => {
               uni.showToast({
@@ -3032,55 +3032,9 @@ export default {
     imageInfos() {
       var self = this;
       return new Promise(async (resolve, reject) => {
-        // #ifdef MP-WEIXIN
-        uni.getImageInfo({
-          src: self.avatarUrl,
-          success: async (res) => {
-            let canvasWidth = res.width; //图片原始长宽
-            let canvasHeight = res.height;
-            if (canvasWidth > 2000 || canvasHeight > 2000) {
-              // h5不支持
-              uni.compressImage({
-                src: self.avatarUrl,
-                quality: 75,
-                width: "35%",
-                height: "35%",
-                success: async (rest) => {
-                  const waitUpload = await self.uploadFile(
-                    rest.tempFilePath,
-                    0
-                  );
-                  resolve(waitUpload);
-                },
-              });
-            } else if (canvasWidth > 1000 || canvasHeight > 1000) {
-              uni.compressImage({
-                src: self.avatarUrl,
-                quality: 75,
-                width: "50%",
-                height: "50%",
-                success: async (rest) => {
-                  const waitUpload = await self.uploadFile(
-                    rest.tempFilePath,
-                    0
-                  );
-                  resolve(waitUpload);
-                },
-              });
-            } else {
-              const waitUpload = await self.uploadFile(self.avatarUrl, 0);
-              resolve(waitUpload);
-            }
-          },
-          fail: (err) => {
-            this.$u.toast("图片上传失败");
-          },
-        });
-        // #endif
-        // #ifdef H5
-        const waitUpload = await this.uploadFile(this.faceUrl, 0);
+        let resPath = await myCompressImage(this.avatarUrl || this.faceUrl, 50);
+        const waitUpload = await self.uploadFile(resPath, 0);
         resolve(waitUpload);
-        // #endif
       });
     },
     timeEvent() {
@@ -3097,7 +3051,10 @@ export default {
         let photoTime = 0; //获取拍照秒数
         for (let i = 0; i < this.photoList.length; i++) {
           photoTime = Number(this.photoList[i]); //获取拍照秒数
-          if (this.erJianErZao && !this.photoHistoryList.length || photoTime < this.playTime && photoTime > this.playTime - 8) {
+          if (
+            (this.erJianErZao && !this.photoHistoryList.length) ||
+            (photoTime < this.playTime && photoTime > this.playTime - 8)
+          ) {
             //3秒区间内才触发拍照,避免拉动滚动条
             if (this.photoHistoryList.indexOf(i) < 0) {
               //不存在拍照历史,没有重修过,没有学过,则拍照
@@ -3117,7 +3074,7 @@ export default {
                 uni.getStorageSync(`tabkePhotoShow${this.goodsId}`) ==
                 this.goodsId
               ) {
-                return this.openPhoto()
+                return this.openPhoto();
               } else {
                 this.popupPhotoShow = true;
                 uni.setStorageSync(
@@ -3166,9 +3123,9 @@ export default {
       polyvPlayerContext = this.selectComponent("#playerVideo");
       if (newstate.detail.newstate == "playing") {
         console.log("播放");
-        if(this.noticeShow){
+        if (this.noticeShow) {
           polyvPlayerContext.pause();
-          return
+          return;
         }
         if (this.needSeek) {
           // var polyvPlayerContext = this.selectComponent("#playerVideo");
@@ -3357,6 +3314,7 @@ export default {
             video: {
               width: 400,
               height: 300,
+			  facingMode:'user',
             },
           },
           this.photographSuccess,
@@ -3446,12 +3404,10 @@ export default {
         return;
       }
       this.uploadLock = true;
-
       let compareFaceData = await this.faceRecognition();
-      console.log(compareFaceData, "compareFaceData");
       this.compareFaceData = compareFaceData;
       if (compareFaceData >= 80) {
-        const waitYS = await this.imageInfos();
+        await this.imageInfos();
         this.postCoursePhotoRecord()
           .then(async (res) => {
             this.photoHistoryList.push(this.photoIndex);
@@ -3516,6 +3472,7 @@ export default {
           video: {
             width: 400,
             height: 300,
+			facingMode:'user',
           },
         },
         this.photographSuccess,
@@ -3921,9 +3878,9 @@ export default {
         polyvPlayerContext.on("s2j_onVideoPlay", () => {
           // 视频初次播放或由暂停恢复播放时触发
           console.log("视频初次播放或由暂停恢复播放时触发");
-          if(this.noticeShow){
-            polyvPlayerContext.j2s_pauseVideo(); 
-            return
+          if (this.noticeShow) {
+            polyvPlayerContext.j2s_pauseVideo();
+            return;
           }
           if (this.needSeek) {
             if (this.recordObj.videoCurrentTime) {

+ 15 - 0
pages4/login/login.vue

@@ -426,6 +426,11 @@ export default {
         (res) => {
           that.isUse = false;
           if (res.data.code == 200) {
+            // 记住账号
+            uni.setStorageSync("rememberPwLoginMsg", {
+              account: this.form.account,
+              pwd: this.form.pwd,
+            });
             this.loginCallback(res, "pwlogin");
           } else {
             that.$u.toast(res.data.msg);
@@ -466,6 +471,16 @@ export default {
     },
     sectionChange(index) {
       this.current = index;
+      // #ifdef H5
+      if (index == 0) {
+        const rememberPwLoginMsg = uni.getStorageSync("rememberPwLoginMsg");
+        if (rememberPwLoginMsg) {
+          let { account, pwd } = rememberPwLoginMsg;
+          this.form.account = account;
+          this.form.pwd = pwd;
+        }
+      }
+      // #endif
     },
     getPhoneNumber(e) {
       let that = this;

+ 91 - 67
pages4/shopping/shoppingCart.vue

@@ -10,10 +10,10 @@
           <uni-swipe-action>
             <u-checkbox-group @change="checkboxGroupChange" placement="column">
               <view>
+                <!-- :show="item.show" -->
                 <uni-swipe-action-item
                   :autoClose="false"
                   @change="swipeChange($event, item)"
-                  :show="item.show"
                   v-for="(item, index) in list"
                   :key="index"
                 >
@@ -21,12 +21,12 @@
                     <view class="item-wrap">
                       <view class="goods-msg">
                         <u-checkbox
-                          @change="checkboxChange"
-                          :disabled="item.goodsStatus == 0"
+                          :disabled="item.disabled"
                           style="width: 100%"
-                          v-model="list[index].checked"
+                          v-model="item.checked"
+                          @change="checkboxChange"
                           shape="circle"
-                          :name="index"
+                          :name="item.id"
                         >
                           <view class="flex">
                             <view class="goods-img">
@@ -52,7 +52,11 @@
                       </view>
                       <view
                         class="goods-select"
-                        v-if="item.templateType != null && item.goodsType == 1"
+                        v-if="
+                          item.templateType != null &&
+                          item.goodsType == 1 &&
+                          !item.disabled
+                        "
                       >
                         <u-line color="#D6D6DB" />
                         <view
@@ -282,15 +286,13 @@ export default {
     return {
       gradeValue: -1,
       isLogin: false,
-      allChecked: false,
       checkboxValue1: [],
       list: [],
-      value1: "",
+      value: "",
       show: false,
       show1: false,
-      totalPrice: 0.0,
+      allChecked: false,
       isOld: false,
-      checkboxList: [],
       gradeList: [],
       examine: [],
       provinceList: [],
@@ -305,9 +307,29 @@ export default {
       cAreaIndex: 0,
       examIndex: 0,
       current: 3,
+      indicatorStyle: `height: 50px;`,
     };
   },
-  computed: { ...mapGetters(["userInfo", "hideBuyState", "config"]) },
+  computed: {
+    ...mapGetters(["userInfo", "hideBuyState", "config"]),
+    totalPrice() {
+      let price = 0;
+      this.checkList.forEach((e) => (price += e.standPrice));
+      return price;
+    },
+    canCheckList() {
+      return this.list.filter((e) => e.status == 1 && e.goodsStatus == 1);
+    },
+    checkList() {
+      return this.canCheckList.filter((e) => e.checked == true);
+    },
+    selectGreadeId() {
+      if (this.detail.gradObj) {
+        return this.detail.gradObj.gradeId;
+      }
+      return "";
+    },
+  },
   onLoad(option) {
     // console.log(option,987)
   },
@@ -447,14 +469,17 @@ export default {
             };
             self.gradeList.push(item);
           }
+          this.gradeValue = self.gradeList.findIndex(
+            (e) => e.gradeId == this.selectGreadeId
+          );
         }
       });
     },
     openPopup(index, item, itemIndex) {
       this.detail = item;
+      console.log(this.detail, 798);
       this.detailIndex = itemIndex;
       if (index == 0) {
-        this.gradeValue = -1;
         this.show = true;
         this.goodsGradeList(item.goodsId);
       } else {
@@ -462,50 +487,72 @@ export default {
           applyAreasJson: null,
           examDateJson: null,
         };
-        (this.pAreaIndex = 0),
-          (this.cAreaIndex = 0),
-          (this.examIndex = 0),
-          (this.show1 = true);
+        this.pAreaIndex = 0;
+        this.cAreaIndex = 0;
+        this.examIndex = 0;
+        this.show1 = true;
         this.getProvinceList();
         this.getExamine(item.projectId);
       }
     },
     checkboxGroupChange(e) {
-      this.checkboxList = e;
-      if (this.checkboxList.length == this.list.length) {
-        this.allChecked = true;
-      } else {
-        this.allChecked = false;
-      }
+      this.allChecked = this.canCheckList.length === this.checkList.length;
+    },
+    checkboxChange(e) {
+      this.updateCartCheckStatus([e.name], e.value);
     },
-
     login() {
       uni.navigateTo({ url: "/pages4/login/login" });
     },
     cartList() {
       let self = this;
-      this.allChecked = false;
-      this.totalPrice = 0.0;
-      this.checkboxList = [];
       this.$api.cartList().then((res) => {
-        if (res.data.code == 200) {
-          for (let i = 0; i < res.data.rows.length; i++) {
-            let item = res.data.rows[i];
-            item.checked = false;
-            if (item.status != 1 || item.goodsStatus != 1) {
+        let { code, rows } = res.data;
+        if (code == 200) {
+          for (const item of rows) {
+            let {
+              choiceStatus,
+              goodsStatus,
+              status,
+              gradeList,
+              templateType,
+              goodsType,
+            } = item;
+            item.gradObj = {};
+            item.show = false;
+            item.applyAreas = {};
+            item.examDate = {};
+            if (status != 1 || goodsStatus != 1) {
               item.disabled = true;
             } else {
               item.disabled = false;
+              item.checked = choiceStatus == 1;
+              if (templateType === "class" && goodsType == 1) {
+                // 无返回就默认系统分班
+                if (gradeList || gradeList.length === 0) {
+                  gradeList = [
+                    {
+                      className: "系统分班",
+                      gradeId: 0,
+                    },
+                  ];
+                }
+                item.gradObj = item.gradeList[0];
+              }
             }
-            item.show = false;
-            item.gradObj = {}; //存储班级
-            item.applyAreas = {};
-            item.examDate = {};
           }
           self.list = res.data.rows;
+          this.checkboxGroupChange();
         }
       });
     },
+    updateCartCheckStatus(ids, check) {
+      let data = {
+        ids,
+        choiceStatus: check ? 1 : 0,
+      };
+      this.$api.updateCartCheckStatus(data).then((res) => {});
+    },
     delItem(item) {
       let self = this;
       this.$api.deleteCart(item.id).then((res) => {
@@ -518,7 +565,7 @@ export default {
       item.show = e;
     },
     goBuy() {
-      if (this.checkboxList.length == 0) {
+      if (this.checkList.length == 0) {
         uni.showModal({
           title: "提示",
           content: "请选择商品",
@@ -526,11 +573,7 @@ export default {
         });
         return;
       }
-      let checkGoodsList = [];
-      for (let i = 0; i < this.checkboxList.length; i++) {
-        let index = this.checkboxList[i];
-        let item = this.list[index];
-        checkGoodsList.push(item);
+      this.checkList.forEach((item) => {
         if (item.templateType == "class" && item.goodsType == 1) {
           if (!item.gradObj.className) {
             uni.showModal({
@@ -551,38 +594,19 @@ export default {
           // 	return false;
           // }
         }
-      }
+      });
       this.$store.commit("setShoppingCartList", {
-        shoppingCartList: checkGoodsList,
+        shoppingCartList: this.checkList,
       });
       this.$navTo.togo("/pages2/order/confirm_pay?fromCart=true");
     },
-    checkboxChange(n) {
-      this.$nextTick(() => {
-        this.totalPrice = 0.0;
-        for (let i = 0; i < this.list.length; i++) {
-          if (this.list[i].checked) {
-            this.totalPrice += this.list[i].standPrice;
-          }
-        }
-      });
-    },
     checkboxAllChange(n) {
-      this.$nextTick(() => {
-        this.totalPrice = 0.0;
-        this.checkboxList = [];
-        if (n.value) {
-          for (let i = 0; i < this.list.length; i++) {
-            this.list[i].checked = true;
-            this.totalPrice += this.list[i].standPrice;
-            this.checkboxList.push(i);
-          }
-        } else {
-          for (let i = 0; i < this.list.length; i++) {
-            this.list[i].checked = false;
-          }
-        }
+      let ids = [];
+      this.canCheckList.forEach((e) => {
+        e.checked = n.value;
+        ids.push(e.id);
       });
+      this.updateCartCheckStatus(ids, n.value);
     },
   },
   components: { ClassTimeTip, navLogo },

+ 6 - 3
pages5/examBank/index.vue

@@ -1005,14 +1005,17 @@ export default {
      * 获取试卷类型2考试,1练习
      */
     bankExam() {
-      return new Promise((resolve) => {
+      return new Promise((resolve, reject) => {
         this.$api.bankExam(this.examId).then((res) => {
-          this.bankType = res.data.data.doType;
+          const { examLimitClient, doType } = res.data.data;
+          if (!this.$method.examClientCanLearn(examLimitClient)) {
+            reject();
+          }
+          this.bankType = doType;
           this.examData = res.data.data;
           if (this.bankType == 2) {
             this.needBack = true;
           }
-
           resolve();
         });
       });

+ 4 - 1
pages5/examReport/index.vue

@@ -577,8 +577,11 @@ export default {
         });
     },
     bankExam() {
-      return new Promise((resolve) => {
+      return new Promise((resolve, reject) => {
         this.$api.bankExam(this.examId).then((res) => {
+          if (!this.$method.examClientCanLearn(res.data.data.examLimitClient)) {
+            reject();
+          }
           this.examData = res.data.data;
           resolve();
         });

+ 636 - 554
pages5/liveDetail/index.vue

@@ -1,564 +1,646 @@
 <template>
-	<view>
-		<nav-bar title="课程详情"></nav-bar>
-		<view class="videoBox" >
-			<view >
-				<view class="video_box" v-if="!startStatus">
-					<image :src="$method.splitImgHost(detail.coverUrl)" style="width: 100%;height: 460rpx;"></image>
-					<image v-if="false" class="video_play" src="/static/play.png" @click="startVideo"></image>
-				</view>
-				<view v-else class="video_box" style="width: 100%;height: 460rpx;">
-					<polyv-player
-						id="playerVideo"
-						playerId="playerVideo"
-						height="460rpx"
-						:vid="vid"
-						:showSettingBtn="true"
-						:enablePlayGesture="true"
-						:playbackRate="playbackRate"
-						:isAllowSeek="isAllowSeek"
-						:autoplay="autoplay"
-						:startTime="startTime"
-						@statechange="onStateChange"
-					></polyv-player>
-				</view>
-				<view style="padding:20rpx;">
-					<view style="display: flex;">
-						<view class="yearTag" v-if="detail.year">{{detail.year}}</view>
-						<view class="titleTag">{{detail.goodsName}}</view>
-					</view>
-					<view style="display: flex;justify-content: space-between;margin-top: 13rpx;">
-						<view class="noteTag"><image src="/static/icon/wk_icon1.png" class="wk_icon"></image>
-						共 <text class="blackFont">{{courseList.length}} 课程 {{detail.classHours}}</text> 学时</view>
-						
-					</view>
-				</view>
-			</view>
-			<u-line color="#D6D6DB" />
-			<view style="height: 80rpx;">
-				<view><u-tabs :list="list" :item-width="itemWidth()" font-size="30" bar-width="24"  :current="current" @change="change" active-color="#007AFF"></u-tabs></view>
-			</view>
-			
-		</view>
-		<view style="padding: 20rpx;padding-bottom: 100rpx;position: relative;" v-show="current==0">
-			<view class="content">
-				<view v-html="detail.mobileDetailHtml" style="width: 100%;overflow: hidden;"></view>
-			</view>
-		</view>
-		<view style="padding: 20rpx;padding-bottom: 100rpx;position: relative;" v-show="current==1">
-			<view >
-				<view v-for="(item,index) in courseList" :key="index" >
-					<view class="courseItemBox" >
-						<view class="courseItem" @click="openCourse(item)">
-							<view class="courseName">{{item.courseName}}</view>
-							<view>
-								<image src="/static/icon/up.png" class="icon_up" v-if="item.down"></image>
-								<image src="/static/icon/down.png" class="icon_up" v-if="!item.down"></image>
-							</view>
-						</view>
-						<view v-show="!item.down">
-							<view v-for="(itemM,indexM) in item.menuList"  :key="indexM">
-								<courseModule :courseId="itemM.courseId" :needOpen="(isFirstEnter && menuIndex[0] === index && menuIndex[1] === indexM) ? true : false" v-if="itemM.type==1" :menuItem="itemM"></courseModule>
-								<courseChapter :courseId="itemM.courseId" :needOpen="(isFirstEnter && menuIndex[0] === index && menuIndex[1] === indexM) ? true : false" v-if="itemM.type==2" :isBuy="false" :menuItem="itemM"></courseChapter>
-								<courseSection :courseId="itemM.courseId" v-if="itemM.type==3" :isBuy="false" :menuItem="itemM"></courseSection>
-								<u-line></u-line>
-								
-							</view>
-						</view>
-					</view>
-					
-				</view>
-			</view>
-		</view>
-		<view style="padding: 20rpx;padding-bottom: 100rpx;position: relative;" v-show="current==2">
-			<view >
-				<view v-for="(item,index) in freeMenuList" :key="index" >
-					<view class="courseItemBox" >
-						<view class="courseItem">
-							<view class="courseName">{{item.freeExamName}}</view>
-						</view>
-					</view>
-					
-				</view>
-			</view>
-		</view>
-		<view class="bottomBox" v-if="!hideBuyState">
-			<view>
-				<text class="priceTag">¥ {{toFixed(detail.standPrice)}}</text>
-				<!-- <view class="priceTag">¥ {{toFixed(detail.linePrice)}}</view> -->
-				<text v-if="detail.linePrice" class="sale"> ¥ </text>
-				<text v-if="detail.linePrice" class="price_line">&nbsp;{{ detail.linePrice }}</text>
-			</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>
+  <view>
+    <nav-bar title="课程详情"></nav-bar>
+    <view class="videoBox">
+      <view>
+        <view class="video_box" v-if="!startStatus">
+          <image
+            :src="$method.splitImgHost(detail.coverUrl)"
+            style="width: 100%; height: 460rpx"
+          ></image>
+          <image
+            v-if="false"
+            class="video_play"
+            src="/static/play.png"
+            @click="startVideo"
+          ></image>
+        </view>
+        <view v-else class="video_box" style="width: 100%; height: 460rpx">
+          <polyv-player
+            id="playerVideo"
+            playerId="playerVideo"
+            height="460rpx"
+            :vid="vid"
+            :showSettingBtn="true"
+            :enablePlayGesture="true"
+            :playbackRate="playbackRate"
+            :isAllowSeek="isAllowSeek"
+            :autoplay="autoplay"
+            :startTime="startTime"
+            @statechange="onStateChange"
+          ></polyv-player>
+        </view>
+        <view style="padding: 20rpx">
+          <view style="display: flex">
+            <view class="yearTag" v-if="detail.year">{{ detail.year }}</view>
+            <view class="titleTag">{{ detail.goodsName }}</view>
+          </view>
+          <view
+            style="
+              display: flex;
+              justify-content: space-between;
+              margin-top: 13rpx;
+            "
+          >
+            <view class="noteTag"
+              ><image src="/static/icon/wk_icon1.png" class="wk_icon"></image>
+              共
+              <text class="blackFont"
+                >{{ courseList.length }} 课程 {{ detail.classHours }}</text
+              >
+              学时</view
+            >
+          </view>
+        </view>
+      </view>
+      <u-line color="#D6D6DB" />
+      <view style="height: 80rpx">
+        <view
+          ><u-tabs
+            :list="list"
+            :item-width="itemWidth()"
+            font-size="30"
+            bar-width="24"
+            :current="current"
+            @change="change"
+            active-color="#007AFF"
+          ></u-tabs
+        ></view>
+      </view>
+    </view>
+    <view
+      style="padding: 20rpx; padding-bottom: 100rpx; position: relative"
+      v-show="current == 0"
+    >
+      <view class="content">
+        <view
+          v-html="detail.mobileDetailHtml"
+          style="width: 100%; overflow: hidden"
+        ></view>
+      </view>
+    </view>
+    <view
+      style="padding: 20rpx; padding-bottom: 100rpx; position: relative"
+      v-show="current == 1"
+    >
+      <view>
+        <view v-for="(item, index) in courseList" :key="index">
+          <view class="courseItemBox">
+            <view class="courseItem" @click="openCourse(item)">
+              <view class="courseName">{{ item.courseName }}</view>
+              <view>
+                <image
+                  src="/static/icon/up.png"
+                  class="icon_up"
+                  v-if="item.down"
+                ></image>
+                <image
+                  src="/static/icon/down.png"
+                  class="icon_up"
+                  v-if="!item.down"
+                ></image>
+              </view>
+            </view>
+            <view v-show="!item.down">
+              <view v-for="(itemM, indexM) in item.menuList" :key="indexM">
+                <courseModule
+                  :courseId="itemM.courseId"
+                  :needOpen="
+                    isFirstEnter &&
+                    menuIndex[0] === index &&
+                    menuIndex[1] === indexM
+                      ? true
+                      : false
+                  "
+                  v-if="itemM.type == 1"
+                  :menuItem="itemM"
+                ></courseModule>
+                <courseChapter
+                  :courseId="itemM.courseId"
+                  :needOpen="
+                    isFirstEnter &&
+                    menuIndex[0] === index &&
+                    menuIndex[1] === indexM
+                      ? true
+                      : false
+                  "
+                  v-if="itemM.type == 2"
+                  :isBuy="false"
+                  :menuItem="itemM"
+                ></courseChapter>
+                <courseSection
+                  :courseId="itemM.courseId"
+                  v-if="itemM.type == 3"
+                  :isBuy="false"
+                  :menuItem="itemM"
+                ></courseSection>
+                <u-line></u-line>
+              </view>
+            </view>
+          </view>
+        </view>
+      </view>
+    </view>
+    <view
+      style="padding: 20rpx; padding-bottom: 100rpx; position: relative"
+      v-show="current == 2"
+    >
+      <view>
+        <view v-for="(item, index) in freeMenuList" :key="index">
+          <view class="courseItemBox">
+            <view class="courseItem">
+              <view class="courseName">{{ item.freeExamName }}</view>
+            </view>
+          </view>
+        </view>
+      </view>
+    </view>
+    <view class="bottomBox" v-if="!hideBuyState">
+      <view>
+        <text class="priceTag">¥ {{ toFixed(detail.standPrice) }}</text>
+        <!-- <view class="priceTag">¥ {{toFixed(detail.linePrice)}}</view> -->
+        <text v-if="detail.linePrice" class="sale"> ¥ </text>
+        <text v-if="detail.linePrice" class="price_line"
+          >&nbsp;{{ detail.linePrice }}</text
+        >
+      </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>
 </template>
 
 <script>
-import courseModule from '@/components/course/courseModule.vue';
-import courseChapter from '@/components/course/courseChapter.vue';
-import courseSection from '@/components/course/courseSection.vue';
-import { mapGetters,mapMutations  } from 'vuex';
+import courseModule from "@/components/course/courseModule.vue";
+import courseChapter from "@/components/course/courseChapter.vue";
+import courseSection from "@/components/course/courseSection.vue";
+import { mapGetters, mapMutations } from "vuex";
 export default {
-	components: {
-		courseModule,
-		courseChapter,
-		courseSection
-	},
-	data() {
-		return {
-			id:0,
-			list: [],
-			menuIndex:[],
-			current:0,
-			detail:{},
-			courseList:[],
-			menuList:[],
-			freeMenuList:[],
-			startStatus:false,
-			playbackRate: [1.0],
-			isAllowSeek:'no',
-			vid:'',
-			autoplay:true,
-			listenConfigList:[],
-			listenSecond:0,
-			isFirstEnter:true, //是否首次进入
-			timer:null,
-			businessData:{},
-			startTime:0
-		};
-	},
-	computed: { ...mapGetters(['userInfo','goodsAuditionConfigIdList','playSectionId','hideBuyState']) },
-	onLoad(option) {
-		this.id = option.id;
-		this.getDetail()
-		this.goodsCourseList()
-		this.appCommonGoodsCourseModuleFreeExamList();
-	},
-	onUnload(option) {
-		this.$store.commit('setPlaySectionId', {playSectionId  :0});
-		//移除所有的事件监听器
-		uni.$off();
-	},
-	mounted() {
-		let self = this
-		uni.$on('getSection', item => {
-			//播放试听
-			self.listenSecond = 0
-			for (var itemChild of self.listenConfigList) {
-				if(self.playSectionId == (itemChild.sectionId || itemChild.menuId) && item.courseId == itemChild.courseId){
-					if(itemChild.auditionMinute>0){
-				//		self.listenSecond = itemChild.auditionMinute *60 //试听秒数
-						self.listenSecond = itemChild.auditionMinute //试听秒数 auditionMinute调整为秒单位
-					}
-				}
-			}
-			if(self.listenSecond>0){
-				if(self.timer){
-					clearInterval(self.timer);
-				}
-				 if(self.vid){
-					 //切换视频
-					 var polyvPlayerContext = self.selectComponent('#playerVideo');
-					 polyvPlayerContext.changeVid(item.recordingUrl)
-				 }else{
-					 self.vid = item.recordingUrl
-				 }
-				
-				self.startStatus = true
-				self.startTime = 0
-			}else{
-				
-				self.$u.toast('试听配置错误');
-			}
-			
-		})
-		this.updateChapterOpen(true)
-	},
-	methods: {
-		 ...mapMutations(['updateChapterOpen']),
-		 itemWidth() {
-			 return (100/this.list.length)+'%'
-		 },
-		appCommonGoodsCourseModuleFreeExamList() {
-		 this.$api.appCommonGoodsCourseModuleFreeExamList(this.id).then(res => {
-			 if(res.data.data.length) {
-				this.freeMenuList = res.data.data;
-				 this.list =  [
-						{
-							name: '详情'
-						},
-						{
-							name: '大纲'
-						},
-						{
-							name: '赠送'
-						}
-					]
-				 } else {
-					 this.list =  [
-							{
-								name: '详情'
-							},
-							{
-								name: '大纲'
-							}
-						]
-				 }
-				 
-				 console.log(this.list)
-		 })
-		},
-		courseBusiness(){
-			this.$api.courseBusiness(this.detail.businessId).then(res => {
-				this.businessData = res.data.data;
-			})
-		},
-		toFixed(number) {
-			if(number > 0) {
-				return number.toFixed(2)
-			} else {
-				return '0.00'
-			}
-		},
-		onStateChange(newstate, oldstate) {
-			if (newstate.detail.newstate == 'playing') {
-				//开始播放
-				if(this.timer){
-					clearInterval(this.timer);
-				}
-				this.timer = setInterval(this.timeEvent, 1500);//定时器
-			}
-			
-		},
-		closePlay(){
-			this.$store.commit('setPlaySectionId', {playSectionId  :0});
-			this.vid = ""
-			this.startStatus = false
-		},
-		timeEvent() {
-			let self = this
-		        var polyvPlayerContext = this.selectComponent('#playerVideo');
-				if (polyvPlayerContext != null) {
-					let PlayCurrentTime = polyvPlayerContext.getCurrentTime();
-					if(PlayCurrentTime>=this.listenSecond){
-						polyvPlayerContext.stop();
-						polyvPlayerContext.exitFullScreen();
-						clearInterval(this.timer);
-						this.timer = null
-						uni.showModal({
-							title: '提示',
-							content: '试听结束,购买课程可学习全部',
-							showCancel:false,
-							success: function(resst) {
-								self.closePlay()
-							}
-						});
-					}
-				}
-		},
-		openCourse(item){
-			item.down = !item.down
-			if(!item.down&&item.menuList.length==0){
-				this.getMenuList(item)
-			}
-			
-		},
-		addShopCart() {
-			let self = this
-			this.$api.addCart({goodsId:this.id}).then(res => {
-				if(res.data.code==200){
-					uni.setStorageSync('updateCart',1) //提醒刷新购物车
-					uni.showToast({
-					    title: '添加成功'
-					});
-				}else{
-					this.$u.toast(res.data.msg);
-				}
-			});
-		},
-		goodsCourseList() {
-			let self = this
-			this.$api.goodsCourseList(this.id).then(res => {
-				if(res.data.code==200){
-					for(let i=0;i<res.data.rows.length;i++){
-						let item = res.data.rows[i]
-						item.down = true
-						item.menuList = []
-					}
-					self.courseList = res.data.rows;
-					this.getFirstCourse();
-				}
-			});
-		},
-		/**
-		 * 获取第一个有模块或者章的课程
-		 */
-		async getFirstCourse() {
-			for(let i = 0; i < this.courseList.length; i++) {
-				
-				let menuIndexOrFalse = await this.getCourseMenus(this.courseList[i]);
-				
-				if(menuIndexOrFalse !== false) {
-					this.menuIndex = [i,menuIndexOrFalse]
-					this.openCourse(this.courseList[i])
-					break
-				}
-			}
-		},
-		getCourseMenus(item) {
-			return new Promise(resolve => {
-				this.$api.menuList({courseId:item.courseId}).then(res => {
-					if(res.data.code==200){
-						for(let i=0;i<res.data.rows.length;i++){
-							if(res.data.rows[i].type == 1 || res.data.rows[i].type == 2) {
-								resolve(i)
-								break;
-							}
-						}
-					}
-				});
-			})
-			
-		},
-		getMenuList(item) {
-			let self = this
-			this.$api.menuList({courseId:item.courseId}).then(res => {
-				if(res.data.code==200){
-					for(let i=0;i<res.data.rows.length;i++){
-						let item = res.data.rows[i]
-						item.down = true
-						item.id = item.menuId
-						item.name = item.menuName
-						
-						if(item.type==3){
-							//判断是否试听
-							item.tryListen = false
-							if(self.goodsAuditionConfigIdList.indexOf(item.id)!==-1){
-								item.tryListen = true
-							}	
-						}
-					}
-					item.menuList = res.data.rows
-				}
-			});
-		},
-		getDetail() {
-			let self = this
-			let sectionIdList = []
-			this.$api.commonGoodsDetail(this.id).then(res => {
-				if(res.data.code==200){
-					if(res.data.data.mobileDetailHtml){
-						res.data.data.mobileDetailHtml = res.data.data.mobileDetailHtml.replace(/<img/gi,'<img style="max-width:100%;"')
-					}
-					
-					
-					self.detail = res.data.data
-					this.courseBusiness();
-					if(self.detail.goodsAuditionConfig){
-						self.listenConfigList = JSON.parse(self.detail.goodsAuditionConfig)
-						for (var itemChild of self.listenConfigList) {
-							sectionIdList.push(itemChild.sectionId)//存储试听节ID
-						}
-						self.$store.commit('setGoodsAuditionConfigIdList', {goodsAuditionConfigIdList:sectionIdList});
-					}
-				}
-			});
-		},
-		buy(){
-			if(this.$method.isGoLogin()){
-				return
-			}
-			this.$navTo.togo('/pages2/order/confirm_list?id='+this.id);
-		},
-		addCart(){
-			if(this.$method.isGoLogin()){
-				return
-			}
-			this.addShopCart()
-		},
-		open(item){
-			item.showChildren = !item.showChildren
-		},
-		change(index){
-			this.current = index;
-		}
-	}
+  components: {
+    courseModule,
+    courseChapter,
+    courseSection,
+  },
+  data() {
+    return {
+      id: 0,
+      list: [],
+      menuIndex: [],
+      current: 0,
+      detail: {},
+      courseList: [],
+      menuList: [],
+      freeMenuList: [],
+      startStatus: false,
+      playbackRate: [1.0],
+      isAllowSeek: "no",
+      vid: "",
+      autoplay: true,
+      listenConfigList: [],
+      listenSecond: 0,
+      isFirstEnter: true, //是否首次进入
+      timer: null,
+      businessData: {},
+      startTime: 0,
+    };
+  },
+  computed: {
+    ...mapGetters([
+      "userInfo",
+      "goodsAuditionConfigIdList",
+      "playSectionId",
+      "hideBuyState",
+    ]),
+  },
+  onLoad(option) {
+    this.id = option.id;
+    this.getDetail();
+    this.goodsCourseList();
+    this.appCommonGoodsCourseModuleFreeExamList();
+  },
+  onUnload(option) {
+    this.$store.commit("setPlaySectionId", { playSectionId: 0 });
+    //移除所有的事件监听器
+    uni.$off();
+  },
+  mounted() {
+    let self = this;
+    uni.$on("getSection", (item) => {
+      //播放试听
+      self.listenSecond = 0;
+      for (var itemChild of self.listenConfigList) {
+        if (
+          self.playSectionId == (itemChild.sectionId || itemChild.menuId) &&
+          item.courseId == itemChild.courseId
+        ) {
+          if (itemChild.auditionMinute > 0) {
+            //		self.listenSecond = itemChild.auditionMinute *60 //试听秒数
+            self.listenSecond = itemChild.auditionMinute; //试听秒数 auditionMinute调整为秒单位
+          }
+        }
+      }
+      if (self.listenSecond > 0) {
+        if (self.timer) {
+          clearInterval(self.timer);
+        }
+        if (self.vid) {
+          //切换视频
+          var polyvPlayerContext = self.selectComponent("#playerVideo");
+          polyvPlayerContext.changeVid(item.recordingUrl);
+        } else {
+          self.vid = item.recordingUrl;
+        }
+
+        self.startStatus = true;
+        self.startTime = 0;
+      } else {
+        self.$u.toast("试听配置错误");
+      }
+    });
+    this.updateChapterOpen(true);
+  },
+  methods: {
+    ...mapMutations(["updateChapterOpen"]),
+    itemWidth() {
+      return 100 / this.list.length + "%";
+    },
+    appCommonGoodsCourseModuleFreeExamList() {
+      this.$api.appCommonGoodsCourseModuleFreeExamList(this.id).then((res) => {
+        if (res.data.data.length) {
+          this.freeMenuList = res.data.data;
+          this.list = [
+            {
+              name: "详情",
+            },
+            {
+              name: "大纲",
+            },
+            {
+              name: "赠送",
+            },
+          ];
+        } else {
+          this.list = [
+            {
+              name: "详情",
+            },
+            {
+              name: "大纲",
+            },
+          ];
+        }
+
+        console.log(this.list);
+      });
+    },
+    courseBusiness() {
+      this.$api.courseBusiness(this.detail.businessId).then((res) => {
+        this.businessData = res.data.data;
+      });
+    },
+    toFixed(number) {
+      if (number > 0) {
+        return number.toFixed(2);
+      } else {
+        return "0.00";
+      }
+    },
+    onStateChange(newstate, oldstate) {
+      if (newstate.detail.newstate == "playing") {
+        //开始播放
+        if (this.timer) {
+          clearInterval(this.timer);
+        }
+        this.timer = setInterval(this.timeEvent, 1500); //定时器
+      }
+    },
+    closePlay() {
+      this.$store.commit("setPlaySectionId", { playSectionId: 0 });
+      this.vid = "";
+      this.startStatus = false;
+    },
+    timeEvent() {
+      let self = this;
+      var polyvPlayerContext = this.selectComponent("#playerVideo");
+      if (polyvPlayerContext != null) {
+        let PlayCurrentTime = polyvPlayerContext.getCurrentTime();
+        if (PlayCurrentTime >= this.listenSecond) {
+          polyvPlayerContext.stop();
+          polyvPlayerContext.exitFullScreen();
+          clearInterval(this.timer);
+          this.timer = null;
+          uni.showModal({
+            title: "提示",
+            content: "试听结束,购买课程可学习全部",
+            showCancel: false,
+            success: function (resst) {
+              self.closePlay();
+            },
+          });
+        }
+      }
+    },
+    openCourse(item) {
+      item.down = !item.down;
+      if (!item.down && item.menuList.length == 0) {
+        this.getMenuList(item);
+      }
+    },
+    addShopCart() {
+      let self = this;
+      this.$api.addCart({ goodsId: this.id, choiceStatus: 1 }).then((res) => {
+        if (res.data.code == 200) {
+          uni.setStorageSync("updateCart", 1); //提醒刷新购物车
+          uni.showToast({
+            title: "添加成功",
+          });
+        } else {
+          this.$u.toast(res.data.msg);
+        }
+      });
+    },
+    goodsCourseList() {
+      let self = this;
+      this.$api.goodsCourseList(this.id).then((res) => {
+        if (res.data.code == 200) {
+          for (let i = 0; i < res.data.rows.length; i++) {
+            let item = res.data.rows[i];
+            item.down = true;
+            item.menuList = [];
+          }
+          self.courseList = res.data.rows;
+          this.getFirstCourse();
+        }
+      });
+    },
+    /**
+     * 获取第一个有模块或者章的课程
+     */
+    async getFirstCourse() {
+      for (let i = 0; i < this.courseList.length; i++) {
+        let menuIndexOrFalse = await this.getCourseMenus(this.courseList[i]);
+
+        if (menuIndexOrFalse !== false) {
+          this.menuIndex = [i, menuIndexOrFalse];
+          this.openCourse(this.courseList[i]);
+          break;
+        }
+      }
+    },
+    getCourseMenus(item) {
+      return new Promise((resolve) => {
+        this.$api.menuList({ courseId: item.courseId }).then((res) => {
+          if (res.data.code == 200) {
+            for (let i = 0; i < res.data.rows.length; i++) {
+              if (res.data.rows[i].type == 1 || res.data.rows[i].type == 2) {
+                resolve(i);
+                break;
+              }
+            }
+          }
+        });
+      });
+    },
+    getMenuList(item) {
+      let self = this;
+      this.$api.menuList({ courseId: item.courseId }).then((res) => {
+        if (res.data.code == 200) {
+          for (let i = 0; i < res.data.rows.length; i++) {
+            let item = res.data.rows[i];
+            item.down = true;
+            item.id = item.menuId;
+            item.name = item.menuName;
+
+            if (item.type == 3) {
+              //判断是否试听
+              item.tryListen = false;
+              if (self.goodsAuditionConfigIdList.indexOf(item.id) !== -1) {
+                item.tryListen = true;
+              }
+            }
+          }
+          item.menuList = res.data.rows;
+        }
+      });
+    },
+    getDetail() {
+      let self = this;
+      let sectionIdList = [];
+      this.$api.commonGoodsDetail(this.id).then((res) => {
+        if (res.data.code == 200) {
+          if (res.data.data.mobileDetailHtml) {
+            res.data.data.mobileDetailHtml =
+              res.data.data.mobileDetailHtml.replace(
+                /<img/gi,
+                '<img style="max-width:100%;"'
+              );
+          }
+
+          self.detail = res.data.data;
+          this.courseBusiness();
+          if (self.detail.goodsAuditionConfig) {
+            self.listenConfigList = JSON.parse(self.detail.goodsAuditionConfig);
+            for (var itemChild of self.listenConfigList) {
+              sectionIdList.push(itemChild.sectionId); //存储试听节ID
+            }
+            self.$store.commit("setGoodsAuditionConfigIdList", {
+              goodsAuditionConfigIdList: sectionIdList,
+            });
+          }
+        }
+      });
+    },
+    buy() {
+      if (this.$method.isGoLogin()) {
+        return;
+      }
+      this.$navTo.togo("/pages2/order/confirm_list?id=" + this.id);
+    },
+    addCart() {
+      if (this.$method.isGoLogin()) {
+        return;
+      }
+      this.addShopCart();
+    },
+    open(item) {
+      item.showChildren = !item.showChildren;
+    },
+    change(index) {
+      this.current = index;
+    },
+  },
 };
 </script>
-<style >
-	page{
-		background-color: #EAEEF1;
-	}
+<style>
+page {
+  background-color: #eaeef1;
+}
 </style>
 <style scope>
-	.video_t2 {
-		font-size: 24rpx;
-		font-family: PingFang SC;
-		font-weight: 500;
-		color: #666666;
-	}
-	.video_t1 {
-		height: 80rpx;
-		color: #333333;
-		line-height: 80rpx;
-		font-size: 30rpx;
-		font-family: PingFang SC;
-		font-weight: bold;
-		color: #333333;
-		overflow: hidden;
-		text-overflow:ellipsis;
-		white-space: nowrap;
-	}
-	.video_t1_t {
-		display: flex;
-		flex-direction: column;
-		height: 80rpx;
-		color: #333333;
-		text-align: center;
-		align-items: center;
-		border-left: solid 1px #d6d6db;
-	}
-	.video_play {
-		position: absolute;
-		width: 95rpx;
-		height: 95rpx;
-		top: 0;
-		left: 0;
-		right: 0;
-		bottom: 0;
-		margin: auto;
-	}
-	.video_box {
-		position: relative;
-	}
-	.courseName{
-		white-space:nowrap;
-		overflow:hidden;
-		text-overflow:ellipsis; 
-	}
-	.videoBox{
-		background-color: #FFFFFF;
-		width: 100%;
-		/* height: 680rpx; */
-		z-index: 999;
-	}
-	.icon_up{
-		width: 32rpx;
-		height: 32rpx;
-	}
-	.contentBox{
-		
-	}
-	.courseItemBox{
-		background: #FFFFFF;
-		border-radius: 16rpx;
-		padding: 0 10rpx;
-		margin-bottom: 20rpx;
-	}
-	.courseItem{
-		height: 80rpx;
-		color: #333333;
-		font-size: 32rpx;
-		line-height: 80rpx;
-		font-weight: bold;
-		display: flex;
-		justify-content: space-between;
-
-	}
-	.content{
-		background-color: #FFFFFF;
-		width: 100%;
-	}
-	.btn2{
-		width: 200rpx;
-		height: 64rpx;
-		background: linear-gradient(0deg, #FFB102, #FD644F);
-		box-shadow: 0rpx 10rpx 16rpx 4rpx rgba(1, 99, 235, 0.04);
-		border-radius: 32rpx;
-		line-height: 64rpx;
-		text-align: center;
-	}
-	.btn1{
-		width: 200rpx;
-		height: 64rpx;
-		background: linear-gradient(0deg, #015EEA, #00C0FA);
-		border-radius: 32rpx;
-		line-height: 64rpx;
-		text-align: center;
-		margin-right: 20rpx;
-	}
-	.bottomBox{
-		position: fixed;
-		bottom: 0;
-		width: 100%;
-		left: 0;
-		height:98rpx ;
-		background-color: #FFFFFF;
-		display: flex;
-		justify-content: space-between;
-		align-items: center;
-		padding: 0 30rpx;
-	}
-	.blackFont{
-		color: #333333;
-		margin: 0 4rpx;
-	}
-	.wk_icon{
-		width: 24rpx;
-		height: 24rpx;
-		margin-right: 12rpx;
-	}
-	.noteTag{
-		font-size: 24rpx;
-		font-family: PingFang SC;
-		font-weight: 500;
-		color: #999999;
-		align-items: center;
-	}
-	.priceTag{
-		font-size: 30rpx;
-		font-family: PingFang SC;
-		font-weight: bold;
-		color: #FF2D55;
-	}
-	.sale {
-		color: #999999;
-		font-size: 28rpx;
-		margin-left: 8rpx;
-	}
-	.price_line {
-		color: #999999;
-		font-size: 28rpx;
-		text-decoration:line-through;
-		font-weight: 400;
-	}
-	.titleTag{
-		font-size: 32rpx;
-		font-weight: bold;
-		color: #333333;
-		margin-left: 8rpx;
-	}
-	.yearTag{
-		width: 80rpx;
-		height: 32rpx;
-		background: #EBF5FF;
-		border: 2rpx solid #007AFF;
-		border-radius: 16rpx;
-		font-size: 24rpx;
-		color: #007AFF;
-		text-align: center;
-		line-height: 32rpx;
-	}
-	.itemBox{
-		background: #FFFFFF;
-		box-shadow: 0rpx 10rpx 9rpx 1rpx rgba(165, 196, 239, 0.1);
-		border-radius: 24rpx;
-		width: 100%;
-		padding: 20rpx;
-		margin-bottom: 20rpx;
-	}
+.video_t2 {
+  font-size: 24rpx;
+  font-family: PingFang SC;
+  font-weight: 500;
+  color: #666666;
+}
+.video_t1 {
+  height: 80rpx;
+  color: #333333;
+  line-height: 80rpx;
+  font-size: 30rpx;
+  font-family: PingFang SC;
+  font-weight: bold;
+  color: #333333;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+.video_t1_t {
+  display: flex;
+  flex-direction: column;
+  height: 80rpx;
+  color: #333333;
+  text-align: center;
+  align-items: center;
+  border-left: solid 1px #d6d6db;
+}
+.video_play {
+  position: absolute;
+  width: 95rpx;
+  height: 95rpx;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  margin: auto;
+}
+.video_box {
+  position: relative;
+}
+.courseName {
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+.videoBox {
+  background-color: #ffffff;
+  width: 100%;
+  /* height: 680rpx; */
+  z-index: 999;
+}
+.icon_up {
+  width: 32rpx;
+  height: 32rpx;
+}
+.contentBox {
+}
+.courseItemBox {
+  background: #ffffff;
+  border-radius: 16rpx;
+  padding: 0 10rpx;
+  margin-bottom: 20rpx;
+}
+.courseItem {
+  height: 80rpx;
+  color: #333333;
+  font-size: 32rpx;
+  line-height: 80rpx;
+  font-weight: bold;
+  display: flex;
+  justify-content: space-between;
+}
+.content {
+  background-color: #ffffff;
+  width: 100%;
+}
+.btn2 {
+  width: 200rpx;
+  height: 64rpx;
+  background: linear-gradient(0deg, #ffb102, #fd644f);
+  box-shadow: 0rpx 10rpx 16rpx 4rpx rgba(1, 99, 235, 0.04);
+  border-radius: 32rpx;
+  line-height: 64rpx;
+  text-align: center;
+}
+.btn1 {
+  width: 200rpx;
+  height: 64rpx;
+  background: linear-gradient(0deg, #015eea, #00c0fa);
+  border-radius: 32rpx;
+  line-height: 64rpx;
+  text-align: center;
+  margin-right: 20rpx;
+}
+.bottomBox {
+  position: fixed;
+  bottom: 0;
+  width: 100%;
+  left: 0;
+  height: 98rpx;
+  background-color: #ffffff;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  padding: 0 30rpx;
+}
+.blackFont {
+  color: #333333;
+  margin: 0 4rpx;
+}
+.wk_icon {
+  width: 24rpx;
+  height: 24rpx;
+  margin-right: 12rpx;
+}
+.noteTag {
+  font-size: 24rpx;
+  font-family: PingFang SC;
+  font-weight: 500;
+  color: #999999;
+  align-items: center;
+}
+.priceTag {
+  font-size: 30rpx;
+  font-family: PingFang SC;
+  font-weight: bold;
+  color: #ff2d55;
+}
+.sale {
+  color: #999999;
+  font-size: 28rpx;
+  margin-left: 8rpx;
+}
+.price_line {
+  color: #999999;
+  font-size: 28rpx;
+  text-decoration: line-through;
+  font-weight: 400;
+}
+.titleTag {
+  font-size: 32rpx;
+  font-weight: bold;
+  color: #333333;
+  margin-left: 8rpx;
+}
+.yearTag {
+  width: 80rpx;
+  height: 32rpx;
+  background: #ebf5ff;
+  border: 2rpx solid #007aff;
+  border-radius: 16rpx;
+  font-size: 24rpx;
+  color: #007aff;
+  text-align: center;
+  line-height: 32rpx;
+}
+.itemBox {
+  background: #ffffff;
+  box-shadow: 0rpx 10rpx 9rpx 1rpx rgba(165, 196, 239, 0.1);
+  border-radius: 24rpx;
+  width: 100%;
+  padding: 20rpx;
+  margin-bottom: 20rpx;
+}
 </style>

+ 181 - 0
pages5/scan/packPage.vue

@@ -0,0 +1,181 @@
+<template>
+  <view class="imagecontent">
+    <nav-bar title="活动"></nav-bar>
+    <movable-area scale-area class="movable-area">
+      <movable-view
+        class="movable-view"
+        direction="all"
+        @scale="onScale"
+        scale="true"
+        scale-min="1"
+        :x="-80"
+        scale-max="4"
+        :scale-value="scale"
+        @dblclick="dblclick"
+      >
+        <image
+          src="https://web.xyyxt.net/static/img/a88848d9321bc1706685815ea2103b5.4a36b7f.png"
+          mode="widthFix"
+          class="qqqqq"
+        >
+        </image>
+        <view class="image-box" :style="{ height: height + 'px' }">
+          <view
+            class="box"
+            :class="'box' + index"
+            @click="to(item.type)"
+            v-for="(item, index) in goodsList"
+            :style="{
+              left: item.start[0] * 1.4 - (110 / width) * 100 + '%',
+              top: item.start[1] + '%',
+            }"
+            :key="index"
+          >
+          </view>
+        </view>
+      </movable-view>
+    </movable-area>
+  </view>
+</template>
+
+<script>
+// 19.8
+// 7.83
+// 1920
+// 3319
+export default {
+  name: "SaasMiniprogramSprint",
+  data() {
+    return {
+      scale: 1,
+      height: 0,
+      width: 0,
+      goodsList: [
+        {
+          start: [18.75, 43.4],
+          end: [38.55, 51.23],
+          type: 1,
+        },
+        {
+          start: [40.1, 43.4],
+          end: [59.9, 51.23],
+          type: 1,
+        },
+        {
+          start: [61.45, 43.4],
+          end: [81.25, 51.23],
+          type: 2,
+        },
+        {
+          start: [18.75, 52.12],
+          end: [38.55, 59.95],
+          type: 1,
+        },
+        {
+          start: [40.1, 52.12],
+          end: [59.9, 59.95],
+          type: 2,
+        },
+        {
+          start: [18.75, 79.99],
+          end: [38.55, 87.82],
+          type: 1,
+        },
+        {
+          start: [40.1, 79.99],
+          end: [59.9, 87.82],
+          type: 1,
+        },
+        {
+          start: [61.45, 79.99],
+          end: [81.25, 87.82],
+          type: 1,
+        },
+        {
+          start: [18.75, 88.73],
+          end: [38.55, 96.56],
+          type: 2,
+        },
+        {
+          start: [40.1, 88.73],
+          end: [59.9, 96.56],
+          type: 2,
+        },
+      ],
+    };
+  },
+  onReady() {
+    setTimeout(() => {
+      uni
+        .createSelectorQuery()
+        .in(this)
+        .select(".qqqqq")
+        .boundingClientRect((rect) => {
+          this.height = rect.height;
+          this.width = rect.width;
+        })
+        .exec();
+    }, 1000);
+  },
+  methods: {
+    to(type) {
+      if (type == 1) {
+        uni.reLaunch({
+          url: "/pages/course/index?cur=1&ename=考前培训&bname=一级建造师",
+        });
+      } else {
+        uni.reLaunch({
+          url: "/pages/information/index",
+        });
+      }
+    },
+    dblclick() {
+      if (this.scale == 10) {
+        this.scale = 1;
+      } else {
+        this.scale = 10;
+      }
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.movable-view {
+  width: 100%;
+  height: calc(100% + 260rpx + 128rpx);
+  display: flex;
+  justify-content: center;
+  position: relative;
+}
+
+.movable-area {
+  height: 100%;
+  width: 100%;
+}
+
+.movable-view image {
+  width: 100%;
+  transform: scale(1.4);
+  margin-top: 260rpx;
+}
+.imagecontent {
+  width: 100%;
+  height: 100%;
+  background: rgba(0, 0, 0, 1);
+  top: 0;
+  position: fixed;
+}
+.image-box {
+  width: 100%;
+  position: absolute;
+}
+.box {
+  // width: 19.8%;
+  // height: 100rpx;
+  width: 28%;
+  height: 140rpx;
+  // background: red;
+  position: absolute;
+}
+</style>

BIN
static/icon/my_icon14.png


BIN
static/nav1.png


BIN
static/nav1_on.png


BIN
static/nav2.png


BIN
static/nav2_on.png


BIN
static/nav3.png


BIN
static/nav3_on.png


BIN
static/nav4.png


BIN
static/nav4_on.png


BIN
static/nav5.png


BIN
static/nav5_on.png


BIN
static/nav6.png


BIN
static/nav6_on.png


+ 5 - 1
static/style/index.scss

@@ -27,4 +27,8 @@
   text-overflow: ellipsis; /* 可以用来多行文本的情况下,用省略号“…”隐藏超出范围的文本 。*/
   -webkit-line-clamp: 2;
   overflow: hidden;
-}
+}
+.line-through {
+  text-decoration: line-through;
+  color: #999999 !important;
+}