|
|
@@ -36,14 +36,25 @@
|
|
|
<script>
|
|
|
import { mapState } from 'vuex';
|
|
|
export default {
|
|
|
+ onShareAppMessage(res) {
|
|
|
+ return {
|
|
|
+ title: this.video.name,
|
|
|
+ path: 'pages/video?from=share&id=' + this.video.id,
|
|
|
+ imageUrl: this.video.thumbnail
|
|
|
+ };
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
height: 100,
|
|
|
video: {},
|
|
|
showTitle: true,
|
|
|
- videoCtx: null
|
|
|
+ videoCtx: null,
|
|
|
+ from: ''
|
|
|
};
|
|
|
},
|
|
|
+ onShow() {
|
|
|
+ this.from = this.$mp.query.from;
|
|
|
+ },
|
|
|
created() {
|
|
|
this.height = wx.getSystemInfoSync().windowHeight;
|
|
|
console.log(wx.getSystemInfoSync());
|
|
|
@@ -79,7 +90,13 @@ export default {
|
|
|
this.showTitle = e.detail.show;
|
|
|
},
|
|
|
back() {
|
|
|
- wx.navigateBack();
|
|
|
+ if (this.from === 'share') {
|
|
|
+ wx.switchTab({
|
|
|
+ url: '/pages/home'
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ wx.navigateBack();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
};
|