love.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. return uni.navigateTo({
  32. url:'/pages/applic/info?id=345'
  33. })
  34. }
  35. uni.navigateTo({
  36. url:url,
  37. })
  38. }
  39. }
  40. }
  41. </script>
  42. <style lang="scss">
  43. page,.center{
  44. height: 100%;
  45. background: #F2F2F2;
  46. }
  47. .box {
  48. width: 90% ;
  49. height: 416rpx;
  50. margin: 26rpx auto;
  51. background: #FEFEFE;
  52. border-radius: 20rpx;
  53. box-shadow: 0 0 10rpx rgba($color: #999, $alpha: 0.9);
  54. image {
  55. width: 100%;
  56. height: 300rpx;
  57. }
  58. .font {
  59. margin-top: 30rpx;
  60. font-size: 34rpx;
  61. font-family: PingFang SC;
  62. font-weight: 500;
  63. color: #0E0E0E;
  64. padding-left: 28rpx;
  65. }
  66. }
  67. </style>