index.vue 1.1 KB

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