123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229 |
- <template>
- <view class="container">
- <navbar :config="config" backColor="#666666"></navbar>
- <view class="detail">
- <view class="title">
- {{detail.problemTitle}}
- </view>
- <view class="postMessage">
- <!-- <view> -->
- <!-- <view class="">
- <text class="iconfont2 icon-img"></text>
- <text>发布者:{{detail.informationAuthor}}</text>
- </view>
- <view class="">
- <text class="iconfont2 icon-img"></text>
- <text>{{detail.createTime}}</text>
- </view> -->
- <!-- </view> -->
- <!-- <view @click="shareHandler">
- <text class="iconfont2 icon-img"></text>
- <text>分享</text>
- </view> -->
- </view>
- <view class="content">
- <view class="ql-editor-box" v-html="detail.replyContent">
- </view>
- </view>
- <!-- <view class="browse">
- <view class="look-box">
- <text class="iconfont3 look-icon"></text>
- <text>浏览量:{{detail.browse_sum||0}}</text>
- </view>
- </view> -->
- </view>
- </view>
- <!-- <share ref="shares" :contentHeight="580"></share> -->
- </view>
- </template>
- <script>
- import share from "@/pages/public/share";
- import rate from "@/components/rate.vue"
- export default {
- components: {
- share,
- rate
- },
- data() {
- return {
- config: {
- back: true,
- title: '问题详情',
- color: 'black',
- backgroundColor: [1, "#fff"],
- statusBarFontColor: '#1A1A1A',
- leftSlot: true
- },
- detail: {},
- }
- },
- onLoad(options) {
- if (options && options.id) {
- this.getDetail(options.id)
- }
- },
- methods: {
- getDetail(id) {
- this.$yghttp.get(`/common/problem/info/${id}`).then(res => {
- if (res.code === 200) {
- this.detail = res.data
- }
- })
- },
- shareHandler() {
- if (!token) {
- uni.navigateTo({
- url: "/pages/login/index",
- });
- } else {
- // 咨询分享
- // this.$http.post(`/information/share/${this.detail.id}`).then(res => {})
- this.$nextTick(() => {
- this.$refs.shares.shareInfo("/?&shareId=" + user.id, null, null, null, null, this.detail.id);
- });
- }
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .detail {
- padding: 20rpx 20rpx 40rpx 30rpx;
- .title {
- margin-bottom: 14rpx;
- font-size: 35rpx;
- font-family: PingFang SC, PingFang SC-Bold;
- font-weight: 700;
- color: #1a1a1a;
- line-height: 52rpx;
- letter-spacing: -0.7rpx;
- }
- .postMessage {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 0 10rpx;
- margin-bottom: 30rpx;
- font-size: 24rpx;
- font-family: PingFang SC, PingFang SC-Medium;
- font-weight: 500;
- color: #999999;
- & 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: #3775F6;
- 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: #3775F6;
- font-size: 36rpx;
- }
- }
- }
- </style>
|