123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170 |
- <template>
- <div class="detail">
- <div class="detail-body">
- <div class="detail-card top-tit-card">
- <div class="left">
- <i class="iconfont icon-laba"></i>
- </div>
- <div class="right">
- <div class="top">
- {{ activityDetail.activityName }}
- </div>
- <div class="bottom">
- <span>{{ activityDetail.updatedAt }}</span>
- <span>园区管委会</span>
- </div>
- </div>
- <div></div>
- </div>
- <div class="detail-card info">
- <div class="card-title">详情</div>
- <div
- class="text"
- style="font-size: 24rpx"
- v-html="activityDetail.styleContent"
- ></div>
- </div>
- </div>
- <div class="white-bottom"></div>
- </div>
- </template>
-
- <script>
- import TelNum from "../../subPackages/components/tel-number";
- import { clickCollect, getUserLocalStorageInfo } from "@/js_sdk/http";
- import { getActivityById1 } from "@/js_sdk/api_activity";
- export default {
- components: {
- TelNum,
- },
- data() {
- return {
- signInfo: {},
- signInCode: "",
- active: false,
- id: "",
- activityDetail: {
- referenceId: "",
- },
- number: 0,
- };
- },
- onLoad(option) {
- // this.getScanCode();
- console.log("option", option.id);
- this.id = option.id;
- this.getActivityById1();
- },
- methods: {
- openFile(url) {
- uni.downloadFile({
- url: url, // 网络文档地址
- success: (data) => {
- if (data.statusCode === 200) {
- uni.saveFile({
- tempFilePath: data.tempFilePath, //临时路径
- success: function (res) {
- // 保存路径
- setTimeout(() => {
- //打开文档查看
- uni.openDocument({
- filePath: res.savedFilePath,
- success: function (res) {},
- });
- }, 3000);
- },
- });
- }
- },
- fail: (err) => {
- uni.showToast({
- title: "失败请重新下载",
- });
- },
- });
- },
- getActivityById1() {
- const _this = this;
- getActivityById1(this.id, getUserLocalStorageInfo().user.id).then(
- (res) => {
- if (res.data) {
- _this.activityDetail = res.data;
- this.activityDetail.styleContent = res.data.styleContent.replace(
- "<img",
- "<img style='max-width:100%'"
- );
- _this.activityDetail.updatedAt = this.$common.transServDate(
- _this.activityDetail.updatedAt
- );
- }
- }
- );
- },
- },
- };
- </script>
-
- <style lang="scss" type="text/scss" >
- .detail {
- box-sizing: border-box;
- background-color: #f2f2f2;
- padding: 20rpx 30rpx 140rpx;
- overflow-y: auto;
- .card-title {
- background: #2a3980;
- color: #fff;
- font-size: 3.467vw;
- line-height: 11.2vw;
- padding: 0 2.667vw;
- }
- .detail-body {
- .detail-card {
- padding: 20rpx 30rpx;
- border-radius: 10rpx;
- box-sizing: border-box;
- background: #fff;
- .left {
- width: 70rpx;
- i {
- font-size: 50rpx;
- }
- }
- .right {
- .top {
- font-size: 24rpx;
- color: #666666;
- }
- }
- &:first-child {
- margin-bottom: 20rpx;
- }
- }
- .info {
- padding: 0;
- .text {
- padding: 30rpx;
- word-break: break-all;
- font-size: 26rpx;
- color: #333333;
- line-height: 1.4;
- img {
- max-width: 100%;
- }
- }
- }
- }
- }
- </style>
- <style lang="scss">
- </style>
|