修改
This commit is contained in:
parent
ec924c4f3e
commit
67572688c8
21
api/questionnaire/index.js
Normal file
21
api/questionnaire/index.js
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
import request from "../request.js"
|
||||||
|
|
||||||
|
export function submit(data) {
|
||||||
|
return request({
|
||||||
|
url: `/evaluate/survey/submit`,
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
header: {
|
||||||
|
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function templateget(templateType) {
|
||||||
|
return request({
|
||||||
|
url: `/evaluate/advice/template/get/${templateType}`,
|
||||||
|
method: 'get',
|
||||||
|
header: {
|
||||||
|
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
57
questionnaire/prescription/prescription.vue
Normal file
57
questionnaire/prescription/prescription.vue
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
<template>
|
||||||
|
<view class="app">
|
||||||
|
<view class="title">
|
||||||
|
健康处方:
|
||||||
|
</view>
|
||||||
|
<view class="text">
|
||||||
|
<u-parse :html="content"></u-parse>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
templateget
|
||||||
|
} from '@/api/questionnaire/index.js'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
content: null,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
info(code) {
|
||||||
|
templateget(code).then(res => {
|
||||||
|
let arr = res.data.content.split("");
|
||||||
|
this.content = arr.map((item) => {
|
||||||
|
return item === "\n" ? "<br>" : item
|
||||||
|
}).join("")
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
this.info(options.code)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.app {
|
||||||
|
width: 96%;
|
||||||
|
margin: 20rpx auto;
|
||||||
|
background-color: #fff;
|
||||||
|
|
||||||
|
.text {
|
||||||
|
padding: 20rpx 20rpx 40rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
width: 94%;
|
||||||
|
margin: 0 auto;
|
||||||
|
border-bottom: 2rpx solid #C1C1C1;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333333;
|
||||||
|
line-height: 80rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Loading…
Reference in New Issue
Block a user