index.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <template>
  2. <view>
  3. <u-navbar placeholder :autoBack="true" v-hideNav>
  4. <template slot="center">
  5. <view class="navbar_center_wrap">
  6. <text class="name">{{name}}</text>
  7. </view>
  8. </template>
  9. </u-navbar>
  10. <clueDetail :clueId="clueId" :params="params"></clueDetail>
  11. </view>
  12. </template>
  13. <script>
  14. import clueDetail from "./page/clueDetail.vue";
  15. import qs from 'qs';
  16. export default {
  17. components: {
  18. clueDetail
  19. },
  20. onPullDownRefresh() {
  21. uni.stopPullDownRefresh();
  22. // 刷新
  23. uni.redirectTo({
  24. url : `/pages/clueDetail/index?` + qs.stringify(this.params),
  25. })
  26. },
  27. onLoad(option) {
  28. const { name , clueId , type } = option;
  29. this.name = name;
  30. this.clueId = clueId;
  31. this.params = option;
  32. uni.setNavigationBarTitle({
  33. title: name
  34. });
  35. },
  36. data() {
  37. return {
  38. name: "",
  39. clueId: "",
  40. params : {},
  41. }
  42. },
  43. mounted(){
  44. }
  45. }
  46. </script>
  47. <style lang="scss" scoped>
  48. .navbar_center_wrap{
  49. text-align: center;
  50. width: 200rpx;
  51. display: flex;
  52. flex-direction: column;
  53. align-items: center;
  54. .pinyin{
  55. font-size: 22rpx;
  56. color: #b3b3c6;
  57. }
  58. }
  59. </style>