谢杰标 2 년 전
부모
커밋
6df1bc04e3
7개의 변경된 파일31개의 추가작업 그리고 18개의 파일을 삭제
  1. 1 1
      common/methodTool.js
  2. 0 3
      components/course/handoutsTree.vue
  3. 5 6
      pages/learn/index.vue
  4. 22 5
      pages2/invoice/index.vue
  5. 1 1
      pages2/learn/my_learn.vue
  6. 1 1
      pages2/wd/stuff.vue
  7. 1 1
      pages3/course/jydetail.vue

+ 1 - 1
common/methodTool.js

@@ -671,7 +671,7 @@ export default {
       uni.downloadFile({
         url,
         success: (res) => {
-          if (res.statusCode === 200) {
+          if (res.statusCode === 200 || res.statusCode === 400) {
             that.fileToBase64(res.tempFilePath).then((res) => {
               resolve(res);
             });

+ 0 - 3
components/course/handoutsTree.vue

@@ -86,9 +86,6 @@ export default {
       uni.navigateTo({
         url: `/pages/webview/sdlink?url=https://preview.xyyxt.net?src=${url}`,
       });
-      // uni.navigateTo({
-      //   url: `/pages/webview/sdlink?url=http://192.168.1.57:8080/?src=${url}`,
-      // });
       // #endif
       // #ifdef MP-WEIXIN
       this.downLoading = true;

+ 5 - 6
pages/learn/index.vue

@@ -647,18 +647,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];
@@ -700,7 +699,7 @@ export default {
     },
   },
   onLoad() {
-    uni.hideTabBar()
+    uni.hideTabBar();
     // 1668873600 ,2022.11.20的时间戳
     this.leftDays = 1668873600 - parseInt(curTime / 1000);
     this.sysTime = +this.$method.timest();

+ 22 - 5
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" />
@@ -747,7 +753,7 @@ export default {
         taxRegistryNumber: "",
         companyAddress: "",
         email: "",
-        invoiceRemark:"",
+        invoiceRemark: "",
         phone: "",
         bankName: "",
         bankAccount: "",
@@ -830,7 +836,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: "邮箱格式不正确",
@@ -1199,9 +1206,18 @@ export default {
     },
 
     download(item) {
+      // #ifdef H5
+      window.location.href = this.$method.splitImgHost(
+        item.certificatePath,
+        true,
+        1000
+      );
+      // #endif
+      // #ifdef MP-WEIXIN
       //获取相册授权
       uni.getSetting({
         success: (res) => {
+          console.log("🚀 ~ file: index.vue:1221 ~ download ~ res:", res);
           if (!res.authSetting["scope.writePhotosAlbum"]) {
             uni.authorize({
               scope: "scope.writePhotosAlbum",
@@ -1219,6 +1235,7 @@ export default {
           }
         },
       });
+      // #endif
     },
 
     saveImgToLocal(item) {
@@ -1230,7 +1247,7 @@ export default {
             uni.downloadFile({
               url: this.$method.splitImgHost(item.invoiceImg, true, 1000), //图片地址
               success: (res) => {
-                if (res.statusCode === 200) {
+                if (res.statusCode === 200 || res.statusCode === 400) {
                   uni.saveImageToPhotosAlbum({
                     filePath: res.tempFilePath,
                     success: function () {

+ 1 - 1
pages2/learn/my_learn.vue

@@ -521,7 +521,7 @@ export default {
             uni.downloadFile({
               url: this.$method.splitImgHost(item.certificatePath, true, 1000), //图片地址
               success: (res) => {
-                if (res.statusCode === 200) {
+                if (res.statusCode === 200 || res.statusCode === 400) {
                   uni.saveImageToPhotosAlbum({
                     filePath: res.tempFilePath,
                     success: function () {

+ 1 - 1
pages2/wd/stuff.vue

@@ -1,6 +1,6 @@
 <template>
   <view>
-    <nav-logo title="我的资料"></nav-logo>
+    <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">

+ 1 - 1
pages3/course/jydetail.vue

@@ -1,6 +1,6 @@
 <template>
   <view class="detail_wrap">
-    <nav-logo title="祥粤云学堂"></nav-logo>
+    <nav-bar title="祥粤云学堂"></nav-bar>
     <view class="detail_wrap_title">{{ goodsDetail.goodsName }}</view>
     <view class="content">
       <handouts-box