环卫车小程序前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
1.7 KiB

4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
  1. <template>
  2. <view >
  3. <view class="se-flex se-bgc-white se-m-20 se-p-20 se-br-20" v-for="(items,indexs) in list" :key="indexs" @click="onDetail(items)">
  4. <image class="se-w-240 se-h-180 se-br-20" :src="items.image" mode=""></image>
  5. <view class="se-flex se-flex-v se-flex-1 se-px-20">
  6. <view class="se-c-black se-fw-6 se-fs-28 se-toe-1 se-pt-5">
  7. {{items.title}}
  8. </view>
  9. <view class="se-c-33 se-fs-24 se-lh-40 se-toe-3 se-pt-10">
  10. {{items.description}}
  11. <!-- <u-parse :content="items.content"></u-parse> -->
  12. <!-- 我国将加快改善农村生活条件我国将加快改善农村生活条件我国将加快改善农村生活条件我国将加快改善农村生活条件我国将加快改善农村生活条件我国将加快改善农村生活条件 -->
  13. </view>
  14. </view>
  15. </view>
  16. </view>
  17. </template>
  18. <script>
  19. import { queryNewsList } from "@/common/api.js"
  20. export default{
  21. data(){
  22. return{
  23. pageNo:1,
  24. pageSize:10,
  25. list:[]
  26. }
  27. },
  28. onLoad(options) {
  29. this.onPageList()
  30. },
  31. onPullDownRefresh() {
  32. let that = this
  33. that.pageNo = 1
  34. that.list = []
  35. that.onPageList()
  36. },
  37. onReachBottom() {
  38. let that = this
  39. that.pageNo = that.pageNo + 1
  40. that.onPageList()
  41. },
  42. methods:{
  43. onDetail(event){
  44. uni.navigateTo({
  45. url:"/pages_subpack/news/detail?id="+event.id
  46. })
  47. },
  48. onPageList(){
  49. let that = this
  50. let params={
  51. pageNo:that.pageNo,
  52. pageSize:that.pageSize
  53. }
  54. queryNewsList(params).then((response) => {
  55. console.info('queryNewsList',response)
  56. that.list = that.list.concat(response.result.records)
  57. }).catch((error) =>{
  58. })
  59. },
  60. }
  61. }
  62. </script>
  63. <style>
  64. page{
  65. background-color: #f5f5f5;
  66. }
  67. </style>