monthly-policy.vue 999 B

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: function(){
  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. img{
  52. width: 100vw;
  53. margin-bottom: -40rpx;
  54. }
  55. }
  56. </style>