123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151 |
- <!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>
- .van-tabs__content{
- height: calc(100vh - 150px);
- overflow-y:scroll;
- }
- </style>
- </head>
- <body class="pt0 pb0 ovh" style="padding-top:0;">
- <div id="app">
- <van-nav-bar class="user_rank_explan_title user_title_normal" left-arrow title="服务中心" v-if="toptitleisshow" @click-left="goback">
- <template #left> <img src="./static/images/left.png" alt=""></template>
- </van-nav-bar>
- <div class="service-list" v-cloak style="padding-bottom:50px;">
- <van-search class="service_center" v-model="searchContent" placeholder="请输入搜索关键词" @click="onSearch" disabled></van-search>
- <van-tabs class="tab-underline" v-model="active" animated line-width="20" line-height="2" @change="changetab" swipeable color="#FFD500">
- <van-tab v-for="type in servicetype" :key="type.Id" :title="type.ColName">
- <van-cell-group>
- <van-cell v-for="item in commonq" :title="item.Title" :key="item.Id" is-link :border="false" @click="articledetail(item.Id)"></van-cell>
- <div class="f14 tc c666 mt16" v-if="!isloaded">加载中...</div>
- <div class="f14 tc c666 mt16" v-if="commonq.length === 0 && isloaded">暂无数据</div>
- </van-cell-group>
- </van-tab>
- <van-tab disabled></van-tab>
- <van-tab disabled></van-tab>
- <van-tab disabled></van-tab>
- </van-tabs>
- </div>
- <van-goods-action class="mall-bottom bc333">
- <van-goods-action-button color="#FFD500" text="在线客服" @click="onClickButton"></van-goods-action-button>
- </van-goods-action>
- <van-dialog style="border-radius:4px;" v-model="dialogisshow" width="70%" confirm-button-color="#FF6240" confirm-button-text="拨打" message="电话客服电话:4001363866" show-cancel-button @confirm="callservice" @cancel="dialogisshow = false"> </van-dialog>
- </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>
- // 通过 CDN 引入时不会自动注册 Lazyload 组件
- // 可以通过下面的方式手动注册
- Vue.use(vant.Lazyload);
-
- // 在 #app 标签下渲染一个按钮组件
- let app = new Vue({
- el: '#app',
- data() {
- return {
- dialogisshow:false,
- toptitleisshow:false,
- active: 0,
- oldindex:0,
- searchContent: '',
- isShow: false,
- pageinfo:{
- PageSize:1000,
- PageNum:1
- },
- servicetype:[],
- commonq:[],
- isloaded:false,
- };
- },
- created() {
- this.toptitleisshow = toptitleisshow;
- this.getservicetype();
- this.active = Number(PublicLib.getCookieInfo('goIndex'));
- PublicLib.putCookieInfo('goIndex',0);
- },
- methods: {
- onSearch() {
- PublicLib.Goto({Url:'user-service-search', Jump: 1});
- },
- //- 获取服务中心分类
- async getservicetype(){
- const res = await getRequest('api/v1/col/servicecenter?t='+Math.random(6),JSON.stringify({PageSize:10,PageNum:1}));
- if(res.status === '1') {
- let serviceitem = {};
- res.data.forEach(item=>{
- if(item.Id === 5){
- serviceitem = item;
- }else{
- this.servicetype.unshift(item);
- };
- });
- this.servicetype.unshift(serviceitem);
- this.getservicelist(this.servicetype[this.active].Id);
- }
- },
- //- 获取服务中心列表
- async getservicelist(id){
- const res = await getRequest('api/v1/servicecenter/list?t='+Math.random(6),JSON.stringify({...this.pageinfo,CategoryId:id}));
- if(res.status === '1'){
- this.commonq = res.data;
- this.isloaded = true;
- if(PublicLib.getCookieInfo('userId') === '14'){
- if(this.active === 0){
- this.commonq.push({Title:'test',Id:999})
- this.commonq.push({Title:'test2',Id:9999})
- };
- }
- }
- },
- //- 切换标签(根据切换的索引获取当前标签项的列表)
- changetab(index){
- if(index === this.oldindex) return;
- //- 添加旧状态,点击当前tab不会重新获取数据
- this.isloaded = false;
- this.oldindex = index;
- this.getservicelist(this.servicetype[index].Id);
- },
- //- 跳转文章详情,存入Id
- articledetail(id){
- if(id === 999){
- //- PublicLib.putCookieInfo('articurl', 'https://mp.weixin.qq.com/s/1UMzp4A04Yu-rUlvYOikbQ');
- PublicLib.Goto({Url:'https://mp.weixin.qq.com/mp/appmsgalbum?__biz=Mzg5NTY0MzUzNw==&action=getalbum&album_id=2522532157681057794#wechat_redirect'});
- }else if(id === 9999){
- //- PublicLib.putCookieInfo('articurl', 'https://mp.weixin.qq.com/s/1UMzp4A04Yu-rUlvYOikbQ');
- PublicLib.Goto({Url:'https://mp.weixin.qq.com/mp/homepage?__biz=Mzg5NTY0MzUzNw==&hid=2&sn=538a8c41d9720bf63275ed8392bea56d'});
- }else{
- PublicLib.Goto({Url:'user-service-detail', Jump: 1});
- PublicLib.putCookieInfo('articleId', id);
- };
- },
- goback(){
- PublicLib.GoBack({Level:1});
- },
- onClickButton(){
- PublicLib.OnlineService();
- },
- callservice(){
- PublicLib.PhoneCall('4001363866');
- }
- }
- });
- </script>
- </body>
- </html>
|