cooperative.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <template>
  2. <view class="container">
  3. <!-- 供销社列表 -->
  4. <view class="rnwdList" v-for="(item, index) in list" :key="index">
  5. <view @tap="goDetails(item.id)" class="cooperativeImgBox">
  6. <image :src="loadImgSrc('/snbj.png')" class="cooperativeImg"></image>
  7. <!--<image :src="loadImgSrc(item.imgUrl)" class="cooperativeImg"></image>-->
  8. </view>
  9. <view @tap="goDetails(item.id)" class="cooperativeBox">
  10. <view class="list">
  11. <span class="listTitle">{{ item.name }}</span>
  12. <view class="jlSj">
  13. <span class="jf">
  14. {{ item.address?item.address:'' }}
  15. </span>
  16. </view>
  17. </view>
  18. </view>
  19. <em class="iconfont icon-xiangyoujiantou"></em>
  20. </view>
  21. </view>
  22. </template>
  23. <script>
  24. import { getList, getDetails } from '@/api/cooperative/cooperative';
  25. export default {
  26. data() {
  27. return {
  28. list: [
  29. {
  30. name:"-",
  31. address:"-",
  32. chargePeople:"-",
  33. chargePhone:"-",
  34. imgUrl:"-"
  35. }
  36. ],
  37. };
  38. }
  39. /**
  40. * 生命周期函数--监听页面加载
  41. */,
  42. onLoad(options) {
  43. this.getList();
  44. },
  45. methods: {
  46. /** 查询列表 */
  47. getList(type) {
  48. this.loading = true;
  49. getList().then(response => {
  50. this.list = response.rows;
  51. });
  52. },
  53. /** 查询详情 */
  54. goDetails(id) {
  55. uni.navigateTo({
  56. url: '/pages/cooperative/details?id='+id
  57. });
  58. }
  59. }
  60. };
  61. </script>
  62. <style>
  63. @import './cooperative.css';
  64. </style>