165 lines
7.2 KiB
PHP
165 lines
7.2 KiB
PHP
<body class="bg-f6">
|
|
<div id="app" ref="app">
|
|
<div class="container relative bg-no-repeat bg-size-fullwidth bg-pos-top pb50"
|
|
style="background-image:url(https://qs.liche.cn/web/images/project/H5-ShiYu/theme-bg.png?v=221008)">
|
|
<div class="pt30 pb60">
|
|
<div class="relative pl30 pr30 fn-clear">
|
|
<? if ($group_id == 2) { ?>
|
|
<a class="fn-fl font-22 bg-fff ulib-r750 pt5 pb5 pl15 pr15"
|
|
href="/h5/market/sylive/user?biz_id=<?= $biz_id ?>"><i
|
|
class="iconfont icon-guanli text-middle"></i><span class="text-middle ml10">顾问管理</span></a>
|
|
<? } ?>
|
|
<? if ($group_id < 2) { ?>
|
|
<a class="fn-fr font-22 bg-fff ulib-r750 pt5 pb5 pl15 pr15"
|
|
href="/h5/market/sylive/biz/lists?area_id=<?= $area_id ?>">
|
|
<i class="iconfont icon-qiehuan text-middle"></i><span class="text-middle ml10">切换门店</span></a>
|
|
<? } ?>
|
|
<? if ($group_id == 3 || $group_id == 2) { ?>
|
|
<a class="fn-fr font-22 bg-fff ulib-r750 pt5 pb5 pl15 pr15" href="javascript:void(0);"
|
|
@click="logout()"><i class="iconfont icon-tuichu text-middle"></i><span
|
|
class="text-middle ml10">退出</span></a>
|
|
<? } ?>
|
|
</div>
|
|
</div>
|
|
<div class="relative bg-fff mt10 ml30 mr30 inner30 ulib-r20 box-shadow-darkGray" style="min-height:75vh;">
|
|
<img class="absolute top--60 box-center bds-1-fff imgsize-120X120 ulib-r750 z-index-1" :src="info.logo"
|
|
alt="#"/>
|
|
<div class="pt50 font-36 text-center">{{info.title}}</div>
|
|
<div class="pt50">
|
|
<!--活动列表列表-->
|
|
<div :class="['relative mb30 bg-f9 pt20 pb20 pl30 ulib-r20 ',item.pay_status == 0 ? 'pr200' : 'pr100']"
|
|
v-for="(item,index) in list">
|
|
<div class="space-nowrap">
|
|
<a class="inline-block actitle font-32" href="javascript:;" @click="gourl(item.url)">{{item.title}}</a>
|
|
<a class="inline-block vertical10" href="javascript:;" @click="gourl(item.stat_url)">
|
|
<div class="inline-block pl20 pr20 line-height-15 text-middle ulib-r750 font-22 color-fff bg-fe9538">
|
|
<i class="iconfont icon-shuju text-middle"></i><span class="text-middle ml5">数据</span>
|
|
</div>
|
|
</a>
|
|
</div>
|
|
<a class="block mt10 font-22 color-999" href="javascript:;" @click="gourl(item.url)">
|
|
{{item.time}}
|
|
<a v-if="item.pay_status == 0" href="javascript:;" @click="gourl(item['stat_url'])"
|
|
class="absolute right-0 mr20 box-middle inline-block pt5 pb5 pl20 pr20 line-height-15 text-middle ulib-r750 font-22 color-fff bg-ff5a5a">开通</a>
|
|
<a v-else-if="item.pay_status == 1" :href="item.url"
|
|
class="absolute right-0 mr20 box-middle iconfont icon-gengduo font-26 color-666"></a>
|
|
</a>
|
|
</div>
|
|
<!--end活动列表-->
|
|
</div>
|
|
<mugen-scroll :handler="fetchData" :should-handle="!loading" scroll-container="app">
|
|
<div class="pt100 pb100 text-center color-ccc" v-if="isNoData"></i><span class="text-middle font-22">暂无数据</span>
|
|
</div>
|
|
<div class="pt20 pb20 text-center color-ccc" v-else-if="loading"><i
|
|
class="iconfont icon-jiazai text-middle"></i><span class="text-middle font-22">请稍等...</span>
|
|
</div>
|
|
<div class="pt20 pb20 text-center font-22 color-ccc" v-else-if="isDataEnd && list.length>10">我们是有底线的
|
|
</div>
|
|
</mugen-scroll>
|
|
</div>
|
|
</div>
|
|
<? if (!$group_id) { ?>
|
|
<? $this->load->view('h5/market/sylive/nav') ?>
|
|
<? } ?>
|
|
</div>
|
|
|
|
<script>
|
|
let hostUrl = ''
|
|
var app = new Vue({
|
|
el: '#app',
|
|
data: {
|
|
info: '',//基础信息
|
|
loading: false,
|
|
isDataEnd: false,
|
|
isNoData: false,
|
|
page: 1, //页数
|
|
size: 10, //每页取多少个数据
|
|
list: [],
|
|
},
|
|
created() {
|
|
|
|
},
|
|
computed: {},
|
|
mounted() {
|
|
this.getInfo()
|
|
},
|
|
beforeDestroy() {
|
|
|
|
},
|
|
//离开页面时
|
|
destroyed() {
|
|
},
|
|
methods: {
|
|
|
|
//获取基础信息
|
|
getInfo() {
|
|
this.info = {
|
|
title: "<?=$biz_name?>",
|
|
logo: "<?=$headimg?>",
|
|
}
|
|
},
|
|
|
|
//拉取数据
|
|
fetchData: function () {
|
|
this.getActivityList()
|
|
},
|
|
|
|
//获取大区列表
|
|
getActivityList() {
|
|
let that = this;
|
|
if (!that.isNoData && !that.isDataEnd && !that.loading) {
|
|
that.loading = true;
|
|
//请求接口
|
|
//请求接口
|
|
$.get('/h5/market/sylive/biz/act_list', {
|
|
'biz_id':<?=$biz_id ? $biz_id : 0?>,
|
|
'area_id':<?=$area_id ? $area_id : 0?>,
|
|
'page': that.page
|
|
}, function (result) {
|
|
that.loading = false;
|
|
that.page = that.page + 1;
|
|
that.list = that.list.concat(result.data.list);
|
|
if (result.data.total == 0) {
|
|
that.isNoData = true;
|
|
} else if (that.list.length == result.data.total) {
|
|
that.isDataEnd = true;
|
|
}
|
|
}, 'json')
|
|
}
|
|
},
|
|
logout() {
|
|
$.get('/h5/market/sylive/login/logout', function (response) {
|
|
if (response.code == 200) {
|
|
mDialog.msg({
|
|
duration: 250,
|
|
pause: 2000,
|
|
content: response.msg,
|
|
onClose: function () {
|
|
window.location = '/h5/market/sylive/login'
|
|
}
|
|
});
|
|
} else {
|
|
mDialog.msg({
|
|
duration: 250,
|
|
pause: 2000,
|
|
content: response.msg
|
|
});
|
|
}
|
|
}, 'json')
|
|
},
|
|
gourl(url) {
|
|
if (url) {
|
|
window.location = url
|
|
} else {
|
|
mDialog.msg({
|
|
duration: 250,
|
|
pause: 2000,
|
|
content: '请联系管理员',
|
|
});
|
|
}
|
|
}
|
|
},
|
|
})
|
|
</script>
|
|
<?= $this->load->view('h5/market/sylive/hidden_wx_share') ?>
|
|
</body>
|