谢杰标 vor 2 Jahren
Ursprung
Commit
636a2981a9
6 geänderte Dateien mit 62 neuen und 33 gelöschten Zeilen
  1. 14 0
      common/config.js
  2. 9 12
      pages/course/index.vue
  3. 22 12
      pages/learn/index.vue
  4. 10 3
      pages/questionBank/index.vue
  5. 1 1
      pages2/order/index.vue
  6. 6 5
      pages3/polyv/detail.vue

+ 14 - 0
common/config.js

@@ -16,6 +16,7 @@ const index = 0 // 测试环境
 // const index = 2 // 祥粤学堂
 // const index = 3 // 勘设云学堂
 // const index = 4 // 中正云学堂
+// const index = 5 // 山西云学堂
 const set = [
     test,
     // 祥粤云学堂
@@ -73,6 +74,19 @@ const set = [
         version: '1.0.2',
         TOP_LOGO: '/static/logo145.png',
         SCAN_LOGO: '/static/me/logo145.png'
+    },
+    // 山西云学堂
+    {
+        BASE_URL: 'https://api.xyyxt.net',
+        BASE_IMG_URL: 'https://file.xyyxt.net/',
+        WEBVIEW_URL: 'https://sxlive.gdzzkj.net /',
+        domain: 'sxm.gdzzkj.net',
+        tenantId: '471722209971055962',
+        appid: 'wx5872ef563d13dabf',
+        tenantName: '山西云学堂',
+        version: '1.0.2',
+        TOP_LOGO: '/static/logo145.png',
+        SCAN_LOGO: '/static/me/logo145.png'
     }
 ]
 export default set[index]

+ 9 - 12
pages/course/index.vue

@@ -44,7 +44,6 @@
                 style="padding-left: 10rpx"
                 v-model="goodsName"
                 type="text"
-                :border="border"
                 placeholder="搜索"
                 @blur="blurSearch"
                 :auto-blur="true"
@@ -275,7 +274,6 @@
           >
         </view>
       </view>
-
       <view v-show="current == 2" class="contents">
         <view class="listBox">
           <!-- /pages5/liveDetail/index -->
@@ -353,7 +351,12 @@
         </view>
       </view>
     </view>
-    <u-popup v-model="show" mode="bottom" border-radius="32" :mask-close-able="false">
+    <u-popup
+      v-model="show"
+      mode="bottom"
+      border-radius="32"
+      :mask-close-able="false"
+    >
       <view class="popuBox">
         <view class="popuBox-title">选择分类</view>
         <view class="flex-d">
@@ -603,9 +606,7 @@ export default {
     courseList() {
       var self = this;
       var param = this.paramList[0];
-      if (this.goodsName) {
-        param.goodsName = this.goodsName;
-      }
+      param.goodsName = this.goodsName;
       this.$api.goodsList(param).then((res) => {
         self.paramList[0].total = res.data.total;
         self.list1.push.apply(self.list1, res.data.rows);
@@ -618,9 +619,7 @@ export default {
     bankList() {
       var self = this;
       var param = this.paramList[1];
-      if (this.goodsName) {
-        param.goodsName = this.goodsName;
-      }
+      param.goodsName = this.goodsName;
       this.$api.goodsList(param).then((res) => {
         self.paramList[1].total = res.data.total;
         self.list2.push.apply(self.list2, res.data.rows);
@@ -633,9 +632,7 @@ export default {
     liveList() {
       var self = this;
       var param = this.paramList[2];
-      if (this.goodsName) {
-        param.goodsName = this.goodsName;
-      }
+      param.goodsName = this.goodsName;
       this.$api.goodsList(param).then((res) => {
         self.paramList[2].total = res.data.total;
         self.list3.push.apply(self.list3, res.data.rows);

+ 22 - 12
pages/learn/index.vue

@@ -164,7 +164,7 @@
                 v-if="
                   item.serviceStartTime &&
                   item.serviceEndTime &&
-                  !item.externalLink
+                  !item.externalLinkStatus
                 "
                 class="learn_ranges"
               >
@@ -187,7 +187,7 @@
               class="all_status"
               @click="studyIn(item.goodsId, item.gradeId, item, index)"
             >
-              <template v-if="!item.externalLink">
+              <template v-if="!item.externalLinkStatus">
                 <!-- 不在学习服务期 -->
                 <template
                   v-if="
@@ -491,7 +491,7 @@
               <view class="rights">
                 <template
                   v-if="
-                    item.externalLink ||
+                    item.externalLinkStatus ||
                     (item.gradeStatus == 1 &&
                       item.status == 1 &&
                       item.serviceEndTime > sysTime &&
@@ -1030,18 +1030,28 @@ export default {
           }
         });
     },
-    async studyIn(v, i, item, index) {
-      if (item.externalLink) {
-        // #ifdef MP-WEIXIN
-        uni.navigateTo({
-          url: `/pages/webview/sdlink?url=` + item.externalLink,
+    toLink(externalLink) {
+      if (!externalLink) {
+        uni.showModal({
+          showCancel: false,
+          content: "链接不存在",
         });
-        // #endif
-        // #ifdef H5
-        window.location.href = item.externalLink;
-        // #endif
         return;
       }
+      // #ifdef MP-WEIXIN
+      uni.navigateTo({
+        url: `/pages/webview/sdlink?url=` + externalLink,
+      });
+      // #endif
+      // #ifdef H5
+      window.location.href = externalLink;
+      // #endif
+    },
+    async studyIn(v, i, item, index) {
+      if (item.externalLinkStatus) {
+        this.toLink(item.externalLink);
+        return
+      }
       if (item.goodsType == 6) {
         // 进入直播课
         this.toLive(item);

+ 10 - 3
pages/questionBank/index.vue

@@ -65,7 +65,7 @@
                 v-if="
                   item.serviceStartTime &&
                   item.serviceEndTime &&
-                  !item.externalLink
+                  !item.externalLinkStatus
                 "
                 class="learn_ranges"
               >
@@ -88,7 +88,7 @@
                   mode=""
                 ></image>
               </view>
-              <view class="rights" v-if="!item.externalLink">
+              <view class="rights" v-if="!item.externalLinkStatus">
                 <view class="learn_progress">
                   <view class="progress_up">
                     <view>
@@ -107,7 +107,7 @@
               </view>
             </view>
             <!-- 按钮 -->
-            <view class="study_btns" v-if="!item.externalLink">
+            <view class="study_btns" v-if="!item.externalLinkStatus">
               <view
                 v-for="(child, c_index) in item.paperVos"
                 :key="c_index"
@@ -207,6 +207,13 @@ export default {
       });
     },
     toLink(externalLink) {
+      if (!externalLink) {
+        uni.showModal({
+          showCancel: false,
+          content: "链接不存在",
+        });
+        return;
+      }
       // #ifdef MP-WEIXIN
       uni.navigateTo({
         url: `/pages/webview/sdlink?url=` + externalLink,

+ 1 - 1
pages2/order/index.vue

@@ -41,7 +41,7 @@
 									</view>
 								</view>
 								<view style="display: flex;flex-direction: row-reverse;padding: 10rpx 0;">
-									<!-- <view class="btn2" v-if="items.refundStatus === 0&&(item.orderFrom === 2 || item.orderFrom === 3)&&(item.orderStatus === 1 || item.orderStatus === 2 || item.orderStatus === 3)&&(items.goodsType == '1' || items.goodsType == '2'  || items.goodsType == '6') && items.goodsPrice > 0" @click.stop="refund(item.orderSn,items.goodsId)">退款</view> -->
+									<view class="btn2" v-if="items.refundStatus === 0&&(item.orderFrom === 2 || item.orderFrom === 3)&&(item.orderStatus === 1 || item.orderStatus === 2 || item.orderStatus === 3)&&(items.goodsType == '1' || items.goodsType == '2'  || items.goodsType == '6') && items.goodsPrice > 0" @click.stop="refund(item.orderSn,items.goodsId)">退款</view>
 									<view v-if="items.refundStatus == 2"> 已退款</view>
 								</view>
 							</view>

+ 6 - 5
pages3/polyv/detail.vue

@@ -247,11 +247,11 @@
           <template v-if="courseHandoutsData.length">
             <view
               class="lecture-box"
-              v-for="item in courseHandoutsData"
-              :key="item.handoutsId"
+              v-for="(item, index) in courseHandoutsData"
+              :key="index"
             >
               <view class="title">
-                {{ item.handoutsName }}
+                {{ item.urlName }}
               </view>
               <view class="btn" @click="openDocument(item)">
                 <image
@@ -3674,12 +3674,12 @@ export default {
       this.current = index;
     },
     openDocument(item) {
-      this.downLoading = true;
-      let url = this.$method.splitImgHost(item.handoutsUrl);
+      let url = this.$method.splitImgHost(item.url);
       // #ifdef H5
       window.location.href = url;
       // #endif
       // #ifdef MP-WEIXIN
+      this.downLoading = true;
       uni.downloadFile({
         url: url,
         success: (res) => {
@@ -3687,6 +3687,7 @@ export default {
           // h5不支持
           uni.openDocument({
             filePath: filePath,
+            fileType: "pdf",
             showMenu: item.canDownload == 1 ? true : false,
             success: (res) => {
               this.downLoading = false;