sinpage.vue 932 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <template>
  2. <view>
  3. <view class="echo-article-details">
  4. <text>{{pagecon}}</text>
  5. </view>
  6. </view>
  7. </template>
  8. <script>
  9. var _this;
  10. export default {
  11. data() {
  12. return {
  13. field: "aboutus",
  14. pagetil: "关于我们",
  15. pagecon: ""
  16. }
  17. },
  18. onLoad: function(option) {
  19. _this = this;
  20. _this.field = option.field ? option.field : "aboutus";
  21. _this.$req.ajax({
  22. path: "sinpage/getsinpage",
  23. data: {
  24. field: _this.field
  25. }
  26. }).then((data) => {
  27. _this.pagetil = data.pagetil;
  28. _this.pagecon = data.pagecon;
  29. uni.setNavigationBarTitle({
  30. title: data.pagetil
  31. });
  32. }).catch((err) => {
  33. uni.showModal({
  34. title: '信息提示',
  35. content: err,
  36. showCancel: false
  37. });
  38. });
  39. },
  40. onShareAppMessage: function(res) {
  41. return {
  42. title: _this.pagetil,
  43. path: "/pages/tool/sinpage?field="+_this.field
  44. }
  45. }
  46. }
  47. </script>
  48. <style lang="scss">
  49. </style>