about.vue 843 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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 : 3})
  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. @import url("/components/gaoyia-parse/parse.css");
  44. #box {
  45. z-index: -1;
  46. padding: 0px 10px 0 10px;
  47. }
  48. </style>