helpCenterList.vue 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <template>
  2. <view class="helpcenterList">
  3. <!-- 标题栏 -->
  4. <u-navbar
  5. back-icon-color="#fff"
  6. :back-text="$t('common.Back')"
  7. :is-back="true"
  8. :background="{background:'#1777FE'}"
  9. :back-text-style="{color:'#fff'}"
  10. :border-bottom="true"
  11. title-color="#fff"
  12. :title="title"
  13. :custom-back="back"
  14. >
  15. </u-navbar>
  16. <!-- 问题分类 -->
  17. <!-- <scroll-view class="list" :scroll-x="false" :scscroll-y="true">
  18. <view class="item" v-for="(item,index) in list" :key="index" @click="showQuestionDetial(item)">{{item.name}}</view>
  19. </scroll-view> -->
  20. </view>
  21. </template>
  22. <script>
  23. import UNavbar from '@/components/uni-nav-bar/uni-nav-bar.vue'
  24. export default {
  25. name:'HelpCenter',
  26. components:{
  27. UNavbar
  28. },
  29. data(){
  30. return {
  31. title:'',
  32. backtext:'',
  33. }
  34. },
  35. onLoad(e){
  36. uni.showLoading({
  37. title: this.$i18n.locale == 'zh'? '加载中...': 'Loading...'
  38. });
  39. this.title= this.$i18n.locale == 'zh'? decodeURIComponent(e.pageTitle): 'Help Center'
  40. this.backtext= this.$i18n.locale == 'zh'? '返回': 'Back'
  41. setTimeout(()=>{uni.hideLoading();},100)
  42. },
  43. onUnload(){
  44. uni.removeStorageSync('helpItem');
  45. },
  46. computed:{
  47. list(){return uni.getStorageSync('helpItem')}
  48. },
  49. methods:{
  50. //路由后退一步
  51. back(){
  52. // #ifdef H5
  53. history.back()
  54. // #endif
  55. // #ifndef H5
  56. uni.navigateBack()
  57. // #endif
  58. },
  59. // 问题详情
  60. showQuestionDetial(item){
  61. uni.navigateTo({
  62. url:'/pages/service/others/helpCenterDetial?questionId='+item.id
  63. })
  64. }
  65. }
  66. }
  67. </script>
  68. <style lang="scss" scoped>
  69. .helpcenterList{
  70. background:#fefefe;
  71. .list{
  72. position:absolute;
  73. height:93.2%;
  74. background:#fefefe;
  75. .item{
  76. width:90%;
  77. padding:5%;
  78. height:100upx;
  79. border-bottom:2upx solid #eee;
  80. display:flex;
  81. align-items:center;
  82. .label{
  83. flex:1
  84. }
  85. }
  86. }
  87. }
  88. </style>