poster.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. <template>
  2. <view>
  3. <public-module></public-module>
  4. <service-widget @btnClick="btn_click"></service-widget>
  5. <view class="" style="position: fixed;width: 100%;z-index: 99;">
  6. <u-tabs :is-scroll="false" :list="list" :current="current" @change="change"></u-tabs>
  7. </view>
  8. <view class="" style="padding-top: 100rpx;box-sizing: border-box;">
  9. <view v-if="current==0" class="order">
  10. <view class="order1" v-for="(item,index) in list1" :key="index" @click="queryImg(item.url)">
  11. <image :src="item.url" mode=""></image>
  12. <text>{{item.originalfilename}}</text>
  13. </view>
  14. </view>
  15. <view v-if="current==1" class="order">
  16. <view class="order1" v-for="(item,index) in list2" :key="index" @click="queryImg(item.url)">
  17. <image :src="item.url" mode=""></image>
  18. <text>{{item.originalfilename}}</text>
  19. </view>
  20. </view>
  21. <view v-if="current==2" class="order">
  22. <view class="order1" v-for="(item,index) in list3" :key="index" @click="queryImg(item.url)">
  23. <image :src="item.url" mode=""></image>
  24. <text>{{item.originalfilename}}</text>
  25. </view>
  26. </view>
  27. <view v-if="current==3" class="order">
  28. <view class="order1" v-for="(item,index) in list4" :key="index" @click="queryImg(item.url)">
  29. <image :src="item.url" mode=""></image>
  30. <text>{{item.originalfilename}}</text>
  31. </view>
  32. </view>
  33. <view v-if="current==4" class="order">
  34. <view class="order1" v-for="(item,index) in list5" :key="index" @click="queryImg(item.url)">
  35. <image :src="item.url" mode=""></image>
  36. <text>{{item.originalfilename}}</text>
  37. </view>
  38. </view>
  39. </view>
  40. </view>
  41. </template>
  42. <script>
  43. export default {
  44. data() {
  45. return {
  46. list: [{
  47. name: '保险'
  48. }, {
  49. name: '产品',
  50. }, {
  51. name: '节气'
  52. }, {
  53. name: '节日'
  54. }, {
  55. name: '增员',
  56. }],
  57. current: 0,
  58. dirId1: "P0001",
  59. dirId2: "P0002",
  60. dirId3: "P0003",
  61. dirId4: "P0004",
  62. dirId5: "P0005",
  63. dirId6: "P0006",
  64. list1: [],
  65. list2: [],
  66. list3: [],
  67. list4: [],
  68. list5: [],
  69. list6: [],
  70. }
  71. },
  72. async onLoad() {
  73. this.$http.get('/sysMenuRecord/add?type=1&menuType=6')
  74. let res1 = await this.$http.post('/sysPoster/posterListApp', {
  75. type: 'P0002'
  76. });
  77. res1.data.content.forEach(ele => {
  78. ele.url = this.$base.baseUrl + ele.url
  79. });
  80. this.list1 = res1.data.content;
  81. let res2 = await this.$http.post('/sysPoster/posterListApp', {
  82. type: 'P0003'
  83. });
  84. res2.data.content.forEach(ele => {
  85. ele.url = this.$base.baseUrl + ele.url
  86. });
  87. this.list2 = res2.data.content;
  88. let res3 = await this.$http.post('/sysPoster/posterListApp', {
  89. type: 'P0004'
  90. });
  91. res3.data.content.forEach(ele => {
  92. ele.url = this.$base.baseUrl + ele.url
  93. });
  94. this.list3 = res3.data.content;
  95. let res4 = await this.$http.post('/sysPoster/posterListApp', {
  96. type: 'P0005'
  97. });
  98. res4.data.content.forEach(ele => {
  99. ele.url = this.$base.baseUrl + ele.url
  100. });
  101. this.list4 = res4.data.content;
  102. let res5 = await this.$http.post('/sysPoster/posterListApp', {
  103. type: 'P0006'
  104. });
  105. res5.data.content.forEach(ele => {
  106. ele.url = this.$base.baseUrl + ele.url
  107. });
  108. this.list5 = res5.data.content;
  109. },
  110. methods: {
  111. btn_click() {
  112. uni.navigateTo({
  113. url: '/pages/chat/chat'
  114. })
  115. },
  116. change(index) {
  117. console.log(index)
  118. this.current = index;
  119. },
  120. queryImg(img) {
  121. uni.navigateTo({
  122. url: '/pages/tools/poster/poster-detail?img=' + img
  123. })
  124. }
  125. }
  126. }
  127. </script>
  128. <style>
  129. .tabs {
  130. border-bottom: 2rpx solid #F0EFF4;
  131. position: fixed;
  132. z-index: 999;
  133. }
  134. .order {
  135. width: 100%;
  136. height: auto;
  137. padding: 26rpx;
  138. box-sizing: border-box;
  139. display: flex;
  140. justify-content: space-between;
  141. flex-wrap: wrap;
  142. }
  143. .order1 {
  144. width: 48%;
  145. text-align: center;
  146. margin-bottom: 20px;
  147. }
  148. .order1>text {
  149. font-weight: bold;
  150. }
  151. image {
  152. width: 100%;
  153. height: 600rpx;
  154. border-radius: 20rpx;
  155. }
  156. </style>