92

parent 24800ee8
......@@ -60,8 +60,8 @@
</div>
</div>
<div class="triangle">
<span v-if="bannerData.start_periods_id>0">已开课</span>
<span v-if="bannerData.start_periods_id==0">待开课</span>
<span v-if="userCourse.periods_list[0].is_start_course>0">已开课</span>
<span v-if="!userCourse.periods_list[0].is_start_course">待开课</span>
</div>
<img class="bgimg canvas" v-if="canvasData" :src="canvasData" alt />
</div>
......@@ -83,13 +83,13 @@
<div
class="triangle"
style="background:transparent;"
v-if="userCourse.start_periods_id">
v-if="userCourse.periods_list[0].is_start_course">
<span>已开课</span>
</div>
<div
class="triangle"
style="background:transparent;"
v-if="!userCourse.start_periods_id">
v-if="!userCourse.periods_list[0].is_start_course">
<span>待开课</span>
</div>
</div>
......@@ -403,13 +403,9 @@
<script>
import {
bannerListApi,
getUserLessonApi,
getTeacherApi,
getCourseInfoApi,
getOrderListApi,
getCouponListApi,
getAutomationCouponApi,
getUserDetailApi
} from "../service/api";
import { IndexImage } from "../util/imgUrl";
import localStorageFn from "../util/localStorage";
......@@ -484,9 +480,10 @@ export default {
});
},
mounted() {
// window.scrollTo(0,0);
let that = this;
//课前预习点击提示
this.unlook = localStorage.getItem("unlook");
//处理横屏banner二维码渲染
if (document.body.clientWidth > 700) {
that.orientationchange = true;
}
......@@ -608,14 +605,12 @@ export default {
}
}
this.$sa.track("viewHomepage", {});
// debugger
this.getBannerListApi();
let course = res;
// 无老师带用户
if (!res.periods_list) {
// 优惠券
getCouponListApi(course.goods_id).then(res => {
// debugger
if (res.length) {
this.couponInfo = res[0];
this.$sa.track("view61index", {});
......@@ -626,7 +621,6 @@ export default {
}
}
if (this.$store.state.couponShadow) {
// debugger
this.couponShadow = true;
this.$sa.track("view61tipshadow", {});
this.$store.dispatch("setCouponShadow", false);
......@@ -647,7 +641,6 @@ export default {
if (
Date.parse(new Date()) > Date.parse(new Date("2019/6/4 00:00:00"))
) {
// debugger
this.liuyuActivity = false;
localStorageFn.set("liuyi", 1);
}
......@@ -659,7 +652,6 @@ export default {
this.$refs.bottomTab.setBtn();
} else {
if (res.start_periods_id != undefined && res.start_periods_id > 0) {
// debugger
// 已开课
if (res.teacher_qr) {
this.bannerData.qr = res.teacher_qr;
......@@ -670,7 +662,6 @@ export default {
this.bannerData.is_start_active = res.is_start_active;
this.bannerData.start_periods_id = res.start_periods_id;
this.$refs.bottomTab.setBtn();
// debugger
let ownDetail = JSON.parse(localStorage.getItem("userDesc"));
if (ownDetail.family_user != 1) {
if (
......@@ -678,7 +669,6 @@ export default {
this.bannerData.start_periods_id
) {
sessionStorage.setItem("frist", true);
// debugger
this.$router.push({
name: "map",
query: {
......@@ -746,7 +736,6 @@ export default {
this.$refs.bottomTab.setBtn();
} else if (res.automation_id.length) {
// 自化课
// debugger
this.bannerData = res;
let ownDetail = JSON.parse(localStorage.getItem("userDesc"));
if (ownDetail.family_user != 1) {
......@@ -770,10 +759,8 @@ export default {
if (!sessionStorage.getItem("orderShadow")) {
this.pt = true;
}
if (
new Date(el.group_info.deadline.replace(/-/g, "/")).getTime() >=
new Date().getTime()
) {
if(el.group_info){
if (new Date(el.group_info.deadline.replace(/-/g, "/")).getTime() >=new Date().getTime()) {
el.goods_desc = JSON.parse(el.goods_desc);
arr.push(el);
let Interval = setInterval(function() {
......@@ -784,6 +771,7 @@ export default {
}, 1000);
}
}
}
});
this.orderList = arr;
});
......
<template>
<div>
<div class="no-result" v-if="!list.length">
<div class="content">
<img src="~@/assets/logistics.png">
......
......@@ -13,6 +13,7 @@ import scroll from "./base/scroll/scroll"
import { Popup, Lazyload, Button, Dialog, Toast } from 'vant';
Vue.config.productionTip = false;
//神策埋点
Vue.prototype.$sa = sa;
Vue.prototype.$sa.init({
server_url: 'http://47.107.250.38:8106/sa?project=' + (process.env.NODE_ENV === 'production' ? "production" : "default"), // 替换成自己的神策地址
......@@ -26,21 +27,19 @@ Vue.prototype.$sa.init({
is_track_single_page: true
});
Vue.prototype.$sa.quick('autoTrack')
//神策埋点
Vue.use(VueClipboard);
Vue.use(Popup).use(Lazyload).use(Button).use(Dialog).use(Toast);
Vue.component('scroll', scroll);
/* eslint-disable no-new */
// Vue.prototype.testAttr = 'testAttr'
// if (process.env.NODE_ENV == 'production') {
const errorHandler = (error, vm)=>{
// 全局错误日志
const errorHandler = (error, vm)=>{
Vue.prototype.$post(`api/client/report/errors/log`,{'routes_url':vm.$route.name,'result_text':error.toString()})
}
Vue.config.errorHandler = errorHandler;
Vue.prototype.$throw = (error)=> errorHandler(error,this);
// }
}
Vue.config.errorHandler = errorHandler;
Vue.prototype.$throw = (error)=> errorHandler(error,this);
Vue.prototype.$common = common
//VConsole关闭屏蔽代码
if (process.env.NODE_ENV != 'production') {
new VConsole();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment