Commit b53b63d3 authored by Mac's avatar Mac

1

parent 7f308213
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
this.isshow = true; this.isshow = true;
this.Name = this.laststudy.name; this.Name = this.laststudy.name;
this.Cover = this.laststudy.cover_pic; this.Cover = this.laststudy.cover_pic;
this.progress = parseInt(this.laststudy.learned / this.laststudy.count); this.progress = parseInt(this.laststudy.learned / this.laststudy.count)*100;
} }
}, },
methods:{ methods:{
......
...@@ -322,6 +322,9 @@ export default { ...@@ -322,6 +322,9 @@ export default {
}else if (that.JumpType == 4) { }else if (that.JumpType == 4) {
//代付页面 //代付页面
uni.navigateTo({ url: "/pages/order/payment-order?GoodsId="+that.OrderId }); uni.navigateTo({ url: "/pages/order/payment-order?GoodsId="+that.OrderId });
}else if (that.JumpType == 5) {
//课程详情
uni.navigateTo({ url: "/pages/school/courseInfo?GoodsId=" + that.GoodsId });
} }
}, 500); }, 500);
} else { } else {
...@@ -528,6 +531,9 @@ export default { ...@@ -528,6 +531,9 @@ export default {
}else if (that.JumpType == 4) { }else if (that.JumpType == 4) {
//代付页面 //代付页面
uni.navigateTo({ url: "/pages/order/payment-order?GoodsId="+that.OrderId }); uni.navigateTo({ url: "/pages/order/payment-order?GoodsId="+that.OrderId });
}else if (that.JumpType == 5) {
//课程详情
uni.navigateTo({ url: "/pages/school/courseInfo?GoodsId=" + that.GoodsId });
} }
}, 500); }, 500);
...@@ -866,7 +872,11 @@ export default { ...@@ -866,7 +872,11 @@ export default {
}else if (this.JumpType == 4) { }else if (this.JumpType == 4) {
//代付页面 //代付页面
uni.navigateTo({ url: "/pages/order/payment-order?GoodsId="+this.OrderId }); uni.navigateTo({ url: "/pages/order/payment-order?GoodsId="+this.OrderId });
}else if (this.JumpType == 5) {
//课程详情
uni.navigateTo({ url: "/pages/school/courseInfo?GoodsId=" + this.GoodsId });
} }
}, 500); }, 500);
}, },
getPageType(){ getPageType(){
......
...@@ -199,6 +199,7 @@ export default { ...@@ -199,6 +199,7 @@ export default {
width: 100%; width: 100%;
height: 100vh; height: 100vh;
background: #FFF; background: #FFF;
font-family: aa;
} }
.articleDetails .ad-box{ .articleDetails .ad-box{
......
...@@ -125,7 +125,8 @@ ...@@ -125,7 +125,8 @@
}, },
cover_pic:'', cover_pic:'',
count:0, count:0,
learned:0 learned:0,
Up:0,
} }
}, },
onLoad(options) { onLoad(options) {
...@@ -162,6 +163,7 @@ ...@@ -162,6 +163,7 @@
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: this.pageTitle, title: this.pageTitle,
}); });
this.Up = uni.getStorageSync("mall_UserInfo")?uni.getStorageSync("mall_UserInfo").UserPageType:0;//用于分享出去的参数
}, },
onUnload(){//监听页面卸载 onUnload(){//监听页面卸载
if(this.timer) { if(this.timer) {
...@@ -191,7 +193,7 @@ ...@@ -191,7 +193,7 @@
return { return {
title: this.name, title: this.name,
path: "/pages/index/index?id=" + this.id + "&user_id=" + uid+ "&SmallShopId=" + SmallShopId+ "&Up=" + this.Up+'&JumpType=5', path: "/pages/index/index?id=" + this.id + "&user_id=" + uid+ "&SmallShopId=" + SmallShopId+ "&Up=" + this.Up+'&JumpType=5',
imageUrl: '' imageUrl: this.cover_pic,
}; };
}, },
//图片预览和文档的打开 //图片预览和文档的打开
...@@ -205,16 +207,29 @@ ...@@ -205,16 +207,29 @@
}); });
} }
}else{ }else{
uni.showLoading({
title: '下载中'
});
uni.downloadFile({ uni.downloadFile({
url: this.selectcourse.FilePath, url: this.selectcourse.FilePath,
success: function (res) { success: function (res) {
uni.showLoading({
title: '正在打开'
});
var filePath = res.tempFilePath; var filePath = res.tempFilePath;
uni.openDocument({ uni.openDocument({
filePath: filePath, filePath: filePath,
success: function (res) { success: function (res) {
uni.hideLoading()
console.log('打开文档成功'); console.log('打开文档成功');
},
fail:function(){
uni.hideLoading()
} }
}); });
},
fail:function(){
uni.hideLoading()
} }
}); });
} }
......
...@@ -386,7 +386,7 @@ export default { ...@@ -386,7 +386,7 @@ export default {
let imageUrl = let imageUrl =
this.g.app_share_pic != null && this.g.app_share_pic != "" this.g.app_share_pic != null && this.g.app_share_pic != ""
? this.g.app_share_pic ? this.g.app_share_pic
: this.g.pic_url[0].pic_url; : this.g.cover_pic;
let id = this.id; let id = this.id;
return { return {
title: title, title: title,
...@@ -408,17 +408,17 @@ export default { ...@@ -408,17 +408,17 @@ export default {
if(SmallShopId == 0){//如果微店id为0 去找所属微店id if(SmallShopId == 0){//如果微店id为0 去找所属微店id
SmallShopId = u.UserSmallShopId? u.UserSmallShopId:0 SmallShopId = u.UserSmallShopId? u.UserSmallShopId:0
} }
console.log("/pages/index/index?id=" + this.id + "&user_id=" + uid+ "&SmallShopId=" + SmallShopId+ "&Up=" + this.Up+'&JumpType=5')
return { return {
title: title:
this.g.app_share_title != null && this.g.app_share_title != "" this.g.app_share_title != null && this.g.app_share_title != ""
? this.g.app_share_title ? this.g.app_share_title
: this.g.name, : this.g.name,
// path: "/pages/goods/goods?id=" + this.id + "&user_id=" + uid+ "&SmallShopId=" + SmallShopId,
path: "/pages/index/index?id=" + this.id + "&user_id=" + uid+ "&SmallShopId=" + SmallShopId+ "&Up=" + this.Up+'&JumpType=5', path: "/pages/index/index?id=" + this.id + "&user_id=" + uid+ "&SmallShopId=" + SmallShopId+ "&Up=" + this.Up+'&JumpType=5',
imageUrl: imageUrl:
this.g.app_share_pic != null && this.g.app_share_pic != "" this.g.app_share_pic != null && this.g.app_share_pic != ""
? this.g.app_share_pic ? this.g.app_share_pic
: this.g.pic_url[0].pic_url, : this.g.cover_pic,
}; };
}, },
mounted() { mounted() {
......
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