协议页面对接
This commit is contained in:
parent
961ec0b967
commit
d992e9bed0
|
|
@ -8,3 +8,7 @@ export function smsSend(data: any) {
|
|||
export function getConfig() {
|
||||
return request.get({ url: '/config' })
|
||||
}
|
||||
|
||||
export function getPolicy(data: any) {
|
||||
return request.get({ url: '/policy', data: data })
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//菜单主题类型
|
||||
export enum AgreementEnum {
|
||||
PRIVACY = '1',
|
||||
SERVICE = '2'
|
||||
PRIVACY = 'service',
|
||||
SERVICE = 'privacy'
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,38 @@
|
|||
<template>
|
||||
<view class="">
|
||||
<u-parse :html="content"></u-parse>
|
||||
<u-parse :html="agreementContent"></u-parse>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { reactive, ref } from 'vue'
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import { AgreementEnum } from '@/enums/agreementEnums'
|
||||
const agreement = ref('') // 协议类型
|
||||
import { getPolicy } from '@/api/app'
|
||||
|
||||
|
||||
let agreementType = ref('') // 协议类型
|
||||
let agreementContent = ref('') // 协议内容
|
||||
// let agreementName = ref('') // 协议名称
|
||||
|
||||
const getData = async (type) => {
|
||||
let res = await getPolicy({ type })
|
||||
console.log(res, 'res')
|
||||
|
||||
agreementContent.value = res.content
|
||||
|
||||
uni.setNavigationBarTitle({
|
||||
title: res.name
|
||||
})
|
||||
}
|
||||
|
||||
onLoad((options: any) => {
|
||||
// if(options.type) {
|
||||
// agreementType.value = options.type
|
||||
// getData(agreementType)
|
||||
// }
|
||||
|
||||
getData('service')
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
|||
Loading…
Reference in New Issue