Pārlūkot izejas kodu

fix: 新增没有数据情况

xuqiaoying 2 gadi atpakaļ
vecāks
revīzija
f8ea3f69ff
2 mainītis faili ar 6 papildinājumiem un 4 dzēšanām
  1. 4 4
      common/request.js
  2. 2 0
      pages3/course/detail.vue

+ 4 - 4
common/request.js

@@ -5,8 +5,8 @@ import api from './api.js'
 var num = 1
 //接口api   
 // export const BASE_URL = 'https://api.xyyxt.net'   //release
-// export const BASE_URL = 'https://test.xyyxt.net'   //预发布
-export const BASE_URL = 'http://120.79.166.78:19012' // 测试环境
+export const BASE_URL = 'https://test.xyyxt.net'   //预发布
+// 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'    //后端本地更新到222
 // export const BASE_URL = 'http://192.168.1.24:5055'    //后端本地
@@ -18,8 +18,8 @@ export const BASE_IMG_URL = 'https://file-dev.xyyxt.net/'  //test
 
 // web_view的
 // export const WEBVIEW_URL = 'https://m.xyyxt.net/'  //release
-// export const WEBVIEW_URL = 'https://testm.xyyxt.net/'  //预发布
-export const WEBVIEW_URL = 'http://120.79.166.78:18001/' // 测试环境
+export const WEBVIEW_URL = 'https://testm.xyyxt.net/'  //预发布
+// export const WEBVIEW_URL = 'http://120.79.166.78:18001/' // 测试环境
 // export const WEBVIEW_URL = 'http://api.xyyxt.net:6066/'  //预发布(弃用了)
 
 // export const socket_url = 'ws://42.192.164.187:19005/webSocket/'  //test

+ 2 - 0
pages3/course/detail.vue

@@ -624,6 +624,7 @@ export default {
             // /app/common/goods/+data
 			this.$api.commonGoodsDetail(this.id).then(res => {
 				if(res.data.code==200){
+					if (res.data.data) {
 					if(res.data.data.mobileDetailHtml){
 						res.data.data.mobileDetailHtml = res.data.data.mobileDetailHtml.replace(/<img/gi,'<img style="max-width:100%;"')
 					}
@@ -639,6 +640,7 @@ export default {
 						self.$store.commit('setGoodsAuditionConfigIdList', {goodsAuditionConfigIdList:sectionIdList});
 					}
 				}
+				}
 			});
 		},
 		buy(){