index.vue 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <template>
  2. <view>
  3. <u-navbar title="团餐设置" :autoBack="true" :placeholder="true"></u-navbar>
  4. <u-cell-group :border="false">
  5. <u-cell-item v-for="(item, i) in data" :key="i" value="" @click="onClick(item)">
  6. <view class="cell-box" slot="title">
  7. <image class="img" :src="item.icon" />
  8. <text class="text">{{ item.name }}</text>
  9. </view>
  10. </u-cell-item>
  11. </u-cell-group>
  12. <Tabbar />
  13. </view>
  14. </template>
  15. <script>
  16. import Tabbar from '@/pages/groupMeal/tabbar/index.vue';
  17. export default {
  18. components: {
  19. Tabbar
  20. },
  21. data() {
  22. return {
  23. data: [
  24. {
  25. name: '我的团长',
  26. icon: '/static/groupMeal/icon_user.png',
  27. path: '/pages/groupMeal/users/team-member'
  28. },
  29. {
  30. name: '团餐设置',
  31. icon: '/static/groupMeal/icon_file.png',
  32. path: '/pages/groupMeal/users/settings'
  33. },
  34. {
  35. name: '企业团餐设置',
  36. icon: '/static/groupMeal/icon_build.png',
  37. path: '/pages/groupMeal/users/settings'
  38. },
  39. ]
  40. }
  41. },
  42. onShow() {
  43. },
  44. methods: {
  45. onClick(e) {
  46. console.log(e)
  47. if (!e.path) return;
  48. uni.navigateTo({
  49. url: `${e.path}`
  50. });
  51. },
  52. }
  53. }
  54. </script>
  55. <style lang="scss" scoped>
  56. .cell-box {
  57. display: flex;
  58. align-items: center;
  59. .img {
  60. width: 40rpx;
  61. height: 40rpx;
  62. margin-right: 16rpx
  63. }
  64. .text {
  65. font-weight: 400;
  66. font-size: 28rpx;
  67. color: #232832;
  68. }
  69. }
  70. </style>