123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300 |
- <template>
- <view class="article" v-if="articleMsg">
- <!-- <navbar :config="config"></navbar> -->
- <view class="title">
- {{ articleMsg.title }}
- </view>
- <view class="image-time">
- <image src="@/static/alipay.png" mode=""></image>
- <view class="time">
- {{ articleMsg.update_time }}
- </view>
- </view>
- <view class="text">
- <view class="item" v-if="articleMsg.article_type == 0">
- <jyf-parser
- :html="$mUtil.formatRichText(articleMsg.content)"
- ref="article"
- ></jyf-parser>
- </view>
- <view class="item" v-if="articleMsg.article_type == 1">
- <video :src="articleMsg.video_url" style="width: 100%"></video>
- </view>
- <view class="option">
- <view class="good">
- <image src="@/static/good.png" mode=""></image>
- <view class="num">
- {{ articleMsg.init_like_num }}
- </view>
- </view>
- <view class="message">
- <image src="@/static/message.png" mode=""></image>
- <view class="num">
- {{ articleMsg.comment_sum }}
- </view>
- </view>
- <view class="link">
- <image src="@/static/link.png" mode=""></image>
- <view class="num">
- {{ articleMsg.init_share_num }}
- </view>
- </view>
- </view>
- </view>
- <view class="bottom-btn u-bg-fff">
- <view class="pt-pb30 u-plr30 u-flex-center-sb">
- <view class="u-flex-center">
- <button class="buy-btn u-DCCDA4 u-font30" @click="open(0)">
- 查看更多
- </button> <button class="buy-btn u-DCCDA4 u-font30" @click="open(1)">
- 下载App
- </button>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- config: {
- back: true, //false是tolbar页面 是则不写
- title: "文章详情",
- color: "#fff",
- switchnextstep: true, //切换底部样式
- //背景颜色;参数一:透明度(0-1);参数二:背景颜色(array则为线性渐变,string为单色背景)
- backgroundColor: [1, "#00321E"],
- statusBarFontColor: "#ffffff",
- },
- articleMsg: null,
- };
- },
- props: {
- options: {
- type: Object,
- default: null,
- },
- },
- watch: {
- options(n) {
- this.options = n;
- },
- },
- created() {
- this.getActicle(this.options.id);
- },
- methods: {
- open(number) {
- if(number==0){
- window.location.href = "lida://&pageType=2&type=" + this.type + "&id=" + this.articleMsg.id+"&shareId="+this.options.shareId;
-
- // "lida://
- }else{
-
- uni.navigateTo({
- url:"/pages/down"
- })
-
- }
- },
- getActicle(id) {
- this.$http.get("/bbs/article/info/" + id).then((res) => {
- if (res && res.code == 200) {
- this.articleMsg = res.data;
- }
- });
- },
- },
- };
- </script>
- <style lang="scss" scoped>
- .bottom-btn .buy-btn{
- width: 340px;
- height: 42px;
- line-height: 42px;
- background: #00321e;
- border-radius: 21px;
- }
- .show-bottom {
- background-color: #ffffff;
- border-radius: 50rpx 50rpx 0 0;
- padding: 37rpx 30rpx 22rpx 30rpx;
- .input {
- .texterea-item {
- background-color: #fafafa;
- padding: 22rpx 20rpx;
- border-radius: 21rpx;
- margin: 22rpx 29rpx 4rpx 30rpx;
- }
- }
- .top {
- display: flex;
- align-items: center;
- .line {
- width: 6rpx;
- height: 26rpx;
- background-color: #00321e;
- border-radius: 3rpx;
- }
- .item {
- font-size: 36rpx;
- color: #1a1a1a;
- font-weight: 700;
- margin-left: 14rpx;
- flex: 1;
- }
- .deter-mine {
- font-size: 30rpx;
- font-weight: 500;
- color: #1a1a1a;
- }
- }
- }
- .selected {
- padding: 0 32rpx;
- .item {
- display: flex;
- margin-top: 30rpx;
- // align-items: center;
- .personal {
- margin-left: 18rpx;
- .top-title {
- font-size: 28rpx;
- font-weight: 400;
- color: #1a1a1a;
- }
- .time {
- font-size: 24rpx;
- color: #999999;
- margin-top: 8rpx;
- font-weight: 500;
- }
- .content {
- margin-top: 14rpx;
- font-size: 28rpx;
- font-weight: 500;
- color: #999999;
- }
- }
- image {
- width: 84rpx;
- height: 84rpx;
- }
- }
- .item:nth-child(odd) {
- .content {
- margin-top: 14rpx;
- font-size: 28rpx;
- font-weight: 500;
- color: #999999;
- }
- }
- .item:nth-child(even) {
- .content {
- margin-top: 14rpx;
- font-size: 28rpx;
- font-weight: 500;
- color: #1a1a1a;
- }
- }
- .stay-msg {
- margin-top: 28rpx;
- font-size: 36rpx;
- font-weight: 700;
- color: #1a1a1a;
- }
- }
- .option {
- display: flex;
- .link {
- display: flex;
- align-items: center;
- margin-left: 44rpx;
- image {
- width: 38rpx;
- height: 38rpx;
- }
- .num {
- margin-left: 10rpx;
- font-size: 24rpx;
- font-weight: 500;
- color: #999999;
- }
- }
- .message {
- display: flex;
- align-items: center;
- margin-left: 44rpx;
- image {
- width: 38rpx;
- height: 38rpx;
- }
- .num {
- margin-left: 10rpx;
- font-size: 24rpx;
- font-weight: 500;
- color: #999999;
- }
- }
- .good {
- display: flex;
- align-items: center;
- image {
- width: 38rpx;
- height: 38rpx;
- }
- .num {
- margin-left: 18rpx;
- font-size: 24rpx;
- font-weight: 500;
- color: #999999;
- }
- }
- }
- .text {
- padding: 18rpx 30rpx 40rpx 30rpx;
- color: #666666;
- font-weight: 500;
- line-height: 48rpx;
- border-bottom: 10rpx solid #f5f5f5;
- .item {
- margin-bottom: 30rpx;
- }
- image {
- width: 690rpx;
- height: 390rpx;
- // margin-bottom: 30rpx;
- }
- }
- .image-time {
- display: flex;
- align-items: center;
- margin-left: 30rpx;
- image {
- width: 24rpx;
- height: 24rpx;
- }
- .time {
- margin-left: 10rpx;
- font-size: 24rpx;
- font-weight: 400;
- color: #999999;
- }
- }
- .title {
- padding: 48rpx 30rpx 16rpx 30rpx;
- font-size: 42rpx;
- font-weight: 700;
- color: #1a1a1a;
- }
- </style>
|