monthly-policy.vue 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. // storeId: this.$store.state.storeInfo.storeId,
  33. }
  34. }).then(res => {
  35. // console.log(res)
  36. if (res.data.code == 0) {
  37. _this.contentDetail = res.data.data.contentDetail;
  38. }
  39. }).catch(err => {})
  40. .finally(() => {
  41. setTimeout(() => {
  42. uni.hideLoading();
  43. this.loading = false;
  44. }, 1000);
  45. })
  46. }
  47. }
  48. }
  49. </script>
  50. <style lang="scss" scoped>
  51. .picture {
  52. /deep/img {
  53. width: 100%;
  54. margin-bottom: -20rpx;
  55. }
  56. }
  57. </style>