lilishop-uniapp/pages/tabbar/home/web-view.vue

38 lines
730 B
Vue
Raw Normal View History

<template>
<view class="web-view">
<web-view :webview-styles="webviewStyles" :src="src"></web-view>
</view>
</template>
<script>
2022-04-02 18:32:01 +08:00
import configs from "@/config/config";
import storage from "@/utils/storage";
export default {
data() {
return {
2022-04-02 18:32:01 +08:00
configs,
storage,
webviewStyles: {
progress: {
color: this.$lightColor,
},
},
src: "",
};
},
onLoad(params) {
params.IM ? (this.src = `${configs.imWebSrc}?token=${storage.getAccessToken()}&id=${params.IM}`): (this.src = decodeURIComponent(params.src));
2022-04-02 18:32:01 +08:00
console.log(this.src);
},
};
</script>
<style lang="scss" scoped>
.web-view {
/deep/ .web-view {
padding: 0;
margin: 0;
}
}
2022-04-02 18:32:01 +08:00
</style>