1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <template>
- <view class="content">
- {{textContent}}
- </view>
- </template>
-
-
- <script setup lang="ts">
- import {
- reactive,
- ref
- } from "vue";
- import {
- navTo
- } from "@/utils/utils"
- import {
- onLoad,
- onShow
- } from "@dcloudio/uni-app";
- import {
- stringToJson
- } from "../../utils/network/encryption.js";
- import {
- request
- } from "../../utils/network/request.js";
- import {
- infoQuery
- } from "@/utils/network/api.js"
-
- const textContent=ref('')
-
- // 获取文本信息----用户协议
- const getInfo = (type) => {
- //参数说明
- let options = {
- type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
- data: {
- businessType: 'USER_AGREEMENT'
- }, //请求参数
- method: "POST", //提交方式(默认POST)
- showLoading: true, //是否显示加载中(默认显示)
- };
-
- //调用方式
- request(infoQuery, options)
- .then((res) => {
- let data = stringToJson(res.bizContent)
- console.log(data);
- textContent.value=data.text
- })
- .catch((err) => {
- console.log(err);
- });
- }
-
-
-
-
-
- onLoad(() => {
-
- })
- onShow(() => {
- getInfo()
- console.log(1);
- })
- </script>
-
- <style lang="scss" scoped>
- .content {
- padding: 98rpx 50rpx 0rpx 50rpx;
- font-size: 28rpx;
- font-weight: 400;
- color: #333333;
- line-height: 40px;
- }
- </style>
|