feat(custom): 新增用户协议
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-03-15 16:06:24 +08:00
parent 5844762b25
commit aef52631e7
11 changed files with 113 additions and 10 deletions

View File

@@ -0,0 +1 @@
export default definePageConfig({});

View 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>