AI销管
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

112 lines
3.0 KiB

  1. <template>
  2. <view class="help-box">
  3. <view class="search-box">
  4. <u-search placeholder="输入要搜索的问题" @change="searchFun" :show-action="true" action-text="搜索" shape="round" v-model="keyword"></u-search>
  5. </view>
  6. <view class='result-box'>
  7. <view class='list-item' @click="todetail(item)" v-for="(item,index) in list" :key="index">
  8. <view class="title u-line-2">
  9. {{keywordColor1(item.name)}}<text class="blue">{{keyword}}</text>{{keywordColor2(item.name)}}
  10. </view>
  11. <view class="desc u-line-2">{{item.desc}}</view>
  12. </view>
  13. </view>
  14. </view>
  15. </template>
  16. <script>
  17. let domain = require("@/utils/domain")
  18. export default {
  19. data() {
  20. return {
  21. keyword: "",
  22. list: [
  23. {name:'您好,职工管家为您服务,你这边大概是想要什么样的户型?我们这边只要是有ABC这三种户型,分别有120平以内的,120到260之间的,300平以上的',desc: '1、打开小程序查看设备如何查看设备是否开启如何查看设备是否开启管理查看设备电量;'},
  24. {name:'如何查看设备开否联网',desc: '您好,职工管家为您服务,你这边大概是想要什么样的户型?我们这边只要是有ABC这三种户型,分别有120平以内的,120到260之间的,300平以上的'},
  25. {name:'你这边大概是想要什么样的户型?我们这边只要是有ABC这三种户型',desc: '打开小程序查看设备管理查看设备电量。'},
  26. {name:'如何查看设备是否开电',desc: '打开小程序查看设备管理查看设备电量。'},
  27. ]
  28. };
  29. },
  30. onShow() {
  31. },
  32. computed: {
  33. },
  34. created(){
  35. },
  36. methods: {
  37. searchFun(){
  38. },
  39. todetail(item){
  40. uni.navigateTo({
  41. url: '/pages/mine/help/helpDetail'
  42. })
  43. },
  44. keywordColor1(name1){
  45. let name = name1
  46. if(!name||!this.keyword) return ''
  47. let index = name.indexOf(this.keyword)
  48. let pre = name.slice(0,index)
  49. return pre
  50. },
  51. keywordColor2(name1){
  52. let name = name1
  53. if(!name||!this.keyword) return ''
  54. let index = name.indexOf(this.keyword)
  55. let last = name.slice(index + this.keyword.length)
  56. return last
  57. },
  58. },
  59. }
  60. </script>
  61. <style lang="scss">
  62. .help-box{
  63. width: 100%;
  64. height: 100%;
  65. .search-box{
  66. width: 690rpx;
  67. height: 70rpx;
  68. margin-top: 16rpx;
  69. margin-left: 30rpx;
  70. }
  71. .result-box{
  72. width: 100%;
  73. padding: 0 30rpx;
  74. .list-item{
  75. width: 690rpx;
  76. padding: 24rpx 0;
  77. border-bottom: 1rpx solid #E0E0E0;
  78. &:last-child{
  79. border: 0;
  80. }
  81. .title{
  82. width: 690rpx;
  83. font-size: 30rpx;
  84. font-family: PingFangSC-Regular, PingFang SC;
  85. font-weight: 400;
  86. color: #333333;
  87. line-height: 42rpx;
  88. margin-bottom: 16rpx;
  89. .blue{
  90. line-height: 42rpx;
  91. color: #2671E2;
  92. display: inline;
  93. }
  94. }
  95. .desc{
  96. font-size: 28rpx;
  97. font-family: PingFangSC-Regular, PingFang SC;
  98. font-weight: 400;
  99. color: #666666;
  100. line-height: 40rpx;
  101. }
  102. }
  103. }
  104. }
  105. </style>