|
@@ -176,6 +176,7 @@ export default {
|
|
|
name: "直播课",
|
|
name: "直播课",
|
|
|
},
|
|
},
|
|
|
],
|
|
],
|
|
|
|
|
+<<<<<<< HEAD
|
|
|
goodsIndex: 0,
|
|
goodsIndex: 0,
|
|
|
goodsItem: 0,
|
|
goodsItem: 0,
|
|
|
workList: [],
|
|
workList: [],
|
|
@@ -585,6 +586,557 @@ export default {
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
computed: { ...mapGetters(['userInfo']) }
|
|
computed: { ...mapGetters(['userInfo']) }
|
|
|
|
|
+=======
|
|
|
|
|
+ goodsIndex: 0,
|
|
|
|
|
+ goodsItem: 0,
|
|
|
|
|
+ workList: [],
|
|
|
|
|
+ workTextList: [],
|
|
|
|
|
+ planGoodsList: [],
|
|
|
|
|
+ paramList: [
|
|
|
|
|
+ {
|
|
|
|
|
+ pageNum: 1,
|
|
|
|
|
+ pageSize: 10,
|
|
|
|
|
+ total: 0,
|
|
|
|
|
+ showStatus: 0,
|
|
|
|
|
+ goodsType: 1,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ pageNum: 1,
|
|
|
|
|
+ pageSize: 10,
|
|
|
|
|
+ total: 0,
|
|
|
|
|
+ showStatus: 0,
|
|
|
|
|
+ goodsType: 2,
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
|
|
+ list1: [],
|
|
|
|
|
+ list2: [],
|
|
|
|
|
+ isLogin: false,
|
|
|
|
|
+ isOld: false,
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
|
|
+ onPullDownRefresh() {},
|
|
|
|
|
+ async onLoad(option) {
|
|
|
|
|
+ this.dictObj;
|
|
|
|
|
+ this.getAdvertising();
|
|
|
|
|
+ if (this.$method.isLogin()) {
|
|
|
|
|
+ try {
|
|
|
|
|
+ await this.getUserInfo();
|
|
|
|
|
+ // websocket.sokcet(socket_url+this.userInfo.userId+'-'+this.$method.getRandomString(6))
|
|
|
|
|
+ // websocket.sokcet(socket_url+this.userInfo.userAccount)
|
|
|
|
|
+ } catch (err) {}
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if (uni.getStorageSync("needToLogin")) {
|
|
|
|
|
+ uni.removeStorageSync("needToLogin");
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url: "/pages4/login/login",
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ this.init();
|
|
|
|
|
+ },
|
|
|
|
|
+ onShow() {
|
|
|
|
|
+ uni.removeStorageSync("goPath");
|
|
|
|
|
+ this.courseList();
|
|
|
|
|
+ this.bankList();
|
|
|
|
|
+ if (uni.getStorageSync("updateHome")) {
|
|
|
|
|
+ this.init();
|
|
|
|
|
+ uni.removeStorageSync("updateHome"); //消费首页刷新事件
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ this.appCommonConfig({
|
|
|
|
|
+ version,
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ if (this.$method.isLogin()) {
|
|
|
|
|
+ this.$store.state.allowLoading = false;
|
|
|
|
|
+ this.$api.getinfoAttached().then((res) => {
|
|
|
|
|
+ if (res.data.code === 200) {
|
|
|
|
|
+ this.infoNums = res.data.data.informSum;
|
|
|
|
|
+ const nums =
|
|
|
|
|
+ res.data.data.informSum +
|
|
|
|
|
+ res.data.data.orderSum +
|
|
|
|
|
+ res.data.data.periodSum +
|
|
|
|
|
+ res.data.data.planSum +
|
|
|
|
|
+ res.data.data.subscribeSum;
|
|
|
|
|
+ this.$store.commit("tabNum", nums);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ this.$store.state.allowLoading = true;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$store.commit("tabNum", 0);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ onShareAppMessage(res) {
|
|
|
|
|
+ var self = this;
|
|
|
|
|
+ return {
|
|
|
|
|
+ title: "中正",
|
|
|
|
|
+ path:
|
|
|
|
|
+ `/pages/index/index?inviteCode=` + userInfo == null
|
|
|
|
|
+ ? ""
|
|
|
|
|
+ : userInfo.userAccount,
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ ...mapActions(["getUserInfo", "appCommonConfig"]),
|
|
|
|
|
+ toFixed(number) {
|
|
|
|
|
+ if (number > 0) {
|
|
|
|
|
+ return number.toFixed(2);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return "0.00";
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @param {Object} swiper
|
|
|
|
|
+ * 点击轮播图
|
|
|
|
|
+ */
|
|
|
|
|
+ swiperClick(swiper) {
|
|
|
|
|
+ if (swiper.jumpType == 1) {
|
|
|
|
|
+ //无跳转
|
|
|
|
|
+ return;
|
|
|
|
|
+ } else if (swiper.jumpType == 2) {
|
|
|
|
|
+ //url
|
|
|
|
|
+ let url = encodeURIComponent(swiper.jumpUrl);
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url: "/pages/webview/index?url=" + swiper.jumpUrl,
|
|
|
|
|
+ });
|
|
|
|
|
+ } else if (swiper.jumpType == 3) {
|
|
|
|
|
+ //内部接口
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url: swiper.jumpUrl,
|
|
|
|
|
+ });
|
|
|
|
|
+ } else if (swiper.jumpType == 4) {
|
|
|
|
|
+ //外部接口
|
|
|
|
|
+ uni.navigateToMiniProgram({
|
|
|
|
|
+ appId: swiper.remarks,
|
|
|
|
|
+ path: swiper.jumpUrl,
|
|
|
|
|
+ extraData: {},
|
|
|
|
|
+ success(res) {
|
|
|
|
|
+ // 打开成功
|
|
|
|
|
+ },
|
|
|
|
|
+ fail(err) {
|
|
|
|
|
+ console.log(err);
|
|
|
|
|
+ // uni.showToast({
|
|
|
|
|
+ // title:'无效的appId,'+err.errMsg,
|
|
|
|
|
+ // icon:'none'
|
|
|
|
|
+ // })
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ /**
|
|
|
|
|
+ * banner图片加载完成
|
|
|
|
|
+ */
|
|
|
|
|
+ imageLoad(e) {
|
|
|
|
|
+ let winW = 750;
|
|
|
|
|
+ let imgW = e.detail.width;
|
|
|
|
|
+ let imgH = e.detail.height;
|
|
|
|
|
+ this.swiperHeight = (750 * imgH) / imgW;
|
|
|
|
|
+ },
|
|
|
|
|
+ async getAdvertising() {
|
|
|
|
|
+ await this.advertisingHomeLocation();
|
|
|
|
|
+ await this.advertisingList();
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ getUserSubscribeRecentExam() {
|
|
|
|
|
+ return new Promise((resolve) => {
|
|
|
|
|
+ this.$api.getUserSubscribeRecentExam().then((res) => {
|
|
|
|
|
+ if (res.data.code == 200) {
|
|
|
|
|
+ if (res.data.data) {
|
|
|
|
|
+ let day = this.$method
|
|
|
|
|
+ .timestampToTime(res.data.data.applySiteExamTime, true)
|
|
|
|
|
+ .replace(/-/g, "/");
|
|
|
|
|
+ let dayTime = day + " " + res.data.data.applySiteStartTime;
|
|
|
|
|
+ let NowTime = new Date(); //考试时间
|
|
|
|
|
+ let examTime = new Date(dayTime); //考试时间
|
|
|
|
|
+ let t =
|
|
|
|
|
+ examTime.getTime() / 1000 -
|
|
|
|
|
+ (NowTime.getTime() / 1000).toFixed(0);
|
|
|
|
|
+ if (t > 0) {
|
|
|
|
|
+ let day = +this.$method.GetRTime(
|
|
|
|
|
+ examTime.getTime() / 1000,
|
|
|
|
|
+ true
|
|
|
|
|
+ );
|
|
|
|
|
+ this.nearByDay = day;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ resolve();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ console.log(res);
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ advertisingHomeLocation() {
|
|
|
|
|
+ return new Promise((resolve) => {
|
|
|
|
|
+ this.$api.advertisingHomeLocation().then((res) => {
|
|
|
|
|
+ this.interval = res.data.data.intervalTime * 1000;
|
|
|
|
|
+ resolve();
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ advertisingList() {
|
|
|
|
|
+ return new Promise((resolve) => {
|
|
|
|
|
+ this.$api.advertisingList({ locationId: 1 }).then((res) => {
|
|
|
|
|
+ this.list = res.data.rows;
|
|
|
|
|
+ resolve();
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ jumpPage() {
|
|
|
|
|
+ this.$navTo.togo("/pages4/msg/index");
|
|
|
|
|
+ },
|
|
|
|
|
+ go(type) {
|
|
|
|
|
+ if (!this.$method.isLogin()) {
|
|
|
|
|
+ if (type == "course") {
|
|
|
|
|
+ uni.setStorageSync("goPath", "course");
|
|
|
|
|
+ } else if (type == "bank") {
|
|
|
|
|
+ uni.setStorageSync("goPath", "bank");
|
|
|
|
|
+ }
|
|
|
|
|
+ this.$navTo.togo("/pages4/login/login");
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if (type == "course") {
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url: "/pages2/wd/class",
|
|
|
|
|
+ });
|
|
|
|
|
+ } else if (type == "bank") {
|
|
|
|
|
+ this.$api
|
|
|
|
|
+ .lockLockStatus({
|
|
|
|
|
+ action: "bank",
|
|
|
|
|
+ })
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ if (res.data.code == 200) {
|
|
|
|
|
+ //有其他端在操作,不能学习
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ icon: "none",
|
|
|
|
|
+ title: res.data.msg,
|
|
|
|
|
+ duration: 3000,
|
|
|
|
|
+ });
|
|
|
|
|
+ } else if (res.data.code == 500) {
|
|
|
|
|
+ //可以学习
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url: "/pages2/wd/question_bank",
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ //课程
|
|
|
|
|
+ courseList() {
|
|
|
|
|
+ var self = this;
|
|
|
|
|
+ var param = this.paramList[0];
|
|
|
|
|
+ this.$api.goodsList(param).then((res) => {
|
|
|
|
|
+ console.log(res, "res");
|
|
|
|
|
+ self.paramList[0].total = res.data.total;
|
|
|
|
|
+ self.list1 = res.data.rows;
|
|
|
|
|
+ if (self.list1.length === res.data.total) {
|
|
|
|
|
+ self.paramList[0].showStatus = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ //题库
|
|
|
|
|
+ bankList() {
|
|
|
|
|
+ var self = this;
|
|
|
|
|
+ var param = this.paramList[1];
|
|
|
|
|
+ this.$api.goodsList(param).then((res) => {
|
|
|
|
|
+ self.paramList[1].total = res.data.total;
|
|
|
|
|
+ self.list2 = res.data.rows;
|
|
|
|
|
+ if (self.list2.length === res.data.total) {
|
|
|
|
|
+ self.paramList[1].showStatus = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @param {Object} item
|
|
|
|
|
+ * 跳转课程详情
|
|
|
|
|
+ */
|
|
|
|
|
+ async jumpGoodsDetail(item) {
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url: "/pages2/wd/class",
|
|
|
|
|
+ });
|
|
|
|
|
+ // let currentTime = this.$method.getZeroTime();
|
|
|
|
|
+
|
|
|
|
|
+ // if(currentTime < item.studyStartTime || currentTime > item.studyEndTime) {
|
|
|
|
|
+ // uni.showToast({
|
|
|
|
|
+ // title:'不在学习有效期,不可以学习了哦',
|
|
|
|
|
+ // icon:'none'
|
|
|
|
|
+ // })
|
|
|
|
|
+ // return;
|
|
|
|
|
+ // }
|
|
|
|
|
+
|
|
|
|
|
+ // if( (item.classStartTime && currentTime <= item.classStartTime) || (item.classEndTime && currentTime >= item.classEndTime) ) {
|
|
|
|
|
+ // uni.showToast({
|
|
|
|
|
+ // title:'不在班级有效期,不能进入学习',
|
|
|
|
|
+ // icon:'none'
|
|
|
|
|
+ // })
|
|
|
|
|
+ // return;
|
|
|
|
|
+ // }
|
|
|
|
|
+
|
|
|
|
|
+ // if(item.learningStatus == 2) {
|
|
|
|
|
+ // uni.showToast({
|
|
|
|
|
+ // title:'开放学习时间待定,不能进入学习',
|
|
|
|
|
+ // icon:'none'
|
|
|
|
|
+ // })
|
|
|
|
|
+ // return;
|
|
|
|
|
+ // }
|
|
|
|
|
+
|
|
|
|
|
+ // if(item.classStatus == 0 ) {
|
|
|
|
|
+ // uni.showToast({
|
|
|
|
|
+ // title:'尚未开班,不能进入学习',
|
|
|
|
|
+ // icon:'none'
|
|
|
|
|
+ // })
|
|
|
|
|
+ // return;
|
|
|
|
|
+ // }
|
|
|
|
|
+
|
|
|
|
|
+ // if(item.learningStatus == 3 && (currentTime < item.learningTimeStart) ) {
|
|
|
|
|
+ // uni.showToast({
|
|
|
|
|
+ // title:'不在开放学习时间,不能进入学习',
|
|
|
|
|
+ // icon:'none'
|
|
|
|
|
+ // })
|
|
|
|
|
+ // return;
|
|
|
|
|
+ // }
|
|
|
|
|
+
|
|
|
|
|
+ // if(item.gradeStatus == 1 && item.status == 1 && (item.studyEndTime > currentTime) && (item.classEndTime && (item.classEndTime < currentTime)) && (item.periodStatus == 0 || item.periodStatus == -1) && item.studyCount > 0) {
|
|
|
|
|
+
|
|
|
|
|
+ // uni.showModal({
|
|
|
|
|
+ // title:'提示',
|
|
|
|
|
+ // content:'班级已过期,需要重新选班',
|
|
|
|
|
+ // showCancel:false,
|
|
|
|
|
+ // success:() => {
|
|
|
|
|
+ // uni.navigateTo({
|
|
|
|
|
+ // url:"/pages2/wd/class"
|
|
|
|
|
+ // })
|
|
|
|
|
+ // }
|
|
|
|
|
+ // })
|
|
|
|
|
+ // return;
|
|
|
|
|
+ // }
|
|
|
|
|
+
|
|
|
|
|
+ // let rebuildStatus = await this.courseGoodsRebuildStatus(item.goodsId,item.gradeId);
|
|
|
|
|
+
|
|
|
|
|
+ // if(rebuildStatus == 0) {
|
|
|
|
|
+ // this.$navTo.togo('/pages2/learn/details', {
|
|
|
|
|
+ // gradeId:item.gradeId,
|
|
|
|
|
+ // goodsId: item.goodsId
|
|
|
|
|
+ // })
|
|
|
|
|
+ // return;
|
|
|
|
|
+ // }
|
|
|
|
|
+
|
|
|
|
|
+ // if(item.courseNum == 1 ) {
|
|
|
|
|
+
|
|
|
|
|
+ // this.$api.courseCourseList({
|
|
|
|
|
+ // pageNum:1,
|
|
|
|
|
+ // pageSize:1,
|
|
|
|
|
+ // goodsId:item.goodsId,
|
|
|
|
|
+ // gradeId:item.gradeId
|
|
|
|
|
+ // }).then(res => {
|
|
|
|
|
+ // if(res.data.code == 200) {
|
|
|
|
|
+ // uni.navigateTo({
|
|
|
|
|
+ // url:`/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}`
|
|
|
|
|
+ // })
|
|
|
|
|
+ // }
|
|
|
|
|
+ // });
|
|
|
|
|
+ // return;
|
|
|
|
|
+ // }
|
|
|
|
|
+
|
|
|
|
|
+ // this.$navTo.togo('/pages2/wd/course', {
|
|
|
|
|
+ // id: item.goodsId,
|
|
|
|
|
+ // gid:item.gradeId
|
|
|
|
|
+ // });
|
|
|
|
|
+ },
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @param {Object} goodsId 商品id
|
|
|
|
|
+ * 查询商品重修状态
|
|
|
|
|
+ */
|
|
|
|
|
+ courseGoodsRebuildStatus(goodsId, gradeId) {
|
|
|
|
|
+ return new Promise((resolve) => {
|
|
|
|
|
+ this.$api
|
|
|
|
|
+ .courseGoodsRebuildStatus({
|
|
|
|
|
+ goodsId: goodsId,
|
|
|
|
|
+ gradeId: gradeId,
|
|
|
|
|
+ })
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ resolve(res.data.data);
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ preveItem() {
|
|
|
|
|
+ if (this.goodsIndex > 0) {
|
|
|
|
|
+ this.goodsIndex = this.goodsIndex - 1;
|
|
|
|
|
+ this.planGoodsList = this.workList[this.goodsIndex].goodsVos;
|
|
|
|
|
+ this.goodsItem = this.planGoodsList[0];
|
|
|
|
|
+ this.dealRL(this.workList[this.goodsIndex].calendarStudyVo);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ nextItem() {
|
|
|
|
|
+ if (this.goodsIndex < this.workList.length - 1) {
|
|
|
|
|
+ this.goodsIndex = this.goodsIndex + 1;
|
|
|
|
|
+ this.planGoodsList = this.workList[this.goodsIndex].goodsVos;
|
|
|
|
|
+ this.goodsItem = this.planGoodsList[0];
|
|
|
|
|
+ this.dealRL(this.workList[this.goodsIndex].calendarStudyVo);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ jumpPlan() {
|
|
|
|
|
+ if (!this.$method.isLogin()) {
|
|
|
|
|
+ this.$navTo.togo("/pages4/login/login");
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$navTo.togo("/pages2/plan/index", {});
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ async init() {
|
|
|
|
|
+ if (!this.$method.isLogin()) {
|
|
|
|
|
+ //未登录
|
|
|
|
|
+ this.date_num = [];
|
|
|
|
|
+ this.workList = [];
|
|
|
|
|
+ this.planGoodsList = [];
|
|
|
|
|
+ this.initDay();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.date_num = [];
|
|
|
|
|
+ this.workList = [];
|
|
|
|
|
+ this.planGoodsList = [];
|
|
|
|
|
+ await this.userPlanSeven();
|
|
|
|
|
+ await this.getUserSubscribeRecentExam();
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ getMonDate() {
|
|
|
|
|
+ var d = new Date(),
|
|
|
|
|
+ day = d.getDay(),
|
|
|
|
|
+ date = d.getDate();
|
|
|
|
|
+ if (day == 0) return d;
|
|
|
|
|
+ else d.setDate(date - day);
|
|
|
|
|
+ return d;
|
|
|
|
|
+ },
|
|
|
|
|
+ initDay() {
|
|
|
|
|
+ // d是当前星期一的日期对象
|
|
|
|
|
+ var d = this.getMonDate();
|
|
|
|
|
+ var arr = [];
|
|
|
|
|
+ let date = new Date();
|
|
|
|
|
+ let num = date.getDate();
|
|
|
|
|
+ this.date_num = [];
|
|
|
|
|
+ for (var i = 0; i < 7; i++) {
|
|
|
|
|
+ let item = { date: d.getDate() };
|
|
|
|
|
+ item.color = 0;
|
|
|
|
|
+ if (d.getDate() == num) {
|
|
|
|
|
+ item.color = 3;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.date_num.push(item);
|
|
|
|
|
+ d.setDate(d.getDate() + 1);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ dealRL(calendarStudyVo) {
|
|
|
|
|
+ let self = this;
|
|
|
|
|
+ self.date_num = [];
|
|
|
|
|
+ let date = new Date();
|
|
|
|
|
+ let num = date.getDate();
|
|
|
|
|
+ let month = date.getMonth() + 1;
|
|
|
|
|
+ let list = [];
|
|
|
|
|
+ for (let j = 0; j < calendarStudyVo.length; j++) {
|
|
|
|
|
+ let item = calendarStudyVo[j];
|
|
|
|
|
+ list = item.dayStudyList;
|
|
|
|
|
+ for (let i = 0; i < list.length; i++) {
|
|
|
|
|
+ let item = list[i];
|
|
|
|
|
+ item.color = 0;
|
|
|
|
|
+ if (item.date == num) {
|
|
|
|
|
+ item.color = 3;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (item.perform == 1) {
|
|
|
|
|
+ item.color = 1;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (item.perform == 2) {
|
|
|
|
|
+ item.color = 2;
|
|
|
|
|
+ }
|
|
|
|
|
+ item.note = item.studyCourseKnob;
|
|
|
|
|
+ if (item.note > 0) {
|
|
|
|
|
+ item.dot = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ self.date_num.push(item);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ userPlanSeven() {
|
|
|
|
|
+ return new Promise((resolve) => {
|
|
|
|
|
+ let self = this;
|
|
|
|
|
+ this.$api.userPlanSeven().then((result) => {
|
|
|
|
|
+ if (result.data.data && result.data.data.length > 0) {
|
|
|
|
|
+ self.workList = result.data.data;
|
|
|
|
|
+ self.planGoodsList = self.workList[0].goodsVos;
|
|
|
|
|
+ if (self.planGoodsList != null && self.planGoodsList.length > 0) {
|
|
|
|
|
+ self.goodsItem = self.planGoodsList[0];
|
|
|
|
|
+ }
|
|
|
|
|
+ self.dealRL(result.data.data[0].calendarStudyVo);
|
|
|
|
|
+ /* let date = new Date();
|
|
|
|
|
+ let num = date.getDate();
|
|
|
|
|
+ let month = date.getMonth() + 1;
|
|
|
|
|
+ let list = [];
|
|
|
|
|
+ for (let i = 0; i < result.data.data[0].calendarStudyVo.length; i++) {
|
|
|
|
|
+ let item = result.data.data[0].calendarStudyVo[i];
|
|
|
|
|
+ if (item.month == month) {
|
|
|
|
|
+ list = item.dayStudyList;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ for (let i = 0; i < list.length; i++) {
|
|
|
|
|
+ let item = list[i];
|
|
|
|
|
+ item.color = 0;
|
|
|
|
|
+ if (item.date == num) {
|
|
|
|
|
+ item.color = 3;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (item.perform == 1) {
|
|
|
|
|
+ item.color = 1;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (item.perform == 2) {
|
|
|
|
|
+ item.color = 2;
|
|
|
|
|
+ }
|
|
|
|
|
+ item.note = item.studyCourseKnob;
|
|
|
|
|
+ if (item.note > 0) {
|
|
|
|
|
+ item.dot = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ self.date_num.push(item);
|
|
|
|
|
+ } */
|
|
|
|
|
+ } else {
|
|
|
|
|
+ self.initDay();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ resolve();
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ swiperChange(e) {
|
|
|
|
|
+ this.current = e.detail.current;
|
|
|
|
|
+ },
|
|
|
|
|
+ tab(e) {
|
|
|
|
|
+ this.tabCurrent = e;
|
|
|
|
|
+ },
|
|
|
|
|
+ updateHomePlan() {
|
|
|
|
|
+ this.$refs.home.init();
|
|
|
|
|
+ },
|
|
|
|
|
+ beforeSwitch(index) {
|
|
|
|
|
+ let that = this;
|
|
|
|
|
+ if (index == 1) {
|
|
|
|
|
+ this.isClick1 = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (index == this.current) {
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!this.$method.isLogin()) {
|
|
|
|
|
+ if (index == 0 || index == 1) {
|
|
|
|
|
+ return true;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$navTo.togo("/pages4/login/login");
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if (index == 2) {
|
|
|
|
|
+ this.$refs.refMy.init();
|
|
|
|
|
+ }
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ onReachBottom() {},
|
|
|
|
|
+ computed: { ...mapGetters(["dictObj", "userInfo"]) },
|
|
|
|
|
+>>>>>>> dev
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
|
<style>
|
|
<style>
|