青蛙卖大米小程序2024-11-24
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.

76 lines
1.4 KiB

6 months ago
6 months ago
6 months ago
4 months ago
6 months ago
4 months ago
6 months ago
6 months ago
6 months ago
4 months ago
6 months ago
4 months ago
6 months ago
  1. <template>
  2. <!-- 公告 -->
  3. <view class="page">
  4. <navbar :title="title" leftClick @leftClick="$utils.navigateBack" />
  5. <view style="padding: 20rpx;">
  6. <view class="videos">
  7. <view class="video"
  8. v-for="(item, index) in videos"
  9. :key="index">
  10. <video :src="item"></video>
  11. </view>
  12. </view>
  13. <uv-parse :content="notice"></uv-parse>
  14. </view>
  15. </view>
  16. </template>
  17. <script>
  18. export default {
  19. data() {
  20. return {
  21. notice : '',
  22. videos : [],
  23. id : 0,
  24. title : '公告',
  25. titles : ['公司介绍', '产品介绍', '关于我们', '其他'],
  26. }
  27. },
  28. onLoad({id, type}) {
  29. if(type){
  30. this.title = this.titles[type]
  31. }
  32. if(id){
  33. this.id = id
  34. this.getInfoIntroduce()
  35. }else{
  36. this.getRiceNoticeList()
  37. }
  38. },
  39. methods: {
  40. // 获取公告
  41. getRiceNoticeList(){
  42. this.$api('getRiceNoticeList', res => {
  43. if(res.code == 200){
  44. this.notice = res.result.content
  45. }
  46. })
  47. },
  48. // 获取相关介绍
  49. getInfoIntroduce(){
  50. this.$api('getInfoIntroduceDetail', {
  51. id : this.id
  52. }, res => {
  53. if(res.code == 200){
  54. this.notice = res.result.details
  55. this.videos = res.result.voSub ? res.result.voSub.split(',') : []
  56. }
  57. })
  58. },
  59. }
  60. }
  61. </script>
  62. <style scoped lang="scss">
  63. .page {
  64. .videos{
  65. .video{
  66. width: 100%;
  67. video{
  68. width: 100%;
  69. }
  70. }
  71. }
  72. }
  73. </style>