index.vue 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <template>
  2. <view class="container">
  3. <!-- 顶部 -->
  4. <!-- <view class="head mar_t20">
  5. </view> -->
  6. <!-- 顶部-end -->
  7. <!-- 内容 -->
  8. <view class="content mar_t20">
  9. <jyf-parser :html="detail.cont"></jyf-parser>
  10. <jyf-parser :html="detail.content"></jyf-parser>
  11. </view>
  12. <!-- 内容-end -->
  13. </view>
  14. </template>
  15. <script>
  16. // let app=getApp();
  17. // let reqApi = new ReqApi();
  18. // var appEv = app.$vm.$options;
  19. // import { ReqApi } from "@/utils/reqTools.js";
  20. import jyfParser from '@/components/jyf-parser/jyf-parser.vue'
  21. import { get, post } from "@/request/api.js";
  22. export default {
  23. components:{
  24. jyfParser
  25. },
  26. data() {
  27. return {
  28. detail:'',
  29. type:''
  30. };
  31. },
  32. onLoad:function(e){
  33. this.type = e.type
  34. this.loadData()
  35. },
  36. methods:{
  37. loadData:function(){
  38. let that = this;
  39. let data = {
  40. type:this.type
  41. }
  42. post("ShuZiTeaYW/shop/getPurchaseAgreement",data).then(res => {
  43. if(res.status == 200){
  44. that.detail = res.data
  45. }
  46. })
  47. }
  48. }
  49. }
  50. </script>
  51. <style lang="scss">
  52. // 页面配置
  53. page{background: #f5f5f5;}
  54. // 页面配置-end
  55. // 顶部
  56. .head{width: 100%;overflow: hidden;background: #fff;padding:40rpx 20rpx;box-sizing: border-box;font-size: 26rpx;color:#232323;font-family: "SourceHanSansCN-Medium";font-weight: 500;}
  57. // 顶部-end
  58. // 内容
  59. .content{width: 100%;overflow: hidden;background: #fff;padding:40rpx 20rpx;box-sizing: border-box;font-size: 24rpx;color:#363636;font-family: "SourceHanSansCN-Medium";}
  60. // 内容-end
  61. </style>