Commit 08059838 authored by xiabin's avatar xiabin

修改vue文件

parent 35217efb
<script>
import Vue from 'vue';
export default new Vue();
</script>
<template>
<div class="container v-list mx900" v-show="lists.length > 0">
<div class="row">
<div v-for="(index,item) in lists" class="col-md-4">
<div v-for="(item,index) in lists" class="col-md-4">
<div class="v-main-box">
<div class="v-screen">
<a @click="itemClick(item.id)" href="javascript:;">
......@@ -111,11 +111,13 @@
classId: {
required: true
}
}
,
ready()
},
mounted()
{
this.getLists(this.classId, this.page, this.num);
var self = this;
this.nextTick(function(){
self.getLists(self.classId, self.page, self.num);
});
}
}
</script>
......@@ -67,9 +67,12 @@
}
},
components: {},
ready()
mounted()
{
this.getLists(this.classId);
var self = this;
this.$nextTick(function () {
self.getLists(this.classId);
});
}
}
</script>
......@@ -3,8 +3,7 @@
<div class="container">
<div class="video-description">
<div class="title">课程介绍</div>
<div class="text">
{{{coursewareInfo.intro}}}
<div v-html="coursewareInfo.intro" class="text">
</div>
</div>
......@@ -147,8 +146,11 @@
});
}
},
ready(){
this.getCommentlists(this.coursewareInfo.id, this.page, this.num);
mounted(){
var self = this;
this.$nextTick(function () {
self.getCommentlists(self.coursewareInfo.id, self.page, self.num);
});
}
}
</script>
<template xmlns:v-el="http://www.w3.org/1999/xhtml">
<template xmlns:ref="http://www.w3.org/1999/xhtml">
<div class="container">
<div class="cnt-tit">
<h3>{{coursewareInfo.courseName}}</h3>
......@@ -23,8 +23,8 @@
</div>
</div>
<div :class="{'video-detail-info':true,'video-detail-phone':coursewareInfo.teachers.length == 0}">
<div v-for="(index,item) in coursewareInfo.teachers" class="video-teacher">
<a data-toggle="modal" data-target="{{{'#teacherInfo'+index}}}"><img
<div v-for="(item,index) in coursewareInfo.teachers" class="video-teacher">
<a data-toggle="modal" :data-target="'#teacherInfo'+index"><img
:src="item.avatar"></a>
<p><a href="javascript:;" data-toggle="modal" data-target="#myModal2">{{item.name}}</a></p>
</div>
......@@ -108,14 +108,14 @@
<div class="top-back-a">
<a href="javascript:;" @click="showQrcode = false"><i class="icon-navigate_before"></i>返回支付渠道选择</a>
</div>
<div v-el:weixin-qrcode class="qrcode-img">
<div ref:weixinQrcode class="qrcode-img">
<span>正在加载</span>
</div>
</div>
</div>
</div>
<div v-for="(index,item) in coursewareInfo.teachers" class="modal fade" id="{{{'teacherInfo'+index}}}" tabindex="-1"
<div v-for="(index,item) in coursewareInfo.teachers" class="modal fade" :id="'teacherInfo'+index" tabindex="-1"
role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
......@@ -128,7 +128,7 @@
<div class="teacher-info text-center">
<img :src="item.avatar">
<h3>{{item.name}}</h3>
<p class="teacher-detail">{{{item.intro}}}</p>
<p class="teacher-detail" v-html="item.intro"></p>
</div>
</div>
</div>
......@@ -173,7 +173,7 @@
$.getJSON(url, function (response) {
if (response.status !== false) {
var imgUrl = __BASE_URL__ + 'home/get-qrcode?number=' + response.data.number;
$(self.$els.weixinQrcode).html('<img src="' + imgUrl + '"/> <p>请使用微信扫一扫付款</p>');
$(self.$refs.weixinQrcode).html('<img src="' + imgUrl + '"/> <p>请使用微信扫一扫付款</p>');
//添加监听
clearInterval(self.weixinCheckHandler);
self.weixinCheckHandler = setInterval(function () {
......@@ -313,21 +313,25 @@
components: {
myvideo: myvideo
},
ready(){
mounted(){
var self = this;
this.isMobile = this.coursewareInfo.isMobile;
this.isWeixin = Utils.isWeixin();
//判断是否要显示支付信息
var pay = getQueryString('pay');
if (pay == 1 && !this.coursewareInfo.isShop) {
if(this.isMobile == false && this.isWeixin == false){
$('#web-pay').trigger('click');
}else if(this.isMobile == true && this.isWeixin == false){
this.mobileAliPay(this.coursewareInfo.course_id);
}else if(this.isWeixin === true){
this.weixinJsPay(this.coursewareInfo.course_id);
this.$nextTick(function(){
self.isMobile = self.coursewareInfo.isMobile;
self.isWeixin = Utils.isWeixin();
//判断是否要显示支付信息
var pay = getQueryString('pay');
if (pay == 1 && !self.coursewareInfo.isShop) {
if(self.isMobile == false && self.isWeixin == false){
$('#web-pay').trigger('click');
}else if(self.isMobile == true && self.isWeixin == false){
self.mobileAliPay(self.coursewareInfo.course_id);
}else if(self.isWeixin === true){
self.weixinJsPay(self.coursewareInfo.course_id);
}
}
}
});
}
}
......
......@@ -51,10 +51,10 @@
},
methods: {
pay(){
this.$dispatch('pay-click');
this.$emit('payClick');
}
},
ready(){
mounted(){
if (this.videoInfo.isShop) {
this.showTips = false;
......
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