package.vue 790 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <template>
  2. <view>
  3. <view id="box">
  4. <u-parse :content="content" :noData="content" v-if="isShow"/>
  5. </view>
  6. </view>
  7. </template>
  8. <script>
  9. import uParse from '@/components/gaoyia-parse/parse.vue'
  10. export default {
  11. components: {
  12. uParse
  13. },
  14. data() {
  15. return {
  16. content:"",
  17. isShow:false
  18. }
  19. },
  20. onLoad(options) {
  21. this.get_article();
  22. },
  23. methods: {
  24. get_article(){
  25. this
  26. .request
  27. .post("getContent",{cate_id : 2})
  28. .then(res=>{
  29. console.log(res);
  30. if(res.code == 200) {
  31. this.content = res.data.content;
  32. this.isShow = true;
  33. }
  34. })
  35. .catch(err=>{
  36. this.utils.Tip("网络错误,请稍后尝试");
  37. });
  38. }
  39. }
  40. }
  41. </script>
  42. <style>
  43. #box {
  44. z-index: -1;
  45. padding: 0px 10px 0 10px;
  46. }
  47. </style>