monthly-policy.vue 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. created() {
  22. uni.setNavigationBarTitle({
  23. title: this.$t('monthlyPolicy.title')
  24. });
  25. },
  26. methods: {
  27. handleGetData(){
  28. uni.showLoading({
  29. title: "加载中"
  30. });
  31. var _this = this;
  32. request({
  33. url: '/homepage/getArticleOne',
  34. method: 'post',
  35. data: {
  36. displayType: 1 //门店1
  37. // storeId: this.$store.state.storeInfo.storeId,
  38. }
  39. }).then(res => {
  40. // console.log(res)
  41. if (res.data.code == 0) {
  42. _this.contentDetail = res.data.data.contentDetail;
  43. }
  44. }).catch(err => {})
  45. .finally(() => {
  46. setTimeout(() => {
  47. uni.hideLoading();
  48. this.loading = false;
  49. }, 1000);
  50. })
  51. }
  52. }
  53. }
  54. </script>
  55. <style lang="scss" scoped>
  56. .picture {
  57. /deep/img {
  58. width: 100%;
  59. margin-bottom: -20rpx;
  60. }
  61. }
  62. </style>