Files
yuxingu-Miniprogram-dev/components/show-pop/show-pop.vue
T
2026-03-23 11:52:05 +08:00

82 lines
2.0 KiB
Vue

<template>
<view>
<uni-popup ref="protocolSlot" type="bottom" :animation="true" :safe-area="false" @maskClick="closePop" >
<view style="width: 750rpx;background: #fff;box-sizing: border-box;
flex-direction: column;display: flex;align-items: center;border-radius: 32rpx 32rpx 0px 0px;">
<!-- padding: 0 40rpx 62rpx 40rpx; -->
<image src="/static/n-zx/show-protocol-top.png" style="width: 750rpx;height: 120rpx;"></image>
<view style="height: 40vh;overflow-y: auto;display: flex;flex-direction: column;padding: 44rpx 40rpx 64rpx 40rpx;">
<text style="color: #3D3D3D;font-size: 40rpx;font-weight: bold;line-height: normal;align-self: center;">{{procotol.title}}</text>
<rich-text :nodes="procotol.context" style="margin-top: 40rpx;"></rich-text>
</view>
<view class="btn" @click="closePop">
<text class="btn-text">知道了</text>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
import {
urls
} from '@/util/apiUrl.js'
import dohttp from '@/util/requestConfig.js'
export default {
name:"show-pop",
props: {
code: {type: String, default: ""},
},
data() {
return {
procotol: {}
};
},
mounted() {
this.$refs.protocolSlot.open("bottom")
this.getProcotol()
},
methods:{
getProcotol(){
dohttp.post(urls.getByCode + "?code="+this.code).then((result) => {
this.procotol = result
})
},
closePop(){
this.$emit("closeProcotolPop")
}
}
}
</script>
<style scoped>
.btn{
width: 550rpx;
height: 96rpx;
border-radius: 2002rpx;
opacity: 1;
/* 自动布局 */
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 8rpx 40rpx;
background: linear-gradient(180deg, #E84B2A 0%, #FF846A 100%);margin-bottom: 40rpx;margin-top: 40rpx;
}
.btn-text{
font-family: SourceHanSansBold;
font-size: 36rpx;
letter-spacing: 0px;
color: #FFFFFF;
}
</style>