123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259 |
- <template>
- <view class="container">
- <navbar :config="config" backColor="#666"></navbar>
- <view class="detail">
- <view class="title">
- {{detail.title}}
- </view>
- <view class="postMessage">
- <text>{{detail.author}}</text>
- <text>{{detail.published}}</text>
- </view>
- <view class="content">
- <view class="ql-editor-box" v-html="content">
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import img from '../../common/img';
- export default {
- data() {
- return {
- config: {
- back: true,
- title: '宜昌发布',
- color: '#1A1A1A',
- backgroundColor: [1, "#fff"],
- statusBarFontColor: '#1A1A1A',
- leftSlot: true
- },
- detail: {},
- content:''
- }
- },
- onLoad(options) {
- const eventChannel = this.getOpenerEventChannel();
- // 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据
- eventChannel.on('YiChangNews', res => {
- this.detail = res.data;
- const cont = res.data.content.replace(/!important/g, "");
- this.content = cont;
- })
- },
- mounted() {
-
-
- },
- methods: {
- }
- }
- </script>
- <style>
- page {
- background: #fff;
- }
- </style>
- <style lang="scss" scoped>
- ::v-deep img {
- max-width: 100% !important;
- height: auto !important;
- // object-fit:contain;
- // vertical-align: bottom;
- }
- .container {
- // padding-bottom: 100rpx;
- }
- .detail {
- padding: 42rpx 30rpx 40rpx 30rpx;
- // margin: 30rpx;
- background-color: #fff;
- border-radius: 20rpx;
- .title {
- margin-bottom: 40rpx;
- font-size: 35rpx;
- font-family: PingFang SC, PingFang SC-Bold;
- font-weight: 700;
- color: #1a1a1a;
- line-height: 56rpx;
- letter-spacing: -0.7rpx;
- }
- .postMessage {
- display: flex;
- align-items: center;
- // justify-content: space-between;
- padding: 0 10rpx;
- margin-bottom: 30rpx;
- font-size: 26rpx;
- font-family: PingFang SC, PingFang SC-Medium;
- font-weight: 500;
- color: #999999;
- text {
- margin-right: 30rpx;
- }
- & view {
- display: flex;
- align-items: center;
- width: 50%;
- text:last-child {
- flex: 1;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- // margin-right: 50rpx;
- }
- .mb20 {
- margin-bottom: 20rpx;
- }
- .icon-img {
- margin-right: 8rpx;
- color: #FA6138;
- font-size: 36rpx;
- }
- }
- .look-box {
- display: flex;
- align-items: center;
- .look-icon {
- font-size: 36rpx;
- margin-right: 8rpx;
- margin-top: 8rpx;
- }
- }
- * {
- word-break: break-all;
- }
- .content /deep/ img {
- max-width: 100%;
- }
- .content /deep/ .ql-align-center {
- text-align: center;
- }
- .content /deep/ .ql-align-right {
- text-align: right;
- }
- .content /deep/ blockquote {
- display: block;
- border-left: 8px solid #d0e5f2;
- padding: 5px 10px;
- margin: 10px 0;
- line-height: 1.4;
- font-size: 100%;
- background-color: #f1f1f1;
- }
- .content /deep/ .ql-indent-1 {
- margin-left: 60rpx;
- }
- .content /deep/ .ql-indent-2 {
- margin-left: 120rpx;
- }
- .content /deep/ .ql-indent-3 {
- margin-left: 180rpx;
- }
- .content /deep/ .ql-indent-4 {
- margin-left: 240rpx;
- }
- .content /deep/ .ql-indent-5 {
- margin-left: 300rpx;
- }
- .content {
- /deep/ .ql-editor-box {
- .ql-video {
- width: 100%;
- // height: 45vw;
- }
- }
- }
- .browse {
- margin-top: 30rpx;
- font-size: 24rpx;
- font-family: PingFang SC, PingFang SC-Medium;
- font-weight: 500;
- color: #999999;
- view {
- display: flex;
- align-items: center;
- }
- .icon-img {
- margin-right: 8rpx;
- color: #FA6138;
- font-size: 36rpx;
- }
- }
- }
- .footer-box {
- position: fixed;
- left: 0;
- bottom: 0;
- width: 100%;
- padding: 30rpx;
- display: flex;
- justify-content: space-between;
- align-items: center;
- background-color: #fff;
- box-shadow: 0 0 6rpx 6rpx rgba(0, 0, 0, .1);
- }
- .btn {
- max-width: 400rpx;
- padding: 0 20rpx;
- line-height: 60rpx;
- text-align: center;
- color: #fff;
- background-color: #3775F6;
- border-radius: 8rpx;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .footer-tools {
- flex-shrink: 0;
- .look-icon {
- margin-right: 4rpx;
- font-size: 40rpx;
- }
- &>view {
- display: flex;
- align-items: center;
- font-size: 30rpx;
- }
- }
- </style>
|