提交 2ad4ee9f 编写于 作者: guofeng.chen's avatar guofeng.chen

修改授权、样式

上级 91dd647c
...@@ -88,7 +88,7 @@ export default { ...@@ -88,7 +88,7 @@ export default {
canvas.style['-webkit-filter'] = 'blur(3px)'; canvas.style['-webkit-filter'] = 'blur(3px)';
canvas.style.filter = 'blur(3px)'; canvas.style.filter = 'blur(3px)';
} }
let ctx = canvas.getContext("2d"); let ctx = canvas.getContext("2d");
let renderTask = pdfPage.render({ let renderTask = pdfPage.render({
canvasContext: ctx, canvasContext: ctx,
...@@ -110,7 +110,7 @@ export default { ...@@ -110,7 +110,7 @@ export default {
this.$store.dispatch('goLogin'); this.$store.dispatch('goLogin');
return; return;
} }
this.$toast('前往APP购买查看') this.$toast('购买/激活后可查看课件')
} }
box.appendChild(cover); box.appendChild(cover);
} }
......
...@@ -2,10 +2,15 @@ ...@@ -2,10 +2,15 @@
<div class="course-detail"> <div class="course-detail">
<!-- 视频 --> <!-- 视频 -->
<div class="video-box"> <div class="video-box">
<pica-video ref="picaVideo" :coverType="coverType" :download="download" @onVideoEnd="onVideoEnd" @onReplay="onReplay"> <pica-video ref="picaVideo" :coverType="coverType" :download="btnClick1" @onVideoEnd="onVideoEnd" @onReplay="onReplay">
<!-- 试看结束 --> <!-- 试看结束 -->
<div class="cover" v-if="logged && coverType === 1"> <div class="cover" v-if="logged && coverType === 1">
<course-covers coverTips="试看结束<br />请来云鹊医App学习完整课程" :isSingle="true" rightBtnText="APP购买更优惠" @btnClick="btnClick" /> <course-covers
coverTips="试看结束<br />请来云鹊医App学习完整课程"
:isSingle="true"
rightBtnText="立即购买"
@btnClick="btnClick1"
/>
</div> </div>
<!-- 付费课程,下载App --> <!-- 付费课程,下载App -->
<div class="cover" v-if="logged && coverType === 2"> <div class="cover" v-if="logged && coverType === 2">
...@@ -150,6 +155,7 @@ export default { ...@@ -150,6 +155,7 @@ export default {
this.$store.dispatch('getUserInfo'); this.$store.dispatch('getUserInfo');
} }
this.projectId = sessionStorage.getItem('projectId'); this.projectId = sessionStorage.getItem('projectId');
this.goodsId = this.$route.query.goodsId;
if (!this.projectId) { if (!this.projectId) {
this.$router.replace('/not-found'); this.$router.replace('/not-found');
return; return;
...@@ -299,6 +305,9 @@ export default { ...@@ -299,6 +305,9 @@ export default {
// //
} }
}, },
btnClick1() {
this.$router.push({ path: '/goods-detail', query: { goodsId: this.goodsId, projectId: this.projectId, returnUrl: encodeURIComponent(location.href + '&projectId=' + projectId) } })
},
// 折叠、展开目录 // 折叠、展开目录
onToggle(index) { onToggle(index) {
const item = this.chapters[index]; const item = this.chapters[index];
......
...@@ -69,12 +69,22 @@ ...@@ -69,12 +69,22 @@
</div> </div>
</div> </div>
<Loading v-show="showLoading" /> <Loading v-show="showLoading" />
<CourseDialog
content="微信授权"
subContent='<p style="font-size: 16px; font-weight: bold; text-align: center;">云鹊医申请以下权限:</p><p style="font-size: 14px; color: #999; text-align: center; padding-bottom: 10px;">获得你的公开信息(头像,昵称等)</p>'
cancleBtnText="取消"
confirmBtnText="允许"
needSubContent
:isShowDialog="isShowDialog"
@handlerAction="handlerAction"
></CourseDialog>
</div> </div>
</template> </template>
<script> <script>
import { Swipe, SwipeItem } from 'vant'; import { Swipe, SwipeItem } from 'vant';
import Loading from "@/components/common/common-loading"; import Loading from "@/components/common/common-loading";
import CourseDialog from "@/components/course/course-dialog";
import { wxConfig, chooseWXPay } from '@/utils/wxShare'; import { wxConfig, chooseWXPay } from '@/utils/wxShare';
import { getAPPID, getWebPageUrl, isWeiXin, wxOauth, debounce } from '@/utils'; import { getAPPID, getWebPageUrl, isWeiXin, wxOauth, debounce } from '@/utils';
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
...@@ -86,6 +96,7 @@ export default { ...@@ -86,6 +96,7 @@ export default {
Swipe, Swipe,
SwipeItem, SwipeItem,
Loading, Loading,
CourseDialog,
}, },
data() { data() {
return { return {
...@@ -100,6 +111,7 @@ export default { ...@@ -100,6 +111,7 @@ export default {
curtTabIdx: 0, curtTabIdx: 0,
tabW: 0, // tab的宽度 tabW: 0, // tab的宽度
showLoading: false, showLoading: false,
isShowDialog: false,
} }
}, },
computed: { computed: {
...@@ -121,7 +133,7 @@ export default { ...@@ -121,7 +133,7 @@ export default {
mounted() { mounted() {
this.projectId = this.$route.query.projectId; this.projectId = this.$route.query.projectId;
this.goodsId = this.$route.query.goodsId || 74; this.goodsId = this.$route.query.goodsId || 74;
this.returnUrl = this.$route.query.returnUrl; this.returnUrl = encodeURIComponent(this.$route.query.returnUrl);
this.getGoodsInfo(); this.getGoodsInfo();
this.getTabW(); this.getTabW();
const { token, info } = this.$store.state.user; const { token, info } = this.$store.state.user;
...@@ -270,6 +282,13 @@ export default { ...@@ -270,6 +282,13 @@ export default {
goLogin() { goLogin() {
this.$store.dispatch('goLogin'); this.$store.dispatch('goLogin');
}, },
handlerAction(type) {
if (type === 2) {
wxOauth();
} else {
this.isShowDialog = false;
}
},
// 创建订单 // 创建订单
createOrder() { createOrder() {
this.$sendBuriedData({ this.$sendBuriedData({
...@@ -282,8 +301,7 @@ export default { ...@@ -282,8 +301,7 @@ export default {
// 微信内先去授权 // 微信内先去授权
if (isWechat && !this.wxInfo.openid) { if (isWechat && !this.wxInfo.openid) {
this.$toast('微信授权中'); this.isShowDialog = true;
wxOauth();
return; return;
} }
...@@ -499,6 +517,8 @@ export default { ...@@ -499,6 +517,8 @@ export default {
} }
.num{ .num{
width: 30px; width: 30px;
height: 22px;
line-height: 22px;
text-align: center; text-align: center;
} }
.plus{ .plus{
...@@ -517,6 +537,7 @@ export default { ...@@ -517,6 +537,7 @@ export default {
} }
} }
.way{ .way{
line-height: 18px;
padding-left: 28px; padding-left: 28px;
background: url('~@/images/wxpay.png') no-repeat left center; background: url('~@/images/wxpay.png') no-repeat left center;
background-size: 18px auto; background-size: 18px auto;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册