1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <template>
- <mobile-frame>
- <view class="main">
- <view class="one">
- <u-parse :content="info.content"></u-parse>
- </view>
- </view>
- </mobile-frame>
- </template>
- <script>
- import uParse from "@/components/u-parse/u-parse.vue";
- export default {
- components: {
- uParse,
- },
- data() {
- return {
- id: "",
- info: {},
- };
- },
- onLoad: function (e) {
- const that = this;
- that.$set(that, `id`, e.id || "");
- },
- onShow: function () {
- const that = this;
- that.search();
- },
- methods: {
- async search() {
- const that = this;
- const res = await that.$api(`/banner/${that.id}`, "GET");
- if (res.errcode == "0") {
- that.$set(that, `info`, res.data);
- } else {
- uni.showToast({
- title: res.errmsg,
- icon: "none",
- });
- }
- },
- },
- };
- </script>
- <style lang="scss">
- .main {
- display: flex;
- flex-direction: column;
- width: 100vw;
- height: 100vh;
- .one {
- padding: 2vw;
- }
- }
- </style>
|