transfer.vue 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <template>
  2. <view class="content">
  3. <view class="" style="height: 20rpx;"></view>
  4. <!-- 调转item -->
  5. <view class="tool-item" v-for=" item in science" @click="Jump(item.id)">
  6. <view class="item-img">
  7. <image :src="(item.image.indexOf('http') != -1 )? item.image: ($store.state.baseURL + item.image)" mode=""></image>
  8. </view>
  9. <view class="item-tit">
  10. {{item.title}}
  11. </view>
  12. </view>
  13. </view>
  14. </template>
  15. <script>
  16. import { getArticList} from '@/api/index.js';
  17. export default {
  18. data() {
  19. return {
  20. science: []
  21. }
  22. },
  23. onLoad(opt) {
  24. this.loadData()
  25. },
  26. computed: {
  27. },
  28. onShow() {
  29. },
  30. onReachBottom() {
  31. },
  32. onReady() {
  33. },
  34. methods: {
  35. loadData(){
  36. let obj = this;
  37. getArticList({ifyid:72}).then(({ data }) => {
  38. console.log(data,123456);
  39. obj.science = obj.science.concat(data.list);
  40. console.log(obj.science,'999999999999999999')
  41. });
  42. },
  43. Jump(id) {
  44. uni.navigateTo({
  45. url:"/pages/applic/info?id="+id
  46. })
  47. },
  48. }
  49. }
  50. </script>
  51. <style lang="scss">
  52. .tool-item {
  53. width: 702rpx;
  54. height: 416rpx;
  55. background: #FEFEFE;
  56. box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
  57. border-radius: 20rpx;
  58. margin: 0 auto 30rpx;
  59. font-size: 0;
  60. .item-img {
  61. width: 702rpx;
  62. height: 300rpx;
  63. border-radius: 20rpx 20rpx 0 0;
  64. image {
  65. border-radius: 20rpx 20rpx 0 0;
  66. width: 100%;
  67. height: 100%;
  68. }
  69. }
  70. .item-tit {
  71. font-size: 34rpx;
  72. font-weight: 500;
  73. color: #0E0E0E;
  74. line-height: 116rpx;
  75. padding-left: 26rpx;
  76. }
  77. }
  78. </style>