榆钱落尽槿花稀 01448b7113 feat: 添加多个静态图片资源及配置文件
新增了多个静态图片资源文件,包括01.png、02.png等,并添加了相关的配置文件和组件,如vue.config.js、package.json等。同时引入了Tuniao UI库,并配置了相关的依赖和设置,以支持项目的开发和构建。
2025-05-09 17:07:24 +08:00

116 lines
3.1 KiB
Vue
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view style="letter-spacing: 1rpx;">
<tn-nav-bar :isBack="false" backTitle="" :bottomShadow="true" backgroundColor="#FFFFFF">
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left">
<view style="padding-left: 15rpx;" @click="goBack()">
<text class="tn-icon-left" style="font-size: 40rpx;"></text>
</view>
<view class="tn-margin-top"
style=";text-shadow: 1rpx 0 0 #FFF, 0 1rpx 0 #FFF, -1rpx 0 0 #FFF , 0 -1rpx 0 #FFF;">
<tn-tabs :list="[{name:'公告详情'}]" :current="topCurrent" activeColor="#000" :bold="false"
:fontSize="36"></tn-tabs>
</view>
</view>
</tn-nav-bar>
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
<view style="padding: 30rpx;">
<view style="text-align: center;font-size:40rpx;font-weight: 600">{{info.notice_title}}</view>
<view style="margin-top: 30rpx;color: #999;">
<text>时间{{info.createtime}}</text>
</view>
<view style="width: 100%;height: 2rpx;background-color: #eee;margin-top: 30rpx;"></view>
<view>
<!-- <view style="margin-top: 20rpx;position: relative;">-->
<!-- <image src="/static/b1.png"-->
<!-- style="width: 100rpx;height: 100rpx;position: absolute;left: 0;right: 0;top: 38%;z-index: 10;margin: 0 auto;">-->
<!-- </image>-->
<!-- <image src="/static/t7.jpg" style="width: 100%;border-radius: 20rpx;" mode="widthFix">-->
<!-- </image>-->
<!-- </view>-->
<view class="ks_html" style="line-height: 50rpx;margin-top: 20rpx;">
<div v-html="info.notice_content"></div>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
getNoticeInfo,
} from '@/util/api.js';
import store from '@/store/index.js'
export default {
data() {
return {
topCurrent: 0,
id: 0,
info: {},
apiImgUrl: this.$store.state.imgUrl,
}
},
// mounted() {
// var id = window.location.href.split("=")[1];
// this.id = id;
// this.getNewsInfo();
// },
onLoad(d) {
console.log(d);
this.id = d.id;
this.getNewsInfo();
},
onShareAppMessage() { // 分享到微信好友
// 更多参数配置,参考文档
return {
title: this.info.notice_title,
path: '/pages/packageB/news/notice_info?id=' + this.info.id,
}
},
onShareTimeline() { // 分享到朋友圈
return {
title: this.info.notice_title,
path: '/pages/packageB/news/notice_info?id=' + this.info.id,
}
},
methods: {
getNewsInfo() {
getNoticeInfo({
id: this.id
})
.then(res => {
console.log(res);
if (res.code == 1) {
var key = res.data;
if (key.notice_content.indexOf("<img") != -1) {
key.notice_content = getApp().addWidthToImages(key.notice_content);
}
this.info = key;
}
})
.catch(error => {
uni.showToast({
title: error,
duration: 2000
});
})
},
goBack() {
if (getCurrentPages().length > 1) {
uni.navigateBack()
} else {
uni.redirectTo({
url: '/pages/index/index'
})
}
},
}
}
</script>
<style>
.ks_html img {
width: 100% !important;
}
</style>