Commit 86c39476caadc8abef73bc285f89c69602b1e297
1 parent
913ca348
唤起APP
Showing
1 changed file
with
20 additions
and
2 deletions
src/pages/index/index.vue
| 1 | 1 | <template> |
| 2 | 2 | <div> |
| 3 | 3 | <div class="box"> |
| 4 | + <!--打开app--> | |
| 5 | + <callAppBox :callApps="$parent.callApps" v-if="!isCNLive.value"></callAppBox> | |
| 4 | 6 | <div class="first_item"></div> |
| 5 | 7 | <!--商品列表--> |
| 6 | 8 | <div class="item"> |
| ... | ... | @@ -70,10 +72,12 @@ |
| 70 | 72 | import {videoPlayer} from 'vue-video-player'; |
| 71 | 73 | import 'video.js/dist/video-js.css'; |
| 72 | 74 | import '../../../static/css/video.css'; |
| 75 | + import callAppBox from "@/components/callAppBox/callAppBox"; | |
| 73 | 76 | export default { |
| 74 | 77 | name: 'index', |
| 75 | 78 | data () { |
| 76 | 79 | return { |
| 80 | + callApps:null, // 打开app参数 | |
| 77 | 81 | playsinline: true, |
| 78 | 82 | playerOptions: { |
| 79 | 83 | events: [], |
| ... | ... | @@ -126,10 +130,19 @@ |
| 126 | 130 | } |
| 127 | 131 | }, |
| 128 | 132 | components: { |
| 129 | - videoPlayer | |
| 133 | + videoPlayer, | |
| 134 | + callAppBox | |
| 130 | 135 | }, |
| 131 | 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 | 147 | methods: { |
| 135 | 148 | link(index){ |
| ... | ... | @@ -171,6 +184,11 @@ |
| 171 | 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 | 194 | </script> | ... | ... |