about.vue 693 B

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