12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- <!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>
- <div id="app">
- <div class="service-list" v-cloak>
- <van-search v-model="pageinfo.SearchKey" placeholder="请输入您的问题" :clearable="false" show-action @search="onSearch" @cancel="onCancel"></van-search>
- <van-cell-group>
- <van-cell :title="item.Title" :key="item.Id" is-link v-for="item in commonq" :border="false" @click="articledetail(item.Id)"></van-cell>
- </van-cell-group>
- </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);
-
- // 在 #app 标签下渲染一个按钮组件
- let app = new Vue({
- el: '#app',
- data() {
- return {
- active: 0,
- isShow: false,
- pageinfo:{
- PageSize:1000,
- PageNum:1,
- SearchKey: '',
- },
- commonq:[
- ],
- };
- },
- methods: {
- async onSearch() {
- const res = await getRequest('/api/v1/servicecenter/search?t='+Math.random(6),JSON.stringify(this.pageinfo));
- if(res.status !== '1') return tips('搜索失败,请重试!');
- if(res.data.length === 0) return tips('暂无搜索结果');
- this.commonq = res.data;
- },
- //- 退回上一页
- onCancel() {
- PublicLib.GoBack({Level:1});
- },
- //- 跳转文章详情,存入Id
- articledetail(id){
- PublicLib.Goto({Url:'user-service-detail'});
- PublicLib.putCookieInfo('articleId', id);
- }
-
- }
- });
- </script>
- </body>
- </html>
|