helpDetail.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <template>
  2. <view>
  3. <view class="helpTitle">{{ resultData.helpWordTitle }}</view>
  4. <view class="helpCon" v-html="resultData.helpWordContent"></view>
  5. </view>
  6. </template>
  7. <script>
  8. export default {
  9. data() {
  10. return {
  11. obj:{},
  12. resultData:[]
  13. };
  14. },
  15. onLoad(options) {
  16. const {
  17. item = {}
  18. } = options;
  19. // console.log(JSON.parse(decodeURIComponent(item)))
  20. this.obj = JSON.parse(decodeURIComponent(item))
  21. this.helpWordId = this.obj.helpWordId
  22. uni.setNavigationBarTitle({
  23. title: this.obj.helpWordTitle
  24. });
  25. if(this.helpWordId){
  26. this.getContent();
  27. }
  28. },
  29. methods: {
  30. getContent() {
  31. let data = {
  32. helpWordId: this.helpWordId,
  33. }
  34. this.$Request.get("/app/helpWord/selectHelpWordDetails", data).then(res => {
  35. if (res.code == 0) {
  36. this.resultData = res.data
  37. } else {
  38. uni.showToast({
  39. title: res.msg,
  40. icon: 'none'
  41. })
  42. }
  43. });
  44. }
  45. }
  46. };
  47. </script>
  48. <style>
  49. page{
  50. background: #ffffff;
  51. }
  52. .helpTitle {
  53. font-size: 40rpx;
  54. font-weight: bold;
  55. margin: 50rpx 30rpx 30rpx;
  56. }
  57. .helpCon {
  58. font-size: 30rpx;
  59. margin: 30rpx 30rpx 50rpx;
  60. line-height: 2em;
  61. }
  62. </style>