love.vue 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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/images/money.png',
  16. name: '爱心捐款',
  17. src: '/pages/applic/contribution'
  18. },
  19. {
  20. image: '/static/images/goods.png',
  21. name: '其他捐款捐物渠道',
  22. src: '/pages/applic/other'
  23. }
  24. ]
  25. }
  26. },
  27. methods: {
  28. nav(url) {
  29. uni.navigateTo({
  30. url:url,
  31. })
  32. }
  33. }
  34. }
  35. </script>
  36. <style lang="scss">
  37. page,.center{
  38. height: 100%;
  39. background: #F2F2F2;
  40. }
  41. .box {
  42. width: 90% ;
  43. height: 416rpx;
  44. margin: 26rpx auto;
  45. background: #FEFEFE;
  46. border-radius: 20rpx;
  47. image {
  48. width: 100%;
  49. height: 300rpx;
  50. }
  51. .font {
  52. margin-top: 30rpx;
  53. font-size: 34rpx;
  54. font-family: PingFang SC;
  55. font-weight: 500;
  56. color: #0E0E0E;
  57. padding-left: 28rpx;
  58. }
  59. }
  60. </style>