| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <template>
- <view class="main">
- <u-parse class="content" :html="info.content"></u-parse>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- id: 0,
- info: {}
- }
- },
- onLoad(options) {
- this.id = typeof(options.id) != 'undefined' ? options.id : 0;
- if (this.id <= 0) {
- this.$u.toast(this.lang.params_error);
- setTimeout(function() {
- uni.navigateBack({
- delta: 1,
- })
- }, 800);
- return false;
- }
- this.getInfo();
- uni.setNavigationBarTitle({
- title: this.lang.article_title
- })
- },
- methods: {
- getInfo() {
- let _this = this
- this.$request.sendToken('/api/article/info', {
- id: _this.id
- }, 'POST').then(res => {
- if (res.success == true) {
- _this.info = res.data;
- } else {
- this.$u.toast(res.msg);
- }
- })
- },
- }
- }
- </script>
- <style lang="scss">
- .content {
- color: #f1f1f1;
- padding: 38rpx 19rpx;
- }
- </style>
|