question_uniapp/pages/mine/noticedetails.vue

104 lines
2.6 KiB
Vue
Raw Permalink Normal View History

2025-06-06 03:08:19 +08:00
<template>
<view class="page">
2025-06-10 00:51:49 +08:00
<uni-nav-bar @clickLeft="goto(1, 1)" left-icon="back" :border="false" :shadow="false" :fixed="true"
2025-06-10 17:10:40 +08:00
:title="$t('noticedetail.title')" backgroundColor="#fff" :statusBar="true"></uni-nav-bar>
2025-06-10 00:51:49 +08:00
<view style="width: 92%; margin: 40rpx auto;">
<view style="font-weight: 700;font-size: 40rpx;color: #3D3D3D;line-height: 56rpx;text-transform: none;">
2025-06-06 03:08:19 +08:00
{{model.title}}
</view>
2025-06-10 00:51:49 +08:00
<view style="font-size: 24rpx; font-weight: 400; color: #999; margin-bottom: 40rpx;">
2025-06-06 03:08:19 +08:00
{{model.created_at}}
</view>
<view class="table_content"><jyf-parser :html="model.content"></jyf-parser></view>
</view>
</view>
</template>
<script>
import jyfParser from '@/components/common/jyf-parser/jyf-parser';
import {
mapState,
mapMutations
} from 'vuex';
export default {
components: {
jyfParser
},
data() {
return {
model: {},
};
},
computed: {
...mapState(['userInfo'])
},
//第一次加载
onLoad(e) {
if(e.id !== typeof(undefined) && e.id !== undefined){
this.getDetails(e.id)
}
},
//页面显示
onShow() {},
//方法
methods: {
2025-06-10 00:51:49 +08:00
goto(url, type) {
if (type == 2) {
return uni.switchTab({ url: url })
}
if (type == 1) {
return uni.navigateBack({ delta: url });
}
uni.navigateTo({
url: url
})
},
2025-06-06 03:08:19 +08:00
getDetails(id){
this.$http.get('/api/article/detail?id='+id).then(res => {
if(res.code == 0){
this.model = res.data;
}
});
}
},
//页面隐藏
onHide() {},
//页面卸载
onUnload() {},
//页面下来刷新
onPullDownRefresh() {},
//页面上拉触底
onReachBottom() {},
//用户点击分享
onShareAppMessage(e) {
return this.wxShare();
}
};
</script>
<style lang="scss" scoped>
@import '@/style/mixin.scss';
body{background-color: #fff;}
.page{ min-height: 100vh;background-color: #fff;}
.wallet1{
2025-06-10 00:51:49 +08:00
border-radius: 20rpx; padding: 40rpx 30rpx; width: 84%; margin: 20rpx auto;
background: url('/static/images/w1.png') #2B66F6; background-repeat: no-repeat; background-position: 92% 10rpx;
2025-06-06 03:08:19 +08:00
}
.cell_list .t{
2025-06-10 00:51:49 +08:00
color: #3d3d3d; font-size: 32rpx; font-weight: 400; line-height: 50rpx;
2025-06-06 03:08:19 +08:00
}
.cell_list .d{
2025-06-10 00:51:49 +08:00
color: #999; font-size: 24rpx; font-weight: 400; line-height: 50rpx; clear: both;
2025-06-06 03:08:19 +08:00
}
.cell_list .u{
2025-06-10 00:51:49 +08:00
color: #1D61E7; font-weight: 600;float: right; font-size: 32rpx;
2025-06-06 03:08:19 +08:00
}
.cell_list .u1{
2025-06-10 00:51:49 +08:00
color: #333; font-weight: 600;float: right;font-size: 32rpx;
2025-06-06 03:08:19 +08:00
}
.w{
2025-06-10 00:51:49 +08:00
background-color: #F8F8F8; border-radius: 20rpx; padding: 40rpx 20rpx;
2025-06-06 03:08:19 +08:00
}
.w .t{
2025-06-10 00:51:49 +08:00
text-align: center; margin-top: 20rpx; font-size: 28rpx;
2025-06-06 03:08:19 +08:00
}
</style>