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.

119 lines
3.3 KiB

  1. <template>
  2. <view class="app" style="margin: 10rpx 30rpx;">
  3. <text class="new-title">一见倾心 | 轻未来2021大健康引领5G新店品牌战略盛典圆满成功</text>
  4. <text class="new-time">2021年4月24日</text>
  5. <image src="/static/shop/677088217d8a00aa.jpg" class="new-img"></image>
  6. <text class="new-des">理想是未来事物的美好想象和希望也比喻对某事物榛于最完善境界的观念是人们在实践过程中形成的有实现可能性的对未来社会和自身发展的向往和追求价值观是基于人的一定的思维感官之上而作出的认知理解判断或抉择也就是认定事物判定是非的一种思维或取向本产本具有良好疗效理想是未来事物的美好想象和希望也比喻对某事物榛于最完善境界的观念是人们在实践过程中形成的有实现可能性的对未来社会和自身发展的向往和追求价值观是基于人的一定的思维感官之上而作出的认知理解判断或抉择也就是认定事物判定是非的一种思维或取向本产本具有良好疗效</text>
  7. </view>
  8. </template>
  9. <script>
  10. export default {
  11. components: {
  12. },
  13. data() {
  14. return {
  15. navList: [],//导航列表
  16. advertList: [],//广告列表
  17. hotList: [],//热门推荐
  18. indicatorDots: true,
  19. autoplay: true,
  20. interval: 2000,
  21. duration: 500
  22. }
  23. },
  24. computed: {
  25. changeIndicatorDots(e) {
  26. this.indicatorDots = !this.indicatorDots
  27. },
  28. changeAutoplay(e) {
  29. this.autoplay = !this.autoplay
  30. },
  31. intervalChange(e) {
  32. this.interval = e.target.value
  33. },
  34. durationChange(e) {
  35. this.duration = e.target.value
  36. },
  37. midAdvert(){
  38. if(this.advertList.length === 0) return {};
  39. const res = this.advertList.filter(item=> item.advert_type === 'middle');
  40. return res.length > 0 ? res[0]: {};
  41. },
  42. carousel(){
  43. return this.advertList.filter(item=> item.advert_type === 'carousel');
  44. }
  45. },
  46. onLoad() {
  47. this.loadAdvert();
  48. this.loadNavList();
  49. setTimeout(()=>{
  50. //this.navTo('/pages/address/list')
  51. }, 1000)
  52. },
  53. methods: {
  54. toStoreProduct(){
  55. this.navTo(`/pages/yunProduct/storeProduct`)
  56. },
  57. //加载广告 缓存10分钟
  58. async loadAdvert(){
  59. const res = await this.$request('advert', 'getAdvertList', {}, {
  60. cache: 10*60
  61. });
  62. this.advertList = res.data;
  63. this.log(res);
  64. },
  65. //加载导航 缓存1小时
  66. async loadNavList(){
  67. const res = await this.$request('advert', 'getNavList', {}, {
  68. cache: 60*60*0,
  69. });
  70. this.navList = res.data;
  71. },
  72. }
  73. }
  74. </script>
  75. <style>
  76. page{
  77. background-color: white;
  78. }
  79. </style>
  80. <style scoped lang="scss">
  81. /* 分类 */
  82. .new-title{
  83. display: block;
  84. line-height: 45rpx;
  85. font-size: 15px;
  86. font-weight: bold;
  87. color: #333333;
  88. margin: 50rpx 0rpx 0rpx;
  89. }
  90. .new-time{
  91. display: block;
  92. font-size: 13px;
  93. font-weight: 500;
  94. color: #999999;
  95. text-align: right;
  96. }
  97. .new-img{
  98. width: 100%;
  99. height: 375rpx;
  100. margin: 48rpx 0rpx 50rpx;
  101. }
  102. .new-des{
  103. font-size: 13px;
  104. font-weight: 500;
  105. color: #999999;
  106. }
  107. </style>