Commit ee3fee99 authored by IvyXia123's avatar IvyXia123

时间推送

parent 0b882060
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
</div> </div>
<!-- 支付方式选择 --> <!-- 支付方式选择 -->
<!--<div class="pay-list"> <div class="pay-list">
<div class="pay-choice">支付方式选择</div> <div class="pay-choice">支付方式选择</div>
<ul class="pay"> <ul class="pay">
<li v-for="item in payList" :key="item.value" @click="payListClick(item.value)"> <li v-for="item in payList" :key="item.value" @click="payListClick(item.value)">
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
</div> </div>
</li> </li>
</ul> </ul>
</div>--> </div>
<footer> <footer>
<div class="sub-block"> <div class="sub-block">
...@@ -249,11 +249,13 @@ export default { ...@@ -249,11 +249,13 @@ export default {
copy(e) { copy(e) {
if(this.payIndex === 1) { if(this.payIndex === 1) {
Toast("支付宝支付获取成功,请把粘贴到支付宝里"); Toast("支付宝支付获取成功,请把粘贴到支付宝里");
}else if(this.payIndex === 2) {
Toast("信用卡支付获取成功");
} }
}, },
onError() { onError() {
if(this.payIndex === 1) { if(this.payIndex === 1) {
Toast("支付宝支付获取成功,请把粘贴到支付宝里"); Toast("信用卡支付获取成功");
} }
}, },
// 支付方式 // 支付方式
...@@ -376,7 +378,7 @@ export default { ...@@ -376,7 +378,7 @@ export default {
} }
this.orderFlag = false; this.orderFlag = false;
/* let payTypeArr = ['WX', 'ALI', '卡分期'] let payTypeArr = ['WX', 'ALI', 'KFQ']
let data = { pay_type: payTypeArr[this.payIndex], return_url: window.location.href, goods_id: json.goods_id, buy_type: this.groupDetail.goods_type, group_order_id: json.group_order_id, order_coupon_id:json.order_coupon_id } let data = { pay_type: payTypeArr[this.payIndex], return_url: window.location.href, goods_id: json.goods_id, buy_type: this.groupDetail.goods_type, group_order_id: json.group_order_id, order_coupon_id:json.order_coupon_id }
postPayBillApi(data).then(res => { postPayBillApi(data).then(res => {
if(this.payIndex === 0) { if(this.payIndex === 0) {
...@@ -423,9 +425,8 @@ export default { ...@@ -423,9 +425,8 @@ export default {
this.payUrl = res.pay_url; this.payUrl = res.pay_url;
} }
}) })
return false*/
payApi(json).then(res => { /*payApi(json).then(res => {
this.orderNo = res.out_trade_no; this.orderNo = res.out_trade_no;
if (res.out_trade_no && !res.appId) { if (res.out_trade_no && !res.appId) {
getCourseInfoApi().then(res => { getCourseInfoApi().then(res => {
...@@ -469,7 +470,7 @@ export default { ...@@ -469,7 +470,7 @@ export default {
.catch(res => { .catch(res => {
// alert(res) // alert(res)
this.orderFlag = true; this.orderFlag = true;
}); });*/
} }
}, },
closeAdd(data) { closeAdd(data) {
......
...@@ -911,7 +911,6 @@ video { ...@@ -911,7 +911,6 @@ video {
top: 70vw; top: 70vw;
z-index: 6; z-index: 6;
right: 10 * 100 /375vw; right: 10 * 100 /375vw;
/*border-radius: 100px;*/
} }
.banner { .banner {
background: white; background: white;
......
<template> <template>
<div> <div>
<div class="model-n">
<div class="model-n-image">
<img :src="yinyin" alt="">
</div>
</div>
<van-actionsheet <van-actionsheet
v-model="actionsheetShow" v-model="actionsheetShow"
:actions="actions" :actions="actions"
@select="onSelect" @select="onSelect"
/> />
<div class="unit-block"> <div class="unit-block">
<div class="course_title" @click="actionsheetShow=true">{{secActions.name}} <i class="iconfont icon-below-s"></i></div> <div class="course_title" @click="actionsheetShow=true">{{secActions.name}} <i class="iconfont icon-below-s"></i>
<router-link v-show="promp" :to="{path: '/promptTime', query: { periods_id: secActions.id }}">
<div class="zhongbian-kuang">
<img class="zhongbian" :src="zhong" alt="">
</div>
</router-link>
</div>
<!--竖屏 主题栏--> <!--竖屏 主题栏-->
<swiper :options="swiperOption" class="banner" v-if="shopType==0&&unitList.length>0" ref="mySwiper"> <swiper :options="swiperOption" class="banner" v-if="shopType==0&&unitList.length>0" ref="mySwiper">
<swiper-slide v-for="(data,index) in unitList" :key="index"> <swiper-slide v-for="(data,index) in unitList" :key="index">
...@@ -184,7 +195,7 @@ ...@@ -184,7 +195,7 @@
</template> </template>
<script> <script>
import {getCourseListApi,getLessonDetailApi,getLessonListApi,getCourseInfoApi} from "../../service/api"; import {getCourseListApi,getLessonDetailApi,getLessonListApi,getCourseInfoApi, getNotifyApi} from "../../service/api";
import star_act from '../../assets/newLesson/star_act.png' import star_act from '../../assets/newLesson/star_act.png'
import star_def from '../../assets/newLesson/star_def.png' import star_def from '../../assets/newLesson/star_def.png'
import diaBGI from '../../assets/newLesson/diaBG.png' import diaBGI from '../../assets/newLesson/diaBG.png'
...@@ -197,6 +208,7 @@ ...@@ -197,6 +208,7 @@
import nextUnitUrl from '../../assets/newLesson/nextUnit.png' import nextUnitUrl from '../../assets/newLesson/nextUnit.png'
import btn_kechegn from '../../assets/btn_kechegn.png' import btn_kechegn from '../../assets/btn_kechegn.png'
import zhong from '../../assets/evaluate/timer.png' import zhong from '../../assets/evaluate/timer.png'
import yinyin from '../../assets/evaluate/yinyin.png'
export default { export default {
name: "mapDefault", name: "mapDefault",
...@@ -209,7 +221,9 @@ ...@@ -209,7 +221,9 @@
data() { data() {
let that = this; let that = this;
return { return {
promp: false,
zhong: zhong, zhong: zhong,
yinyin: yinyin,
actions: [ actions: [
], ],
secActions:{}, secActions:{},
...@@ -316,6 +330,15 @@ ...@@ -316,6 +330,15 @@
return arr return arr
}, },
}, },
mounted() {
getNotifyApi(this.$route.query.periods_id).then(res => {
if(res.time) {
this.promp = false
}else {
this.promp = true
}
})
},
methods:{ methods:{
// 页面初始化 // 页面初始化
initPage(){ initPage(){
...@@ -756,6 +779,24 @@ ...@@ -756,6 +779,24 @@
<style scoped lang="less"> <style scoped lang="less">
@import "../../util/public"; @import "../../util/public";
// 精灵图 // 精灵图
.model-n {
width: 100%;
height: 100%;
background: rgba(0,0,0,.5);
position: fixed;
left: 0;
top: 0;
z-index: 5000;
display: none;
.model-n-image {
width: 100%;
img{
width: 90%;
margin-left: 7%;
margin-top: 9 * @toVw;
}
}
}
#app{background: white;} #app{background: white;}
.child-view{background: white;} .child-view{background: white;}
.map{background:url('https://static-cdn.changchangenglish.com/new-sing/static/images/map.png') no-repeat;background-size:136*@toVw 207*@toVw} .map{background:url('https://static-cdn.changchangenglish.com/new-sing/static/images/map.png') no-repeat;background-size:136*@toVw 207*@toVw}
...@@ -859,7 +900,7 @@ ...@@ -859,7 +900,7 @@
top: 0; top: 0;
left: 0; left: 0;
.course_title{ .course_title{
font-size: 20px;padding: 10*@toVw 20*@toVw; border-bottom: 1px solid #eeeeee; font-size: 20px;padding: 10*@toVw 20*@toVw;border-bottom: 1px solid #eeeeee;
position: relative; position: relative;
.zhongbian-kuang { .zhongbian-kuang {
width: 70 * @toVw; width: 70 * @toVw;
...@@ -870,8 +911,8 @@ ...@@ -870,8 +911,8 @@
.zhongbian { .zhongbian {
width: 22 * @toVw; width: 22 * @toVw;
height: 22 * @toVw; height: 22 * @toVw;
margin-top: 24 * @toVw; margin-top: 15 * @toVw;
margin-left: 34 * @toVh;
} }
} }
} }
......
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
}, },
preservationClick() { preservationClick() {
if(this.currentTime) { if(this.currentTime) {
let pushAtData = { time: this.currentTime } let pushAtData = { time: this.currentTime, periods_id: this.$route.query.periods_id }
postNotifySettingApi(pushAtData).then(res => { postNotifySettingApi(pushAtData).then(res => {
Toast("时间设定完成"); Toast("时间设定完成");
this.$router.go(-1); this.$router.go(-1);
......
...@@ -36,6 +36,7 @@ export default { ...@@ -36,6 +36,7 @@ export default {
mounted() { mounted() {
// debugger // debugger
let userCourse2 = JSON.parse(localStorage.getItem("userCourse")); let userCourse2 = JSON.parse(localStorage.getItem("userCourse"));
console.log(userCourse2)
this.ownDetail = JSON.parse(localStorage.getItem("userDesc")); this.ownDetail = JSON.parse(localStorage.getItem("userDesc"));
if(userCourse2){ if(userCourse2){
this.userCourse2 = userCourse2 this.userCourse2 = userCourse2
...@@ -57,7 +58,8 @@ export default { ...@@ -57,7 +58,8 @@ export default {
this.$router.push({ this.$router.push({
name: "map", name: "map",
query: { query: {
course_type: this.userCourse2.start_periods_course_type course_type: this.userCourse2.start_periods_course_type,
periods_id: this.userCourse2.start_periods_id
} }
}); });
}else{ }else{
...@@ -74,7 +76,7 @@ export default { ...@@ -74,7 +76,7 @@ export default {
name: "hasaccount" name: "hasaccount"
}); });
} }
// this.$router.push({ // this.$router.push({
// name: "secMap", // name: "secMap",
// query: { // query: {
......
...@@ -620,8 +620,9 @@ router.beforeEach((to, from, next) => { ...@@ -620,8 +620,9 @@ router.beforeEach((to, from, next) => {
} }
// extensionV1Shop // extensionV1Shop
// extensionV1 // extensionV1
if (to.name === 'extensionV1' || to.name === 'extensionV1Shop' || to.name === 'author' || to.name === 'bindMobile' || to.name === 'noWechat' || to.name === 'inspectorActivit' || to.name === 'passShop'|| to.name === 'ybIndex' ) { if (to.name === 'author' || to.name === 'bindMobile' || to.name === 'noWechat' || to.name === 'inspectorActivit' || to.name === 'passShop'|| to.name === 'ybIndex' ) {
// 无需登录的页面 // 无需登录的页面
console.log(488)
next() next()
} else if (window.location.href.indexOf('token') > -1 && to.name === 'index') { } else if (window.location.href.indexOf('token') > -1 && to.name === 'index') {
let token = common.getUrlParam().token || to.query.token; let token = common.getUrlParam().token || to.query.token;
......
...@@ -396,3 +396,8 @@ export const postPayBillApi = function (json) { ...@@ -396,3 +396,8 @@ export const postPayBillApi = function (json) {
return Vue.prototype.$post(`/api/client/bill/create`, json) return Vue.prototype.$post(`/api/client/bill/create`, json)
}; };
// 获取课程推送设置
const getNotifyUrl = `${_baseUrl}api/client/user/notify/`
export const getNotifyApi = function (periods_id) {
return Vue.prototype.$fetch(`${getNotifyUrl}${periods_id}`)
};
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