铝交易,微信公众号
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.

88 lines
1.5 KiB

1 year ago
  1. <template>
  2. <view class="content">
  3. <view class="item" v-for="(item, index) in list" :key="index" @click="tapItem(item, index)">
  4. <view class="key">
  5. <view class="img">
  6. <img :src="item.imgUrl" style="width: 100%; height: 100%;"/>
  7. </view>
  8. <view class="text">
  9. {{ item.text }}
  10. </view>
  11. </view>
  12. <view class="value">
  13. {{ item.value }}
  14. </view>
  15. </view>
  16. </view>
  17. </template>
  18. <script>
  19. export default {
  20. name: "centerList",
  21. props: {
  22. list: {}
  23. },
  24. data() {
  25. return {
  26. }
  27. },
  28. methods: {
  29. // 点击列表项
  30. tapItem(item, index) {
  31. console.log(item, index, "item,index==========")
  32. if (item.text === '联系客服') {
  33. console.log("联系客服")
  34. this.$emit('open')
  35. } else if (item.text === '我的挂单') {
  36. uni.navigateTo({
  37. url: item.toPathUrl
  38. })
  39. } else if (index === 2) {
  40. console.log("关于我们")
  41. }
  42. },
  43. },
  44. }
  45. </script>
  46. <style scoped lang="scss">
  47. .content {
  48. background-color: #2e2e2e;
  49. .item {
  50. display: flex;
  51. justify-content: space-between;
  52. align-items: center;
  53. padding: 20rpx 40rpx;
  54. .key {
  55. display: flex;
  56. justify-content: center;
  57. align-items: center;
  58. color: #FFF;
  59. font-size: 32rpx;
  60. .img {
  61. width: 40rpx;
  62. height: 40rpx;
  63. }
  64. .text {
  65. margin-left: 20rpx;
  66. }
  67. }
  68. .value {
  69. color: #FFF;
  70. font-size: 36rpx;
  71. }
  72. }
  73. }
  74. </style>