谢杰标 2 سال پیش
والد
کامیت
890ee5a044

+ 6 - 5
App.vue

@@ -1,7 +1,7 @@
 <script>
 import plv from "./pages3/static/polyv-sdk/index";
 // #ifdef H5
-import vconsole from 'vconsole';
+import vconsole from "vconsole";
 // #endif
 export default {
   onLaunch: function (option) {
@@ -15,14 +15,15 @@ export default {
       apiId: "ezl5uy4zei",
       apiSecret: "2bf5bb3c31d34531943df10284edd50b",
     });
+    this.$store.dispatch('getConfig')
   },
   methods: {},
   onShow: function (option) {
-    this.$store.commit('setScene', option.scene || 0)
+    this.$store.commit("setScene", option.scene || 0);
     // #ifdef H5
-    if (process.env.NODE_ENV === 'development') {
-      console.log('开发环境')
-      const consoleObj = new vconsole()
+    if (process.env.NODE_ENV === "development") {
+      console.log("开发环境");
+      const consoleObj = new vconsole();
     } else {
       // console.log('生产环境')
       // const consoleObj = new vconsole()

+ 84 - 86
common/config.js

@@ -1,94 +1,92 @@
-
 // test 测试环境
 const test = {
-    BASE_URL: 'http://120.79.166.78:19012',
-    BASE_IMG_URL: 'https://file-dev.xyyxt.net/',
-    WEBVIEW_URL: 'http://120.79.166.78:18001/',
-    domain: 'h.xyyxt.net',
-    tenantId: '867735392558919680', //详粤云学堂
-    appid: 'wxd3c8ae80cf43a305',
-    version: '1.0.2',
-    TOP_LOGO: '/static/logo2.png',
-    SCAN_LOGO: '/static/me/logo.png',
-    tenantName: '祥粤云学堂',
-}
-const index = 0 // 测试环境
+  BASE_URL: "http://120.79.166.78:19012",
+  BASE_IMG_URL: "https://file-dev.xyyxt.net/",
+  WEBVIEW_URL: "http://120.79.166.78:18001/",
+  domain: "h.xyyxt.net",
+  tenantId: "867735392558919680", //详粤云学堂
+  appid: "wxd3c8ae80cf43a305",
+  version: "1.0.2",
+  TOP_LOGO: "/static/logo2.png",
+  SCAN_LOGO: "/static/me/logo.png",
+  tenantName: "祥粤云学堂",
+  host:
+    process.env.NODE_ENV === "production"
+      ? window.location.host
+      : "120.79.166.78:19012",
+};
+const index = 0; // 测试环境
 // const index = 1 // 祥粤云学堂
 // const index = 2 // 祥粤学堂
 // const index = 3 // 勘设云学堂
 // const index = 4 // 中正云学堂
 // const index = 5 // 山西云学堂
 const set = [
-    test,
-    // 祥粤云学堂
-    {
-        BASE_URL: 'https://api.xyyxt.net',
-        BASE_IMG_URL: 'https://file.xyyxt.net/',
-        WEBVIEW_URL: 'https://m.xyyxt.net/',
-        domain: 'h.xyyxt.net',
-        tenantId: '867735392558919680',
-        appid: 'wxd3c8ae80cf43a305',
-        tenantName: '祥粤云学堂',
-        version: '1.0.2',
-        TOP_LOGO: '/static/logo2.png',
-        SCAN_LOGO: '/static/me/logo.png',
-    },
-    // 祥粤学堂
-    {
-        BASE_URL: 'https://api.xyyxt.net',
-        BASE_IMG_URL: 'https://file.xyyxt.net/',
-        WEBVIEW_URL: 'https://cm.xyyxt.net/',
-        domain: '',
-        tenantId: '667735392758919630',
-        appid: 'wx871153afc95f55f4',
-        tenantName: '祥粤学堂',
-        version: '1.0.2',
-        TOP_LOGO: '/static/logo2.png',
-        SCAN_LOGO: '/static/me/logo.png',
-    },
-    // 勘设云学堂
-    {
-        BASE_URL: 'https://api.xyyxt.net',
-        BASE_IMG_URL: 'https://file.xyyxt.net/',
-        WEBVIEW_URL: 'https://zstcm.xyyxt.net/',
-        domain: '',
-        tenantId: '567735392758918520',
-        appid: 'wx29d0ad81e625ad81',
-        tenantName: '勘设云学堂',
-        version: '1.0.2',
-        TOP_LOGO: '/static/logo520.png',
-        SCAN_LOGO: '/static/me/logo520.png',
-        tips1:
-            "中山勘设云学堂是中山市工程勘察设计行业协会和广东省祥粤建设职业培训学校联合打造的网络教育平台。",
-        tips2:
-            "广东省祥粤建设职业培训学校负责师资与培训资质,为中山学员提供考前、继续教育等培训,出具符合广东省要求的继续教育学时证明。",
-    },
-    // 中正云学堂
-    {
-        BASE_URL: 'https://api.xyyxt.net',
-        BASE_IMG_URL: 'https://file.xyyxt.net/',
-        WEBVIEW_URL: 'https://live.gdzzkj.net/',
-        domain: 'h.gdzzkj.net',
-        tenantId: '141250585240548145',
-        appid: 'wx5872ef563d13dabf',
-        tenantName: '中正云学堂',
-        version: '1.0.2',
-        TOP_LOGO: '/static/logo145.png',
-        SCAN_LOGO: '/static/me/logo145.png',
-    },
-    // 山西云学堂
-    {
-        BASE_URL: 'https://api.xyyxt.net',
-        BASE_IMG_URL: 'https://file.xyyxt.net/',
-        WEBVIEW_URL: 'https://sxlive.gdzzkj.net /',
-        domain: 'sxm.gdzzkj.net',
-        tenantId: '471722209971055962',
-        appid: 'wx5872ef563d13dabf',
-        tenantName: '山西云学堂',
-        version: '1.0.2',
-        TOP_LOGO: '/static/logo962.png',
-        SCAN_LOGO: '/static/me/logo962.png',
-    }
-]
-export default set[index]
-
+  test,
+  // 祥粤云学堂
+  {
+    BASE_URL: "https://api.xyyxt.net",
+    BASE_IMG_URL: "https://file.xyyxt.net/",
+    WEBVIEW_URL: "https://m.xyyxt.net/",
+    domain: "h.xyyxt.net",
+    tenantId: "867735392558919680",
+    appid: "wxd3c8ae80cf43a305",
+    tenantName: "祥粤云学堂",
+    version: "1.0.2",
+    TOP_LOGO: "/static/logo2.png",
+    SCAN_LOGO: "/static/me/logo.png",
+  },
+  // 祥粤学堂
+  {
+    BASE_URL: "https://api.xyyxt.net",
+    BASE_IMG_URL: "https://file.xyyxt.net/",
+    WEBVIEW_URL: "https://cm.xyyxt.net/",
+    domain: "",
+    tenantId: "667735392758919630",
+    appid: "wx871153afc95f55f4",
+    tenantName: "祥粤学堂",
+    version: "1.0.2",
+    TOP_LOGO: "/static/logo2.png",
+    SCAN_LOGO: "/static/me/logo.png",
+  },
+  // 勘设云学堂
+  {
+    BASE_URL: "https://api.xyyxt.net",
+    BASE_IMG_URL: "https://file.xyyxt.net/",
+    WEBVIEW_URL: "https://zstcm.xyyxt.net/",
+    domain: "",
+    tenantId: "567735392758918520",
+    appid: "wx29d0ad81e625ad81",
+    tenantName: "勘设云学堂",
+    version: "1.0.2",
+    TOP_LOGO: "/static/logo520.png",
+    SCAN_LOGO: "/static/me/logo520.png",
+  },
+  // 中正云学堂
+  {
+    BASE_URL: "https://api.xyyxt.net",
+    BASE_IMG_URL: "https://file.xyyxt.net/",
+    WEBVIEW_URL: "https://live.gdzzkj.net/",
+    domain: "h.gdzzkj.net",
+    tenantId: "141250585240548145",
+    appid: "wx5872ef563d13dabf",
+    tenantName: "中正云学堂",
+    version: "1.0.2",
+    TOP_LOGO: "/static/logo145.png",
+    SCAN_LOGO: "/static/me/logo145.png",
+  },
+  // 山西云学堂
+  {
+    BASE_URL: "https://api.xyyxt.net",
+    BASE_IMG_URL: "https://file.xyyxt.net/",
+    WEBVIEW_URL: "https://sxlive.gdzzkj.net /",
+    domain: "sxm.gdzzkj.net",
+    tenantId: "471722209971055962",
+    appid: "wx5872ef563d13dabf",
+    tenantName: "山西云学堂",
+    version: "1.0.2",
+    TOP_LOGO: "/static/logo962.png",
+    SCAN_LOGO: "/static/me/logo962.png",
+  },
+];
+export default set[index];

+ 186 - 181
common/httpList/login.js

@@ -1,185 +1,190 @@
-import {
-	myRequest
-} from '../request.js'
-import store from '@/store/index.js'
+import { myRequest } from "../request.js";
+import store from "@/store/index.js";
 export default {
+  //我的列表数据
+  getinfoAttached(data) {
+    return myRequest({
+      url: "/app/user/infoAttached",
+      method: "get",
+      data: data,
+    });
+  },
+  //登录
+  login(data) {
+    return myRequest({
+      url: "/login",
+      // url: '/testLogin',
+      method: "post",
+      data: data,
+      noToken: true,
+    });
+  },
+  //登录用户信息
+  getInfo(data) {
+    return myRequest({
+      url: "/app/user/getInfo",
+      method: "get",
+      data: data,
+    });
+  },
+  /**
+   * @param {Object} data
+   * 微信登录
+   */
+  wxLogin(data) {
+    return myRequest({
+      url: "/app/common/bindLogin",
+      method: "post",
+      data: data,
+      noToken: true,
+    });
+  },
 
-	//我的列表数据
-	getinfoAttached(data) {
-		return myRequest({
-			url: '/app/user/infoAttached',
-			method: 'get',
-			data: data
-		})
-	},
-	//登录
-	login(data) {
-		return myRequest({
-			url: '/login',
-			// url: '/testLogin',
-			method: 'post',
-			data: data,
-			noToken: true
-		})
-	},
-	//登录用户信息
-	getInfo(data) {
-		return myRequest({
-			url: '/app/user/getInfo',
-			method: 'get',
-			data: data,
-		})
-	},
-	/**
-	 * @param {Object} data 
-	 * 微信登录
-	 */
-	wxLogin(data) {
-		return myRequest({
-			url: '/app/common/bindLogin',
-			method: 'post',
-			data: data,
-			noToken: true
-		})
-	},
+  //刷新令牌
+  refreshToken(data) {
+    return myRequest({
+      url: "/refreshToken/" + data,
+      method: "get",
+      noToken: true,
+    });
+  },
+  //查询等级列表
+  gradelist(data) {
+    return myRequest({
+      url: "/grade/list",
+      method: "get",
+      data: data,
+    });
+  },
+  refreshUserInfo() {
+    this.getInfo().then((resdata) => {
+      if (resdata.data.code == 200) {
+        store.commit("updateUserInfo", { userInfo: resdata.data.data });
+      }
+    });
+  },
+  //注册短信
+  registerSms(data) {
+    return myRequest({
+      url: "/app/common/sms/register",
+      method: "post",
+      data: data,
+      noToken: true,
+    });
+  },
+  //获取重新绑定手机短信
+  bindNewSms(data) {
+    return myRequest({
+      url: "/app/common/sms/bindNew",
+      method: "post",
+      data: data,
+      noToken: true,
+    });
+  },
 
+  //重新绑定手机
+  bindNewTel(data) {
+    return myRequest({
+      url: "/app/user/bindNewTel",
+      method: "post",
+      data: data,
+    });
+  },
 
-	//刷新令牌
-	refreshToken(data) {
-		return myRequest({
-			url: '/refreshToken/' + data,
-			method: 'get',
-			noToken: true
-		})
-	},
-	//查询等级列表
-	gradelist(data) {
-		return myRequest({
-			url: '/grade/list',
-			method: 'get',
-			data: data
-		})
-	},
-	refreshUserInfo() {
-		this.getInfo().then(resdata => {
-			if (resdata.data.code == 200) {
-				store.commit('updateUserInfo', { userInfo: resdata.data.data })
-			}
-		});
-	},
-	//注册短信
-	registerSms(data) {
-		return myRequest({
-			url: '/app/common/sms/register',
-			method: 'post',
-			data: data,
-			noToken: true
-		})
-	},
-	//获取重新绑定手机短信
-	bindNewSms(data) {
-		return myRequest({
-			url: '/app/common/sms/bindNew',
-			method: 'post',
-			data: data,
-			noToken: true
-		})
-	},
-
-	//重新绑定手机
-	bindNewTel(data) {
-		return myRequest({
-			url: '/app/user/bindNewTel',
-			method: 'post',
-			data: data
-		})
-	},
-
-	//注册用户
-	registerUser(data) {
-		return myRequest({
-			url: '/app/common/register_small',
-			method: 'post',
-			data: data,
-			noToken: true
-		})
-	},
-	//登录短信
-	loginSms(data) {
-		return myRequest({
-			url: '/app/common/sms/login',
-			method: 'post',
-			data: data,
-			noToken: true
-		})
-	},
-	//忘记短信
-	forgetSms(data) {
-		return myRequest({
-			url: '/app/common/sms/forget',
-			method: 'post',
-			data: data,
-			noToken: true
-		})
-	},
-	//忘记用户
-	forgetUser(data) {
-		return myRequest({
-			url: '/app/common/register_forget',
-			method: 'post',
-			data: data,
-			noToken: true
-		})
-	},
-	//短信登录用户
-	smsLogin(data) {
-		return myRequest({
-			url: '/app/common/sms_login',
-			method: 'post',
-			data: data,
-			noToken: true
-		})
-	},
-	//账号登录用户
-	accountLogin(data) {
-		return myRequest({
-			url: '/app/common/account_login',
-			method: 'post',
-			data: data,
-			noToken: true
-		})
-	},
-	skipLogin(data) {
-		return myRequest({
-			url: '/app/common/telphone_login',
-			method: 'post',
-			data: data,
-			noToken: true
-		})
-	},
-	//绑定身份证号信息
-	bindId(data) {
-		return myRequest({
-			url: '/app/user/bind_idcard',
-			method: 'post',
-			data: data
-		})
-	},
-	// 小程序校验PC登录二维码
-	scanLoginCheck(data) {
-		return myRequest({
-			url: '/scan_login_check',
-			method: 'post',
-			data: data
-		})
-	},
-	// 小程序已扫码
-	scanhasCode(data) {
-		return myRequest({
-			url: '/scan_code',
-			method: 'get',
-			data: data,
-			noToken: true
-		})
-	}
-}
+  //注册用户
+  registerUser(data) {
+    return myRequest({
+      url: "/app/common/register_small",
+      method: "post",
+      data: data,
+      noToken: true,
+    });
+  },
+  //登录短信
+  loginSms(data) {
+    return myRequest({
+      url: "/app/common/sms/login",
+      method: "post",
+      data: data,
+      noToken: true,
+    });
+  },
+  //忘记短信
+  forgetSms(data) {
+    return myRequest({
+      url: "/app/common/sms/forget",
+      method: "post",
+      data: data,
+      noToken: true,
+    });
+  },
+  //忘记用户
+  forgetUser(data) {
+    return myRequest({
+      url: "/app/common/register_forget",
+      method: "post",
+      data: data,
+      noToken: true,
+    });
+  },
+  //短信登录用户
+  smsLogin(data) {
+    return myRequest({
+      url: "/app/common/sms_login",
+      method: "post",
+      data: data,
+      noToken: true,
+    });
+  },
+  //账号登录用户
+  accountLogin(data) {
+    return myRequest({
+      url: "/app/common/account_login",
+      method: "post",
+      data: data,
+      noToken: true,
+    });
+  },
+  skipLogin(data) {
+    return myRequest({
+      url: "/app/common/telphone_login",
+      method: "post",
+      data: data,
+      noToken: true,
+    });
+  },
+  //绑定身份证号信息
+  bindId(data) {
+    return myRequest({
+      url: "/app/user/bind_idcard",
+      method: "post",
+      data: data,
+    });
+  },
+  // 小程序校验PC登录二维码
+  scanLoginCheck(data) {
+    return myRequest({
+      url: "/scan_login_check",
+      method: "post",
+      data: data,
+    });
+  },
+  // 小程序已扫码
+  scanhasCode(data) {
+    return myRequest({
+      url: "/scan_code",
+      method: "get",
+      data: data,
+      noToken: true,
+    });
+  },
+  // 移动端配置参数
+  mobileConfig(data) {
+    return myRequest({
+      url: "/app/common/base/home/list",
+      method: "get",
+      data: data,
+      noToken: true,
+    });
+  },
+};

+ 3 - 8
common/request.js

@@ -8,11 +8,7 @@ export const BASE_URL = config.BASE_URL;
 export let tenantId = config.tenantId; // 祥粤云学堂:867735392558919680,祥粤学堂:667735392758919630, 中建云学堂-567735392758918520
 // #endif
 // #ifdef H5
-const host =
-  process.env.NODE_ENV === "production"
-    ? window.location.host
-    : "120.79.166.78:19012";
-export let tenantId = uni.getStorageSync(host) || "";
+export let tenantId = uni.getStorageSync(config.host) || "";
 // #endif
 export const myRequest = (options) => {
   if (store.state.allowLoading && !options.noLoading) {
@@ -21,12 +17,11 @@ export const myRequest = (options) => {
       mask: true,
     });
   }
-
   return new Promise(async (resolve, reject) => {
     // #ifdef H5
     if (!tenantId) {
       tenantId = await getTenantId();
-      uni.setStorageSync(host, tenantId);
+      uni.setStorageSync(config.host, tenantId);
     }
     // #endif
     let token = uni.getStorageSync("token");
@@ -138,7 +133,7 @@ function getTenantId() {
       url: config.BASE_URL + "/app/common/findTenantId",
       method: "get",
       data: {
-        hostH5: host,
+        hostH5: config.host,
       },
       success: (res) => {
         if (res.data.code == 200) {

+ 834 - 638
components/course/courseSection.vue

@@ -1,658 +1,854 @@
 <template>
-	<view style="display: flex;justify-content: space-between;align-items: center;" @click="getVideo">
-		<view style="display: flex;justify-content: space-between; align-items: center;margin: 20rpx 0;width: 100%;">
-			<view style="display: flex;align-items: center;flex:1;">
-				<view class="tag tagColor1" v-if="menuItem.sectionType==1">视频</view>
-				<view class="tag tagColor2" v-if="menuItem.sectionType==2">直播</view>
-				<view class="tag tagColor3" v-if="menuItem.sectionType==3">回放</view>
-				<view class="t_content">
-					<view v-if="menuItem.sectionType==1" :class="playSectionId==newId && playNextId==playId?'color1':''">{{menuItem.name || ''}}</view>
-					<view v-if="menuItem.sectionType==2" :class="playSectionId==newId && playNextId==playId?'color2':''">{{menuItem.name || ''}}</view>
-					<view v-if="menuItem.sectionType==3" :class="playSectionId==newId && playNextId==playId?'color3':''">{{menuItem.name || ''}}</view>
-					<view style="font-size: 20rpx;color: #FF3B30;" v-if="menuItem.sectionType==2 && menuItem.liveStartTime">
-						<view v-if="menuItem.liveStartTime>nowTime || !isBuy">
-							<text>{{$method.timestampToTime(menuItem.liveStartTime, isDay =false)}}</text>-
-							<text>{{$method.timestampToTime(menuItem.liveEndTime, isDay =false)}}</text>
-						</view>
-						<template v-if="isLast()">
-							<view v-if="liveLast.watchStatus == 'live'">
-								<text>直播中</text>
-							</view>
-							<view v-if="liveLast.watchStatus == 'end'">
-								<text>当前直播回放视频请稍后再查看</text>
-							</view>
-						</template>
-						<!-- <view v-if="menuItem.liveStartTime<=nowTime&&menuItem.liveEndTime>nowTime">
+  <view
+    style="display: flex; justify-content: space-between; align-items: center"
+    @click="getVideo"
+  >
+    <view
+      style="
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        margin: 20rpx 0;
+        width: 100%;
+      "
+    >
+      <view style="display: flex; align-items: center; flex: 1">
+        <view class="tag tagColor1" v-if="menuItem.sectionType == 1">视频</view>
+        <view class="tag tagColor2" v-if="menuItem.sectionType == 2">直播</view>
+        <view class="tag tagColor3" v-if="menuItem.sectionType == 3">回放</view>
+        <view class="t_content">
+          <view
+            v-if="menuItem.sectionType == 1"
+            :class="
+              playSectionId == newId && playNextId == playId ? 'color1' : ''
+            "
+            >{{ menuItem.name || "" }}</view
+          >
+          <view
+            v-if="menuItem.sectionType == 2"
+            :class="
+              playSectionId == newId && playNextId == playId ? 'color2' : ''
+            "
+            >{{ menuItem.name || "" }}</view
+          >
+          <view
+            v-if="menuItem.sectionType == 3"
+            :class="
+              playSectionId == newId && playNextId == playId ? 'color3' : ''
+            "
+            >{{ menuItem.name || "" }}</view
+          >
+          <view
+            style="font-size: 20rpx; color: #ff3b30"
+            v-if="menuItem.sectionType == 2 && menuItem.liveStartTime"
+          >
+            <view v-if="menuItem.liveStartTime > nowTime || !isBuy">
+              <text>{{
+                $method.timestampToTime(menuItem.liveStartTime, (isDay = false))
+              }}</text
+              >-
+              <text>{{
+                $method.timestampToTime(menuItem.liveEndTime, (isDay = false))
+              }}</text>
+            </view>
+            <template v-if="isLast()">
+              <view v-if="liveLast.watchStatus == 'live'">
+                <text>直播中</text>
+              </view>
+              <view v-if="liveLast.watchStatus == 'end'">
+                <text>当前直播回放视频请稍后再查看</text>
+              </view>
+            </template>
+            <!-- <view v-if="menuItem.liveStartTime<=nowTime&&menuItem.liveEndTime>nowTime">
 							<text>直播中</text>
 						</view>
 						<view v-if="menuItem.liveEndTime<nowTime">
 							<text>回放</text>
 						</view> -->
-					</view>
-					<view style="font-size: 20rpx;color: #FF3B30;" v-if="menuItem.sectionType == 3">
-						<view v-if="!menuItem.recordingUrl">
-							<text>当前直播回放视频请稍后再查看</text>
-						</view>
-						<view v-else>
-							回放中
-						</view>
-					</view>
-				</view>
-				<view v-if="menuItem.sectionType==null">{{menuItem.name || ''}}</view>
-				<!-- 学习中 -->
-				<view v-if="playSectionId==newId && playNextId==playId" class="learnings">
-					<image src="/pages3/static/imgs/learning_icon.gif" class="learning_icon"></image>
-				</view>
-			</view>
-			<view style="font-size: 20rpx;color: #FF3B30;"  v-if="menuItem.liveStartTime && menuItem.sectionType != 3 && isBuy">
-				
-				<template v-if="!isLast() && !isLive">
-					<view class="tagWillPlay" v-if="menuItem.liveStartTime>nowTime">
-						<text>待开播</text>
-					</view>
-					<view class="tagPlaying" v-if="menuItem.liveStartTime<=nowTime&&menuItem.liveEndTime>nowTime">
-						<text>直播中</text>
-					</view>
-					<view class="tagPlayed" v-if="menuItem.liveEndTime<nowTime">
-						<text>已结束</text>
-					</view>
-				</template>
-				
-			</view>
-			<!-- 直播课程没有学习状态 -->
-			<template v-if="!isLive">
-				<view v-if="(isRebuild||menuItem.rebuild>0)" class="tagRe">待重修</view>
-				<view v-else>
-					<view v-if="menuItem.learning==1" class="tagGreen">已学完</view>
-				</view>
-			</template>
+          </view>
+          <view
+            style="font-size: 20rpx; color: #ff3b30"
+            v-if="menuItem.sectionType == 3"
+          >
+            <view v-if="!menuItem.recordingUrl">
+              <text>当前直播回放视频请稍后再查看</text>
+            </view>
+            <view v-else> 回放中 </view>
+          </view>
+        </view>
+        <view v-if="menuItem.sectionType == null">{{
+          menuItem.name || ""
+        }}</view>
+        <!-- 学习中 -->
+        <view
+          v-if="playSectionId == newId && playNextId == playId"
+          class="learnings"
+        >
+          <image
+            src="/pages3/static/imgs/learning_icon.gif"
+            class="learning_icon"
+          ></image>
+        </view>
+      </view>
+      <view
+        style="font-size: 20rpx; color: #ff3b30"
+        v-if="menuItem.liveStartTime && menuItem.sectionType != 3 && isBuy"
+      >
+        <template v-if="!isLast() && !isLive">
+          <view class="tagWillPlay" v-if="menuItem.liveStartTime > nowTime">
+            <text>待开播</text>
+          </view>
+          <view
+            class="tagPlaying"
+            v-if="
+              menuItem.liveStartTime <= nowTime &&
+              menuItem.liveEndTime > nowTime
+            "
+          >
+            <text>直播中</text>
+          </view>
+          <view class="tagPlayed" v-if="menuItem.liveEndTime < nowTime">
+            <text>已结束</text>
+          </view>
+        </template>
+      </view>
+      <!-- 直播课程没有学习状态 -->
+      <template v-if="!isLive">
+        <view v-if="isRebuild || menuItem.rebuild > 0" class="tagRe"
+          >待重修</view
+        >
+        <view v-else>
+          <view v-if="menuItem.learning == 1" class="tagGreen">已学完</view>
+        </view>
+      </template>
 
-			<view v-if="checkTest()" class="exercises" @click.stop="toDoSectionExam()">
-				<text class="exe_w">习题</text>
-				<u-icon name="arrow-right" color="#498AFE" size="28"></u-icon>
-			</view>	
-			
-		</view>
-		<view v-if="menuItem.tryListen&&!isBuy" class="tryBox">
-			试看
-		</view>
-	</view>
+      <view
+        v-if="checkTest()"
+        class="exercises"
+        @click.stop="toDoSectionExam()"
+      >
+        <text class="exe_w">习题</text>
+        <u-icon name="arrow-right" color="#498AFE" size="28"></u-icon>
+      </view>
+    </view>
+    <view v-if="menuItem.tryListen && !isBuy" class="tryBox"> 试看 </view>
+  </view>
 </template>
 
 <script>
-import { mapGetters } from 'vuex';
-import config from '@/common/config'
+import { mapGetters } from "vuex";
 export default {
-	name: 'courseSection',
-	props: {
-		isLive:false, //是否是直播课
-		orderGoodsId:{
-			default:0
-		},
-		preItem:{
-			default:undefined,
-		},
-		learningOrder:{ //是否设置学习顺序 1 章节顺序 0不设置 2从头学到尾顺序
-			type:Number,
-			default:0
-		},
-		courseId: {
-			type: Number,
-			default: 0
-		},
-		goodsId: {
-			type: Number,
-			default: 0
-		},
-		menuItem: {
-			type: Object,
-			default: {}
-		},
-		isBuy: {
-			type: Boolean,
-			default: false
-		},
-		levelId: {
-			type: String,
-			default: ""
-		},
-		isRebuild: {
-			type: Boolean,
-			default: false
-		},
-		gradeId: {
-			type: Number,
-			default: 0
-		},
-		nextMenuItem: {
-			type: Object,
-			default: {}
-		},
-		sectionMaxNum:{
-			default:undefined,
-		},
-		// 章->所有节试卷列表
-		ChapterSectionExam: {
-			type: Array,
-			default: () => [],
-		},
-		// 区分是模块试卷还是章试卷,3是模块试卷
-		testType: {
-			type: Number,
-			default: 0,
-		},
-		menuAllList: { // 课程所有子目录结构列表
-			type: Array,
-			default: () => []
-		}
-	},
-	watch:{
-		menuItem(val) {
-			console.log(val,'val')
-		}
-	},
-	data() {
-		return {
-			nowTime:0,
-			newId:0,
-			playId:'',
-			clickLock:false, //点击锁,防止连续点击多次
-			moduleSectionExam: [], // 模块下的所有节试卷列表
-			chapterExams: {},
-			moduleExams: {},
-			// newMenuAllList: [],
-		};
-	},
-	onLoad() {
-	},
-	created() {
-		if (this.testType == 3) {
-			// 模块下的所有节试卷列表
-			this.$api.reSectionExamList({
-				chapterId: 0,
-				courseId: this.courseId,
-				gradeId: this.gradeId
-			}).then((res) => {
-				if (res.data.code == 200) {
-					this.moduleSectionExam = res.data.data || []
-				}
-			})
-		}
-	},
-    mounted() {
-		// console.log('节的播放---menuItem', this.menuItem, 'playSectionId:', this.playSectionId, 'isBuy:', this.isBuy)
-		this.nowTime = Number(new  Date().getTime()/1000).toFixed(0)
-		this.newId= this.menuItem.sectionId>0?this.menuItem.sectionId:this.menuItem.menuId
-		let moduleId = this.menuItem.moduleId || 0;
-		let chapterId = this.menuItem.chapterId || 0;
-		let sectionId = this.menuItem.sectionId || this.menuItem.menuId;
-		let playNextId = `moduleId${moduleId}chapterId${chapterId}sectionId${sectionId}${this.isRebuild?'isRebuild':''}`;
-		this.playId = playNextId;
-		// console.log('playNextId:', this.playNextId, 'playId:', this.playId);
-		uni.$off('playNext'+playNextId) //绑定前先移除之前的事件
-		uni.$once('playNext'+playNextId, async (data) => {
-			//到时会触发每个节的监听事件,只允许当前节的接收
-			let self = this
-			if(this.nextMenuItem.recordingUrl&&this.isRebuild&&(this.newId==this.playSectionId) && data.fromRebuild){  // fromRebuild 来自重修目录的点击才弹出播放下一节
-				//重修存在下一节
-				uni.showModal({
-				    title: '提示',
-				    content: '是否播放下一节',
-				    success: function (res) {
-				        if (res.confirm) {
-							let nextId= self.nextMenuItem.sectionId>0?self.nextMenuItem.sectionId:self.nextMenuItem.menuId
-							//设置播放的节ID
-							self.$store.commit('setPlaySectionId', {playSectionId  :nextId});
-							self.$store.commit('setPlayVID', {playVID  :self.nextMenuItem.recordingUrl});
-							let ids = self.levelId.split('-');
-							ids[2] = nextId 
-							uni.$emit('levelId', ids.join('-'))
-							uni.$emit('getSection', self.nextMenuItem)
-							self.$emit('playEnd',{isRebuild:self.isRebuild})
-							
-				        } else {
-							let nextId= self.nextMenuItem.sectionId>0?self.nextMenuItem.sectionId:self.nextMenuItem.menuId
-							//设置播放的节ID
-							self.$store.commit('setPlaySectionId', {playSectionId  :nextId});
-							self.$store.commit('setPlayVID', {playVID  :self.nextMenuItem.recordingUrl});
-							let ids = self.levelId.split('-');
-							ids[2] = nextId 
-							self.$emit('playEnd',{isRebuild:self.isRebuild})
-						}
-				    }
-				});
-			} else {
-				this.$emit('playEnd',{isRebuild:this.isRebuild})
-			}
-		});
-	},
-	methods: {
-		isLast() {
-			if(this.liveLast) {
-				let sectionASame = this.liveLast.sectionId == (this.menuItem.sectionId || this.menuItem.menuId)
-				let chapterSame = this.liveLast.chapterId == (this.menuItem.chapterId || 0)
-				let moduleSame = this.liveLast.moduleId == (this.menuItem.moduleId || 0);
-				return sectionASame && chapterSame && moduleSame
-			} else {
-				return false;
-			}
-			
-		},
-		toDoSectionExam() {
-			if (this.testType == 3) {
-				this.ModuleExam()
-			} else {
-				this.ChapterExam()
-			}
-		},
-		checkTest() {
-			let data = this.testType == 3 ? this.moduleSectionExam : this.ChapterSectionExam
-			let id = this.testType == 3 ? this.menuItem.menuId : this.menuItem.sectionId
-			if (!data) {
-				return false
-			}
-			return data.some((e) => e.sectionId == id)
-		},
-		ChapterExam() {
-			this.chapterExams = this.ChapterSectionExam.find((e) => e.sectionId == this.menuItem.sectionId)
-			let moduleId = this.chapterExams.moduleId || 0
-			let chapterId = this.chapterExams.chapterId || 0
-			let sectionId = this.chapterExams.sectionId || this.chapterExams.menuId
-			uni.navigateTo({
-              url:"/pages2/class/questionBank?courseId=" + this.courseId + "&gradeId=" + this.gradeId + "&isFromVideo=1&id=" + this.chapterExams.typeId +
-                "&goodsid=" + this.goodsId + "&moduleId=" + moduleId + "&chapterId=" + chapterId + "&sectionId=" + sectionId + "&orderGoodsId=" +
-				this.orderGoodsId + "&type=2",
+  name: "courseSection",
+  props: {
+    isLive: false, //是否是直播课
+    orderGoodsId: {
+      default: 0,
+    },
+    preItem: {
+      default: undefined,
+    },
+    learningOrder: {
+      //是否设置学习顺序 1 章节顺序 0不设置 2从头学到尾顺序
+      type: Number,
+      default: 0,
+    },
+    courseId: {
+      type: Number,
+      default: 0,
+    },
+    goodsId: {
+      type: Number,
+      default: 0,
+    },
+    menuItem: {
+      type: Object,
+      default: {},
+    },
+    isBuy: {
+      type: Boolean,
+      default: false,
+    },
+    levelId: {
+      type: String,
+      default: "",
+    },
+    isRebuild: {
+      type: Boolean,
+      default: false,
+    },
+    gradeId: {
+      type: Number,
+      default: 0,
+    },
+    nextMenuItem: {
+      type: Object,
+      default: {},
+    },
+    sectionMaxNum: {
+      default: undefined,
+    },
+    // 章->所有节试卷列表
+    ChapterSectionExam: {
+      type: Array,
+      default: () => [],
+    },
+    // 区分是模块试卷还是章试卷,3是模块试卷
+    testType: {
+      type: Number,
+      default: 0,
+    },
+    menuAllList: {
+      // 课程所有子目录结构列表
+      type: Array,
+      default: () => [],
+    },
+  },
+  watch: {
+    menuItem(val) {
+      console.log(val, "val");
+    },
+  },
+  data() {
+    return {
+      nowTime: 0,
+      newId: 0,
+      playId: "",
+      clickLock: false, //点击锁,防止连续点击多次
+      moduleSectionExam: [], // 模块下的所有节试卷列表
+      chapterExams: {},
+      moduleExams: {},
+      // newMenuAllList: [],
+    };
+  },
+  onLoad() {},
+  created() {
+    if (this.testType == 3) {
+      // 模块下的所有节试卷列表
+      this.$api
+        .reSectionExamList({
+          chapterId: 0,
+          courseId: this.courseId,
+          gradeId: this.gradeId,
+        })
+        .then((res) => {
+          if (res.data.code == 200) {
+            this.moduleSectionExam = res.data.data || [];
+          }
+        });
+    }
+  },
+  mounted() {
+    // console.log('节的播放---menuItem', this.menuItem, 'playSectionId:', this.playSectionId, 'isBuy:', this.isBuy)
+    this.nowTime = Number(new Date().getTime() / 1000).toFixed(0);
+    this.newId =
+      this.menuItem.sectionId > 0
+        ? this.menuItem.sectionId
+        : this.menuItem.menuId;
+    let moduleId = this.menuItem.moduleId || 0;
+    let chapterId = this.menuItem.chapterId || 0;
+    let sectionId = this.menuItem.sectionId || this.menuItem.menuId;
+    let playNextId = `moduleId${moduleId}chapterId${chapterId}sectionId${sectionId}${
+      this.isRebuild ? "isRebuild" : ""
+    }`;
+    this.playId = playNextId;
+    // console.log('playNextId:', this.playNextId, 'playId:', this.playId);
+    uni.$off("playNext" + playNextId); //绑定前先移除之前的事件
+    uni.$once("playNext" + playNextId, async (data) => {
+      //到时会触发每个节的监听事件,只允许当前节的接收
+      let self = this;
+      if (
+        this.nextMenuItem.recordingUrl &&
+        this.isRebuild &&
+        this.newId == this.playSectionId &&
+        data.fromRebuild
+      ) {
+        // fromRebuild 来自重修目录的点击才弹出播放下一节
+        //重修存在下一节
+        uni.showModal({
+          title: "提示",
+          content: "是否播放下一节",
+          success: function (res) {
+            if (res.confirm) {
+              let nextId =
+                self.nextMenuItem.sectionId > 0
+                  ? self.nextMenuItem.sectionId
+                  : self.nextMenuItem.menuId;
+              //设置播放的节ID
+              self.$store.commit("setPlaySectionId", { playSectionId: nextId });
+              self.$store.commit("setPlayVID", {
+                playVID: self.nextMenuItem.recordingUrl,
+              });
+              let ids = self.levelId.split("-");
+              ids[2] = nextId;
+              uni.$emit("levelId", ids.join("-"));
+              uni.$emit("getSection", self.nextMenuItem);
+              self.$emit("playEnd", { isRebuild: self.isRebuild });
+            } else {
+              let nextId =
+                self.nextMenuItem.sectionId > 0
+                  ? self.nextMenuItem.sectionId
+                  : self.nextMenuItem.menuId;
+              //设置播放的节ID
+              self.$store.commit("setPlaySectionId", { playSectionId: nextId });
+              self.$store.commit("setPlayVID", {
+                playVID: self.nextMenuItem.recordingUrl,
+              });
+              let ids = self.levelId.split("-");
+              ids[2] = nextId;
+              self.$emit("playEnd", { isRebuild: self.isRebuild });
+            }
+          },
+        });
+      } else {
+        this.$emit("playEnd", { isRebuild: this.isRebuild });
+      }
+    });
+  },
+  methods: {
+    isLast() {
+      if (this.liveLast) {
+        let sectionASame =
+          this.liveLast.sectionId ==
+          (this.menuItem.sectionId || this.menuItem.menuId);
+        let chapterSame =
+          this.liveLast.chapterId == (this.menuItem.chapterId || 0);
+        let moduleSame =
+          this.liveLast.moduleId == (this.menuItem.moduleId || 0);
+        return sectionASame && chapterSame && moduleSame;
+      } else {
+        return false;
+      }
+    },
+    toDoSectionExam() {
+      if (this.testType == 3) {
+        this.ModuleExam();
+      } else {
+        this.ChapterExam();
+      }
+    },
+    checkTest() {
+      let data =
+        this.testType == 3 ? this.moduleSectionExam : this.ChapterSectionExam;
+      let id =
+        this.testType == 3 ? this.menuItem.menuId : this.menuItem.sectionId;
+      if (!data) {
+        return false;
+      }
+      return data.some((e) => e.sectionId == id);
+    },
+    ChapterExam() {
+      this.chapterExams = this.ChapterSectionExam.find(
+        (e) => e.sectionId == this.menuItem.sectionId
+      );
+      let moduleId = this.chapterExams.moduleId || 0;
+      let chapterId = this.chapterExams.chapterId || 0;
+      let sectionId = this.chapterExams.sectionId || this.chapterExams.menuId;
+      uni.navigateTo({
+        url:
+          "/pages2/class/questionBank?courseId=" +
+          this.courseId +
+          "&gradeId=" +
+          this.gradeId +
+          "&isFromVideo=1&id=" +
+          this.chapterExams.typeId +
+          "&goodsid=" +
+          this.goodsId +
+          "&moduleId=" +
+          moduleId +
+          "&chapterId=" +
+          chapterId +
+          "&sectionId=" +
+          sectionId +
+          "&orderGoodsId=" +
+          this.orderGoodsId +
+          "&type=2",
+      });
+    },
+    ModuleExam() {
+      let sectionId = this.menuItem.sectionId || this.menuItem.menuId;
+      this.moduleExams = this.moduleSectionExam.find(
+        (e) => e.sectionId == sectionId
+      );
+      let moduleId = this.moduleExams.moduleId || 0;
+      let chapterId = this.moduleExams.chapterId || 0;
+
+      uni.navigateTo({
+        url:
+          "/pages2/class/questionBank?courseId=" +
+          this.courseId +
+          "&gradeId=" +
+          this.gradeId +
+          "&isFromVideo=1&id=" +
+          this.moduleExams.typeId +
+          "&goodsid=" +
+          this.goodsId +
+          "&moduleId=" +
+          moduleId +
+          "&chapterId=" +
+          chapterId +
+          "&sectionId=" +
+          sectionId +
+          "&orderGoodsId=" +
+          this.orderGoodsId +
+          "&type=2",
+      });
+    },
+    studyRecordMenuAllList() {
+      return new Promise((resolve) => {
+        this.$api
+          .studyRecordMenuAllList({
+            courseId: this.courseId,
+            gradeId: this.gradeId,
+            goodsId: this.goodsId,
+          })
+          .then((res) => {
+            if (res.data.code == 200) {
+              resolve(res.data.data);
+            }
+          });
+      });
+    },
+    gradeCheckGoodsStudy() {
+      return new Promise((resolve) => {
+        this.$api
+          .gradeCheckGoodsStudy({
+            goodsId: this.goodsId,
+            gradeId: this.gradeId,
+            moduleId: this.menuItem.moduleId || 0,
+            chapterId: this.menuItem.chapterId || 0,
+            sectionId: this.menuItem.sectionId || this.menuItem.menuId,
+          })
+          .then((res) => {
+            resolve(res.data.data);
+          });
+      });
+    },
+    goodsTodayStudySectionNum() {
+      return new Promise((resolve) => {
+        this.$api
+          .goodsTodayStudySectionNum({
+            goodsId: this.goodsId,
+            gradeId: this.gradeId,
+          })
+          .then((res) => {
+            if (res.data.code == 200) {
+              resolve(res.data.data);
+            }
+          });
+      });
+    },
+    getVideo() {
+      if (this.clickLock) {
+        return;
+      }
+      if (this.$method.isGoLogin()) {
+        return;
+      }
+      this.clickLock = true;
+
+      if (this.learningOrder == 2 && !this.menuItem.isRebuild && !this.isLive) {
+        //要按从头到尾顺序学习, 且不是重修课程
+        if (this.preItem) {
+          // let rows = await this.studyRecordMenuAllList();
+          let rows = this.menuAllList;
+          let newRows = [];
+          for (let i = 0; i < rows.length; i++) {
+            let moduleTrue =
+              rows[i].moduleId == this.menuItem.moduleId ||
+              rows[i].moduleId == 0;
+            let chapterTrue =
+              rows[i].chapterId == this.menuItem.chapterId ||
+              rows[i].chapterId == 0;
+            let sectionTrue =
+              rows[i].sectionId == this.menuItem.sectionId ||
+              rows[i].sectionId == this.menuItem.menuId;
+            if (moduleTrue && chapterTrue && sectionTrue) {
+              break;
+            } else {
+              if (rows[i].sectionType != 2) {
+                newRows.push(rows[i]);
+              }
+            }
+          }
+          let isAllLearn = newRows.every((item) => {
+            return item.studyStatus == 1;
+          });
+          if (isAllLearn) {
+            this.playVideo();
+          } else {
+            uni.showToast({
+              icon: "none",
+              title: "请按顺序学习视频课程",
             });
-		},
-		ModuleExam() {
-			let sectionId = this.menuItem.sectionId || this.menuItem.menuId
-			this.moduleExams = this.moduleSectionExam.find((e) => e.sectionId == sectionId)
-			let moduleId = this.moduleExams.moduleId || 0
-			let chapterId = this.moduleExams.chapterId || 0
-			
-			uni.navigateTo({
-				url:"/pages2/class/questionBank?courseId=" + this.courseId + "&gradeId=" + this.gradeId + "&isFromVideo=1&id=" + this.moduleExams.typeId +
-                "&goodsid=" + this.goodsId + "&moduleId=" + moduleId + "&chapterId=" + chapterId + "&sectionId=" + sectionId + "&orderGoodsId=" +
-				this.orderGoodsId + "&type=2",
+          }
+        } else {
+          //第一章第一节
+          this.playVideo();
+        }
+      } else {
+        this.playVideo();
+      }
+      setTimeout(() => {
+        this.clickLock = false;
+      }, 3000);
+    },
+    studyRecordGetChannelBasicInfo(channelId) {
+      return new Promise((resolve) => {
+        this.$api
+          .studyRecordGetChannelBasicInfo({
+            channelId,
+          })
+          .then((res) => {
+            resolve(res.data.data);
+          });
+      });
+    },
+    async playVideo() {
+      if (this.menuItem.sectionType == 1 || this.menuItem.sectionType == 3) {
+        //1视频 3回放
+        if (!this.isBuy) {
+          //非购买
+          if (!this.menuItem.tryListen) {
+            //不允许试听
+            this.clickLock = false;
+            return;
+          } else {
+            this.$store.commit("setPlaySectionId", {
+              playSectionId: this.newId,
             });
-		},
-		studyRecordMenuAllList() {
-			return new Promise(resolve => {
-				this.$api.studyRecordMenuAllList({
-					courseId:this.courseId,
-					gradeId:this.gradeId,
-					goodsId:this.goodsId
-				}).then(res => {
-					if(res.data.code == 200) {
-						resolve(res.data.data)
-					}
-				})
-			})
-		},
-		gradeCheckGoodsStudy() {
-			return new Promise(resolve => {
-				this.$api.gradeCheckGoodsStudy({
-					goodsId:this.goodsId,
-					gradeId:this.gradeId,
-					moduleId:this.menuItem.moduleId || 0,
-					chapterId:this.menuItem.chapterId || 0,
-					sectionId:this.menuItem.sectionId || this.menuItem.menuId
-				}).then( res => {
-					resolve(res.data.data)
-				})
-			})
-		},
-		goodsTodayStudySectionNum() {
-			return new Promise(resolve => {
-				this.$api.goodsTodayStudySectionNum({goodsId:this.goodsId,gradeId:this.gradeId}).then(res => {
-					if(res.data.code == 200) {
-						resolve(res.data.data)
-					}
-				})
-			})
-		},
-		getVideo(){
-			if(this.clickLock) {
-				return;
-			}
-            if (this.$method.isGoLogin()) { 
-               return;
-            }
-			this.clickLock = true;
-			
-			if(this.learningOrder == 2 && !this.menuItem.isRebuild && !this.isLive) { //要按从头到尾顺序学习, 且不是重修课程
-				if(this.preItem) {
-					// let rows = await this.studyRecordMenuAllList();
-					let rows = this.menuAllList
-					let newRows = [];
-					for(let i = 0; i < rows.length; i++ ) {
-						let moduleTrue = rows[i].moduleId == this.menuItem.moduleId || rows[i].moduleId == 0
-						let chapterTrue = rows[i].chapterId == this.menuItem.chapterId || rows[i].chapterId == 0;
-						let sectionTrue = (rows[i].sectionId == this.menuItem.sectionId) || (rows[i].sectionId ==  this.menuItem.menuId);
-						if(moduleTrue && chapterTrue && sectionTrue) {
-							break;
-						} else {
-							if(rows[i].sectionType != 2) {
-								newRows.push(rows[i])
-							}
-							
-						}
-					}
-					let isAllLearn = newRows.every(item => {
-						return item.studyStatus == 1;
-					})
-					if(isAllLearn) {
-						this.playVideo();
-					} else {
-						uni.showToast({
-							icon:'none',
-							title:'请按顺序学习视频课程'
-						})
-					}
-					
-				} else { //第一章第一节
-					this.playVideo();
-				}
-			} else { 
-				this.playVideo();
-			}
-			setTimeout(() => {
-				this.clickLock = false;
-			},3000)
-			
-		},
-		studyRecordGetChannelBasicInfo(channelId) {
-			return new Promise((resolve) => {
-				this.$api
-					.studyRecordGetChannelBasicInfo({
-						channelId,
-					})
-					.then((res) => {
-						resolve(res.data.data);
-					});
-			});
-		},
-		async playVideo() {
-			if(this.menuItem.sectionType==1 || this.menuItem.sectionType == 3){
-				//1视频 3回放
-				if(!this.isBuy){
-					//非购买
-					if(!this.menuItem.tryListen){
-						//不允许试听
-						this.clickLock = false;
-						return
-					} else {
-						this.$store.commit('setPlaySectionId', {playSectionId  :this.newId});
-						this.$store.commit('setPlayVID', {playVID  :this.menuItem.recordingUrl});
-						this.menuItem.courseId = this.courseId;
-						uni.$emit('getSection', this.menuItem)
-						return;
-					}
-					
-				}
-				
-				let learnNum = await this.goodsTodayStudySectionNum()
-				let hasLearn = await this.gradeCheckGoodsStudy();
-				
-				if(this.sectionMaxNum > 0) {
-					if(learnNum >= this.sectionMaxNum && !hasLearn) {
-						uni.showToast({
-							icon:'none',
-							title:`每天最多学习${this.sectionMaxNum}节`
-						})
-						this.clickLock = false;
-						return;
-					}
-				}
-				if(!this.menuItem.recordingUrl){
-					uni.showToast({
-						title: '暂无播放地址数据',
-						icon: 'none'
-					});
-					this.clickLock = false;
-					return;
-				}
-				/* if(this.playSectionId==this.newId){
+            this.$store.commit("setPlayVID", {
+              playVID: this.menuItem.recordingUrl,
+            });
+            this.menuItem.courseId = this.courseId;
+            uni.$emit("getSection", this.menuItem);
+            return;
+          }
+        }
+
+        let learnNum = await this.goodsTodayStudySectionNum();
+        let hasLearn = await this.gradeCheckGoodsStudy();
+
+        if (this.sectionMaxNum > 0) {
+          if (learnNum >= this.sectionMaxNum && !hasLearn) {
+            uni.showToast({
+              icon: "none",
+              title: `每天最多学习${this.sectionMaxNum}节`,
+            });
+            this.clickLock = false;
+            return;
+          }
+        }
+        if (!this.menuItem.recordingUrl) {
+          uni.showToast({
+            title: "暂无播放地址数据",
+            icon: "none",
+          });
+          this.clickLock = false;
+          return;
+        }
+        /* if(this.playSectionId==this.newId){
 					//切换为同一节
 					return
 				} */
-				// 回放
-				if (this.menuItem.sectionType == 3) {
-					let moduleId = this.menuItem.moduleId || 0;
-					let chapterId = this.menuItem.chapterId || 0;
-					let sectionId = this.menuItem.sectionId || this.menuItem.menuId;
-					let uuid = new Date().valueOf() + ""
-					// buyCourse 是否购买课程:1是 0否,type=vod是回放
-					let encode = encodeURIComponent(config.WEBVIEW_URL+'pages/live/index?token='+uni.getStorageSync('token')+'&userInfo='+JSON.stringify(this.userInfo)+
-					'&channelId='+this.menuItem.liveUrl+'&gradeId='+this.gradeId+'&courseId='+this.courseId+'&goodsId='+this.goodsId+'&orderGoodsId='+this.orderGoodsId+
-					'&sectionId='+sectionId+'&chapterId='+chapterId+'&moduleId='+moduleId+'&buyCourse=1'+'&ident='+uuid+'&sectionType=3'+'&vid='+this.menuItem.recordingUrl)
-					uni.navigateTo({
-						url:`../../pages/webview/index?url=`+encode
-					})
-					return
-				}
-				if(this.playSectionId>0){
-					//切换视频
-					let oldSectionId = this.playSectionId
-					uni.$emit('changeSection', oldSectionId)
-				}
-				// console.log('===设置播放的节IDthis.menuItem,', this.menuItem, this.playId);
-				//设置播放的节ID
-				this.$store.commit('setPlaySectionId', {playSectionId  :this.newId});
-				this.$store.commit('setPlayVID', {playVID  :this.menuItem.recordingUrl});
-				this.$store.commit('updatePlayNextId',this.playId)
-				uni.$emit('levelId', this.levelId)
-				uni.$emit('getSection', this.menuItem)
-				uni.$emit('isRebuild',this.isRebuild)
-			}
-			if(this.menuItem.sectionType==2){
-				//直播
-				if(!this.isBuy){
-					//非购买
-					this.clickLock = false;
-					return
-				}
-				
-				let learnNum = await this.goodsTodayStudySectionNum()
-				let hasLearn = await this.gradeCheckGoodsStudy();
-				
-				if(this.sectionMaxNum > 0 && !this.isLive) {
-					if(learnNum >= this.sectionMaxNum && !hasLearn) {
-						uni.showToast({
-							icon:'none',
-							title:`每天最多学习${this.sectionMaxNum}节`
-						})
-						this.clickLock = false;
-						return;
-					}
-				}
-				if(!this.menuItem.liveUrl){
-					uni.showToast({
-						title: '暂无直播地址数据',
-						icon: 'error'
-					});
-					return;
-				}
-				
-				let data = await this.studyRecordGetChannelBasicInfo(this.menuItem.liveUrl);
-				let nowTime = +this.$method.timest();
-				
-				if (this.menuItem.liveStartTime > nowTime) {
-					if (data.watchStatus == "end" || data.watchStatus == "playback") {
-						this.clickLock = false;
-						uni.showToast({
-							title: '直播未开始',
-							icon: 'none'
-						});
-						return;
-					}
-				} else if (
-					this.menuItem.liveStartTime < nowTime &&
-					this.menuItem.liveEndTime > nowTime
-				) {
-					if (data.watchStatus == "end" || data.watchStatus == "playback") {
-						this.clickLock = false;
-						uni.showToast({
-							title: '暂无直播',
-							icon: 'none'
-						});
-						return;
-					}
-				} else if (this.menuItem.liveEndTime < nowTime) {
-					if (!data) {
-						uni.showToast({
-							title: '直播已结束',
-							icon: 'none'
-						});
-						return;
-					}
-					if (data.watchStatus == "end" || data.watchStatus == "playback") {
-						this.clickLock = false;
-						uni.showToast({
-							title: '直播已结束',
-							icon: 'none'
-						});
-						return;
-					}
-				}
-				let moduleId = this.menuItem.moduleId || 0;
-				let chapterId = this.menuItem.chapterId || 0;
-				let sectionId = this.menuItem.sectionId || this.menuItem.menuId;
-				let uuid = new Date().valueOf() + ""
-         		 // buyCourse 是否购买课程:1是 0否
-				let encode = encodeURIComponent(config.WEBVIEW_URL+'pages/live/index?token='+uni.getStorageSync('token')+'&userInfo='+JSON.stringify(this.userInfo)+
-				'&channelId='+this.menuItem.liveUrl+'&gradeId='+this.gradeId+'&courseId='+this.courseId+'&goodsId='+this.goodsId+'&orderGoodsId='+this.orderGoodsId+
-				'&sectionId='+sectionId+'&chapterId='+chapterId+'&moduleId='+moduleId+'&buyCourse=1'+'&ident='+uuid+'&sectionType=2')
-				uni.navigateTo({
-					url:`../../pages/webview/index?url=`+encode
-				})
-				
-				return;
-			}
-			
-		}
-	},
-	computed: { ...mapGetters(['playSectionId','playChannelId','playVID','playNextId','userInfo','liveLast']) }
-	
+        // 回放
+        if (this.menuItem.sectionType == 3) {
+          let moduleId = this.menuItem.moduleId || 0;
+          let chapterId = this.menuItem.chapterId || 0;
+          let sectionId = this.menuItem.sectionId || this.menuItem.menuId;
+          let uuid = new Date().valueOf() + "";
+          // buyCourse 是否购买课程:1是 0否,type=vod是回放
+          let encode = encodeURIComponent(
+            this.config.hostLive +
+              "pages/live/index?token=" +
+              uni.getStorageSync("token") +
+              "&userInfo=" +
+              JSON.stringify(this.userInfo) +
+              "&channelId=" +
+              this.menuItem.liveUrl +
+              "&gradeId=" +
+              this.gradeId +
+              "&courseId=" +
+              this.courseId +
+              "&goodsId=" +
+              this.goodsId +
+              "&orderGoodsId=" +
+              this.orderGoodsId +
+              "&sectionId=" +
+              sectionId +
+              "&chapterId=" +
+              chapterId +
+              "&moduleId=" +
+              moduleId +
+              "&buyCourse=1" +
+              "&ident=" +
+              uuid +
+              "&sectionType=3" +
+              "&vid=" +
+              this.menuItem.recordingUrl
+          );
+          uni.navigateTo({
+            url: `../../pages/webview/index?url=` + encode,
+          });
+          return;
+        }
+        if (this.playSectionId > 0) {
+          //切换视频
+          let oldSectionId = this.playSectionId;
+          uni.$emit("changeSection", oldSectionId);
+        }
+        // console.log('===设置播放的节IDthis.menuItem,', this.menuItem, this.playId);
+        //设置播放的节ID
+        this.$store.commit("setPlaySectionId", { playSectionId: this.newId });
+        this.$store.commit("setPlayVID", {
+          playVID: this.menuItem.recordingUrl,
+        });
+        this.$store.commit("updatePlayNextId", this.playId);
+        uni.$emit("levelId", this.levelId);
+        uni.$emit("getSection", this.menuItem);
+        uni.$emit("isRebuild", this.isRebuild);
+      }
+      if (this.menuItem.sectionType == 2) {
+        //直播
+        if (!this.isBuy) {
+          //非购买
+          this.clickLock = false;
+          return;
+        }
+
+        let learnNum = await this.goodsTodayStudySectionNum();
+        let hasLearn = await this.gradeCheckGoodsStudy();
+
+        if (this.sectionMaxNum > 0 && !this.isLive) {
+          if (learnNum >= this.sectionMaxNum && !hasLearn) {
+            uni.showToast({
+              icon: "none",
+              title: `每天最多学习${this.sectionMaxNum}节`,
+            });
+            this.clickLock = false;
+            return;
+          }
+        }
+        if (!this.menuItem.liveUrl) {
+          uni.showToast({
+            title: "暂无直播地址数据",
+            icon: "error",
+          });
+          return;
+        }
+
+        let data = await this.studyRecordGetChannelBasicInfo(
+          this.menuItem.liveUrl
+        );
+        let nowTime = +this.$method.timest();
+
+        if (this.menuItem.liveStartTime > nowTime) {
+          if (data.watchStatus == "end" || data.watchStatus == "playback") {
+            this.clickLock = false;
+            uni.showToast({
+              title: "直播未开始",
+              icon: "none",
+            });
+            return;
+          }
+        } else if (
+          this.menuItem.liveStartTime < nowTime &&
+          this.menuItem.liveEndTime > nowTime
+        ) {
+          if (data.watchStatus == "end" || data.watchStatus == "playback") {
+            this.clickLock = false;
+            uni.showToast({
+              title: "暂无直播",
+              icon: "none",
+            });
+            return;
+          }
+        } else if (this.menuItem.liveEndTime < nowTime) {
+          if (!data) {
+            uni.showToast({
+              title: "直播已结束",
+              icon: "none",
+            });
+            return;
+          }
+          if (data.watchStatus == "end" || data.watchStatus == "playback") {
+            this.clickLock = false;
+            uni.showToast({
+              title: "直播已结束",
+              icon: "none",
+            });
+            return;
+          }
+        }
+        let moduleId = this.menuItem.moduleId || 0;
+        let chapterId = this.menuItem.chapterId || 0;
+        let sectionId = this.menuItem.sectionId || this.menuItem.menuId;
+        let uuid = new Date().valueOf() + "";
+        // buyCourse 是否购买课程:1是 0否
+        let encode = encodeURIComponent(
+          this.config.hostLive +
+            "pages/live/index?token=" +
+            uni.getStorageSync("token") +
+            "&userInfo=" +
+            JSON.stringify(this.userInfo) +
+            "&channelId=" +
+            this.menuItem.liveUrl +
+            "&gradeId=" +
+            this.gradeId +
+            "&courseId=" +
+            this.courseId +
+            "&goodsId=" +
+            this.goodsId +
+            "&orderGoodsId=" +
+            this.orderGoodsId +
+            "&sectionId=" +
+            sectionId +
+            "&chapterId=" +
+            chapterId +
+            "&moduleId=" +
+            moduleId +
+            "&buyCourse=1" +
+            "&ident=" +
+            uuid +
+            "&sectionType=2"
+        );
+        uni.navigateTo({
+          url: `../../pages/webview/index?url=` + encode,
+        });
+
+        return;
+      }
+    },
+  },
+  computed: {
+    ...mapGetters([
+      "playSectionId",
+      "playChannelId",
+      "playVID",
+      "playNextId",
+      "userInfo",
+      "liveLast",
+      "config",
+    ]),
+  },
 };
 </script>
 
 <style scoped lang="scss">
-	.tagGreen{
-		width: 80rpx;
-		height: 28rpx;
-		background: #34C759;
-		border-radius: 8rpx;
-		font-size: 20rpx;
-		color: #FFFFFF;
-		text-align: center;
-	}
-	.tagWillPlay{
-		width: 80rpx;
-		height: 28rpx;
-		background: #EBF4FF;
-		border-radius: 8rpx;
-		font-size: 20rpx;
-		color: #007AFF;
-		text-align: center;
-	}
-	.tagPlaying{
-		width: 80rpx;
-		height: 28rpx;
-		background: #FFF7EB;
-		border-radius: 8rpx;
-		font-size: 20rpx;
-		color: #FF9500;
-		text-align: center;
-	}
-	.tagPlayed{
-		width: 80rpx;
-		height: 28rpx;
-		background: #EEEEEE;
-		border-radius: 8rpx;
-		font-size: 20rpx;
-		color: #666666;
-		text-align: center;
-	}
-	.tagRe{
-		width: 80rpx;
-		height: 28rpx;
-		background: #FF3B30;
-		border-radius: 8rpx;
-		font-size: 20rpx;
-		color: #FFFFFF;
-		text-align: center;
-	}
-	.tryBox{
-		width: 103rpx;
-		height: 48rpx;
-		background: #fff;
-		border-radius: 24rpx;
-		color: #3577E8;
-		font-size: 24rpx;
-		line-height: 48rpx;
-		text-align: center;
-		border: 1rpx solid #3577E8;
-	}
-	.icon_up{
-		width: 24rpx;
-		height: 24rpx;
-	}
-	.t_content3{
-		color: #007AFF;
-	}
-	.t_content2{
-		color: #007AFF;
-	}
-	.t_content1{
-		color: #007AFF;
-	}
-	.t_content{
-		font-size: 30rpx;
-		margin-left: 10rpx;
-		color: #666666;
-		flex:1;
-	}
-	.tagColor3{
-		border: 2rpx solid #FF9500;
-		color: #FF9500;
-	}
-	.tagColor2{
-		border: 2rpx solid #FF3B30;
-		color: #FF3B30;
-	}
-	.tagColor1{
-		border: 2rpx solid #007AFF;
-		color: #007AFF;
-	}
-	.color3{
-		color: #FF9500;
-	}
-	.color2{
-		color: #FF3B30;
-	}
-	.color1{
-		color: #007AFF;
-	}
-	.tag{
-		border-radius: 8rpx;
-		font-size: 20rpx;
-		padding: 4rpx 10rpx;
-	}
-	.exercises {
-		margin-left: 10rpx;
-		font-size: 26rpx;
-		color: #498AFE;
-		>text {
-			margin-right: 6rpx;
-		}
-	}
-	.learnings {
-		margin-right: 8rpx;
-		.learning_icon {
-			width: 40rpx;
-			height: 40rpx;
-			margin-right: 4rpx;
-		}
-	}
-</style>
+.tagGreen {
+  width: 80rpx;
+  height: 28rpx;
+  background: #34c759;
+  border-radius: 8rpx;
+  font-size: 20rpx;
+  color: #ffffff;
+  text-align: center;
+}
+.tagWillPlay {
+  width: 80rpx;
+  height: 28rpx;
+  background: #ebf4ff;
+  border-radius: 8rpx;
+  font-size: 20rpx;
+  color: #007aff;
+  text-align: center;
+}
+.tagPlaying {
+  width: 80rpx;
+  height: 28rpx;
+  background: #fff7eb;
+  border-radius: 8rpx;
+  font-size: 20rpx;
+  color: #ff9500;
+  text-align: center;
+}
+.tagPlayed {
+  width: 80rpx;
+  height: 28rpx;
+  background: #eeeeee;
+  border-radius: 8rpx;
+  font-size: 20rpx;
+  color: #666666;
+  text-align: center;
+}
+.tagRe {
+  width: 80rpx;
+  height: 28rpx;
+  background: #ff3b30;
+  border-radius: 8rpx;
+  font-size: 20rpx;
+  color: #ffffff;
+  text-align: center;
+}
+.tryBox {
+  width: 103rpx;
+  height: 48rpx;
+  background: #fff;
+  border-radius: 24rpx;
+  color: #3577e8;
+  font-size: 24rpx;
+  line-height: 48rpx;
+  text-align: center;
+  border: 1rpx solid #3577e8;
+}
+.icon_up {
+  width: 24rpx;
+  height: 24rpx;
+}
+.t_content3 {
+  color: #007aff;
+}
+.t_content2 {
+  color: #007aff;
+}
+.t_content1 {
+  color: #007aff;
+}
+.t_content {
+  font-size: 30rpx;
+  margin-left: 10rpx;
+  color: #666666;
+  flex: 1;
+}
+.tagColor3 {
+  border: 2rpx solid #ff9500;
+  color: #ff9500;
+}
+.tagColor2 {
+  border: 2rpx solid #ff3b30;
+  color: #ff3b30;
+}
+.tagColor1 {
+  border: 2rpx solid #007aff;
+  color: #007aff;
+}
+.color3 {
+  color: #ff9500;
+}
+.color2 {
+  color: #ff3b30;
+}
+.color1 {
+  color: #007aff;
+}
+.tag {
+  border-radius: 8rpx;
+  font-size: 20rpx;
+  padding: 4rpx 10rpx;
+}
+.exercises {
+  margin-left: 10rpx;
+  font-size: 26rpx;
+  color: #498afe;
+  > text {
+    margin-right: 6rpx;
+  }
+}
+.learnings {
+  margin-right: 8rpx;
+  .learning_icon {
+    width: 40rpx;
+    height: 40rpx;
+    margin-right: 4rpx;
+  }
+}
+</style>

+ 2 - 4
pages/course/index.vue

@@ -9,7 +9,7 @@
     >
       <view class="slot-wrap">
         <image
-          :src="logo"
+          :src="$method.splitImgHost(config.h5Logo)"
           style="width: 178rpx; height: 31rpx; margin-left: 30rpx"
         ></image>
       </view>
@@ -392,12 +392,10 @@
 
 <script>
 import { mapGetters } from "vuex";
-import config from "@/common/config";
 export default {
   components: {},
   data() {
     return {
-      logo: config.TOP_LOGO,
       show: false,
       courseLists: [
         {
@@ -656,7 +654,7 @@ export default {
       }
     }
   },
-  computed: { ...mapGetters(["userInfo"]) },
+  computed: { ...mapGetters(["userInfo", "config"]) },
 };
 </script>
 <style >

+ 7 - 6
pages/index/index.vue

@@ -8,7 +8,7 @@
       back-icon-color="#ffffff"
     >
       <view class="slot-wrap">
-        <image :src="tenantInfo.TOP_LOGO"></image>
+        <image :src="$method.splitImgHost(config.h5Logo)"></image>
       </view>
     </u-navbar>
     <view class="swiper">
@@ -314,8 +314,7 @@
           <u-empty text="暂无推荐题库" mode="list" margin-top="100"></u-empty>
         </template>
       </view>
-      <view class="bom-tip">{{ tenantInfo.tips1 }}</view>
-      <view class="bom-tip">{{ tenantInfo.tips2 }}</view>
+      <view class="bom-tip" v-html="config.footerRecordNo"></view>
     </view>
     <!-- #ifdef MP-WEIXIN -->
     <view :style="{ opacity: opacitys }" class="officials">
@@ -418,7 +417,7 @@ export default {
   async onLoad(option) {
     // #ifdef H5
     uni.setNavigationBarTitle({
-      title: config.tenantName,
+      title: this.config.companyName,
     });
     // #endif
     this.isLogin = this.$method.isLogin();
@@ -464,7 +463,9 @@ export default {
         !uni.getStorageSync("h5_code") &&
         process.env.NODE_ENV !== "development"
       ) {
-        location.replace("https://www.xyyxt.net/?ask_type=" + config.domain);
+        location.replace(
+          "https://www.xyyxt.net/?ask_type=" + window.location.host
+        );
       }
     }
     // #endif
@@ -550,7 +551,7 @@ export default {
     }
   },
   computed: {
-    ...mapGetters(["dictObj", "userInfo", "hideBuyState"]),
+    ...mapGetters(["dictObj", "userInfo", "hideBuyState", "config"]),
     opacitys() {
       const value =
         [1011, 1017, 1025, 1047, 1124].includes(this.$store.state.scene) &&

+ 5 - 7
pages/learn/index.vue

@@ -9,7 +9,7 @@
     >
       <view class="slot-wrap">
         <image
-          :src="logo"
+          :src="$method.splitImgHost(config.h5Logo)"
           style="width: 178rpx; height: 31rpx; margin-left: 30rpx"
         ></image>
       </view>
@@ -782,11 +782,9 @@
 <script>
 var curTime = new Date().getTime(); // 当前时间的时间戳
 import { mapGetters, mapActions } from "vuex";
-import config from "@/common/config";
 export default {
   data() {
     return {
-      logo: config.TOP_LOGO,
       leftDays: 0,
       paramC: {
         pageNum: 1,
@@ -825,7 +823,7 @@ export default {
     },
   },
   computed: {
-    ...mapGetters(["userInfo"]),
+    ...mapGetters(["userInfo", "config"]),
     allCourse() {
       return this.courseLists.length || this.livingLists.length ? true : false;
     },
@@ -958,7 +956,7 @@ export default {
       let uuid = new Date().valueOf() + "";
       // buyCourse 是否购买课程:1是 0否
       let encode = encodeURIComponent(
-        config.WEBVIEW_URL +
+        this.config.hostLive +
           "pages/live/index?token=" +
           uni.getStorageSync("token") +
           "&userInfo=" +
@@ -1050,7 +1048,7 @@ export default {
     async studyIn(v, i, item, index) {
       if (item.externalLinkStatus) {
         this.toLink(item.externalLink);
-        return
+        return;
       }
       if (item.goodsType == 6) {
         // 进入直播课
@@ -1493,4 +1491,4 @@ page {
 </style>
 <style lang="scss" scoped>
 @import "./index.scss";
-</style>
+</style>

+ 3 - 5
pages/questionBank/index.vue

@@ -9,7 +9,7 @@
     >
       <view class="slot-wrap">
         <image
-          :src="logo"
+          :src="$method.splitImgHost(config.h5Logo)"
           style="width: 178rpx; height: 31rpx; margin-left: 30rpx"
         ></image>
       </view>
@@ -140,11 +140,9 @@
 
 <script>
 import { mapGetters } from "vuex";
-import config from "@/common/config";
 export default {
   data() {
     return {
-      logo: config.TOP_LOGO,
       allLoading: false, // 加载样式
       questionLists: [], // 题库列表
       param: {
@@ -156,7 +154,7 @@ export default {
     };
   },
   computed: {
-    ...mapGetters(["userInfo"]),
+    ...mapGetters(["userInfo", "config"]),
   },
   onLoad(options) {
     this.options = options;
@@ -298,4 +296,4 @@ page {
 </style>
 <style lang="scss" scoped>
 @import "./index.scss";
-</style>
+</style>

+ 2 - 4
pages/wd/index.vue

@@ -10,7 +10,7 @@
     >
       <view class="slot-wrap">
         <image
-          :src="logo"
+          :src="$method.splitImgHost(config.h5Logo)"
           style="width: 178rpx; height: 31rpx; margin-left: 30rpx"
         ></image>
       </view>
@@ -169,11 +169,9 @@
 <script>
 // import { websocket } from '@/common/socket.js';
 import { mapGetters } from "vuex";
-import config from "@/common/config";
 export default {
   data() {
     return {
-      logo: config.TOP_LOGO,
       list: [23, 24, 25, 26, 27, 28, 29],
       content: "此功能暂未开放",
       show: false,
@@ -261,7 +259,7 @@ export default {
       this.$navTo.togo("/pages4/login/login");
     },
   },
-  computed: { ...mapGetters(["userInfo", "hideBuyState"]) },
+  computed: { ...mapGetters(["userInfo", "hideBuyState", "config"]) },
 };
 </script>
 <style>

+ 4 - 5
pages/webview/index.vue

@@ -15,7 +15,6 @@
 
 <script>
 import { mapGetters } from "vuex";
-import config from "@/common/config";
 export default {
   components: {},
   data() {
@@ -78,12 +77,12 @@ export default {
       this.paramObj = paramObj;
       this.sectionType = this.paramObj.sectionType || 2; // 默认直播,回放的加了sectionType=3
       this.vid = this.paramObj.vid || "";
-      this.url = this.url + "&tid=" + config.tenantId;
+      this.url = this.url + "&tid=" + this.config.tenantId;
       this.studyLog(paramObj);
     }
   },
   computed: {
-    ...mapGetters(["userInfo"]),
+    ...mapGetters(["userInfo",'config']),
   },
   methods: {
     getInfo() {
@@ -124,7 +123,7 @@ export default {
             let uuid = new Date().valueOf() + "";
             // buyCourse 是否购买课程:1是 0否
             this.url =
-              config.WEBVIEW_URL +
+              this.config.hostLive +
               "pages/live/index?token=" +
               uni.getStorageSync("token") +
               "&userInfo=" +
@@ -154,7 +153,7 @@ export default {
               "&vid=" +
               this.vid +
               "&tid=" +
-              config.tenantId;
+              this.config.tenantId;
             this.studyLog(item);
           } else {
             // 没有权限

+ 2 - 3
pages3/live/detail.vue

@@ -653,7 +653,6 @@ import courseModule from "@/components/course/courseModule.vue";
 import courseChapter from "@/components/course/courseChapter.vue";
 import courseSection from "@/components/course/courseSection.vue";
 import PopupPhoto from '@/components/popup/index.vue'
-import config from '@/common/config'
 import { mapGetters, mapMutations } from "vuex";
 export default {
   components: {
@@ -794,7 +793,7 @@ export default {
     };
   },
   computed: {
-    ...mapGetters(["userInfo", "playSectionId", "playChannelId", "playVID"]),
+    ...mapGetters(["userInfo", "playSectionId", "playChannelId", "playVID",'config']),
   },
   onLoad(option) {
     console.log('--option--', option);
@@ -1143,7 +1142,7 @@ export default {
 			let sectionId = item.sectionId || item.menuId;
       let uuid = new Date().valueOf() + ""
       // buyCourse 是否购买课程:1是 0否
-			let encode = encodeURIComponent(config.WEBVIEW_URL+'pages/live/index?token='+uni.getStorageSync('token')+'&userInfo='+JSON.stringify(this.userInfo)+'&channelId='+
+			let encode = encodeURIComponent(this.config.hostLive+'pages/live/index?token='+uni.getStorageSync('token')+'&userInfo='+JSON.stringify(this.userInfo)+'&channelId='+
       item.liveUrl+'&gradeId='+this.gradeId+'&courseId='+this.courseId+'&goodsId='+this.goodsId+'&orderGoodsId='+this.orderGoodsId+'&sectionId='+sectionId+
       '&chapterId='+chapterId+'&moduleId='+moduleId+'&buyCourse=1'+'&ident='+uuid)
 			uni.navigateTo({

+ 2 - 3
pages3/polyv/detail.vue

@@ -793,7 +793,6 @@ import courseModule from "@/components/course/courseModule.vue";
 import courseChapter from "@/components/course/courseChapter.vue";
 import courseSection from "@/components/course/courseSection.vue";
 import PopupPhoto from "@/components/popup/index.vue";
-import config from "@/common/config";
 import { mapGetters, mapMutations } from "vuex";
 var polyvPlayerContext = null;
 export default {
@@ -926,7 +925,7 @@ export default {
     };
   },
   computed: {
-    ...mapGetters(["userInfo", "playSectionId", "playChannelId", "playVID"]),
+    ...mapGetters(["userInfo", "playSectionId", "playChannelId", "playVID",'config']),
   },
   watch: {
     showSet(n) {
@@ -1857,7 +1856,7 @@ export default {
       let uuid = new Date().valueOf() + "";
       // buyCourse 是否购买课程:1是 0否
       let encode = encodeURIComponent(
-        config.WEBVIEW_URL +
+        this.config.hostLive +
           "pages/live/index?token=" +
           uni.getStorageSync("token") +
           "&userInfo=" +

+ 2 - 4
pages4/shopping/shoppingCart.vue

@@ -9,7 +9,7 @@
     >
       <view class="slot-wrap">
         <image
-          :src="logo"
+          :src="$method.splitImgHost(config.smallLogo)"
           style="width: 178rpx; height: 31rpx; margin-left: 30rpx"
         ></image>
       </view>
@@ -289,11 +289,9 @@
 <script>
 import { mapGetters } from "vuex";
 import ClassTimeTip from "../../components/common/ClassTimeTip.vue";
-import config from "@/common/config";
 export default {
   data() {
     return {
-      logo: config.TOP_LOGO,
       gradeValue: -1,
       isLogin: false,
       allChecked: false,
@@ -321,7 +319,7 @@ export default {
       current: 3,
     };
   },
-  computed: { ...mapGetters(["userInfo", "hideBuyState"]) },
+  computed: { ...mapGetters(["userInfo", "hideBuyState", "config"]) },
   onLoad(option) {
     // console.log(option,987)
   },

+ 2 - 3
pages5/exam/index.vue

@@ -30,7 +30,6 @@
 </template>
 
 <script>
-import config from '@/common/config'
 import { mapGetters } from 'vuex';
 export default {
 	components: {
@@ -56,7 +55,7 @@ export default {
 		goLive() {
 			let uuid = new Date().valueOf() + ""
       		// buyCourse 是否购买课程:1是 0否
-			let encode = encodeURIComponent(config.WEBVIEW_URL+'pages/live/index?token='+uni.getStorageSync('token')+'&userInfo='+JSON.stringify(this.userInfo)+'&channelId='
+			let encode = encodeURIComponent(this.config.hostLive+'pages/live/index?token='+uni.getStorageSync('token')+'&userInfo='+JSON.stringify(this.userInfo)+'&channelId='
 			+this.livingInfo.liveUrl+'&buyCourse=1'+'&ident='+uuid)
 			uni.navigateTo({
 				url:`../../pages/webview/index?url=`+encode
@@ -113,7 +112,7 @@ export default {
 		}
 	},
 	onReachBottom() {},
-	computed: { ...mapGetters(['userInfo']) }
+	computed: { ...mapGetters(['userInfo','config']) }
 };
 </script>
 <style >

+ 2 - 3
pages5/examList/index.vue

@@ -240,7 +240,6 @@
 
 <script>
 import { mapGetters } from "vuex";
-import config from "@/common/config";
 export default {
   data() {
     return {
@@ -274,7 +273,7 @@ export default {
     };
   },
   computed: {
-    ...mapGetters(["userInfo"]),
+    ...mapGetters(["userInfo",'config']),
   },
   onLoad(option) {
     this.param.mockStatus = option.state || 0;
@@ -445,7 +444,7 @@ export default {
       let uuid = new Date().valueOf() + "";
       // buyCourse 是否购买课程:1是 0否
       let encode = encodeURIComponent(
-        config.WEBVIEW_URL +
+        this.config.hostLive +
           "pages/live/index?token=" +
           uni.getStorageSync("token") +
           "&userInfo=" +

+ 4 - 3
pages5/examReport/index.vue

@@ -284,7 +284,6 @@
 
 <script>
 import { mapGetters, mapActions } from "vuex";
-import config from '@/common/config'
 export default {
   data() {
     return {
@@ -308,7 +307,9 @@ export default {
     };
   },
 
-  computed: { ...mapGetters(["userInfo", "sysTime", "hideBuyState"]) },
+  computed: {
+    ...mapGetters(["userInfo", "sysTime", "hideBuyState", "config"]),
+  },
 
   onPullDownRefresh() {
     this.pageNum = 1;
@@ -538,7 +539,7 @@ export default {
       let uuid = new Date().valueOf() + "";
       // buyCourse 是否购买课程:1是 0否
       let encode = encodeURIComponent(
-        config.WEBVIEW_URL +
+        this.config.hostLive +
           "pages/live/index?token=" +
           uni.getStorageSync("token") +
           "&userInfo=" +

+ 2 - 3
pages5/liveDetail/list.vue

@@ -34,7 +34,6 @@
 </template>
 
 <script>
-import config from '@/common/config'
 import { mapGetters } from 'vuex';
 export default {
 	data() {
@@ -49,7 +48,7 @@ export default {
 		};
 	},
 	onUnload() {},
-	computed: { ...mapGetters(['userInfo']) },
+	computed: { ...mapGetters(['userInfo','config']) },
 	onLoad(option) {
 		this.goodsListGoodsUserLive()
 		this.goodsLivingSectionList();
@@ -121,7 +120,7 @@ export default {
 			let sectionId = item.sectionId || item.menuId;
 			let uuid = new Date().valueOf() + ""
       		// buyCourse 是否购买课程:1是 0否
-			let encode = encodeURIComponent(config.WEBVIEW_URL+'pages/live/index?token='+uni.getStorageSync('token')+'&userInfo='+JSON.stringify(this.userInfo)+'&channelId='
+			let encode = encodeURIComponent(this.config.hostLive+'pages/live/index?token='+uni.getStorageSync('token')+'&userInfo='+JSON.stringify(this.userInfo)+'&channelId='
 			+item.liveUrl+'&gradeId='+0+'&courseId='+this.courseId+'&goodsId='+this.goodsId+'&orderGoodsId='+this.orderGoodsId+'&sectionId='+sectionId+'&chapterId='
 			+chapterId+'&moduleId='+moduleId+'&buyCourse=1'+'&ident='+uuid)
 			uni.navigateTo({

+ 2 - 3
pages5/liveList/index.vue

@@ -86,7 +86,6 @@
 </template>
 
 <script>
-import config from '@/common/config'
 import { mapGetters } from 'vuex';
 export default {
 	data() {
@@ -117,7 +116,7 @@ export default {
 			endDate:'',
 		};
 	},
-	computed: { ...mapGetters(['userInfo']) },
+	computed: { ...mapGetters(['userInfo','config']) },
 	onLoad(option) {
 		this.endDate = this.$method.timestampToTime(new Date().getTime() / 1000).replace(/-/g,'/');
 		
@@ -163,7 +162,7 @@ export default {
 			if(item.liveStatus == 0) { //直播中
 				let uuid = new Date().valueOf() + ""
 				// buyCourse 是否购买课程:1是 0否
-				let encode = encodeURIComponent(config.WEBVIEW_URL+'pages/live/index?token='+uni.getStorageSync('token')+'&userInfo='+JSON.stringify(this.userInfo)+
+				let encode = encodeURIComponent(this.config.hostLive+'pages/live/index?token='+uni.getStorageSync('token')+'&userInfo='+JSON.stringify(this.userInfo)+
 				'&channelId='+item.liveUrl+'&buyCourse=1'+'&ident='+uuid)
 				uni.navigateTo({
 					url:`../../pages/webview/index?url=`+encode

+ 241 - 208
store/index.js

@@ -1,212 +1,245 @@
-import Vue from 'vue'
-import Vuex from 'vuex'
-import api from '@/common/api.js'
-import method from '@/common/methodTool'
+import Vue from "vue";
+import Vuex from "vuex";
+import api from "@/common/api.js";
+import method from "@/common/methodTool";
+import ipconfig from "../common/config";
 Vue.use(Vuex);
 const store = new Vuex.Store({
-	state: {
-		hideBuyState: false, //是否隐藏购买流程和订单列表
-		login: true,
-		token: '',
-		avatarUrl: '',
-		userName: '',
-		playNextId: '', //正在播放的节id
-		userInfo: null,
-		dictObj: null,
-		chapterOpen: true,
-		allowLoading: true,
-		goodsAuditionConfigIdList: [], //当前访问页面的试听节ID
-		shoppingCartList: [], //购物车支付商品
-		applyData: {}, //预约考试数据存放
-		backPageApplyData: {}, //预约考试返回页面的数据存放
-		playSectionId: 0, //正在播放的录播节ID
-		copyData: null, //存放审核资料数据
-		playChannelId: 0, //正在播放的直播频道号
-		playVID: 0, //正在播放的保利威视频ID
-		liveLast: null,
-		tabNums: 0, // '我的'右上角的数字
-		sysTime: 0, //系统时间
-		scene: 0, //进入小程序的场景值
-		sac: ''
-	},
-	getters: {
-		sysTime: state => {
-			return state.sysTime
-		},
-		userInfo: state => {
-			// if (state.userInfo == null) {
-			// 	if (uni.getStorageSync('user_account')) {
-			// 		getUserInfo(state)
-			// 	}
-			// }
-			return state.userInfo
-		},
-		dictObj: state => {
-			if (state.dictObj == null) {
-				api.dictList().then(res => {
-					if (res.data.code === 200) {
-						let newList = {}
-						let list = res.data.data
-						for (let i = 0; i < list.length; i++) {
-							let item = list[i]
-							if (newList.hasOwnProperty(item.dictType)) {
-								newList[item.dictType].push(item.dictLabel)
-							} else {
-								newList[item.dictType] = [item.dictLabel]
-							}
-						}
-						state.dictObj = newList;
-					}
-				});
-			}
-			return state.dictObj
-		},
-		allowLoading: state => {
-			return state.allowLoading
-		},
-		playNextId: state => {
-			return state.playNextId
-		},
-		chapterOpen: state => {
-			return state.chapterOpen
-		},
-		goodsAuditionConfigIdList: state => {
-			return state.goodsAuditionConfigIdList
-		},
-		hideBuyState: state => {
-			return state.hideBuyState
-		},
-		shoppingCartList: state => {
-			return state.shoppingCartList
-		},
-		getApplyData: state => {
-			return state.applyData
-		},
-		getBackPageApplyData: state => {
-			return state.backPageApplyData
-		},
-		playSectionId: state => {
-			return state.playSectionId
-		},
-		getCopyData: state => state.copyData,
-		playChannelId: state => state.playChannelId,
-		playVID: state => state.playVID,
-		liveLast: state => state.liveLast,
-		sac: state => state.sac
-	},
-	mutations: {
-		commonSystemTime(state, time) {
-			state.sysTime = time;
-		},
-		tabNum(state, nums) {
-			// state.tabLists[4].count = nums
-			// if (nums) {
-			// 	uni.setTabBarBadge({
-			// 		index: 4,
-			// 		text: nums + ''
-			// 	})
-			// } else {
-			// 	uni.removeTabBarBadge({
-			// 		index: 4
-			// 	})
-			// }
-		},
-		updateLiveLast(state, liveLast) {
-			state.liveLast = liveLast
-		},
-		updateAllowLoading(state, isShowloading) {
-			state.allowLoading = isShowloading
-		},
-		updatePlayNextId(state, str) {
-			console.log(str, 'str')
-			state.playNextId = str
-		},
-		updateChapterOpen(state, boolean) {
-			state.chapterOpen = boolean
-		},
-		updataCopyData(state, objs) {
-			state.copyData = objs
-		},
-		updateApplyData(state, arrays) {
-			state.applyData = arrays;
-		},
-		updateBackApplyData(state, arrays) {
-			state.backPageApplyData = arrays;
-		},
-		updateUserInfo(state, provider) {
-			state.userInfo = provider.userInfo;
-		},
-		setGoodsAuditionConfigIdList(state, provider) {
-			state.goodsAuditionConfigIdList = provider.goodsAuditionConfigIdList;
-		},
-		setShoppingCartList(state, provider) {
-			state.shoppingCartList = provider.shoppingCartList;
-		},
-		setPlaySectionId(state, provider) {
-			state.playSectionId = provider.playSectionId;
-		},
-		setPlayChannelId(state, provider) {
-			state.playChannelId = provider.playChannelId;
-		},
-		setPlayVID(state, provider) {
-			state.playVID = provider.playVID;
-		},
-		setScene(state, scene) {
-			state.scene = scene
-		},
-		setSac(state, sac) {
-			state.sac = sac
-		},
-	},
-	actions: {
-		/**
-		 * 设置系统时间
-		 */
-		setSystemTime({
-			commit
-		}) {
-			return new Promise(resolve => {
-				api.commonSystemTime().then(res => {
-					if (res.data.code == 200) {
-						commit('commonSystemTime', res.data.data)
-						resolve()
-					}
-				})
-			})
-		},
-		changeTabsNum({
-			commit
-		}) {
-			api.getinfoAttached().then(res => {
-				if (res.data.code === 200) {
-					const nums = res.data.data.informSum + res.data.data.orderSum + res.data.data
-						.periodSum + res.data.data.planSum + res.data.data.subscribeSum
-					commit('tabNum', nums)
-				}
-			})
-		},
-		getUserInfo(context) {
-			return new Promise(async resolve => {
-				const resdata = await api.getInfo()
-				if (resdata.data.code == 200) {
-					context.state.userInfo = resdata.data.data;
-					method.setUuid(new Date().valueOf() + "")
-					resolve()
-				}
-			})
-		},
-		async appCommonConfig(context, data) {
-			const resdata = await api.appCommonConfig(data)
-			if (resdata.data.code == 200) {
-				context.state.hideBuyState = resdata.data.data.hide;
-			}
-		}
-	}
-})
+  state: {
+    hideBuyState: false, //是否隐藏购买流程和订单列表
+    login: true,
+    token: "",
+    avatarUrl: "",
+    userName: "",
+    playNextId: "", //正在播放的节id
+    userInfo: null,
+    dictObj: null,
+    chapterOpen: true,
+    allowLoading: true,
+    goodsAuditionConfigIdList: [], //当前访问页面的试听节ID
+    shoppingCartList: [], //购物车支付商品
+    applyData: {}, //预约考试数据存放
+    backPageApplyData: {}, //预约考试返回页面的数据存放
+    playSectionId: 0, //正在播放的录播节ID
+    copyData: null, //存放审核资料数据
+    playChannelId: 0, //正在播放的直播频道号
+    playVID: 0, //正在播放的保利威视频ID
+    liveLast: null,
+    tabNums: 0, // '我的'右上角的数字
+    sysTime: 0, //系统时间
+    scene: 0, //进入小程序的场景值
+    sac: "",
+    config: {},
+  },
+  getters: {
+    sysTime: (state) => {
+      return state.sysTime;
+    },
+    userInfo: (state) => {
+      // if (state.userInfo == null) {
+      // 	if (uni.getStorageSync('user_account')) {
+      // 		getUserInfo(state)
+      // 	}
+      // }
+      return state.userInfo;
+    },
+    dictObj: (state) => {
+      if (state.dictObj == null) {
+        api.dictList().then((res) => {
+          if (res.data.code === 200) {
+            let newList = {};
+            let list = res.data.data;
+            for (let i = 0; i < list.length; i++) {
+              let item = list[i];
+              if (newList.hasOwnProperty(item.dictType)) {
+                newList[item.dictType].push(item.dictLabel);
+              } else {
+                newList[item.dictType] = [item.dictLabel];
+              }
+            }
+            state.dictObj = newList;
+          }
+        });
+      }
+      return state.dictObj;
+    },
+    allowLoading: (state) => {
+      return state.allowLoading;
+    },
+    playNextId: (state) => {
+      return state.playNextId;
+    },
+    chapterOpen: (state) => {
+      return state.chapterOpen;
+    },
+    goodsAuditionConfigIdList: (state) => {
+      return state.goodsAuditionConfigIdList;
+    },
+    hideBuyState: (state) => {
+      return state.hideBuyState;
+    },
+    shoppingCartList: (state) => {
+      return state.shoppingCartList;
+    },
+    getApplyData: (state) => {
+      return state.applyData;
+    },
+    getBackPageApplyData: (state) => {
+      return state.backPageApplyData;
+    },
+    playSectionId: (state) => {
+      return state.playSectionId;
+    },
+    getCopyData: (state) => state.copyData,
+    playChannelId: (state) => state.playChannelId,
+    playVID: (state) => state.playVID,
+    liveLast: (state) => state.liveLast,
+    sac: (state) => state.sac,
+    config: (state) => state.config,
+  },
+  mutations: {
+    commonSystemTime(state, time) {
+      state.sysTime = time;
+    },
+    tabNum(state, nums) {
+      // state.tabLists[4].count = nums
+      // if (nums) {
+      // 	uni.setTabBarBadge({
+      // 		index: 4,
+      // 		text: nums + ''
+      // 	})
+      // } else {
+      // 	uni.removeTabBarBadge({
+      // 		index: 4
+      // 	})
+      // }
+    },
+    updateLiveLast(state, liveLast) {
+      state.liveLast = liveLast;
+    },
+    updateAllowLoading(state, isShowloading) {
+      state.allowLoading = isShowloading;
+    },
+    updatePlayNextId(state, str) {
+      console.log(str, "str");
+      state.playNextId = str;
+    },
+    updateChapterOpen(state, boolean) {
+      state.chapterOpen = boolean;
+    },
+    updataCopyData(state, objs) {
+      state.copyData = objs;
+    },
+    updateApplyData(state, arrays) {
+      state.applyData = arrays;
+    },
+    updateBackApplyData(state, arrays) {
+      state.backPageApplyData = arrays;
+    },
+    updateUserInfo(state, provider) {
+      state.userInfo = provider.userInfo;
+    },
+    setGoodsAuditionConfigIdList(state, provider) {
+      state.goodsAuditionConfigIdList = provider.goodsAuditionConfigIdList;
+    },
+    setShoppingCartList(state, provider) {
+      state.shoppingCartList = provider.shoppingCartList;
+    },
+    setPlaySectionId(state, provider) {
+      state.playSectionId = provider.playSectionId;
+    },
+    setPlayChannelId(state, provider) {
+      state.playChannelId = provider.playChannelId;
+    },
+    setPlayVID(state, provider) {
+      state.playVID = provider.playVID;
+    },
+    setScene(state, scene) {
+      state.scene = scene;
+    },
+    setSac(state, sac) {
+      state.sac = sac;
+    },
+    setConfig(state, config) {
+      state.config = config;
+    },
+  
+  },
+  actions: {
+    /**
+     * 设置系统时间
+     */
+    setSystemTime({ commit }) {
+      return new Promise((resolve) => {
+        api.commonSystemTime().then((res) => {
+          if (res.data.code == 200) {
+            commit("commonSystemTime", res.data.data);
+            resolve();
+          }
+        });
+      });
+    },
+    changeTabsNum({ commit }) {
+      api.getinfoAttached().then((res) => {
+        if (res.data.code === 200) {
+          const nums =
+            res.data.data.informSum +
+            res.data.data.orderSum +
+            res.data.data.periodSum +
+            res.data.data.planSum +
+            res.data.data.subscribeSum;
+          commit("tabNum", nums);
+        }
+      });
+    },
+    getUserInfo(context) {
+      return new Promise(async (resolve) => {
+        const resdata = await api.getInfo();
+        if (resdata.data.code == 200) {
+          context.state.userInfo = resdata.data.data;
+          method.setUuid(new Date().valueOf() + "");
+          resolve();
+        }
+      });
+    },
+    async appCommonConfig(context, data) {
+      const resdata = await api.appCommonConfig(data);
+      if (resdata.data.code == 200) {
+        context.state.hideBuyState = resdata.data.data.hide;
+      }
+    },
+    getConfig({ commit }) {
+      return new Promise(async (resolve) => {
+        let config = {};
+        api.mobileConfig().then((res) => {
+          let data = res.data.rows.find((e) => e.configKey == "home.mobile");
+          if (data) {
+            config = { ...config, ...JSON.parse(data.configValue) };
+          }
+          let header = res.data.rows.find((e) => e.configKey == "home.header");
+          if (header) {
+            config = {
+              ...config,
+              companyName: JSON.parse(header.configValue).companyName,
+            };
+          }
+          let foot = res.data.rows.find(
+            (e) => e.configKey == "home.footer.record"
+          );
+          if (foot) {
+            config = { ...config, ...JSON.parse(foot.configValue) };
+          }
+          commit("setConfig", config);
+          resolve(config);
+        });
+      });
+    },
+  },
+});
 async function getUserInfo(state) {
-	const resdata = await api.getInfo()
-	if (resdata.data.code == 200) {
-		state.userInfo = resdata.data.data;
-	}
+  const resdata = await api.getInfo();
+  if (resdata.data.code == 200) {
+    state.userInfo = resdata.data.data;
+  }
 }
-export default store
+export default store;