Feat(页面):页面埋点配置

This commit is contained in:
lifizer
2024-06-17 23:13:22 +08:00
parent 19914b5b0d
commit cef0177716
55 changed files with 552 additions and 377 deletions
@@ -4,16 +4,18 @@
</view>
</template>
<script>
import uniPopup from '@/components/uni-popup/uni-popup.vue';
import uniPopup from '@/components/uni-popup/uni-popup.vue'
import { pageListenMixins } from '@/mixins/pageListenMixins'
export default {
components:{
uniPopup
uniPopup
},
mixins: [pageListenMixins],
data() {
return {
curPlayVideoUrl:'',
isVideoPopupShow:false
curPlayVideoUrl:'',
isVideoPopupShow:false,
pageKeyId: ''
}
},
onReady: function(res) {
@@ -21,10 +23,9 @@ export default {
this.videoContext.requestFullScreen();
},
onLoad:function(e){
this.curPlayVideoUrl = e.videoUrl;
//this.$refs.popup.open();
this.curPlayVideoUrl = e.videoUrl
const id = options.id
this.pageKeyId = `findVideo_videoId_${id}`
},
methods: {
videoErrorCallback: function(e) {
+27 -29
View File
@@ -32,71 +32,69 @@
</template>
<script>
import {getStoreVideoType, getArticleList} from "@/api/public";
import {getVideoList} from "@/api/user";
import {getStoreVideoType, getArticleList} from '@/api/public'
import {getVideoList} from '@/api/user'
import { pageListenMixins } from '@/mixins/pageListenMixins'
export default {
mixins: [pageListenMixins],
data() {
return {
webUrl: this.$VUE_APP_RESOURCES_URL,
typeList: [{"label": "全部", "value": ""}],
type: "",
typeList: [{'label': '全部', 'value': ''}],
type: '',
page: 1,
limit: 10,
keyword: "",
keyword: '',
list: [],
isWait: false
isWait: false,
pageKeyId: Object.freeze('findVideoList')
}
},
onLoad() {
this.getType();
this.fetchList();
this.getType()
this.fetchList()
},
onReachBottom() {
this.page++;
this.fetchList();
this.page++
this.fetchList()
},
methods: {
getType() {
getStoreVideoType().then(({data}) => {
if (data.length > 0) {
data.forEach(item => {
this.typeList.push(item);
this.typeList.push(item)
})
}
});
})
},
changeType(item) {
this.type = item.value;
this.page = 1;
this.list = [];
this.fetchList();
this.type = item.value
this.page = 1
this.list = []
this.fetchList()
},
fetchList() {
if (this.isWait) return;
this.isWait = true;
let params = {
if (this.isWait) return
this.isWait = true
const params = {
type: this.type,
page: this.page,
limit: this.limit
};
}
getVideoList(params).then(res => {
if (res.status === 200) {
for (let i = 0; i < res.data.length; i++) {
res.data[i].hide = true;
res.data[i].hide = true
this.list.push(res.data[i])
}
}
this.isWait = false;
});
this.isWait = false
})
},
goDetail(item) {
this.$yrouter.push("/pages/VideoPlayBackList/VideoPlayBackDetail?videoUrl=" + item.video);
this.$yrouter.push("/pages/VideoPlayBackList/VideoPlayBackDetail?videoUrl=" + item.video + '&id=' + item.id)
}
}
}