love.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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/aixin2.png',
  16. name: '爱心捐款',
  17. src: '/pages/applic/contribution'
  18. },
  19. {
  20. image: '/static/index/aixin1.png',
  21. name: '其他捐款捐物渠道',
  22. src: '/pages/applic/other'
  23. }
  24. ]
  25. }
  26. },
  27. methods: {
  28. nav(url) {
  29. // if(url == '/pages/applic/contribution') {
  30. // return this.$api.msg('功能建设中,敬请期待')
  31. // }
  32. uni.navigateTo({
  33. url:url,
  34. })
  35. }
  36. }
  37. }
  38. </script>
  39. <style lang="scss">
  40. page,.center{
  41. height: 100%;
  42. background: #F2F2F2;
  43. }
  44. .box {
  45. width: 90% ;
  46. height: 416rpx;
  47. margin: 26rpx auto;
  48. background: #FEFEFE;
  49. border-radius: 20rpx;
  50. box-shadow: 0 0 10rpx rgba($color: #999, $alpha: 0.9);
  51. image {
  52. width: 100%;
  53. height: 300rpx;
  54. }
  55. .font {
  56. margin-top: 30rpx;
  57. font-size: 34rpx;
  58. font-family: PingFang SC;
  59. font-weight: 500;
  60. color: #0E0E0E;
  61. padding-left: 28rpx;
  62. }
  63. }
  64. </style>