Browse Source

修复bug

chenxiong 3 years ago
parent
commit
cef8077b61

+ 3 - 1
build/webpack.prod.conf.js

@@ -35,7 +35,9 @@ const webpackConfig = merge(baseWebpackConfig, {
     new UglifyJsPlugin({
       uglifyOptions: {
         compress: {
-          warnings: false
+          warnings: false,
+          drop_debugger: true,
+          drop_console: true
         }
       },
       sourceMap: config.build.productionSourceMap,

+ 1 - 0
src/apis/login.js

@@ -78,6 +78,7 @@ export default {
    */
    bindIdCard(data) {
 		return request({
+      token:data.token,
       headers:{
         AuthorizationToken:"WX "+data.token
       },

+ 5 - 4
src/axios.js

@@ -1,13 +1,13 @@
 import axios from 'axios'
 import store from './store'
-// export const BASE_URL = 'https://api.xyyxt.net'   //release
-export const BASE_URL = 'http://42.192.164.187:19005'    //test
+export const BASE_URL = 'https://api.xyyxt.net'   //release
+// export const BASE_URL = 'http://42.192.164.187:19005'    //test
 export const tenantId = '867735392558919680'
 
 
 //图片上传api
-// export const BASE_IMG_URL = 'https://file.xyyxt.net/'     //release
-export const BASE_IMG_URL = 'https://file-dev.xyyxt.net/'  //test
+export const BASE_IMG_URL = 'https://file.xyyxt.net/'     //release
+// export const BASE_IMG_URL = 'https://file-dev.xyyxt.net/'  //test
 
 import tools from './common/tools'
 import router from './router'
@@ -35,6 +35,7 @@ const err = (error) => {
 
 // request interceptor(请求拦截器)
 request.interceptors.request.use(config => {
+  console.log(config,'config')
   const token = tools.getToken()
   if (token && !config.noToken) {
     config.headers['AuthorizationToken'] = 'WX ' + token // 让每个请求携带自定义 token 请根据实际情况自行修改

+ 5 - 1
src/pages/course-detail/index.vue

@@ -4818,13 +4818,17 @@ export default {
         if (this.liveDuration == 2) {
           //直播第2秒拍照
           if (
+            this.goodsPhotographConfig &&
             this.goodsPhotographConfig.livephotograph == 1 &&
-            this.sectionItem.learning != 1
+            this.sectionItem.learning != 1 &&
+            this.photoHistoryList.length == 0
           ) {
             //开启直播拍照
 
             polyvPlayerContext.j2s_pauseVideo();
             this.openPhoto();
+          } else {
+            this.postStudyRecord();
           }
         }
       }

+ 10 - 2
src/pages/login/index.vue

@@ -961,6 +961,7 @@ export default {
               } else {
                 this.user_account = res.data.user_account;
                 this.token = res.data.token;
+                console.log(this.token);
                 this.islogin = false;
                 this.state = 4;
               }
@@ -1039,6 +1040,10 @@ export default {
                 }, 1000);
               })
               .catch((err) => {
+                this.$message({
+                  message: err.msg,
+                  type: "warning",
+                });
                 this.getForgetCodeLock = false;
               });
           }
@@ -1118,7 +1123,10 @@ export default {
               //自动登录
               this.autoLogin();
             })
-            .catch((err) => (this.isRegister = false));
+            .catch((err) => {
+              this.isRegister = false;
+              this.$message.warning(err.msg);
+            });
         }
       });
     },
@@ -1224,7 +1232,7 @@ export default {
           let bindForm = JSON.parse(JSON.stringify(this.bindForm));
           bindForm.token = this.token;
           this.$request
-            .bindIdCard(this.bindForm)
+            .bindIdCard(bindForm)
             .then((res) => {
               this.isBind = false;
               this.$message({

+ 1 - 1
src/pages/payment-success/index.vue

@@ -149,7 +149,7 @@ export default {
           this.getRecommend();
         });
     }
-    console.log(this.$route.params, "this.$route.params");
+    console.log(this.$route, "this.$route.params");
   },
   methods: {
     addCart(status, goodsId) {

+ 1 - 0
src/pages/payment/index.vue

@@ -122,6 +122,7 @@ export default {
     clearInterval(this.checkOrderTimer);
   },
   mounted() {
+    console.log(this.$route, "this.$route.params");
     console.log(this.checkGoodsList);
     this.isBK = this.$route.query.isBK;
     if (this.checkGoodsList.length <= 0 && !this.$route.params.orderSn) {