【小程序】增加个人资料,修改密码页面。协议页面调整
This commit is contained in:
parent
d992e9bed0
commit
4eb5ec6118
|
|
@ -65,6 +65,18 @@
|
|||
"style": {
|
||||
"navigationBarTitleText": "协议"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/change_password/change_password",
|
||||
"style": {
|
||||
"navigationBarTitleText": "修改密码"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/user_data/user_data",
|
||||
"style": {
|
||||
"navigationBarTitleText": "个人资料"
|
||||
}
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
|
||||
let agreementType = ref('') // 协议类型
|
||||
let agreementContent = ref('') // 协议内容
|
||||
// let agreementName = ref('') // 协议名称
|
||||
|
||||
const getData = async (type) => {
|
||||
let res = await getPolicy({ type })
|
||||
|
|
@ -26,12 +25,10 @@
|
|||
}
|
||||
|
||||
onLoad((options: any) => {
|
||||
// if(options.type) {
|
||||
// agreementType.value = options.type
|
||||
// getData(agreementType)
|
||||
// }
|
||||
|
||||
getData('service')
|
||||
if(options.type) {
|
||||
agreementType = options.type
|
||||
getData(agreementType)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,37 @@
|
|||
<template>
|
||||
<view class="">
|
||||
<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'
|
||||
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)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
<template>
|
||||
<view class="">
|
||||
<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'
|
||||
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)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
Loading…
Reference in New Issue