| | |
| | | <template> |
| | | <div class="wrapper"> |
| | | <u-parse :show-with-animation="true" :lazy-load="true" :selectable="true" :html="res.content" v-if="res"></u-parse> |
| | | |
| | | <button class="submit" @click="agreed()" v-if="privacyAgreement">同意协议</button> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import UParse from '@/uview-components/uview-ui/components/u-parse/u-parse.vue'; |
| | | import '@/components/uview-components/uview-ui'; |
| | | |
| | | import { getArticleDetailByType } from "@/api/article"; |
| | | export default { |
| | | components: {UParse}, |
| | | |
| | | data() { |
| | | return { |
| | | res: "", |
| | | privacyAgreement:false, |
| | | way: { |
| | | USER_AGREEMENT: { |
| | | title: "服务协议", |
| | |
| | | }, |
| | | mounted() {}, |
| | | onLoad(option) { |
| | | if(option.type === 'STORE_REGISTER'){ |
| | | this.privacyAgreement = true; |
| | | } |
| | | console.log(this.way) |
| | | uni.setNavigationBarTitle({ |
| | | title: this.way[option.type].title, |
| | | }); |
| | | this.init(option); |
| | | |
| | | }, |
| | | |
| | | methods: { |
| | | agreed(){ |
| | | uni.setStorageSync('agreed', true); // 存储同意状态 |
| | | uni.navigateBack(); // 返回原页面 |
| | | }, |
| | | init(option) { |
| | | getArticleDetailByType(this.way[option.type].type).then((res) => { |
| | | if (res.data.success) { |
| | |
| | | }; |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .submit { |
| | | color: #fff; |
| | | margin-top: 120rpx; |
| | | background: rgba($light-color, 0.8); |
| | | } |
| | | .wrapper { |
| | | padding: 16rpx; |
| | | } |