1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <template>
- <view class="activity">
- <!-- <image @click.stop="navToDetailPage" src="https://img.caimei365.com/group1/M00/03/9A/Cmis216Zf8GAb_UqABE6NiwUUZs004.jpg" mode="widthFix"></image> -->
- <web-view :webview-styles="webviewStyles" :src="activityPath"></web-view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- webviewStyles: {
- progress: {
- color: '#FF3333'
- }
- },
- productID:'',
- activityPath:'',
- type : '',
- }
- },
- onLoad(option) {
- this.type = option.type
- console.log(option)
- this.initPath(option.link)
- },
- methods:{
- navToDetailPage() {//跳转商品详情页
- this.$api.navigateTo(`/pages/goods/product?id=${this.productID}`)
- },
- initPath(path){
- if(this.type === '1'){
- let URL_CONFIG = ''
- if(process.env.NODE_ENV === 'development'){
- URL_CONFIG = 'https://www-b.caimei365.com'
- }
- this.activityPath = `${URL_CONFIG}/document/pdfdetails.html?type=1&src=${path}`
- console.log(this.activityPath)
- }else{
- this.activityPath = path
- }
- }
- }
- }
- </script>
-
- <style lang="scss">
- .activity{
- width: 100%;
- height: auto;
- image{
- width: 100%;
- height: auto;
- }
- }
- </style>
|