123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>欢迎-创业帮</title>
- <meta name="keywords" content="欢迎-创业帮">
- <meta name="description" content="欢迎-创业帮">
- <meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,shrink-to-fit=no,user-scalable=no" name="viewport" viewport="cover">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
- <meta content="telephone=no" name="format-detection">
- <meta content="email=no" name="format-detection">
- <meta name="apple-mobile-web-app-title" content="欢迎-创业帮">
- <meta http-equiv="Cache-Control" content="no-siteapp">
- <link rel="stylesheet" href="./static/css/main.css">
- <style>
- .screenroll::-webkit-scrollbar { display: none;}
- .screenroll{height:100vh !important;}
- .screenroll img { width:100%;float:left;}
- .showhtml,
- .showhtml p,
- .showhtml div{overflow:hidden;}
- </style>
- </head>
- <body class="pb0 ovh pt0">
- <div id="app" v-cloak>
- <van-sticky>
- <van-nav-bar class="camp_title user_title_normal" title="详情" @click-left="backbtn" left-arrow v-if="toptitleisshow">
- <template #left>
- <van-icon name="arrow-left" color="#000" size="20"></van-icon>
- </template>
- </van-nav-bar>
- </van-sticky>
- <div>
- <div class="screenroll">
- <div class="tc">
- <div class="showhtml" v-html="articleinfo.Contents" style="width:100%;" v-if="!isId" @click="clickimg()"></div><img src="./static/images/banner-detail.jpg" alt="" v-if="isId">
- </div>
- </div>
- </div>
- </div>
- <script src="./static/js/klm-vv.min.js"></script>
- <script src="./static/js/appfunc.min.js"></script>
- <script src="./static/js/klm-axios-config.js"></script>
- <script src="./static/js/publicfn.js"></script>
- <script>
- //- PublicLib.SetStatusBarStyle({type:'light', isShow:1});
- // 通过 CDN 引入时不会自动注册 Lazyload 组件
- // 可以通过下面的方式手动注册
- Vue.use(vant.Lazyload);
- // 在 #app 标签下渲染一个按钮组件
- let app = new Vue({
- el: '#app',
- data() {
- return {
- toptitleisshow:false,
- articleinfo:{
- Title: '',
- Contents:''
- },
- isId:true,
- imgsrc:[],
- type:'',
- };
- },
- created() {
- this.type = browsertype.versions.ios ? 'ios' : 'android';
- //- 如果userId为31则显示默认详情图
- if(PublicLib.getCookieInfo('userId') === '31'){
- this.isId = true;
- }else{
- this.isId = false;
- };
- this.getbannerinfo();
- },
- mounted() {
- this.$nextTick(()=>{
- })
- },
- methods: {
- //- 拿到当前活动页面的详细内容
- async getbannerinfo(){
- const Id = PublicLib.getCookieInfo('indexBannerId');
- const res = await getRequest('api/v1/advertisment/detail?t='+Math.random(6),JSON.stringify({Id}));
- if(res.status === '1') {
- this.articleinfo.Contents = res.data.Contents;
- var imgReg = /(\/|http)[^>]+\.(jpg|jpeg|png|gif)/g;
- this.imgsrc=res.data.Contents.match(imgReg);
- };
- },
- backbtn(){
- PublicLib.GoBack({Level:1});
- },
- clickimg(index = 0){
- if(typeof(index) == 'number'){
- console.log(index);
- if(this.type === 'ios'){
- window.webkit.messageHandlers.PhotoBrowser.postMessage({index,imageList:this.imgsrc});
- }else{
- Func.PhotoBrowser(index,JSON.stringify(this.imgsrc));
- };
- };
- },
- }
- });
- </script>
- </body>
- </html>
|