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" v-if="item.name == '爱心捐款'">{{ item.name }} <span>(可自动生成感谢信)</span></view>
  6. <view class="font" v-else>{{ item.name }}</view>
  7. </view>
  8. </view>
  9. </template>
  10. <script>
  11. export default {
  12. data() {
  13. return {
  14. list: [
  15. {
  16. image: '../../static/images/money.jpg',
  17. name: '爱心捐款',
  18. src: '/pages/applic/contribution'
  19. },
  20. {
  21. image: '../../static/images/goods.png',
  22. name: '其他捐款捐物渠道',
  23. src: '/pages/applic/other'
  24. }
  25. ]
  26. }
  27. },
  28. methods: {
  29. nav(url) {
  30. uni.navigateTo({
  31. url:url,
  32. })
  33. }
  34. }
  35. }
  36. </script>
  37. <style lang="scss">
  38. page,.center{
  39. height: 100%;
  40. background: #F2F2F2;
  41. }
  42. .box {
  43. width: 90% ;
  44. height: 416rpx;
  45. margin: 26rpx auto;
  46. background: #FEFEFE;
  47. border-radius: 20rpx;
  48. image {
  49. width: 100%;
  50. height: 300rpx;
  51. }
  52. .font {
  53. margin-top: 30rpx;
  54. font-size: 34rpx;
  55. font-family: PingFang SC;
  56. font-weight: 500;
  57. color: #0E0E0E;
  58. padding-left: 28rpx;
  59. span {
  60. font-size: 26rpx;
  61. }
  62. }
  63. }
  64. </style>