|
@@ -48,6 +48,7 @@ export default {
|
|
listData: [],
|
|
listData: [],
|
|
orderGoodsId: "",
|
|
orderGoodsId: "",
|
|
rebuildShow: false,
|
|
rebuildShow: false,
|
|
|
|
+ lock: false,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
onLoad(option) {
|
|
onLoad(option) {
|
|
@@ -56,7 +57,8 @@ export default {
|
|
this.gradeId = Number(option.gradeId);
|
|
this.gradeId = Number(option.gradeId);
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
- if (this.$method.isGoLogin()) { // 从公众号消息进来的没登录需要跳到登录页,登录后返回
|
|
|
|
|
|
+ if (this.$method.isGoLogin()) {
|
|
|
|
+ // 从公众号消息进来的没登录需要跳到登录页,登录后返回
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
this.getInfo();
|
|
this.getInfo();
|
|
@@ -128,6 +130,10 @@ export default {
|
|
},
|
|
},
|
|
//重学
|
|
//重学
|
|
getBtn() {
|
|
getBtn() {
|
|
|
|
+ if (this.lock) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ this.lock = true;
|
|
var self = this;
|
|
var self = this;
|
|
self.$api
|
|
self.$api
|
|
.courseperiodrebuild({
|
|
.courseperiodrebuild({
|
|
@@ -137,51 +143,43 @@ export default {
|
|
})
|
|
})
|
|
.then((res) => {
|
|
.then((res) => {
|
|
if (res.data.code === 200) {
|
|
if (res.data.code === 200) {
|
|
- // uni.redirectTo({
|
|
|
|
- // url:
|
|
|
|
- // "/pages2/wd/course?gid=" +
|
|
|
|
- // self.gradeId +
|
|
|
|
- // "&id=" +
|
|
|
|
- // self.goodsId +
|
|
|
|
- // "&orderGoodsId=" +
|
|
|
|
- // self.orderGoodsId,
|
|
|
|
- // });
|
|
|
|
this.$http({
|
|
this.$http({
|
|
- url: '/course/courseList',
|
|
|
|
- method: 'get',
|
|
|
|
- data: {
|
|
|
|
- pageNum: 1,
|
|
|
|
- pageSize: 100,
|
|
|
|
- goodsId: this.goodsId,
|
|
|
|
- gradeId: this.gradeId,
|
|
|
|
- orderGoodsId: this.orderGoodsId,
|
|
|
|
- },
|
|
|
|
- })
|
|
|
|
- .then(res => {
|
|
|
|
- if (res.data.code == 200) {
|
|
|
|
- if(res.data.total > 1) {
|
|
|
|
- uni.redirectTo({
|
|
|
|
- url: `/pages3/polyv/detail?id=''&goodsId=${this.goodsId}&orderGoodsId=${this.orderGoodsId}&gradeId=${this.gradeId}`
|
|
|
|
- })
|
|
|
|
- } else if(res.data.total == 1) {
|
|
|
|
- uni.redirectTo({
|
|
|
|
- url: `/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${this.goodsId}&orderGoodsId=${this.orderGoodsId}&gradeId=${this.gradeId}`
|
|
|
|
- })
|
|
|
|
- } else {
|
|
|
|
- uni.showToast({
|
|
|
|
- icon:'none',
|
|
|
|
- title:'暂无可观看的视频课程'
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ url: "/course/courseList",
|
|
|
|
+ method: "get",
|
|
|
|
+ data: {
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: 100,
|
|
|
|
+ goodsId: this.goodsId,
|
|
|
|
+ gradeId: this.gradeId,
|
|
|
|
+ orderGoodsId: this.orderGoodsId,
|
|
|
|
+ },
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ this.lock = false;
|
|
|
|
+ if (res.data.code == 200) {
|
|
|
|
+ if (res.data.total > 1) {
|
|
|
|
+ uni.redirectTo({
|
|
|
|
+ url: `/pages3/polyv/detail?id=''&goodsId=${this.goodsId}&orderGoodsId=${this.orderGoodsId}&gradeId=${this.gradeId}`,
|
|
|
|
+ });
|
|
|
|
+ } else if (res.data.total == 1) {
|
|
|
|
+ uni.redirectTo({
|
|
|
|
+ url: `/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${this.goodsId}&orderGoodsId=${this.orderGoodsId}&gradeId=${this.gradeId}`,
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ icon: "none",
|
|
|
|
+ title: "暂无可观看的视频课程",
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
// uni.navigateTo({
|
|
// uni.navigateTo({
|
|
// url: `/pages3/polyv/detail?id=''&goodsId=${this.goodsId}&orderGoodsId=${this.orderGoodsId}&gradeId=${this.gradeId}`
|
|
// url: `/pages3/polyv/detail?id=''&goodsId=${this.goodsId}&orderGoodsId=${this.orderGoodsId}&gradeId=${this.gradeId}`
|
|
// })
|
|
// })
|
|
}
|
|
}
|
|
- });
|
|
|
|
- // uni.showModal({
|
|
|
|
|
|
+ })
|
|
|
|
+ .catch((err) => {
|
|
|
|
+ this.lock = false;
|
|
|
|
+ }); // uni.showModal({
|
|
// title:"注意",
|
|
// title:"注意",
|
|
// content:`如对审核结果有异议,请勿点击确认重学。致电020-87085982咨询`,
|
|
// content:`如对审核结果有异议,请勿点击确认重学。致电020-87085982咨询`,
|
|
// confirmText:"确认重学",
|
|
// confirmText:"确认重学",
|