monthly-policy.vue 973 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <template>
  2. <view>
  3. <!-- 月度政策 -->
  4. <view class="picture" v-html="contentDetail"></view>
  5. </view>
  6. </template>
  7. <script>
  8. import {
  9. request
  10. } from '@/common/request/request'
  11. require("promise.prototype.finally").shim()
  12. export default {
  13. data() {
  14. return {
  15. contentDetail: null
  16. }
  17. },
  18. onLoad() {
  19. this.handleGetData();
  20. },
  21. methods: {
  22. handleGetData(){
  23. uni.showLoading({
  24. title: "加载中"
  25. });
  26. var _this = this;
  27. request({
  28. url: '/homepage/getArticleOne',
  29. method: 'post',
  30. data: {
  31. "displayType": "1" //门店1
  32. }
  33. }).then(res => {
  34. console.log(res)
  35. if (res.data.code == 0) {
  36. _this.contentDetail = res.data.data.contentDetail;
  37. }
  38. }).catch(err => {})
  39. .finally(() => {
  40. setTimeout(() => {
  41. uni.hideLoading();
  42. this.loading = false;
  43. }, 1000);
  44. })
  45. }
  46. }
  47. }
  48. </script>
  49. <style lang="scss" scoped>
  50. .picture {
  51. /deep/img {
  52. width: 100%;
  53. }
  54. }
  55. </style>