1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- <!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">
- </head>
- <body class="bgc-back">
- <div id="app" v-cloak>
- <van-nav-bar class="user_rank_explan_title mall_title user_title_normal" title="市场活动" @click-left="goback" v-if="toptitleisshow">
- <template #left> <img src="./static/images/left.png" alt=""></template>
- </van-nav-bar>
- <div class="active_list ml16 mr16">
- <van-pull-refresh v-model="refreshing" @refresh="onRefresh" :class="banner.length === 0 ? 'isnodata':''">
- <van-empty class="custom-image" image="./static/images/empty-img.png" description="暂无数据" v-if="isnodata"></van-empty>
- <div class="box mt16 ovh rel" v-for="item,index in banner" :key="item.Id" @click="goactivedetail(item.Id)"><img class="db" :src="PublicLib.CachePicture({picUrl:item.ActBanner,domid:'activeimg' + index})" :id="'activeimg' + index" style="width:100%;">
- <div class="abs bgcfff cm">{{item.Status}}</div>
- </div>
- </van-pull-refresh>
- </div>
- </div>
- <script src="./static/js/klm-vv.min.js"></script>
- <script src="./static/js/klm-axios-config.js"></script>
- <script>
- // 通过 CDN 引入时不会自动注册 Lazyload 组件
- // 可以通过下面的方式手动注册
- Vue.use(vant.Lazyload);
- PublicLib.SetStatusBarBgColor({bgcolor:'ffffff'});
- // 在 #app 标签下渲染一个按钮组件
- let app = new Vue({
- el: '#app',
- data() {
- return {
- isnodata:false,
- toptitleisshow:false,
- banner: [],
- refreshing:false,
- };
- },
- created() {
- this.toptitleisshow = toptitleisshow;
- this.getactivelist();
- },
- methods: {
- onLoad() {
- if (this.refreshing) {
- this.banner = [];
- this.refreshing = false;
- }
- this.getactivelist();
- },
- onRefresh() {
- // 清空列表数据
- this.finished = false;
- // 重新加载数据
- // 将 loading 设置为 true,表示处于加载状态
- this.loading = true;
- this.onLoad();
- },
- async getactivelist(){
- PublicLib.ShowLoading({Message:''});
- const res = await getRequest('/api/v1/activityinfo/list?t='+Math.random(6),JSON.stringify({PageSize:20,PageNum:1}));
- if(res.status === 1) {
- PublicLib.HideLoading();
- this.banner = res.data;
- if(this.banner.length === 0) {this.isnodata = true}else{this.isnodata = false};
- };
- },
- goactivedetail(id){
- PublicLib.putCookieInfo('marketactiveId', id);
- PublicLib.Goto({Url:'market-active-detail'});
- },
- goback(){
- PublicLib.GoBack({Level:1});
- }
- }
- });
- </script>
- </body>
- </html>
|