This commit is contained in:
1
src/pages/users/user_agreement/index.config.ts
Normal file
1
src/pages/users/user_agreement/index.config.ts
Normal file
@@ -0,0 +1 @@
|
||||
export default definePageConfig({});
|
||||
0
src/pages/users/user_agreement/index.scss
Normal file
0
src/pages/users/user_agreement/index.scss
Normal file
37
src/pages/users/user_agreement/index.vue
Normal file
37
src/pages/users/user_agreement/index.vue
Normal file
@@ -0,0 +1,37 @@
|
||||
<template>
|
||||
<view><rich-text :nodes="nodes"></rich-text> </view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import Taro from "@tarojs/taro";
|
||||
import { ref } from "vue";
|
||||
import { getAgreement } from "../../../api/user";
|
||||
|
||||
const nodes = ref(``);
|
||||
|
||||
Taro.useLoad((e) => {
|
||||
Taro.setNavigationBarTitle({
|
||||
title: e.name,
|
||||
});
|
||||
get_data(e.type);
|
||||
});
|
||||
|
||||
const get_data = async (type: string) => {
|
||||
const res = await getAgreement();
|
||||
switch (type) {
|
||||
case "1":
|
||||
nodes.value = res.data.data.user;
|
||||
break;
|
||||
case "2":
|
||||
nodes.value = res.data.data.policy;
|
||||
break;
|
||||
case "3":
|
||||
nodes.value = res.data.data.integral;
|
||||
break;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import "./index.scss";
|
||||
</style>
|
||||
Reference in New Issue
Block a user