index.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <template>
  2. <view class="center">
  3. <view v-for="(item,index) in list" :key="index" class="box" @click="nav(item.src)">
  4. <image :src="item.image"></image>
  5. <view class="font">{{ item.name }}</view>
  6. </view>
  7. </view>
  8. </template>
  9. <script>
  10. export default {
  11. data() {
  12. return {
  13. list: [
  14. {
  15. image: '/static/index/aixin1.jpg',
  16. name: '爱心捐款',
  17. src: '/pages/applic/contribution'
  18. },
  19. {
  20. image: '/static/index/aixin2.jpg',
  21. name: '其他捐款捐物渠道',
  22. src: '/pages/applic/other'
  23. },
  24. {
  25. image: '/static/index/aixin3.jpg',
  26. name: '公益月捐',
  27. src: '/pages/index/ken'
  28. }
  29. ]
  30. }
  31. },
  32. methods: {
  33. nav(url) {
  34. // if(url == '/pages/applic/contribution') {
  35. // return this.$api.msg('功能建设中,敬请期待')
  36. // }
  37. uni.navigateTo({
  38. url:url,
  39. })
  40. }
  41. }
  42. }
  43. </script>
  44. <style lang="scss" scoped>
  45. page,.center{
  46. padding-top: 20rpx;
  47. // height: 100%;
  48. // background: #F2F2F2;
  49. }
  50. .box {
  51. width: 90%;
  52. height: 416rpx;
  53. margin:0 auto 26rpx;
  54. background: #FEFEFE;
  55. border-radius: 20rpx;
  56. box-shadow: 0 0 10rpx rgba($color: #999, $alpha: 0.9);
  57. image {
  58. width: 100%;
  59. height: 300rpx;
  60. }
  61. .font {
  62. margin-top: 30rpx;
  63. font-size: 34rpx;
  64. font-family: PingFang SC;
  65. font-weight: 500;
  66. color: #0E0E0E;
  67. padding-left: 28rpx;
  68. }
  69. }
  70. </style>