Commit 86c39476caadc8abef73bc285f89c69602b1e297
1 parent
913ca348
唤起APP
Showing
1 changed file
with
20 additions
and
2 deletions
src/pages/index/index.vue
| 1 | <template> | 1 | <template> |
| 2 | <div> | 2 | <div> |
| 3 | <div class="box"> | 3 | <div class="box"> |
| 4 | + <!--打开app--> | ||
| 5 | + <callAppBox :callApps="$parent.callApps" v-if="!isCNLive.value"></callAppBox> | ||
| 4 | <div class="first_item"></div> | 6 | <div class="first_item"></div> |
| 5 | <!--商品列表--> | 7 | <!--商品列表--> |
| 6 | <div class="item"> | 8 | <div class="item"> |
| @@ -70,10 +72,12 @@ | @@ -70,10 +72,12 @@ | ||
| 70 | import {videoPlayer} from 'vue-video-player'; | 72 | import {videoPlayer} from 'vue-video-player'; |
| 71 | import 'video.js/dist/video-js.css'; | 73 | import 'video.js/dist/video-js.css'; |
| 72 | import '../../../static/css/video.css'; | 74 | import '../../../static/css/video.css'; |
| 75 | + import callAppBox from "@/components/callAppBox/callAppBox"; | ||
| 73 | export default { | 76 | export default { |
| 74 | name: 'index', | 77 | name: 'index', |
| 75 | data () { | 78 | data () { |
| 76 | return { | 79 | return { |
| 80 | + callApps:null, // 打开app参数 | ||
| 77 | playsinline: true, | 81 | playsinline: true, |
| 78 | playerOptions: { | 82 | playerOptions: { |
| 79 | events: [], | 83 | events: [], |
| @@ -126,10 +130,19 @@ | @@ -126,10 +130,19 @@ | ||
| 126 | } | 130 | } |
| 127 | }, | 131 | }, |
| 128 | components: { | 132 | components: { |
| 129 | - videoPlayer | 133 | + videoPlayer, |
| 134 | + callAppBox | ||
| 130 | }, | 135 | }, |
| 131 | created(){ | 136 | created(){ |
| 132 | - document.title = '崇学向善 鼠年有礼' | 137 | + document.title = '崇学向善 鼠年有礼'; |
| 138 | + }, | ||
| 139 | + mounted(){ | ||
| 140 | + // 获取并设置分享参数 | ||
| 141 | + this.$parent.getShareData({ | ||
| 142 | + type: 22, | ||
| 143 | + id: this.$route.query.id || 1, | ||
| 144 | + url: "" | ||
| 145 | + }); | ||
| 133 | }, | 146 | }, |
| 134 | methods: { | 147 | methods: { |
| 135 | link(index){ | 148 | link(index){ |
| @@ -171,6 +184,11 @@ | @@ -171,6 +184,11 @@ | ||
| 171 | // this.playerOptions.sources[0].src = "https://wjjtest.ys2.cnliveimg.com/802/shop/img/2019/12/30/5e0973f0aa9be.mp4" | 184 | // this.playerOptions.sources[0].src = "https://wjjtest.ys2.cnliveimg.com/802/shop/img/2019/12/30/5e0973f0aa9be.mp4" |
| 172 | // } | 185 | // } |
| 173 | }, | 186 | }, |
| 187 | + /** | ||
| 188 | + * 接口调用 | ||
| 189 | + * @param {object} [ 分享参数] | ||
| 190 | + */ | ||
| 191 | + | ||
| 174 | } | 192 | } |
| 175 | } | 193 | } |
| 176 | </script> | 194 | </script> |