xuqiaoying 3 yıl önce
ebeveyn
işleme
e624c8df5b

+ 225 - 4
package-lock.json

@@ -2577,6 +2577,14 @@
             "js-base64": "^2.1.9",
             "source-map": "^0.5.6",
             "supports-color": "^3.2.3"
+          },
+          "dependencies": {
+            "js-base64": {
+              "version": "2.6.4",
+              "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
+              "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==",
+              "dev": true
+            }
           }
         },
         "supports-color": {
@@ -2756,6 +2764,14 @@
             "js-base64": "^2.1.9",
             "source-map": "^0.5.6",
             "supports-color": "^3.2.3"
+          },
+          "dependencies": {
+            "js-base64": {
+              "version": "2.6.4",
+              "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
+              "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==",
+              "dev": true
+            }
           }
         },
         "supports-color": {
@@ -5833,10 +5849,9 @@
       "dev": true
     },
     "js-base64": {
-      "version": "2.6.4",
-      "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
-      "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==",
-      "dev": true
+      "version": "3.7.2",
+      "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-3.7.2.tgz",
+      "integrity": "sha512-NnRs6dsyqUXejqk/yv2aiXlAvOs56sLkX6nUdeaNezI5LFFLlsZjOThmwnrcwh5ZZRwZlCMnVAY3CvhIhoVEKQ=="
     },
     "js-tokens": {
       "version": "3.0.2",
@@ -8029,6 +8044,14 @@
             "js-base64": "^2.1.9",
             "source-map": "^0.5.6",
             "supports-color": "^3.2.3"
+          },
+          "dependencies": {
+            "js-base64": {
+              "version": "2.6.4",
+              "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
+              "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==",
+              "dev": true
+            }
           }
         },
         "supports-color": {
@@ -8096,6 +8119,14 @@
             "js-base64": "^2.1.9",
             "source-map": "^0.5.6",
             "supports-color": "^3.2.3"
+          },
+          "dependencies": {
+            "js-base64": {
+              "version": "2.6.4",
+              "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
+              "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==",
+              "dev": true
+            }
           }
         },
         "supports-color": {
@@ -8162,6 +8193,14 @@
             "js-base64": "^2.1.9",
             "source-map": "^0.5.6",
             "supports-color": "^3.2.3"
+          },
+          "dependencies": {
+            "js-base64": {
+              "version": "2.6.4",
+              "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
+              "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==",
+              "dev": true
+            }
           }
         },
         "supports-color": {
@@ -8227,6 +8266,14 @@
             "js-base64": "^2.1.9",
             "source-map": "^0.5.6",
             "supports-color": "^3.2.3"
+          },
+          "dependencies": {
+            "js-base64": {
+              "version": "2.6.4",
+              "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
+              "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==",
+              "dev": true
+            }
           }
         },
         "supports-color": {
@@ -8292,6 +8339,14 @@
             "js-base64": "^2.1.9",
             "source-map": "^0.5.6",
             "supports-color": "^3.2.3"
+          },
+          "dependencies": {
+            "js-base64": {
+              "version": "2.6.4",
+              "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
+              "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==",
+              "dev": true
+            }
           }
         },
         "supports-color": {
@@ -8357,6 +8412,14 @@
             "js-base64": "^2.1.9",
             "source-map": "^0.5.6",
             "supports-color": "^3.2.3"
+          },
+          "dependencies": {
+            "js-base64": {
+              "version": "2.6.4",
+              "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
+              "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==",
+              "dev": true
+            }
           }
         },
         "supports-color": {
@@ -8422,6 +8485,14 @@
             "js-base64": "^2.1.9",
             "source-map": "^0.5.6",
             "supports-color": "^3.2.3"
+          },
+          "dependencies": {
+            "js-base64": {
+              "version": "2.6.4",
+              "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
+              "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==",
+              "dev": true
+            }
           }
         },
         "supports-color": {
@@ -8488,6 +8559,14 @@
             "js-base64": "^2.1.9",
             "source-map": "^0.5.6",
             "supports-color": "^3.2.3"
+          },
+          "dependencies": {
+            "js-base64": {
+              "version": "2.6.4",
+              "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
+              "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==",
+              "dev": true
+            }
           }
         },
         "supports-color": {
@@ -8553,6 +8632,14 @@
             "js-base64": "^2.1.9",
             "source-map": "^0.5.6",
             "supports-color": "^3.2.3"
+          },
+          "dependencies": {
+            "js-base64": {
+              "version": "2.6.4",
+              "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
+              "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==",
+              "dev": true
+            }
           }
         },
         "supports-color": {
@@ -8768,6 +8855,14 @@
             "js-base64": "^2.1.9",
             "source-map": "^0.5.6",
             "supports-color": "^3.2.3"
+          },
+          "dependencies": {
+            "js-base64": {
+              "version": "2.6.4",
+              "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
+              "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==",
+              "dev": true
+            }
           }
         },
         "supports-color": {
@@ -8833,6 +8928,14 @@
             "js-base64": "^2.1.9",
             "source-map": "^0.5.6",
             "supports-color": "^3.2.3"
+          },
+          "dependencies": {
+            "js-base64": {
+              "version": "2.6.4",
+              "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
+              "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==",
+              "dev": true
+            }
           }
         },
         "supports-color": {
@@ -8912,6 +9015,14 @@
             "js-base64": "^2.1.9",
             "source-map": "^0.5.6",
             "supports-color": "^3.2.3"
+          },
+          "dependencies": {
+            "js-base64": {
+              "version": "2.6.4",
+              "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
+              "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==",
+              "dev": true
+            }
           }
         },
         "supports-color": {
@@ -8985,6 +9096,14 @@
             "js-base64": "^2.1.9",
             "source-map": "^0.5.6",
             "supports-color": "^3.2.3"
+          },
+          "dependencies": {
+            "js-base64": {
+              "version": "2.6.4",
+              "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
+              "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==",
+              "dev": true
+            }
           }
         },
         "supports-color": {
@@ -9051,6 +9170,14 @@
             "js-base64": "^2.1.9",
             "source-map": "^0.5.6",
             "supports-color": "^3.2.3"
+          },
+          "dependencies": {
+            "js-base64": {
+              "version": "2.6.4",
+              "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
+              "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==",
+              "dev": true
+            }
           }
         },
         "supports-color": {
@@ -9119,6 +9246,14 @@
             "js-base64": "^2.1.9",
             "source-map": "^0.5.6",
             "supports-color": "^3.2.3"
+          },
+          "dependencies": {
+            "js-base64": {
+              "version": "2.6.4",
+              "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
+              "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==",
+              "dev": true
+            }
           }
         },
         "supports-color": {
@@ -9187,6 +9322,14 @@
             "js-base64": "^2.1.9",
             "source-map": "^0.5.6",
             "supports-color": "^3.2.3"
+          },
+          "dependencies": {
+            "js-base64": {
+              "version": "2.6.4",
+              "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
+              "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==",
+              "dev": true
+            }
           }
         },
         "supports-color": {
@@ -9291,6 +9434,14 @@
             "js-base64": "^2.1.9",
             "source-map": "^0.5.6",
             "supports-color": "^3.2.3"
+          },
+          "dependencies": {
+            "js-base64": {
+              "version": "2.6.4",
+              "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
+              "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==",
+              "dev": true
+            }
           }
         },
         "supports-color": {
@@ -9556,6 +9707,14 @@
             "js-base64": "^2.1.9",
             "source-map": "^0.5.6",
             "supports-color": "^3.2.3"
+          },
+          "dependencies": {
+            "js-base64": {
+              "version": "2.6.4",
+              "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
+              "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==",
+              "dev": true
+            }
           }
         },
         "supports-color": {
@@ -9650,6 +9809,14 @@
             "js-base64": "^2.1.9",
             "source-map": "^0.5.6",
             "supports-color": "^3.2.3"
+          },
+          "dependencies": {
+            "js-base64": {
+              "version": "2.6.4",
+              "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
+              "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==",
+              "dev": true
+            }
           }
         },
         "supports-color": {
@@ -9716,6 +9883,14 @@
             "js-base64": "^2.1.9",
             "source-map": "^0.5.6",
             "supports-color": "^3.2.3"
+          },
+          "dependencies": {
+            "js-base64": {
+              "version": "2.6.4",
+              "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
+              "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==",
+              "dev": true
+            }
           }
         },
         "supports-color": {
@@ -9781,6 +9956,14 @@
             "js-base64": "^2.1.9",
             "source-map": "^0.5.6",
             "supports-color": "^3.2.3"
+          },
+          "dependencies": {
+            "js-base64": {
+              "version": "2.6.4",
+              "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
+              "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==",
+              "dev": true
+            }
           }
         },
         "supports-color": {
@@ -9848,6 +10031,14 @@
             "js-base64": "^2.1.9",
             "source-map": "^0.5.6",
             "supports-color": "^3.2.3"
+          },
+          "dependencies": {
+            "js-base64": {
+              "version": "2.6.4",
+              "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
+              "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==",
+              "dev": true
+            }
           }
         },
         "supports-color": {
@@ -9927,6 +10118,14 @@
             "js-base64": "^2.1.9",
             "source-map": "^0.5.6",
             "supports-color": "^3.2.3"
+          },
+          "dependencies": {
+            "js-base64": {
+              "version": "2.6.4",
+              "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
+              "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==",
+              "dev": true
+            }
           }
         },
         "supports-color": {
@@ -9994,6 +10193,14 @@
             "js-base64": "^2.1.9",
             "source-map": "^0.5.6",
             "supports-color": "^3.2.3"
+          },
+          "dependencies": {
+            "js-base64": {
+              "version": "2.6.4",
+              "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
+              "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==",
+              "dev": true
+            }
           }
         },
         "supports-color": {
@@ -10080,6 +10287,14 @@
             "js-base64": "^2.1.9",
             "source-map": "^0.5.6",
             "supports-color": "^3.2.3"
+          },
+          "dependencies": {
+            "js-base64": {
+              "version": "2.6.4",
+              "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
+              "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==",
+              "dev": true
+            }
           }
         },
         "supports-color": {
@@ -11025,6 +11240,12 @@
         "source-map": "^0.7.1"
       },
       "dependencies": {
+        "js-base64": {
+          "version": "2.6.4",
+          "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
+          "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==",
+          "dev": true
+        },
         "source-map": {
           "version": "0.7.3",
           "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz",

+ 1 - 0
package.json

@@ -12,6 +12,7 @@
   "dependencies": {
     "axios": "^0.26.1",
     "element-ui": "^2.15.6",
+    "js-base64": "^3.7.2",
     "jsencrypt": "^3.2.1",
     "moment": "^2.29.2",
     "print-js": "^1.6.0",

+ 3 - 0
src/axios.js

@@ -6,6 +6,8 @@ export const BASE_URL = 'https://api.xyyxt.net'   //release
 // export const BASE_URL = 'https://test.xyyxt.net'   //预发布
 // export const BASE_URL = 'http://192.168.1.24:5055'    //dev
 // export const BASE_URL = 'http://120.79.166.78:19012'    //测试-外网
+// export const BASE_URL = 'http://42.192.164.187:19005'    //test
+// export const BASE_URL = 'http://192.168.1.222:5055'    //测试
 export const tenantId = '867735392558919680'
 
 
@@ -114,6 +116,7 @@ async function refreshToken(response) {
     var userInfo = {
       url: '/app/user/getInfo',
       method: 'get',
+      params: {fromPlat: 2}, // 来源平台 1小程序 2PC网站
     }
     const resUser = await request(userInfo)
     if (resUser.data.code === 200) {

+ 2 - 1
src/components/goodsItem/index.vue

@@ -51,7 +51,7 @@ export default {
   },
   mounted() {},
   methods: {
-    ...mapMutations(["getCartCount"]),
+    ...mapMutations(["setCurrentRouter", "getCartCount"]),
     /**
      * 查看商品详情
      */
@@ -78,6 +78,7 @@ export default {
     },
 
     buyNow(item) {
+      console.log('加入购物车---000',this.$route)
       console.log(item);
       if (!this.$tools.isLogin()) {
         this.setCurrentRouter(this.$route);

+ 2 - 0
src/main.js

@@ -14,12 +14,14 @@ import upload from '@/common/uploadFile'
 import mixin from '@/mixin/index'
 import moment from "moment"
 import vueEsign from 'vue-esign'
+import axios from './axios.js'
 import 'moment/locale/zh-cn'
 
 console.dir(Vue,'Vue')
 Vue.config.productionTip = false
 Vue.prototype.$store = store
 Vue.prototype.$request = request
+Vue.prototype.$axios = axios
 Vue.prototype.$tools = tools
 Vue.prototype.$upload = upload
 Vue.prototype.$moment = moment

+ 6 - 4
src/pages/course-detail/index copy.vue

@@ -1963,7 +1963,7 @@
                     <span
                       v-if="item.fieldKey === 'recent_photos'"
                       style="color: #999999"
-                      >竖向证件照 文件大小≤2M</span
+                      >竖向白底证件照 文件大小≤2M</span
                     >
                     <span
                       v-if="
@@ -2547,7 +2547,7 @@ export default {
         recent_photos: [
           {
             required: true,
-            message: "请上传个人近照",
+            message: "请上传证件照",
             trigger: ["change", "blur"],
           },
         ],
@@ -2591,7 +2591,7 @@ export default {
         ],
       },
 
-      fileList1: [], //个人近
+      fileList1: [], //证件
       fileList2: [], //人像
       fileList3: [], //国徽
       fileListStamp: [], //印章
@@ -3550,7 +3550,7 @@ export default {
               }
             } else {
               this.uploading = false;
-              this.$message.warning("个人近照和身份证人像面照片不匹配");
+              this.$message.warning("证件照和身份证人像面照片不匹配");
             }
           })
           .catch((err) => {
@@ -5141,6 +5141,7 @@ export default {
             sectionId: option.sectionId || option.menuId,
             chapterId: option.chapterId || 0,
             moduleId: option.moduleId || 0,
+            sectionType: 2,
           },
         });
         // this.loadPlayerScriptzb(this.loadPlayerzb);
@@ -5645,6 +5646,7 @@ export default {
       console.log(this);
       console.log(PlayDuration, "PlayDuration");
       let data = {
+        fromPlat: 2, //来源平台 1小程序 2网站	
         photo: self.ossAvatarUrl,
         sectionId: parseInt(this.playSectionId),
         goodsId: parseInt(this.goodsId),

+ 103 - 20
src/pages/course-detail/index.vue

@@ -20,6 +20,7 @@
                 <div class="title">
                   <span>{{ changeName(courseId) }}</span>
                   <el-button
+                    v-if="courseTotal > 1"
                     size="mini"
                     type="primary"
                     plain
@@ -66,6 +67,7 @@
                           <div slot="label">
                             <span class="label">{{ tab.label }}</span>
                           </div>
+                          <!-- 章节目录 -->
                           <template v-if="tab.name == '1'">
                             <div class="right-box__body">
                               <div
@@ -636,6 +638,7 @@
                               </div>
                             </div>
                           </template>
+                          <!-- 重修目录 -->
                           <template v-if="tab.name == '2'">
                             <div class="right-box__body">
                               <div
@@ -2034,7 +2037,7 @@
               :prop="item.required ? item.fieldKey : ''"
             >
               <el-input
-                :disabled="true"
+                :disabled="disName"
                 v-model="infoForm.name"
                 :placeholder="`请输入${item.fieldName}`"
               />
@@ -2048,7 +2051,7 @@
               :prop="item.required ? item.fieldKey : ''"
             >
               <el-input
-                :disabled="true"
+                :disabled="disCard"
                 v-model="infoForm.idcard"
                 :placeholder="`请输入${item.fieldName}`"
               />
@@ -2294,7 +2297,7 @@
                     <span
                       v-if="item.fieldKey === 'recent_photos'"
                       style="color: #999999"
-                      >竖向证件照 文件大小≤2M</span
+                      >竖向白底证件照 文件大小≤2M</span
                     >
                     <span
                       v-if="
@@ -2704,7 +2707,7 @@ export default {
       courseList: [],
       businessData: {},
       courseHandoutsData: "",
-      menuList: [],
+      // menuList: [],
       goodsData: {},
       tabList: [],
       historyChatMsgList: [],
@@ -2906,7 +2909,7 @@ export default {
         recent_photos: [
           {
             required: true,
-            message: "请上传个人近照",
+            message: "请上传证件照",
             trigger: ["change", "blur"],
           },
         ],
@@ -2950,7 +2953,7 @@ export default {
         ],
       },
 
-      fileList1: [], //个人近
+      fileList1: [], //证件
       fileList2: [], //人像
       fileList3: [], //国徽
       fileListStamp: [], //印章
@@ -2967,6 +2970,10 @@ export default {
       clickLock: false,
       liveLast: null,
       apply_post_disabled: false,
+      disName: false, // 姓名是否禁止输入
+      disCard: false, // 身份证是否禁止输入
+      clickSectionItem: {}, // 点击节的内容
+      courseTotal: 0, 
     };
   },
   computed: {
@@ -3024,7 +3031,7 @@ export default {
     this.orderGoodsId = this.$route.query.orderGoodsId;
     this.gradeId = this.$route.query.gradeId;
     this.sectionItem = this.$route.query;
-
+    console.log('this.sectionItem', this.sectionItem)
     let isOther = this.$route.query.isOther || "";
 
     if (isOther) {
@@ -3208,6 +3215,7 @@ export default {
                 this.playSectionId = res.data.sectionId;
                 this.vid = res.data.recordingUrl;
                 this.sectionItem = res.data;
+                console.log('================sectionItem', this.sectionItem)
                 this.playVideo(res.data);
               } else if (res.data.sectionType == 2) {
                 //直播
@@ -3958,7 +3966,7 @@ export default {
               }
             } else {
               this.uploading = false;
-              this.$message.warning("个人近照和身份证人像面照片不匹配");
+              this.$message.warning("证件照和身份证人像面照片不匹配");
             }
           })
           .catch((err) => {
@@ -4417,6 +4425,7 @@ export default {
         self.listData.forEach((item) => {
           if (item.fieldKey == "idcard") {
             this.infoForm.idcard = this.userInfo.idCard;
+            this.disCard = this.infoForm.idcard ? true : false
           }
           if (item.fieldKey == "telphone") {
             this.infoForm.telphone = this.userInfo.telphone;
@@ -4424,6 +4433,7 @@ export default {
 
           if (item.fieldKey == "name") {
             this.infoForm.name = this.userInfo.realname || "";
+            this.disName = this.infoForm.name ? true : false
           }
         });
         self.isRequired = self.listData.every((ims) => {
@@ -4794,6 +4804,7 @@ export default {
      * 切换科目
      */
     courseChange() {
+      console.log('切换科目')
       return new Promise((resolve) => {
         this.needOpen = true;
         this.noteParams = {
@@ -4816,9 +4827,9 @@ export default {
         this.nowTime = Number(new Date().getTime() / 1000).toFixed(0);
         this.courseDetail(); //课程详情
         this.getAnswerList(); //答疑列表
-        this.answerTimer = setInterval(() => {
-          this.getAnswerList();
-        }, 5000);
+        // this.answerTimer = setInterval(() => {
+        //   this.getAnswerList();
+        // }, 5000);
         this.getMenuList(); //学习目录
         this.getReMenuList(); //获取重修目录
         this.getNoteList(); //获取节笔记
@@ -4981,6 +4992,7 @@ export default {
     },
 
     getBuySectionList(chapterId, courseId, moduleId = 0, chapter) {
+      // /course/sectionList 查询章与节关系列表+章卷同级展示
       this.$request
         .reSectionList({
           chapterId: chapterId,
@@ -5074,10 +5086,31 @@ export default {
         resolve();
       });
     },
+    // 新增用户视频学习日志
+    studyLog(moduleId, chapterId, sectionId) {
+      this.$axios({
+        url: '/user/study/log',
+        method: 'post',
+        data: {
+          goodsId: this.goodsId,
+          courseId: this.courseId,
+					moduleId: moduleId || 0,
+					chapterId: chapterId || 0,
+          sectionId: sectionId || 0,
+          fromPlat: 2, //来源平台 1小程序 2PC网站
+          goodsType: 1, // 商品类型 1视频2题库 3补考 4前培 5虚拟赠送题库 6直播
+          orderGoodsId: this.orderGoodsId,
+        }
+      }).then((res) => {
+        console.log('直播的用户学习日志:', res)
+      })
+    },
     /**
      * 点击节
      */
     async getResource(section) {
+      console.log('点击节节节', section)
+      this.clickSectionItem = section
       //逻辑
       if (section.sectionType === 2 && section.liveStartTime && section.liveEndTime) {
         if (section.liveStartTime > this.nowTime) {
@@ -5145,6 +5178,7 @@ export default {
 
               return;
             }
+            this.studyLog(section.moduleId = 0, section.chapterId = 0, section.typeId)
           } else {
             this.$message({
               type: "warning",
@@ -5224,6 +5258,7 @@ export default {
 
               return;
             }
+            this.studyLog(section.moduleId = 0, section.chapterId = 0, section.typeId)
           } else {
             this.$message({
               type: "warning",
@@ -5268,6 +5303,7 @@ export default {
 
             return;
           }
+          this.studyLog(section.moduleId = 0, section.chapterId = 0, section.typeId)
         }
         return;
       }
@@ -5285,6 +5321,7 @@ export default {
           this.chapterId == (section.chapterId || 0)
         ) {
           //切换为同一频道不作为
+          console.log('切换为同一频道不作为')
           this.clickLock = false;
           return;
         }
@@ -5502,7 +5539,32 @@ export default {
     },
 
     async playVideo(option) {
-      if (option.sectionType == 1 || option.sectionType == 3) {
+      console.log('asdhsuohfosufgasoug', option)
+      if (option.sectionType == 3) {
+        console.log('huifang')
+        // 回放
+        if (Object.keys(this.clickSectionItem).length) { //this.clickSectionItem 判断点击节才跳转, 不判断的话一进来页面到这里就直接跳转了
+          this.$router.push({
+            path: "/living-room/" + option.liveUrl,
+            query: {
+              goodsId: this.goodsId,
+              courseId: this.courseId,
+              gradeId: this.gradeId,
+              orderGoodsId: this.orderGoodsId,
+              sectionId: option.sectionId || option.menuId,
+              chapterId: option.chapterId || 0,
+              moduleId: option.moduleId || 0,
+              sectionType: 3,
+              goodsName: option.name,
+              vid: option.recordingUrl, // 回放vid
+            }          
+          })
+          this.clickSectionItem = {}
+          return
+        }
+      }
+      if (option.sectionType == 1) {
+        console.log('lubo点击点击点击点击')
         //录播
 
         //设置播放的节ID
@@ -5520,7 +5582,7 @@ export default {
         //播放视频
         this.showRecordStatus = false; //隐藏播放记录提示
         this.sectionItem = option;
-        console.log(option, "option");
+        console.log(option, "option=======>sectionItem");
         this.isPlayRebuild = option.rebuild;
         this.moduleId = option.moduleId || 0;
         this.chapterId = option.chapterId || 0;
@@ -5540,6 +5602,7 @@ export default {
         setTimeout(() => {
           this.clickLock = false;
         }, 3000);
+        this.studyLog(this.moduleId, this.chapterId, this.playSectionId)
         // uni.$emit("levelId", this.levelId);
         // uni.$emit("getSection", this.menuItem);
         // uni.$emit("isRebuild", this.isRebuild);
@@ -5583,6 +5646,7 @@ export default {
             sectionId: option.sectionId || option.menuId,
             chapterId: option.chapterId || 0,
             moduleId: option.moduleId || 0,
+            sectionType: 2,
           },
         });
         // this.loadPlayerScriptzb(this.loadPlayerzb);
@@ -5662,6 +5726,7 @@ export default {
         this.postStudyRecord(1);
       });
     },
+    // 播放视频
     loadPlayer() {
       var self = this;
       const polyvPlayer = window.polyvPlayer;
@@ -6087,6 +6152,7 @@ export default {
       console.log(this);
       console.log(PlayDuration, "PlayDuration");
       let data = {
+        fromPlat: 2, //来源平台 1小程序 2网站	
         photo: self.ossAvatarUrl,
         sectionId: parseInt(this.playSectionId),
         goodsId: parseInt(this.goodsId),
@@ -6103,6 +6169,7 @@ export default {
       if (status > 0) {
         data.status = status;
       }
+      // /study/record 学习记录
       this.$request
         .studyRecord(data)
         .then((res) => {
@@ -6127,6 +6194,7 @@ export default {
      * 获取重修列表中是否有相同对象
      */
     getSameObj(metaObj) {
+      console.log('看完视频后----', metaObj, this.reMenuList)
       let newObj = false;
       if (this.reMenuList.length) {
         console.log(this.reMenuList, "this.reMenuList");
@@ -6187,7 +6255,7 @@ export default {
      * 刷新父级列表
      */
     refreshParentList(sectionItem, rebuildObj) {
-      console.log(sectionItem, "sectionItem");
+      console.log(sectionItem, "看完视频==========sectionItem", this.menuList);
       console.log(rebuildObj, "rebuildObj");
       let self = this;
       if (sectionItem.menuId) {
@@ -6265,6 +6333,7 @@ export default {
             let newArr = res.data.filter((item) => {
               return item.type != 2;
             });
+          if (sectionItem.parent) {
             sectionItem.parent.canLearn = newArr.every((item) => {
               if (item.learning == 1) {
                 return true;
@@ -6276,7 +6345,7 @@ export default {
               section.isRebuild = 1;
               section.parent = sectionItem.parent;
             });
-
+          }
             this.menuList.forEach((menu) => {
               if (menu.menuId == sectionItem.chapterId) {
                 menu.list = res.data;
@@ -6297,6 +6366,7 @@ export default {
               let newArr = res.data.filter((item) => {
                 return item.type != 2;
               });
+            if (rebuildObj.parent) {
               rebuildObj.parent.canLearn = newArr.every((item) => {
                 if (item.learning == 1) {
                   return true;
@@ -6308,7 +6378,7 @@ export default {
               res.data.forEach((section) => {
                 section.parent = rebuildObj.parent;
               });
-
+            }
               this.reMenuList.forEach((menu) => {
                 if (menu.menuId == rebuildObj.chapterId) {
                   menu.list = res.data;
@@ -6363,6 +6433,7 @@ export default {
         }
       } else {
         //第三层节有moduleid和chapterid都有
+        console.log('第三层第三层')
         this.$request
           .reSectionList({
             chapterId: sectionItem.chapterId,
@@ -6374,6 +6445,7 @@ export default {
             let newArr = res.data.filter((item) => {
               return item.type != 2;
             });
+          if (sectionItem.parent) {
             sectionItem.parent.canLearn = newArr.every((item) => {
               if (item.learning == 1) {
                 return true;
@@ -6385,7 +6457,7 @@ export default {
             res.data.forEach((section) => {
               section.parent = sectionItem.parent;
             });
-
+          }
             this.menuList.forEach((menu) => {
               if (menu.list && menu.list.length) {
                 menu.list.forEach((chapter) => {
@@ -6393,13 +6465,16 @@ export default {
                     chapter.moduleId == sectionItem.moduleId &&
                     chapter.chapterId == sectionItem.chapterId
                   ) {
+                    chapter.learning = res.data[0].learning
                     console.log(res.data, "res.data");
-                    console.log(chapter.list, "chapter.list");
                     chapter.list = res.data;
+                    console.log(chapter.list, "chapter.list");
                   }
                 });
               }
             });
+
+            
           });
 
         if (this.menuTab.length > 1 && rebuildObj) {
@@ -6415,6 +6490,7 @@ export default {
               let newArr = res.data.filter((item) => {
                 return item.type != 2;
               });
+            if (sectionItem.parent) {
               rebuildObj.parent.canLearn = newArr.every((item) => {
                 if (item.learning == 1) {
                   return true;
@@ -6426,7 +6502,7 @@ export default {
               res.data.forEach((section) => {
                 section.parent = rebuildObj.parent;
               });
-
+            }
               this.reMenuList.forEach((menu) => {
                 if (menu.list && menu.list.length) {
                   menu.list.forEach((chapter) => {
@@ -6434,6 +6510,7 @@ export default {
                       chapter.moduleId == rebuildObj.moduleId &&
                       chapter.chapterId == rebuildObj.chapterId
                     ) {
+                      chapter.learning = res.data[0].learning
                       chapter.list = res.data;
                     }
                   });
@@ -6563,9 +6640,11 @@ export default {
      */
     getMenuList() {
       let self = this;
+      // /course/menuList
       this.$request
         .reMenuList({ courseId: this.courseId, gradeId: this.gradeId })
         .then(async (res) => {
+          console.log('--asfsdgshfduofhdug', res.rows, this.menuList)
           for (let i = 0; i < res.rows.length; i++) {
             let item = res.rows[i];
             item.id = item.menuId;
@@ -6576,6 +6655,7 @@ export default {
             item.parent = this.menuList;
           }
           self.menuList = res.rows;
+          console.log('==============self.menuList===', res.rows, self.menuList)
           if ((this.sectionItem.recordingUrl||this.sectionItem.liveUrl) && this.needOpenNew) {
             this.needOpenNew = false;
             if (this.sectionItem.sectionType == 1) {
@@ -6825,6 +6905,7 @@ export default {
     },
     getAnswerList() {
       let self = this;
+      // /app/answer/list 查询答疑列表
       this.$request
         .answerList({ courseId: this.courseId, goodsId: this.goodsId })
         .then((res) => {
@@ -6884,8 +6965,10 @@ export default {
         this.param.goodsId = this.goodsId;
         this.param.gradeId = this.gradeId;
         this.$request.courseCourseList(this.param).then(async (res) => {
-          console.log(res.rows, "resresresres");
+          console.log(res, "resresresres");
           this.courseList.push(...res.rows);
+          this.courseTotal = res.total
+          // console.log('courseTotal::', this.courseTotal)
           if (!this.courseId) {
             this.courseId = this.courseList[0].courseId;
           }

+ 19 - 14
src/pages/home/index.vue

@@ -249,7 +249,7 @@
                   <el-button
                     type="primary"
                     class="submit"
-                    @click="login"
+                    @click="login()"
                     :loading="isLogin"
                     >登录</el-button
                   >
@@ -495,7 +495,7 @@
             </el-input
           ></el-form-item>
           <el-form-item prop="idCard">
-            <el-input placeholder="身份证号码" v-model="bindForm.idCard">
+            <el-input placeholder="身份证号码" v-model="bindForm.idCard" maxlength="18">
             </el-input
           ></el-form-item>
           <el-button
@@ -503,7 +503,7 @@
             type="primary"
             :loading="isBind"
             round
-            @click="bind"
+            @click="bind()"
             >确定</el-button
           >
           <div class="bind-next" @click="bindNext">下次再关联</div>
@@ -585,7 +585,7 @@ export default {
         read: [{ required: true, trigger: "blur", message: "请勾选服务协议" }],
       },
       bindShow: false,
-      loginType: 1,
+      loginType: 2,
       loginForm: {},
       loginSmsForm: {},
       bindForm: {},
@@ -914,15 +914,16 @@ export default {
      * 微信登入—返回数据
      */
     wxLoginBack(res) {
+      localStorage.setItem("user_account", res.data.user_account);
+      localStorage.setItem("token", res.data.token);
       if (res.data.full_info) {
-        localStorage.setItem("user_account", res.data.user_account);
-        localStorage.setItem("token", res.data.token);
+        
         this.getInfo();
       } else {
         this.indexUserAccount = res.data.user_account;
         this.indexToken = res.data.token;
         this.isLogin = false;
-        //弹窗
+        // 弹窗
         this.bindShow = true;
       }
     },
@@ -1201,16 +1202,18 @@ export default {
           this.$request
             .login(loginForm)
             .then((res) => {
+              localStorage.setItem("user_account", res.data.user_account);
+              localStorage.setItem("token", res.data.token);
               if (res.data.full_info) {
-                localStorage.setItem("user_account", res.data.user_account);
-                localStorage.setItem("token", res.data.token);
+                // localStorage.setItem("user_account", res.data.user_account);
+                // localStorage.setItem("token", res.data.token);
 
                 this.getInfo();
               } else {
                 this.indexUserAccount = res.data.user_account;
                 this.indexToken = res.data.token;
                 this.isLogin = false;
-                //弹窗
+                // 弹窗
                 this.bindShow = true;
               }
             })
@@ -1271,10 +1274,11 @@ export default {
             .loginSms(this.loginSmsForm)
             .then((res) => {
               this.isloginSms = false;
+              localStorage.setItem("user_account", res.data.user_account);
+              localStorage.setItem("token", res.data.token);
+              this.$tools.setUuid(new Date().valueOf() + "");
               if (res.data.full_info) {
-                localStorage.setItem("user_account", res.data.user_account);
-                localStorage.setItem("token", res.data.token);
-                this.$tools.setUuid(new Date().valueOf() + "");
+                
                 this.getInfo();
               } else {
                 this.indexUserAccount = res.data.user_account;
@@ -1320,7 +1324,7 @@ export default {
      */
     getInfo() {
       this.$request
-        .getInfo()
+        .getInfo({fromPlat: 2})
         .then((res) => {
           this.loginForm = {};
           this.loginSmsForm = {};
@@ -1373,6 +1377,7 @@ export default {
       this.bindShow = false;
       this.indexToken = "";
       this.indexUserAccount = "";
+      this.getInfo();
     },
   },
 };

+ 74 - 14
src/pages/live-detail/index.vue

@@ -15,7 +15,7 @@
         </div>
         <div class="section__body">
           <div class="container">
-            <div class="course-info">
+            <div class="course-info"> 
               <div class="course-info__header clearfix">
                 <div
                   class="left-box"
@@ -1884,6 +1884,7 @@
             >
               <el-input
                 v-model="infoForm.name"
+                :disabled="disName"
                 :placeholder="`请输入${item.fieldName}`"
               />
             </el-form-item>
@@ -1898,6 +1899,7 @@
             >
               <el-input
                 v-model="infoForm.idcard"
+                :disabled="disCard"
                 :placeholder="`请输入${item.fieldName}`"
               />
             </el-form-item>
@@ -2141,7 +2143,7 @@
                     <span
                       v-if="item.fieldKey === 'recent_photos'"
                       style="color: #999999"
-                      >竖向证件照 文件大小≤2M</span
+                      >竖向白底证件照 文件大小≤2M</span
                     >
                     <span
                       v-if="
@@ -2719,7 +2721,7 @@ export default {
         recent_photos: [
           {
             required: true,
-            message: "请上传个人近照",
+            message: "请上传证件照",
             trigger: ["change", "blur"],
           },
         ],
@@ -2763,7 +2765,7 @@ export default {
         ],
       },
 
-      fileList1: [], //个人近
+      fileList1: [], //证件
       fileList2: [], //人像
       fileList3: [], //国徽
       fileListStamp: [], //印章
@@ -2779,6 +2781,9 @@ export default {
       menuIndex: [],
       clickLock: false,
       liveLast: null,
+      disName: false, // 姓名是否禁止输入
+      disCard: false, // 身份证是否禁止输入
+      clickSectionItem: {}, // 点击节的内容
     };
   },
   computed: {
@@ -2854,6 +2859,7 @@ export default {
         }, 1000);
       }
     } else {
+      console.log('------')
       this.studyRecordQueryLiveLast();
     }
     // let noteSecond = this.$route.query.noteSecond;
@@ -2952,6 +2958,7 @@ export default {
               this.playSectionId = res.data.sectionId;
               this.vid = res.data.recordingUrl;
               this.sectionItem = res.data;
+              console.log('回放啊')
               this.playVideo(res.data);
             }
           }
@@ -3671,7 +3678,7 @@ export default {
               }
             } else {
               this.uploading = false;
-              this.$message.warning("个人近照和身份证人像面照片不匹配");
+              this.$message.warning("证件照和身份证人像面照片不匹配");
             }
           })
           .catch((err) => {
@@ -4127,6 +4134,7 @@ export default {
         self.listData.forEach((item) => {
           if (item.fieldKey == "idcard") {
             this.infoForm.idcard = this.userInfo.idCard;
+             this.disCard = this.infoForm.idcard ? true : false
           }
           if (item.fieldKey == "telphone") {
             this.infoForm.telphone = this.userInfo.telphone;
@@ -4134,6 +4142,7 @@ export default {
 
           if (item.fieldKey == "name") {
             this.infoForm.name = this.userInfo.realname || "";
+            this.disName = this.infoForm.name ? true : false
           }
         });
         self.isRequired = self.listData.every((ims) => {
@@ -4519,6 +4528,7 @@ export default {
       });
     },
     polyvLiveHistoryChatMsgList() {
+      // /polyv/live/historyChatMsgList-查询保利威节聊天历史
       this.$request
         .polyvLiveHistoryChatMsgList({
           sectionId: this.playSectionId,
@@ -4733,10 +4743,31 @@ export default {
         }
       });
     },
+    // 新增用户视频学习日志
+    studyLog(moduleId, chapterId, sectionId) {
+      this.$axios({
+        url: '/user/study/log',
+        method: 'post',
+        data: {
+          goodsId: this.goodsId,
+          courseId: this.courseId,
+					moduleId: moduleId || 0,
+					chapterId: chapterId || 0,
+          sectionId: sectionId || 0,
+          fromPlat: 2, //来源平台 1小程序 2PC网站
+          goodsType: 6, // 商品类型 1视频2题库 3补考 4前培 5虚拟赠送题库 6直播
+          orderGoodsId: this.orderGoodsId,
+        }
+      }).then((res) => {
+        console.log('直播的用户学习日志:', res)
+      })
+    },
     /**
      * 点击节
      */
     async getResource(section) {
+      console.log('回放回放', section)
+      this.clickSectionItem = section
       //逻辑
 
       if (section.type == 2) {
@@ -4773,7 +4804,6 @@ export default {
                   orderGoodsId: this.orderGoodsId,
                 },
               });
-
               //没有答题次数限制
             } else if (section.answerNum == 0) {
               this.$router.push({
@@ -4795,6 +4825,7 @@ export default {
 
               return;
             }
+            this.studyLog(section.moduleId = 0, section.chapterId = 0, section.typeId)
           } else {
             this.$message({
               type: "warning",
@@ -4874,6 +4905,7 @@ export default {
 
               return;
             }
+            this.studyLog(section.moduleId = 0, section.chapterId = 0, section.typeId)
           } else {
             this.$message({
               type: "warning",
@@ -4896,7 +4928,6 @@ export default {
                 orderGoodsId: this.orderGoodsId,
               },
             });
-
             //没有答题次数限制
           } else if (section.answerNum == 0) {
             this.$router.push({
@@ -4918,6 +4949,7 @@ export default {
 
             return;
           }
+          this.studyLog(section.moduleId = 0, section.chapterId = 0, section.typeId)
         }
         return;
       }
@@ -4928,13 +4960,14 @@ export default {
         }
         this.clickLock = true;
         if (
-          this.playSectionId &&
+          section.sectionType != 3 && this.playSectionId &&
           (this.playSectionId == section.sectionId ||
             this.playSectionId == section.menuId) &&
           this.moduleId == (section.moduleId || 0) &&
           this.chapterId == (section.chapterId || 0)
         ) {
           //切换为同一频道不作为
+          console.log('---====', this.moduleId, this.chapterId)
           this.clickLock = false;
           return;
         }
@@ -5030,6 +5063,7 @@ export default {
       }
     },
     async initVideo(option) {
+      console.log('initVideo', option)
       if (option.sectionType == 1 || option.sectionType == 3) {
         //录播
 
@@ -5164,10 +5198,33 @@ export default {
     },
 
     async playVideo(option) {
-      console.log(option, "option");
-      if (option.sectionType == 1 || option.sectionType == 3) {
+      console.log(option, "<-----option", this.clickSectionItem);
+
+      if (option.sectionType == 3) {
+        console.log('huifang')
+        // 回放
+        if (Object.keys(this.clickSectionItem).length) { //this.clickSectionItem 判断点击节才跳转, 不判断的话一进来页面到这里就直接跳转了
+          this.$router.push({
+            path: "/living-room/" + option.liveUrl,
+            query: {
+              goodsId: this.goodsId,
+              courseId: this.courseId,
+              gradeId: this.gradeId,
+              orderGoodsId: this.orderGoodsId,
+              sectionId: option.sectionId || option.menuId,
+              chapterId: option.chapterId || 0,
+              moduleId: option.moduleId || 0,
+              sectionType: 3,
+              goodsName: option.name,
+              vid: option.recordingUrl, // 回放vid
+            }          
+          })
+          this.clickSectionItem = {}
+          return
+        }
+      }
+      if (option.sectionType == 1) {
         //录播
-
         //设置播放的节ID
 
         //提交保存观看历史
@@ -5183,7 +5240,6 @@ export default {
         //播放视频
         this.showRecordStatus = false; //隐藏播放记录提示
         this.sectionItem = option;
-        console.log(option, "option");
         this.isPlayRebuild = option.rebuild;
         this.moduleId = option.moduleId || 0;
         this.chapterId = option.chapterId || 0;
@@ -5207,13 +5263,14 @@ export default {
         setTimeout(() => {
           this.clickLock = false;
         }, 3000);
+        this.studyLog(this.moduleId, this.chapterId, this.playSectionId)
         // uni.$emit("levelId", this.levelId);
         // uni.$emit("getSection", this.menuItem);
         // uni.$emit("isRebuild", this.isRebuild);
       }
       if (option.sectionType == 2) {
         //直播
-
+        // 直播下面不需要调用 this.studyLog(),因为跳到直播页面有调用
         //提交保存观看历史
         if (this.playSectionId) {
           this.postStudyRecord(0, this.playSectionId);
@@ -5249,7 +5306,9 @@ export default {
             sectionId: option.sectionId || option.menuId,
             chapterId: option.chapterId || 0,
             moduleId: option.moduleId || 0,
-          },
+            sectionType: 2,
+            goodsName: option.name,
+          },          
         });
         // this.loadPlayerScriptzb(this.loadPlayerzb);
         // setTimeout(() => {
@@ -5759,6 +5818,7 @@ export default {
       console.log(this);
       console.log(PlayDuration, "PlayDuration");
       let data = {
+        fromPlat: 2, //来源平台 1小程序 2网站	
         photo: self.ossAvatarUrl,
         sectionId: parseInt(this.playSectionId),
         goodsId: parseInt(this.goodsId),

+ 339 - 38
src/pages/living-room/index.vue

@@ -4,14 +4,23 @@
 
     <div class="container">
       <div class="clearfix top-line">
-        <el-button
-          class="float-right"
-          type="primary"
-          size="small"
-          round
-          @click="$router.go(backNum)"
-          >返回</el-button
-        >
+        <div class="title">{{ goodsName }}</div>
+        <div class="bottoms">
+          <el-button
+            size="small"
+            round
+            @click="toShare()"
+            >分享</el-button>
+          <el-button
+            class="float-right"
+            type="primary"
+            size="small"
+            round
+            @click="returnBack()"
+            >返回</el-button
+          >
+        </div>
+        
       </div>
     </div>
     <!-- pc端 -->
@@ -110,7 +119,6 @@
 
     <el-dialog
       width="400px"
-      class="sign-success"
       :visible.sync="signSuccess"
       :close-on-click-modal="false"
       :close-on-press-escape="false"
@@ -121,6 +129,43 @@
         <div class="title">签到成功!</div>
       </div>
     </el-dialog>
+
+    <!-- 您还没有开通直播课程,无法观看 -->
+    <el-dialog
+      title="提示"
+      :visible.sync="showAuth"
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
+      :show-close="false"
+      width="400px"
+      >
+      <div class="popCentent">
+        <div class="tips">您还没有开通直播课程,无法观看</div>
+        <div class="btns" @click="toAuth()">立即开通</div>
+      </div>
+    </el-dialog>
+
+    <!-- 分享弹窗 -->
+    <el-dialog
+      title="提示"
+      :visible.sync="shareShow"
+      width="600px"
+      >
+      <div v-loading="shareLoading" class="popShare">
+        <el-form ref="form" :model="formShare" label-width="130px">
+          <el-form-item label="观看链接(pc端):">
+            <div>
+              <span>{{ formShare.links }}</span>
+              <span class="ccopy" @click="copy()">复制</span>
+            </div>
+          </el-form-item>
+          <el-form-item label="观看二维码:">
+            <img class="ercode_pic" :src="formShare.ercode" alt="" />
+            <span class="ccopy" @click="download()">下载</span>
+          </el-form-item>
+        </el-form>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -134,6 +179,7 @@ import "@/assets/css/chatroom.css";
 import "@/assets/css/pc.css";
 import "@/assets/css/tool.css";
 import "@/assets/css/public.css";
+let Base64 = require('js-base64').Base64
 
 export default {
   components: {
@@ -161,7 +207,7 @@ export default {
         liveSdk: null, // 保存直播 JS-SDK 实例
         socket: null, // 保存 WebSocket 实例
         scene: "", // 场景
-        mainPosition: "player", // 用于记录当前主屏幕是文档还是播放器
+        mainPosition: "ppt", // 用于记录当前主屏幕是文档还是播放器
       },
       sectionId: 0,
       goodsId: 0,
@@ -176,39 +222,204 @@ export default {
       liveLast: null,
       isFirst: true,
       backNum: -1, //返回页面数
+      buyCourse: 1, // 是否购买课程:1是 0否
+      identification: '', // 标识
+      goodsName: '', // 名称
+      checkStatus: 0, // 0没有权限,1有权限
+      goodsStatus: 0, // 0未上架,1上架
+      showAuth: false, 
+      shareShow: false,
+      sectionType: 2, //sectionType: 2, // 节类型 1录播 2直播 3回放	
+      vid: '', // 回放的id
+      formShare: {
+        links: '',
+        ercode: '',
+      },
+      shareLoading: false
     };
   },
   computed: {
     ...mapGetters(["userInfo"]),
   },
   beforeRouteEnter(to, from, next) {
-    console.log(to,from)
     next((vm) => {
       if (from.path.includes("my-course-detail")) {
         vm.backNum = -2;
+      } else if (from.path == '/login') {
+        vm.backNum = 0;
       } else {
         vm.backNum = -1;
       }
     });
   },
-  mounted() {
-    this.sectionId = this.$route.query.sectionId;
-    this.goodsId = this.$route.query.goodsId;
-    this.courseId = this.$route.query.courseId;
-    this.orderGoodsId = this.$route.query.orderGoodsId;
-    this.gradeId = +this.$route.query.gradeId;
-    this.chapterId = this.$route.query.chapterId;
-    this.moduleId = this.$route.query.moduleId;
-    this.channelId = this.$route.params.channelId;
+  created() {
+    console.log('是否登录了', this.$route.query)
+    if (!this.$tools.isLogin()) {
+      this.setCurrentRouter(this.$route);
+      this.$router.push({
+        path: "/login",
+      });
+      return;
+    }
+    const { a } = this.$route.query
+    console.log('aaaaaaaaa', a, location.search.slice(5))    
+    this.channelId = this.$route.params.channelId
+    // 有a字段是标识是复制链接进来
+    if (a ==1) {
+      this.getParam()
+      return
+    }
+    // 下面不是复制链接进来的
+    const {sectionId, goodsId, courseId, orderGoodsId, gradeId, chapterId, moduleId, goodsName, sectionType, vid} = this.$route.query
+    this.sectionId = sectionId
+    this.goodsId = goodsId
+    this.courseId = courseId
+    this.orderGoodsId = orderGoodsId
+    this.gradeId = +gradeId
+    this.chapterId = chapterId
+    this.moduleId = moduleId
+    // this.channelId = this.$route.params.channelId;
+    this.goodsName = goodsName
+    this.sectionType = sectionType
+    this.vid = vid
+    this.identification = new Date().valueOf() + ""
+    this.buyCourse = 0
     this.playVideo();
-    this.studyRecordGetLastLive();
+    if (this.sectionType !=3 ) {
+      this.studyRecordGetLastLive();
+    }
+    
   },
   beforeDestroy() {
+    if (!this.$tools.isLogin()) return
     this.plv.liveSdk.destroy();
     clearInterval(this.timer);
   },
   methods: {
-    ...mapMutations(["getCartCount"]),
+    ...mapMutations(["setCurrentRouter", "getCartCount"]),
+    returnBack() {
+      console.log('backNum', this.backNum)
+      if (this.backNum == 0) {
+        this.$router.push({
+          path: '/home'
+        })
+      } else {
+        this.$router.go(this.backNum)
+      }
+    },
+    toShare() {
+      this.shareLoading = true
+      this.shareShow = true
+      this.$axios({
+        url: '/course/watch/per',
+        method: 'get',
+        params: {
+          courseId: this.courseId, //课程ID	
+          goodsId: this.goodsId, // 商品id
+          moduleId: this.moduleId || null,
+          chapterId: this.chapterId || null,
+          sectionId: this.sectionId, // 节id
+          sectionType: this.sectionType, //节类型 1录播 2直播 3回放
+        },
+      }).then((res) => {
+        this.shareLoading = false
+        if (res.code == 200) {
+          this.formShare.links = res.data.enCodePC
+          this.formShare.ercode = res.data.enCode
+        }
+      }).catch((err) => {
+        this.shareLoading = false
+        this.$message.warning(err.msg)
+      })
+    },
+    // 获取直播间跳转参数的接口
+    getParam() {
+      let decodeValue = decodeURIComponent(location.search.slice(5))
+      let paramArr = Base64.decode(decodeValue).split('&')
+      console.log('paramArr:',paramArr)
+      let paramObj = {}
+      for (let i = 0; i < paramArr.length; i++) {
+          paramObj[paramArr[i].split('=')[0]] = paramArr[i].split('=')[1]
+      }
+      const { cid, gid, sid} = paramObj
+      console.log('cid, gid, sid',  cid, gid, sid)
+      this.$axios({
+        url: '/course/check/watch/per',
+        method: 'get',
+        params: {
+          courseId: cid, //课程ID	
+          goodsId: gid, // 商品id
+          sectionId: sid, // 节id
+        },
+      }).then((res) => {
+        if (res.code == 200) {
+          let item = res.data
+          const {sectionId, goodsId, courseId, orderGoodsId, gradeId, chapterId, moduleId, buyCourse, sectionType, recordingUrl} = item
+          this.goodsId = goodsId
+          this.sectionId = sectionId
+          this.courseId = courseId
+          this.orderGoodsId = orderGoodsId
+          this.gradeId = +gradeId || 0
+          this.chapterId = chapterId
+          this.moduleId = moduleId
+          this.buyCourse = buyCourse
+          this.goodsStatus = item.goodsStatus
+          this.goodsName = item.goodsName
+          this.sectionType = sectionType
+          this.vid = recordingUrl || ''
+          console.log('vid', this.vid, this.sectionType)
+          if (item.checkStatus == 1) { // 有权限
+            this.identification = new Date().valueOf() + ""
+            this.playVideo();
+            if (this.sectionType != 3) {
+              this.studyRecordGetLastLive();
+            }
+          } else {
+            this.showAuth = true
+          }
+        }
+      }).catch((err) => {
+        console.log('500:', err)
+        this.$message({
+          message: err.msg,
+          type: "warning",
+        })
+        this.$router.push({
+          path: '/home'
+        })
+      })
+
+    },
+    toAuth() {
+      if (this.goodsStatus == 1) { //已上架
+        this.$router.push({
+          path: "/course-detail/" + this.goodsId,
+        })
+      } else {
+        this.$router.push({
+          path: '/home'
+        })
+      }
+    },
+    // 新增用户视频学习日志
+    studyLog() {
+      this.$axios({
+        url: '/user/study/log',
+        method: 'post',
+        data: {
+          goodsId: this.goodsId,
+          courseId: this.courseId,
+					moduleId: this.moduleId || 0,
+					chapterId: this.chapterId || 0,
+          sectionId: this.sectionId || 0,
+          fromPlat: 2, //来源平台 1小程序 2PC网站
+          goodsType: 6, // 商品类型 1视频2题库 3补考 4前培 5虚拟赠送题库 6直播
+          orderGoodsId: this.orderGoodsId,
+        }
+      }).then((res) => {
+        console.log('直播的用户学习日志:', res)
+      })
+    },
     close() {
       this.signModal = false;
       this.signSuccess = true;
@@ -218,11 +429,13 @@ export default {
     },
     polyvLivesign() {
       console.log(this.channelId);
+      // /polyv/live/sign
       this.$request
         .polyvLivesign({
           channelId: this.channelId,
         })
         .then((res) => {
+          if (res.code == 200) {
           this.sign = res.data.sign;
           this.token = res.data.token;
           this.mediaChannelKey = res.data.mediaChannelKey;
@@ -230,7 +443,14 @@ export default {
           this.appId = res.data.appId;
 
           this.loadPlayerzb();
-        });
+          // 新增用户视频学习日志
+          this.studyLog()
+          } else {
+            this.$message.warning(res.msg)
+          }
+        }).catch((err) => {
+          this.$message.warning(err.msg)
+        }) 
     },
 
     async playVideo() {
@@ -246,6 +466,7 @@ export default {
      */
     studyRecordGetLastLive() {
       if (!this.gradeId && this.sectionId) {
+        // /study/record/getLastLive
         this.$request
           .studyRecordGetLastLive({
             orderGoodsId: this.orderGoodsId,
@@ -253,7 +474,7 @@ export default {
           })
           .then((res) => {
             if (!res.data) {
-              this.signModal = true;
+              // this.signModal = true;
             }
           });
       }
@@ -345,22 +566,33 @@ export default {
       ); // 监听流状态变化
 
       // 第四步:监听频道信息读取完成事件,初始化播放器
+      let options = {
+        el: els.pptEl,
+        pptEl: els.playerEl,
+        pptPlaceholder: true,
+        switchPlayer: true,
+        controllerPosition: "player",
+        fixedController: true,
+        controllerEl: els.controllerEl,
+        pptNavBottom: "80px",
+        barrage: true, // 是否开启弹幕
+        defaultBarrageStatus: true,
+        autoplay: true,
+      }
+      if (this.sectionType == 3) {
+        // 回放模式需要fileId、url、sessionId
+        // fileId: undefined, //ppt数据id,回放模式必填
+        // url: undefined,  // 回放视频链接,回放模式必填
+        // sessionId: undefined, // 回放场次id,回放模式必填
+        // vid: undefined,  // 回放id,回放模式下传入该参数,可不传fileId、url、sessionId
+        options.type = 'vod',
+        options.vid = this.vid
+      }
+      console.log('options', options)
       this.plv.liveSdk.on(
         PolyvLiveSdk.EVENTS.CHANNEL_DATA_INIT,
         (event, data) => {
-          this.plv.liveSdk.setupPlayer({
-            el: els.playerEl,
-            pptEl: els.pptEl,
-            pptPlaceholder: true,
-            switchPlayer: true,
-            controllerPosition: "ppt",
-            fixedController: true,
-            controllerEl: els.controllerEl,
-            pptNavBottom: "80px",
-            barrage: true, // 是否开启弹幕
-            defaultBarrageStatus: true,
-            autoplay: true,
-          });
+          this.plv.liveSdk.setupPlayer(options);
 
           this.plv.liveSdk.player.on(
             "fullscreenChange",
@@ -417,6 +649,9 @@ export default {
       }
       let self = this;
       this.$request.studyRecord({
+        fromPlat: 2, //来源平台 1小程序 2网站	
+        buyCourse: this.buyCourse,
+        identification: this.identification,
         sectionId: parseInt(this.sectionId),
         goodsId: parseInt(self.goodsId),
         courseId: parseInt(self.courseId),
@@ -512,6 +747,31 @@ export default {
       this.plv.liveSdk.player.resize(); // ppt容器宽高修改,调用resize刷新ppt尺寸
       this.plv.liveSdk.player.resizeBarrage(); // 刷新弹幕显示区域尺寸
     },
+    download() {
+      var url = this.formShare.ercode
+      var a = document.createElement("a");
+      var event = new MouseEvent("click");
+      a.download = "二维码";
+      a.href = url;
+      a.dispatchEvent(event);
+    },
+
+    copy() {
+      var copyInput = document.createElement("input");
+      //val是要复制的内容
+      copyInput.setAttribute("value", this.formShare.links);
+      document.body.appendChild(copyInput);
+      copyInput.select();
+      try {
+        var copyed = document.execCommand("copy");
+        if (copyed) {
+          document.body.removeChild(copyInput);
+          this.$message.success("复制成功");
+        }
+      } catch (err) {
+        this.$message.error("复制失败,请检查浏览器兼容");
+      }
+    },
   },
 };
 </script>
@@ -522,8 +782,16 @@ export default {
   background: #eee;
   .top-line {
     margin: 10px 0;
-    .float-right {
+    overflow: hidden;
+    // padding: 0px 45px;
+    .title {
+      font-size: 18px;
+      float: left;
+    }
+    .bottoms {
       float: right;
+    }
+    .float-right {
       width: 100px;
     }
   }
@@ -645,5 +913,38 @@ export default {
       }
     }
   }
+
+  .popCentent {
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+    .btns {
+      width: 300px;
+      height: 40px;
+      line-height: 40px;
+      text-align: center;
+      background-color: #3577E8;
+      color: #fff;
+      font-size: 16px;
+      border-radius: 20px;
+      margin-top: 20px;
+      cursor: pointer;
+    }
+  }
+  .popShare {
+    .ccopy {
+      color: #1890ff;
+      font-size: 14px;
+      margin-left: 10px;
+      cursor: pointer;
+    }
+    .ercode_pic {
+      width: 150px;
+      height: 150px;
+      // &.bg {
+      //   background: url();
+      // }
+    }
+  }
 }
 </style>

+ 43 - 24
src/pages/login/index.vue

@@ -77,7 +77,7 @@
                     </div>
                     <el-button
                       class="submit"
-                      @click="login"
+                      @click="login()"
                       type="primary"
                       round
                       :loading="islogin"
@@ -126,7 +126,7 @@
                     </div>
                     <el-button
                       class="submit"
-                      @click="loginSms"
+                      @click="loginSms()"
                       :loading="isloginSms"
                       type="primary"
                       round
@@ -202,8 +202,8 @@
                   <div class="checkbox">
                     <el-form-item prop="read">
                       <div>
-                        <input type="checkbox" v-model="registerForm.read" />
-                        我已认真阅读并同意
+                        <el-checkbox v-model="registerForm.read">我已认真阅读并同意</el-checkbox>
+                        <!-- <input type="checkbox" v-model="registerForm.read" /> -->
                       </div>
 
                       <div>
@@ -215,7 +215,7 @@
                   </div>
                   <el-button
                     class="submit"
-                    @click="register"
+                    @click="register()"
                     type="primary"
                     round
                     :loading="isRegister"
@@ -330,6 +330,7 @@
                       <el-input
                         placeholder="身份证号码"
                         v-model="bindForm.idCard"
+                        maxlength="18"
                       >
                       </el-input
                     ></el-form-item>
@@ -339,7 +340,7 @@
                     type="primary"
                     :loading="isBind"
                     round
-                    @click="bind"
+                    @click="bind()"
                     >确定</el-button
                   >
                   <div class="bind-next" @click="nextBind">下次再关联</div>
@@ -866,12 +867,24 @@ export default {
         callback();
       }
     };
+    var validateAccept = (rule, value, callback) => {
+      if (!value) {
+        callback(new Error('请勾选服务协议'))
+      } else {
+        callback();
+      }
+    }
     return {
       state: 1, //1登录 2注册  3找回密码 4绑定学员身份
-      tabIndex: 0,
+      tabIndex: 1,
       loginForm: {},
       loginSmsForm: {},
-      registerForm: {},
+      registerForm: {
+        tel: '',
+        code: '',
+        pwd: '',
+        read: false,
+      },
       forgetForm: {},
       bindForm: {},
       countDown: 0,
@@ -919,7 +932,7 @@ export default {
         ],
         code: [{ required: true, trigger: "blur", message: "请输入验证码" }],
         pwd: [{ required: true, trigger: "blur", message: "请输入密码" }],
-        read: [{ required: true, trigger: "blur", message: "请勾选服务协议" }],
+        read: [{ required: true, trigger: ["blur", 'change'], validator: validateAccept },],
       },
 
       bindRules: {
@@ -961,10 +974,11 @@ export default {
      * 微信登入—返回数据
      */
     wxLoginBack(res) {
+      localStorage.setItem("user_account", res.data.user_account);
+      localStorage.setItem("token", res.data.token);
+      this.$tools.setUuid(new Date().valueOf() + "");
       if (res.data.full_info) {
-        localStorage.setItem("user_account", res.data.user_account);
-        localStorage.setItem("token", res.data.token);
-        this.$tools.setUuid(new Date().valueOf() + "");
+        
         this.getInfo();
       } else {
         this.user_account = res.data.user_account;
@@ -988,10 +1002,11 @@ export default {
           this.$request
             .login(loginForm)
             .then((res) => {
+              localStorage.setItem("user_account", res.data.user_account);
+              localStorage.setItem("token", res.data.token);
+              this.$tools.setUuid(new Date().valueOf() + "");
               if (res.data.full_info) {
-                localStorage.setItem("user_account", res.data.user_account);
-                localStorage.setItem("token", res.data.token);
-                this.$tools.setUuid(new Date().valueOf() + "");
+                
                 this.getInfo();
               } else {
                 this.user_account = res.data.user_account;
@@ -1097,10 +1112,11 @@ export default {
           this.$request
             .loginSms(this.loginSmsForm)
             .then((res) => {
+              localStorage.setItem("user_account", res.data.user_account);
+              localStorage.setItem("token", res.data.token);
+              this.$tools.setUuid(new Date().valueOf() + "");
               if (res.data.full_info) {
-                localStorage.setItem("user_account", res.data.user_account);
-                localStorage.setItem("token", res.data.token);
-                this.$tools.setUuid(new Date().valueOf() + "");
+                
                 this.getInfo();
               } else {
                 this.user_account = res.data.user_account;
@@ -1124,14 +1140,15 @@ export default {
      */
     getInfo() {
       this.$request
-        .getInfo()
+        .getInfo({fromPlat: 2})
         .then((res) => {
           this.isRegister = false;
           this.islogin = false;
           this.isloginSms = false;
           this.setUserInfo(res.data);
-          console.log(this.currentRouter);
+          console.log('=========',this.currentRouter);
           if (JSON.stringify(this.currentRouter) != "{}") {
+            console.log('zhelisafhsdifgsdiufg')
             this.$router.push(this.currentRouter);
             this.setCurrentRouter({});
           } else {
@@ -1219,11 +1236,12 @@ export default {
       this.$request
         .login(loginForm)
         .then((res) => {
+          localStorage.setItem("user_account", res.data.user_account);
+          localStorage.setItem("token", res.data.token);
+          this.$tools.setUuid(new Date().valueOf() + "");
           if (res.data.full_info) {
             //信息完善,获取用户信息
-            localStorage.setItem("user_account", res.data.user_account);
-            localStorage.setItem("token", res.data.token);
-            this.$tools.setUuid(new Date().valueOf() + "");
+            
             this.getInfo();
           } else {
             //不完善,跳转完善信息页面
@@ -1265,7 +1283,8 @@ export default {
     },
 
     nextBind() {
-      this.state = 1;
+      // this.state = 1;
+      this.getInfo();
       this.user_account = "";
       this.token = "";
     },

+ 3 - 0
src/pages/mock-report/index.vue

@@ -284,6 +284,9 @@ export default {
     goLive() {
       this.$router.push({
         path: "/living-room/" + this.subscribeInfo.liveUrl,
+        query: {
+          sectionType: 2,
+        },
       });
     },
     openRemind() {

+ 2 - 2
src/pages/person-center/index.vue

@@ -114,9 +114,9 @@
                 <router-link to="/person-center/my-classhour">
                   <div class="item">我的学时</div>
                 </router-link>
-                <!-- <router-link to="/person-center/my-examination">
+                <router-link to="/person-center/my-examination">
                   <div class="item">我的考试</div>
-                </router-link> -->
+                </router-link>
                 <router-link to="/person-center/my-mock">
                   <div class="item">我的模考</div>
                 </router-link>

+ 22 - 1
src/pages/person-center/my-bank/bank-detailCopy/index.vue

@@ -1163,7 +1163,25 @@ export default {
           });
       });
     },
-
+    // 新增用户视频学习日志
+		studyLog(courseId, moduleId, chapterId, examId) {
+			this.$http({
+				url: '/user/study/log',
+				method: 'post',
+				data: {
+					goodsId: this.goodsId,
+					courseId: courseId,
+					moduleId: moduleId || 0,
+					chapterId: chapterId || 0,
+					sectionId: examId || 0,
+					fromPlat: 2, //来源平台 1小程序 2PC网站
+					goodsType: 2, // 商品类型 1视频2题库 3补考 4前培 5虚拟赠送题库 6直播
+					orderGoodsId: this.orderGoodsId,
+				}
+			}).then((res) => {
+				console.log('题库的用户学习日志:', res)
+			})
+		},
     /**
      * 去做题
      */
@@ -1191,6 +1209,7 @@ export default {
           orderGoodsId: this.orderGoodsId,
         },
       });
+      this.studyLog(0, moduleId, chapterId, section.examId)
     },
 
     /**
@@ -1208,6 +1227,7 @@ export default {
           orderGoodsId: this.orderGoodsId,
         },
       });
+      this.studyLog(0, moduleId, chapterId, section.examId)
     },
 
     /**
@@ -1262,6 +1282,7 @@ export default {
             },
           });
         });
+        this.studyLog(0, moduleId, chapterId, section.examId)
     },
 
     /**

+ 120 - 0
src/pages/person-center/my-course/components/AppointTest.vue

@@ -0,0 +1,120 @@
+<template>
+    <div class="appoint_test">
+        <el-dialog
+            title="预约考试"
+            :visible.sync="appointModal"
+            width="600px"
+            class="appoint-modal"
+            :close-on-click-modal="false"
+            :close-on-press-escape="false"
+            :before-close="cancel"
+        >
+            <div v-if="appointItem.examApplyGoodsList && appointItem.examApplyGoodsList.length" class="appoint-modal">
+                <div v-for="(appointChild, appointIndex) in appointItem.examApplyGoodsList" :key="appointIndex"  class="appoint_item" >
+                    <div class="names">{{ appointChild.applyName }}</div>
+                    <div class="btns" @click="confirmAppoint(appointChild)">预约</div>
+                </div>
+                <!-- <el-radio
+                    v-for="(appointChild, appointIndex) in appointItem.examApplyGoodsList"
+                    v-model="applyId"
+                    :key="appointIndex"
+                    :label="appointChild.applyId"
+                >
+                    {{ appointChild.applyName }}
+                </el-radio> -->
+            </div>
+            <div v-else class="no_data">暂无考试预约~</div>
+            <!-- <span slot="footer" class="dialog-footer">
+                <el-button @click="cancel()">取 消</el-button>
+                <el-button type="primary" @click="confirmAppoint">立即预约</el-button>
+            </span> -->
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+export default {
+    name: 'appoint_test',
+    props: {
+        appointModal: {
+            type: Boolean,
+            default: false,
+        },
+        appointItem: {
+            type: Object,
+            default: () => {}
+        },
+    },
+    data() {
+        return {
+            applyId: "",
+        }
+    },
+    methods: {
+        cancel() {
+            this.$emit('update:appointModal', false)
+        },
+        confirmAppoint(item) {
+            // if (!this.applyId) {
+            //     this.$message.warning("请选择要预约的考试");
+            //     return;
+            // }
+            var data = {
+                goodsId: this.appointItem.goodsId,
+                gradeId: this.appointItem.gradeId,
+                applyId: item.applyId,
+                orderGoodsId: this.appointItem.orderGoodsId,
+            };
+            this.$request.getApplysubscribe(data).then((res) => {
+                this.$router.push({
+                    path: "/person-center/my-classhour/appointment",
+                    query: {
+                    goodsId: this.appointItem.goodsId,
+                    gradeId: this.appointItem.gradeId,
+                    orderGoodsId: this.appointItem.orderGoodsId,
+                    applyId: item.applyId,
+                    },
+                });
+            }).catch((err) => {
+                this.$message({
+                    type: "warning",
+                    message: err.msg,
+                });
+            });
+        },
+    }
+}
+</script>
+
+<style lang="scss" scoped>
+.appoint_item {
+    width: 100%;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    height: 84px;
+    border-bottom: 1px solid #F0F0F0;
+    .names {
+        font-size: 14px;
+        font-weight: 500;
+        color: #303030;
+    }
+    .btns {
+        width: 54px;
+        height: 28px;
+        line-height: 28px;
+        text-align: center;
+        background: #FFF5EC;
+        border-radius: 4px;
+        font-size: 12px;
+        font-weight: 500;
+        color: #F67205;
+        cursor: pointer;
+    }
+    .no_data {
+        text-align: center;
+        font-size: 16px;
+        margin-bottom: 20px;
+    }
+}
+</style>

+ 76 - 73
src/pages/person-center/my-course/courseData.vue

@@ -1,7 +1,7 @@
 <template>
   <div id="courseData">
     <el-dialog title="切换科目" :visible.sync="dialogVisible" width="1100px">
-        <div class="headerStyle">
+        <div class="headerStyle" v-if="Object.keys(activeItem).length">
             <p class="title">当前科目</p>
             <div
               class="course-items"
@@ -818,78 +818,7 @@
           </div>
         </div>
 
-        <el-dialog
-          title="实名验证确认"
-          :visible.sync="showConfirm"
-          width="600px"
-          class="showconfirm"
-          :close-on-click-modal="false"
-          :close-on-press-escape="false"
-          :show-close="false"
-        >
-          <div class="showconfirm__content">
-            <div class="text">
-              为避免个人信息不正确导致您的学习时长无效,请认真核对以下信息是否正确,如信息有误请取消当前操作,立刻联系020-38946666
-            </div>
-            <el-descriptions :column="1">
-              <el-descriptions-item label="姓名">{{
-                userInfo && userInfo.realname
-              }}</el-descriptions-item>
-              <el-descriptions-item label="手机号">{{
-                userInfo && userInfo.telphone
-              }}</el-descriptions-item>
-              <el-descriptions-item label="身份证号">{{
-                userInfo && userInfo.idCard
-              }}</el-descriptions-item>
-            </el-descriptions>
-
-            <div class="">
-              <el-checkbox v-model="confirmChecked"
-                >确认个人信息无误</el-checkbox
-              >
-            </div>
-          </div>
-          <span slot="footer" class="dialog-footer">
-            <el-button @click="showConfirm = false">取 消</el-button>
-            <el-button
-              type="primary"
-              @click="confirmUser"
-              :disabled="confirmCount > 0"
-              :loading="confirmLoading"
-              >{{
-                confirmCount > 0 ? "确 定(" + confirmCount + ")" : "确 定"
-              }}</el-button
-            >
-          </span>
-        </el-dialog>
-
-        <el-dialog
-          title="预约考试"
-          :visible.sync="appointModal"
-          width="600px"
-          class="appoint-modal"
-          :close-on-click-modal="false"
-          :close-on-press-escape="false"
-        >
-          <div class="appoint-modal__content">
-            <el-radio
-              v-for="(
-                appointChild, appointIndex
-              ) in appointItem.examApplyGoodsList"
-              v-model="applyId"
-              :key="appointIndex"
-              :label="appointChild.applyId"
-              >{{ appointChild.applyName }}</el-radio
-            >
-          </div>
-          <span slot="footer" class="dialog-footer">
-            <el-button @click="appointModal = false">取 消</el-button>
-            <el-button type="primary" @click="confirmAppoint"
-              >立即预约</el-button
-            >
-          </span>
-        </el-dialog>
-
+        
         <SelectClassModal
           ref="selectClassModal"
           @selectClassOk="selectClassOk"
@@ -903,6 +832,78 @@
         <ExercisesModal ref="exercisesModal"></ExercisesModal>
       </div>
     </el-dialog>
+    <!-- 预约考试弹窗 -->
+    <appoint-test :appointModal.sync="appointModal" :appointItem='appointItem'></appoint-test>
+    <!-- <el-dialog
+      title="预约考试"
+      :visible.sync="appointModal"
+      width="600px"
+      class="appoint-modal"
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
+    >
+      <div class="appoint-modal__content">
+        <el-radio
+          v-for="(
+            appointChild, appointIndex
+          ) in appointItem.examApplyGoodsList"
+          v-model="applyId"
+          :key="appointIndex"
+          :label="appointChild.applyId"
+          >{{ appointChild.applyName }}</el-radio
+        >
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="appointModal = false">取 消</el-button>
+        <el-button type="primary" @click="confirmAppoint"
+          >立即预约</el-button
+        >
+      </span>
+    </el-dialog> -->
+    <el-dialog
+      title="实名验证确认"
+      :visible.sync="showConfirm"
+      width="600px"
+      class="showconfirm"
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
+      :show-close="false"
+    >
+      <div class="showconfirm__content">
+        <div class="text">
+          为避免个人信息不正确导致您的学习时长无效,请认真核对以下信息是否正确,如信息有误请取消当前操作,立刻联系020-38946666
+        </div>
+        <el-descriptions :column="1">
+          <el-descriptions-item label="姓名">{{
+            userInfo && userInfo.realname
+          }}</el-descriptions-item>
+          <el-descriptions-item label="手机号">{{
+            userInfo && userInfo.telphone
+          }}</el-descriptions-item>
+          <el-descriptions-item label="身份证号">{{
+            userInfo && userInfo.idCard
+          }}</el-descriptions-item>
+        </el-descriptions>
+
+        <div class="">
+          <el-checkbox v-model="confirmChecked"
+            >确认个人信息无误</el-checkbox
+          >
+        </div>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="showConfirm = false">取 消</el-button>
+        <el-button
+          type="primary"
+          @click="confirmUser()"
+          :disabled="confirmCount > 0"
+          :loading="confirmLoading"
+          >{{
+            confirmCount > 0 ? "确 定(" + confirmCount + ")" : "确 定"
+          }}</el-button
+        >
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -912,6 +913,7 @@ import { mapGetters, mapActions } from "vuex";
 import SelectClassModal from "@/components/selectClassModal";
 import RebuildModal from "@/components/rebuildModal";
 import ExercisesModal from "@/components/exercisesModal";
+import AppointTest from './components/AppointTest.vue'
 import * as baseUrls from "@/axios.js";
 export default {
   name: "MyCourse",
@@ -919,6 +921,7 @@ export default {
     SelectClassModal,
     RebuildModal,
     ExercisesModal,
+    AppointTest,
   },
   data() {
     return {

+ 11 - 1
src/pages/person-center/my-course/index.vue

@@ -14,6 +14,8 @@
           @click="changeCourse"
           >切换科目</el-button
         >
+        <el-button size="mini" type="warning" plain style="margin-left: 14px" @click="changeTest()">预约考试
+        </el-button>
       </h4>
       <div v-for="(item, index) in courseList" :key="index">
         <p class="firstTop hoverStyle" @click="changeStatus(item)">
@@ -499,6 +501,9 @@
       ref="rebuildModal"
       @rebuildSubmit="rebuildSubmit($event)"
     ></RebuildModal>
+
+    <!-- 预约考试弹窗 -->
+    <appoint-test :appointModal.sync="appointModal" :appointItem='goodsData'></appoint-test>
   </div>
 </template>
 
@@ -506,9 +511,10 @@
 import { mapGetters, mapActions } from "vuex";
 import courseData from "./courseData.vue";
 import RebuildModal from "@/components/rebuildModal";
+import AppointTest from './components/AppointTest.vue'
 export default {
   name: "MyCourse",
-  components: { courseData, RebuildModal },
+  components: { courseData, RebuildModal, AppointTest },
   data() {
     return {
       goodsData: {},
@@ -519,6 +525,7 @@ export default {
       confirmChecked: false,
       confirmTimer: null,
       confirmLoading: false,
+      appointModal: false, // 预约考试弹窗
     };
   },
   computed: {
@@ -551,6 +558,9 @@ export default {
     changeCourse() {
       this.$refs.courseData.openBoxs(this.goodsData);
     },
+    changeTest() {
+      this.appointModal = true
+    },
     backData(item) {
       this.goodsData = item;
       this.getGoodsCourseList(item);

+ 3 - 1
src/pages/person-center/my-info/index.vue

@@ -283,7 +283,9 @@ export default {
       };
       this.$request.appuserupdatePwd(data).then((res) => {
         this.$message.success("修改成功,请重新登录");
-      });
+      }).catch(err => {
+        this.$message.warning(err.msg)
+      })
     },
     /**
      * 更新头像

+ 2 - 0
src/pages/person-center/my-live/index.vue

@@ -102,6 +102,8 @@ export default {
           sectionId: this.livingSectionList[0].sectionId,
           chapterId: this.livingSectionList[0].chapterId || 0,
           moduleId: this.livingSectionList[0].moduleId || 0,
+          goodsName: this.livingSectionList[0].name,
+          sectionType: this.livingSectionList[0].sectionType,
         },
       });
     },

+ 6 - 0
src/pages/person-center/my-mock/index.vue

@@ -663,6 +663,9 @@ export default {
         //直播中
         this.$router.push({
           path: "/living-room/" + item.liveUrl,
+          query: {
+            sectionType: 2,
+          }
         });
       } else if (item.liveStatus == 1) {
         //未开播
@@ -758,6 +761,9 @@ export default {
     goLive(item) {
       this.$router.push({
         path: "/living-room/" + item.liveUrl,
+        query: {
+          sectionType: 2,
+        }
       });
     },
     goTest(item) {

+ 2 - 1
src/router/index.js

@@ -190,7 +190,8 @@ const router =  new Router({
     },
     {
       path: '/living-room/:channelId',
-      name: '课程详情',
+      // name: '课程详情',
+      name: '直播页面详情',
       component: resolve => require(['@/pages/living-room/index'],resolve),
       meta: {
         title: '祥粤云学堂-一二级建造师、工程师、建筑师视频课程、免费直播课',

+ 1 - 1
src/store/index.js

@@ -143,7 +143,7 @@ export default new Vuex.Store({
      */
     getUserInfo(context) {
       return new Promise(resolve => {
-        login.getInfo().then(res => {
+        login.getInfo({fromPlat: 2}).then(res => {
           context.commit('setUserInfo', res.data)
           if(!tools.getUuid()) {
             tools.setUuid(new Date().valueOf() + "")