3 changed files with 111 additions and 0 deletions
@ -0,0 +1,37 @@ |
|||||
|
<template> |
||||
|
<view> |
||||
|
<view v-html="content"></view> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
export default { |
||||
|
data() { |
||||
|
return { |
||||
|
content:"" |
||||
|
}; |
||||
|
}, |
||||
|
onLoad() { |
||||
|
this.getAboutContent(); |
||||
|
}, |
||||
|
methods:{ |
||||
|
async getAboutContent() { |
||||
|
|
||||
|
const { |
||||
|
data: res |
||||
|
} = await uni.$http.post('/small/project/text/listAll',{type:2}) |
||||
|
if (!res.success) return uni.$showMsg() |
||||
|
|
||||
|
res.data.forEach(item=>{ |
||||
|
this.content = item.content |
||||
|
}) |
||||
|
|
||||
|
uni.$showMsg('数据请求成功!') |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
|
||||
|
</style> |
||||
@ -0,0 +1,37 @@ |
|||||
|
<template> |
||||
|
<view> |
||||
|
<view v-html="content"></view> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
export default { |
||||
|
data() { |
||||
|
return { |
||||
|
content:"" |
||||
|
}; |
||||
|
}, |
||||
|
onLoad() { |
||||
|
this.getAboutContent(); |
||||
|
}, |
||||
|
methods:{ |
||||
|
async getAboutContent() { |
||||
|
|
||||
|
const { |
||||
|
data: res |
||||
|
} = await uni.$http.post('/small/project/text/listAll',{type:1}) |
||||
|
if (!res.success) return uni.$showMsg() |
||||
|
|
||||
|
res.data.forEach(item=>{ |
||||
|
this.content = item.content |
||||
|
}) |
||||
|
|
||||
|
uni.$showMsg('数据请求成功!') |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
|
||||
|
</style> |
||||
@ -0,0 +1,37 @@ |
|||||
|
<template> |
||||
|
<view> |
||||
|
<view v-html="content"></view> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
export default { |
||||
|
data() { |
||||
|
return { |
||||
|
content:"" |
||||
|
}; |
||||
|
}, |
||||
|
onLoad() { |
||||
|
this.getAboutContent(); |
||||
|
}, |
||||
|
methods:{ |
||||
|
async getAboutContent() { |
||||
|
|
||||
|
const { |
||||
|
data: res |
||||
|
} = await uni.$http.post('/small/project/text/listAll',{type:0}) |
||||
|
if (!res.success) return uni.$showMsg() |
||||
|
|
||||
|
res.data.forEach(item=>{ |
||||
|
this.content = item.content |
||||
|
}) |
||||
|
|
||||
|
uni.$showMsg('数据请求成功!') |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
|
||||
|
</style> |
||||
Loading…
Reference in new issue