user-service-list1.html 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>服务中心-创业帮</title>
  6. <meta name="keywords" content="服务中心-创业帮">
  7. <meta name="description" content="服务中心-创业帮">
  8. <meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,shrink-to-fit=no,user-scalable=no" name="viewport" viewport="cover">
  9. <meta name="apple-mobile-web-app-capable" content="yes">
  10. <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
  11. <meta content="telephone=no" name="format-detection">
  12. <meta content="email=no" name="format-detection">
  13. <meta name="apple-mobile-web-app-title" content="服务中心-创业帮">
  14. <meta http-equiv="Cache-Control" content="no-siteapp">
  15. <link rel="stylesheet" href="./static/css/main.css">
  16. </head>
  17. <body class="bgcf7f7f7 pt0" style="padding-top:0;">
  18. <div id="app">
  19. <van-nav-bar class="user_rank_explan_title user_title_normal" left-arrow title="服务中心" v-if="toptitleisshow" @click-left="goback">
  20. <template #left> <img src="./static/images/left.png" alt=""></template>
  21. </van-nav-bar>
  22. <div class="service-list" v-cloak>
  23. <van-search class="service_center" v-model="searchContent" placeholder="请输入搜索关键词" @click="onSearch" disabled></van-search>
  24. <van-tabs v-model="active" animated line-width="20" line-height="2" @click="changetab" swipeable color="#FFD500">
  25. <van-tab v-for="type in servicetype" :key="type.Id" :title="type.ColName">
  26. <van-cell-group>
  27. <van-cell v-for="item in commonq" title="基础设置" :key="item.Id" is-link :border="false" @click="articledetail(item.Id)"></van-cell>
  28. </van-cell-group>
  29. </van-tab>
  30. <van-tab disabled></van-tab>
  31. <van-tab disabled></van-tab>
  32. <van-tab disabled></van-tab>
  33. </van-tabs>
  34. </div>
  35. <van-goods-action class="mall-bottom bc333">
  36. <van-goods-action-button color="#FFD500" text="电话客服" @click="onClickButton"></van-goods-action-button>
  37. </van-goods-action>
  38. <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>
  39. </div>
  40. <script src="./static/js/klm-vv.min.js"></script>
  41. <script src="./static/js/appfunc.min.js"></script>
  42. <script src="./static/js/klm-axios-config.js"></script>
  43. <script src="./static/js/publicfn.js"></script>
  44. <script>
  45. // 通过 CDN 引入时不会自动注册 Lazyload 组件
  46. // 可以通过下面的方式手动注册
  47. Vue.use(vant.Lazyload);
  48. // 在 #app 标签下渲染一个按钮组件
  49. let app = new Vue({
  50. el: '#app',
  51. data() {
  52. return {
  53. dialogisshow:false,
  54. toptitleisshow:false,
  55. active: 0,
  56. oldindex:0,
  57. searchContent: '',
  58. isShow: false,
  59. pageinfo:{
  60. PageSize:1000,
  61. PageNum:1
  62. },
  63. servicetype:[
  64. {ColName:'基础分类'}
  65. ],
  66. commonq:[],
  67. };
  68. },
  69. created() {
  70. this.toptitleisshow = toptitleisshow;
  71. //- this.getservicetype();
  72. },
  73. methods: {
  74. onSearch() {
  75. PublicLib.Goto({Url:'user-service-search', Jump: 1});
  76. },
  77. //- 获取服务中心分类
  78. async getservicetype(){
  79. //- const res = await getRequest('api/v1/col/servicecenter',JSON.stringify({PageSize:10,PageNum:1}));
  80. //- console.log(res)
  81. //- if(res.status === '1') {
  82. //- this.servicetype = res.data;
  83. //- //- this.getservicelist(this.servicetype[0].Id);
  84. //- }
  85. },
  86. //- 获取服务中心列表
  87. async getservicelist(id){
  88. const res = await getRequest('api/v1/servicecenter/list',JSON.stringify({...this.pageinfo,CategoryId:id}));
  89. if(res.status === '1'){
  90. this.commonq = res.data;
  91. }
  92. },
  93. //- 切换标签(根据切换的索引获取当前标签项的列表)
  94. changetab(index){
  95. if(index === this.oldindex) return;
  96. //- 添加旧状态,点击当前tab不会重新获取数据
  97. this.oldindex = index;
  98. this.getservicelist(this.servicetype[index].Id);
  99. },
  100. //- 跳转文章详情,存入Id
  101. articledetail(id){
  102. PublicLib.Goto({Url:'user-service-detail', Jump: 1});
  103. PublicLib.putCookieInfo('articleId', id);
  104. },
  105. goback(){
  106. PublicLib.GoBack({Level:1});
  107. },
  108. onClickButton(){
  109. this.dialogisshow = true;
  110. },
  111. callservice(){
  112. PublicLib.PhoneCall('4001363866');
  113. }
  114. }
  115. });
  116. </script>
  117. </body>
  118. </html>