wangfumin 2 місяців тому
батько
коміт
2b70b5c790
55 змінених файлів з 1776 додано та 219 видалено
  1. 3 1
      app.js
  2. 3 1
      app.json
  3. 2 2
      components/active-time-select/index.wxml
  4. 1 1
      components/loading/index.wxml
  5. 5 5
      components/loading/index.wxss
  6. 2 2
      components/time-select/time-select.wxml
  7. 12 1
      pages/collection/index.js
  8. 1 1
      pages/collection/index.wxml
  9. 1 1
      pages/collection/index.wxss
  10. 449 0
      pages/exhibition/activeDetails/index.js
  11. 9 0
      pages/exhibition/activeDetails/index.json
  12. 78 0
      pages/exhibition/activeDetails/index.wxml
  13. 271 0
      pages/exhibition/activeDetails/index.wxss
  14. 34 5
      pages/exhibition/index.js
  15. 10 8
      pages/exhibition/index.wxml
  16. 30 1
      pages/exhibition/index.wxss
  17. 3 3
      pages/index/active-page/active-page.js
  18. 1 1
      pages/index/active-page/active-page.wxss
  19. 4 4
      pages/index/active-people/active-people.js
  20. 2 2
      pages/index/active-people/active-people.wxml
  21. 1 1
      pages/index/active-people/active-people.wxss
  22. 1 1
      pages/index/active-preview/active-preview.js
  23. 1 1
      pages/index/active-preview/active-preview.wxml
  24. 6 2
      pages/index/activity/activity.js
  25. 5 5
      pages/index/activity/activity.wxml
  26. 4 4
      pages/index/activity/activity.wxss
  27. 41 9
      pages/index/index.js
  28. 54 34
      pages/index/index.wxml
  29. 22 3
      pages/index/index.wxss
  30. 4 4
      pages/index/news/news.wxml
  31. 4 4
      pages/index/news/news.wxss
  32. 1 1
      pages/index/start-preview/start-preview.wxss
  33. 4 4
      pages/index/visit-people/visit-people.js
  34. 2 2
      pages/index/visit-people/visit-people.wxml
  35. 1 1
      pages/index/visit-people/visit-people.wxss
  36. 1 1
      pages/index/visit-preview/visit-preview.js
  37. 2 2
      pages/index/visit-preview/visit-preview.wxml
  38. 1 1
      pages/index/visit-preview/visit-preview.wxss
  39. 1 1
      pages/user/feedback/index.wxss
  40. 2 0
      pages/user/index.js
  41. 4 4
      pages/user/index.wxml
  42. 4 4
      pages/user/index.wxss
  43. 225 0
      pages/user/map/index.js
  44. 8 0
      pages/user/map/index.json
  45. 59 0
      pages/user/map/index.wxml
  46. 222 0
      pages/user/map/index.wxss
  47. 4 4
      pages/user/my-preview/index.wxml
  48. 1 1
      pages/user/my-preview/index.wxss
  49. 1 1
      pages/user/userList/index.wxml
  50. 1 1
      pages/user/userList/index.wxss
  51. 1 1
      project.config.json
  52. 2 2
      project.private.config.json
  53. 55 39
      utils/api.js
  54. 82 20
      utils/htmlProcessor.js
  55. 28 22
      utils/util.js

+ 3 - 1
app.js

@@ -1,12 +1,14 @@
 // app.js
 const { utils } = require('./utils/api.js');
 App({
+  onload() {
+    wx.hideTabBar();
+  },
   onLaunch() {
     // 展示本地存储能力
     const logs = wx.getStorageSync('logs') || []
     // logs.unshift(Date.now())
     // wx.setStorageSync('logs', logs)
-
     // 微信登录获取token
     this.wxLogin()
   },

+ 3 - 1
app.json

@@ -15,7 +15,9 @@
     "pages/user/my-preview/index",
     "pages/index/activity/activity",
     "pages/index/news/news",
-    "pages/user/feedback/index"
+    "pages/user/feedback/index",
+    "pages/user/map/index",
+    "pages/exhibition/activeDetails/index"
   ],
   "window": {
     "navigationBarTextStyle": "black",

+ 2 - 2
components/active-time-select/index.wxml

@@ -3,11 +3,11 @@
     <view class="time-select-title">请选择参观日期</view>
     <view class="month-selector">
       <view class="arrow prev" bindtap="prevMonth">
-        <image src="https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/imgs/icon_left.png" class="arrow-icon"></image>
+        <image src="https://sit-kelamayi.4dage.com/mini/wxImg/icon_left.png" class="arrow-icon"></image>
       </view>
       <view class="current-month">{{currentYearMonth}}</view>
       <view class="arrow next" bindtap="nextMonth">
-        <image src="https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/imgs/icon_right.png" class="arrow-icon"></image>
+        <image src="https://sit-kelamayi.4dage.com/mini/wxImg/icon_right.png" class="arrow-icon"></image>
       </view>
     </view>
   </view>

+ 1 - 1
components/loading/index.wxml

@@ -7,7 +7,7 @@
     </view>
 
     <view class="progress-container">
-      <image src="https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/imgs/loading/process.png" class="progress-bg" mode="widthFix" />
+      <image src="https://sit-kelamayi.4dage.com/mini/wxImg/loading/process.png" class="progress-bg" mode="widthFix" />
       <view class="custom-progress-bar">
         <view class="progress-fill" style="width: {{progress}}%"></view>
       </view>

+ 5 - 5
components/loading/index.wxss

@@ -3,7 +3,7 @@
   width: 100%;
   height: 100vh;
   overflow: hidden;
-  background: url('https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/karamay/loading-bg.png') no-repeat center center;
+  background: url('https://sit-kelamayi.4dage.com/mini/wxImg/loading-bg.png') no-repeat center center;
   background-size: cover;
   display: flex;
   flex-direction: column;
@@ -32,11 +32,11 @@
 .car {
   width: 150px;
   height: 132px;
-  background: url('https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/karamay/carLoading.png') 0 0;
+  background: url('https://sit-kelamayi.4dage.com/mini/wxImg/carLoading.png') 0 0;
   position: relative;
   bottom: 0;
   background-size: 12500% 100%;
-  animation: car 3s steps(10) infinite;
+  animation: car 2s steps(10) infinite;
 }
 
 @keyframes car {
@@ -106,11 +106,11 @@
 .logo {
   width: 300px;
   height: 300px;
-  background: url('https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/karamay/logo.png') 0 0;
+  background: url('https://sit-kelamayi.4dage.com/mini/wxImg/logo.png') 0 0;
   position: relative;
   bottom: 0;
   background-size: 2400% 100%;
-  animation: sprite 3s steps(23) 1 forwards;
+  animation: sprite 2s steps(23) 1 forwards;
 }
 
 @keyframes sprite {

+ 2 - 2
components/time-select/time-select.wxml

@@ -3,11 +3,11 @@
     <view class="time-select-title">请选择参观日期</view>
     <view class="month-selector">
       <view class="arrow prev" bindtap="prevMonth">
-        <image src="https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/imgs/icon_left.png" class="arrow-icon"></image>
+        <image src="https://sit-kelamayi.4dage.com/mini/wxImg/icon_left.png" class="arrow-icon"></image>
       </view>
       <view class="current-month">{{currentYearMonth}}</view>
       <view class="arrow next" bindtap="nextMonth">
-        <image src="https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/imgs/icon_right.png" class="arrow-icon"></image>
+        <image src="https://sit-kelamayi.4dage.com/mini/wxImg/icon_right.png" class="arrow-icon"></image>
       </view>
     </view>
   </view>

+ 12 - 1
pages/collection/index.js

@@ -52,7 +52,7 @@ Page({
         title: this.data.searchText || undefined
       };
       
-      const res = await museumApi.getCollectionList(params);
+      const res = await museumApi.getArtifactList(params);
       console.log('获取收藏列表参数:', res);
       if (res.records) {
         const newList = res.records || [];
@@ -152,5 +152,16 @@ Page({
       title: '克拉玛依博物馆 - 典藏',
       path: '/pages/collection/index'
     };
+  },
+
+  /**
+   * 用户点击右上角分享到朋友圈
+   */
+  onShareTimeline() {
+    return {
+      title: '克拉玛依博物馆 - 珍贵典藏文物展示',
+      query: '',
+      imageUrl: '' // 可以设置自定义分享图片
+    };
   }
 })

+ 1 - 1
pages/collection/index.wxml

@@ -41,7 +41,7 @@
           <view class="item-info">
             <view class="item-category">{{item.category || '三维文物'}}</view>
             <view class="item-title">{{item.title || '未知标题'}}</view>
-            <view class="item-description">{{item.description || '暂无描述'}}</view>
+            <view class="item-description">{{item.remark || '暂无描述'}}</view>
           </view>
         </view>
       </view>

+ 1 - 1
pages/collection/index.wxss

@@ -1,7 +1,7 @@
 /* pages/collection/index.wxss */
 .collection-container {
   height: 100vh;
-  background-image: url('https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/karamay/bg.png');
+  background-image: url('https://sit-kelamayi.4dage.com/mini/wxImg/bg.png');
   background-size: cover;
   background-repeat: no-repeat;
   box-sizing: border-box;

+ 449 - 0
pages/exhibition/activeDetails/index.js

@@ -0,0 +1,449 @@
+// pages/exhibition/activeDetails/index.js
+const { museumApi } = require('../../../utils/api.js');
+
+Page({
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    loading: false,
+    detailData: null,
+    contentItems: [],
+    fromtype: '',
+    isFrom: '',
+    shouldShowBackButton: true,
+    isPreviewMode: false,
+    formattedPublishTime: ''
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    // 检查是否来自微信,如果是则隐藏返回按钮
+    if (options.isfrom === 'weixin') {
+      this.setData({
+        shouldShowBackButton: false,
+        isFrom: 'weixin'
+      });
+    }
+    
+    // 检查是否为预览模式
+    if (options.preview === '1') {
+      this.setData({
+        isPreviewMode: true
+      });
+    }
+    
+    // 设置页面参数
+    this.setData({
+      fromtype: options.type || '',
+      isFrom: options.isFrom || ''
+    });
+    
+    // 加载详情数据
+    this.loadDetailData(options);
+  },
+
+  /**
+   * 返回上一页
+   */
+  goBack() {
+    wx.navigateBack({
+      delta: 1
+    });
+  },
+
+  /**
+   * 跳转到线上观展
+   */
+  goToOnlineExhibition() {
+    const { detailData, isPreviewMode } = this.data;
+    let targetUrl;
+    
+    // 如果是预览模式,优先使用webSiteB
+    if (isPreviewMode && detailData.webSiteB) {
+      targetUrl = detailData.webSiteB;
+    } else {
+      targetUrl = detailData.webSite;
+    }
+    
+    if (targetUrl) {
+      // 小程序中使用web-view或复制链接
+      wx.setClipboardData({
+        data: targetUrl,
+        success: function() {
+          wx.showToast({
+            title: '链接已复制',
+            icon: 'success'
+          });
+        }
+      });
+    }
+  },
+
+  /**
+   * 跳转到活动预约页面
+   */
+  goToActivePreview() {
+    const { detailData } = this.data;
+    const activityId = detailData.activityId || detailData.id;
+    
+    wx.navigateTo({
+      url: `/pages/index/active-page/active-page?activityId=${activityId}&type=2`
+    });
+  },
+
+  /**
+   * 处理链接点击
+   */
+  onLinkTap(e) {
+    const { url } = e.currentTarget.dataset;
+    if (url) {
+      // 复制链接到剪贴板
+      wx.setClipboardData({
+        data: url,
+        success: function() {
+          wx.showToast({
+            title: '链接已复制',
+            icon: 'success'
+          });
+        }
+      });
+    }
+  },
+
+  /**
+   * 处理rich-text中的链接点击
+   */
+  onRichTextTap(e) {
+    const { links } = e.currentTarget.dataset;
+    if (links && links.length > 0) {
+      // 如果只有一个链接,直接打开
+      if (links.length === 1) {
+        const url = links[0].url;
+        this.openLink(url);
+      } else {
+        // 如果有多个链接,显示选择列表
+        const itemList = links.map(link => link.text);
+        wx.showActionSheet({
+          itemList: itemList,
+          success: (res) => {
+            const selectedLink = links[res.tapIndex];
+            this.openLink(selectedLink.url);
+          }
+        });
+      }
+    }
+  },
+
+  /**
+   * 打开链接
+   */
+  openLink(url) {
+    if (url) {
+      // 复制链接到剪贴板
+      wx.setClipboardData({
+        data: url,
+        success: function() {
+          wx.showToast({
+            title: '链接已复制',
+            icon: 'success'
+          });
+        }
+      });
+    }
+  },
+
+  /**
+   * 格式化时间(横线分隔)
+   */
+  formatTimeWithDash(timeStr) {
+    console.log('formatTimeWithDash:', timeStr);
+    if (!timeStr) return '';
+    const date = new Date(timeStr);
+    const year = date.getFullYear();
+    const month = String(date.getMonth() + 1).padStart(2, '0');
+    const day = String(date.getDate()).padStart(2, '0');
+    return `${year}-${month}-${day}`;
+  },
+
+  /**
+   * 获取字段值(支持预览模式)
+   */
+  getFieldValue(fieldName) {
+    const { detailData, isPreviewMode } = this.data;
+    if (!detailData) return '';
+    
+    if (isPreviewMode) {
+      // 预览模式下优先读取带B后缀的字段
+      const bFieldName = fieldName + 'B';
+      return detailData[bFieldName] || detailData[fieldName] || '';
+    } else {
+      return detailData[fieldName] || '';
+    }
+  },
+
+  /**
+   * 加载详情数据
+   */
+  loadDetailData(options) {
+    const { id, type } = options;
+    
+    if (!id) {
+      console.error('缺少ID参数');
+      return;
+    }
+
+    this.setData({
+      loading: true
+    });
+
+    let apiPromise;
+    
+    // 根据类型调用不同的接口
+    switch (type) {
+      case 'information':
+        apiPromise = museumApi.getInformationDetail(id);
+        break;
+      case 'exhibition':
+        apiPromise = museumApi.getExhibitDetail(id);
+        break;
+      case 'activity':
+        apiPromise = museumApi.getActivityDetail(id);
+        break;
+      case 'news':
+        apiPromise = museumApi.getNewsDetail(id);
+        break;
+      case 'museum':
+        apiPromise = museumApi.getMuseumDetail(1);
+        break;
+      default:
+        console.error('未知的详情类型:', type);
+        this.setData({ loading: false });
+        return;
+    }
+
+    apiPromise
+      .then(response => {
+        if (response) {
+          // 获取内容字段
+          const content = this.getContentForParsing(response);
+          const parsedContent = this.parseContent(content);
+          
+          // 格式化发布时间
+          const formattedTime = this.formatTimeWithDash(response.publish);
+          
+          this.setData({
+            detailData: response,
+            contentItems: parsedContent,
+            formattedPublishTime: formattedTime
+          });
+        }
+      })
+      .catch(error => {
+        console.error('获取详情数据失败:', error);
+        this.setData({
+          detailData: null
+        });
+        wx.showToast({
+          title: '加载失败',
+          icon: 'none'
+        });
+      })
+      .finally(() => {
+        this.setData({
+          loading: false
+        });
+      });
+  },
+
+  /**
+   * 获取用于解析的内容
+   */
+  getContentForParsing(detailData) {
+    const { isPreviewMode } = this.data;
+    
+    if (isPreviewMode) {
+      // 预览模式下优先使用带B后缀的字段
+      return detailData.contextB || detailData.context || '';
+    } else {
+      return detailData.context || '';
+    }
+  },
+
+  /**
+   * 解析HTML内容为不同类型的内容项(使用map页面的解析规则)
+   */
+  parseContent(content) {
+    if (!content) return [];
+    
+    const contentItems = [];
+    const matches = [];
+    
+    // 定义所有匹配规则
+    const patterns = [
+      {
+        regex: /<p[^>]*>(.*?)<\/p>/gi,
+        type: 'text',
+        handler: (match) => {
+          let content = match[1];
+          // 检查是否包含缩进样式
+          const hasIndent = match[0].includes('text-indent:2em') || match[0].includes('text-indent: 2em');
+          
+          // 检查是否包含a标签链接
+          const linkRegex = /<a[^>]*href="([^"]+)"[^>]*>(.*?)<\/a>/gi;
+          const hasLinks = linkRegex.test(content);
+          
+          if (hasLinks) {
+             // 如果包含链接,转换为rich-text节点格式
+             let processedContent = content;
+             const links = [];
+             let linkMatch;
+             linkRegex.lastIndex = 0; // 重置正则表达式
+             
+             // 收集所有链接信息
+             while ((linkMatch = linkRegex.exec(content)) !== null) {
+               links.push({
+                 url: linkMatch[1],
+                 text: linkMatch[2].replace(/<[^>]*>/g, '')
+               });
+             }
+             
+             // 将a标签转换为带样式的span标签
+             processedContent = processedContent.replace(
+               /<a[^>]*href="([^"]+)"[^>]*>(.*?)<\/a>/gi,
+               '<span style="color: #007bff; text-decoration: underline;" data-url="$1">$2</span>'
+             );
+             
+             return {
+               type: 'text_with_links',
+               content: processedContent,
+               links: links,
+               indent: hasIndent
+             };
+           } else {
+            // 普通文本处理
+            let text = content.replace(/<[^>]*>/g, '');
+            
+            // 将HTML实体编码的空格转换为对应数量的&nbsp;
+            text = text.replace(/&nbsp;/g, '&nbsp;');
+            text = text.replace(/&ensp;/g, '&nbsp;&nbsp;');
+            text = text.replace(/&emsp;/g, '&nbsp;&nbsp;&nbsp;&nbsp;');
+            text = text.replace(/&#160;/g, '&nbsp;');
+            // 将普通空格也转换为&nbsp;
+            text = text.replace(/ /g, '&nbsp;');
+            
+            // 如果有缩进样式,在文本前添加缩进
+            if (hasIndent) {
+              text = '&nbsp;&nbsp;&nbsp;&nbsp;' + text;
+            }
+            
+            return {
+              type: 'text',
+              content: text,
+              indent: hasIndent
+            };
+          }
+        }
+      },
+      {
+        regex: /<div[^>]*class="[^"]*media-wrap[^"]*image-wrap[^"]*"[^>]*>.*?<img[^>]*src="([^"]+)"[^>]*(?:alt="([^"]*)")?\/??>.*?<\/div>/gi,
+        type: 'image',
+        handler: (match) => ({
+          type: 'image',
+          src: match[1],
+          alt: match[2] || '图片'
+        })
+      },
+      {
+        regex: /<div[^>]*class="[^"]*media-wrap[^"]*video-wrap[^"]*"[^>]*>.*?<video[^>]*src="([^"]+)"[^>]*(?:poster="([^"]*)")?\/??>.*?<\/div>/gi,
+        type: 'video',
+        handler: (match) => ({
+          type: 'video',
+          src: match[1],
+          poster: match[2] || ''
+        })
+      },
+      {
+        regex: /<div[^>]*class="[^"]*media-wrap[^"]*audio-wrap[^"]*"[^>]*>.*?<audio[^>]*src="([^"]+)"[^>]*(?:title="([^"]*)")?\/??>.*?<\/div>/gi,
+        type: 'audio',
+        handler: (match) => ({
+          type: 'audio',
+          src: match[1],
+          title: match[2] || '音频'
+        })
+      }
+    ];
+    
+    // 收集所有匹配项及其位置
+    patterns.forEach(pattern => {
+      let match;
+      pattern.regex.lastIndex = 0; // 重置正则表达式的lastIndex
+      while ((match = pattern.regex.exec(content)) !== null) {
+         const item = pattern.handler(match);
+         if ((item.type === 'text' && item.content.trim()) || item.type !== 'text') {
+           matches.push({
+             index: match.index,
+             item: item
+           });
+         }
+       }
+    });
+    
+    // 按照在原HTML中的位置排序
+    matches.sort((a, b) => a.index - b.index);
+    
+    // 提取排序后的内容项
+    return matches.map(match => match.item);
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+});

+ 9 - 0
pages/exhibition/activeDetails/index.json

@@ -0,0 +1,9 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "详情",
+  "navigationBarBackgroundColor": "#B8956A",
+  "navigationBarTextStyle": "white",
+  "backgroundColor": "#f8f8f8",
+  "enablePullDownRefresh": false,
+  "onReachBottomDistance": 50
+}

+ 78 - 0
pages/exhibition/activeDetails/index.wxml

@@ -0,0 +1,78 @@
+<!--pages/exhibition/activeDetails/index.wxml-->
+<view class="detail-container">
+  <!-- 返回按钮 -->
+  <!-- <view wx:if="{{shouldShowBackButton}}" class="back-button" bindtap="goBack">
+    <image src="/assets/indexPage/icon_back.png" mode="aspectFit"></image>
+  </view> -->
+
+  <!-- 加载状态 -->
+  <view wx:if="{{loading}}" class="loading-container">
+    <view class="loading-text">加载中...</view>
+  </view>
+
+  <!-- 详情内容 -->
+  <view wx:elif="{{detailData}}" class="detail-content {{isFrom == 'weixin' ? 'notMargin' : ''}}">
+    <!-- 标题 -->
+    <view class="detail-title">
+      {{detailData.title}}
+    </view>
+
+    <!-- 时间 -->
+    <view wx:if="{{detailData.publish}}" class="detail-time">
+      {{formattedPublishTime}}
+    </view>
+
+    <!-- 处理后的内容 -->
+    <view wx:if="{{detailData.context}}" class="detail-text">
+      <view class="processed-html-content">
+        <block wx:for="{{contentItems}}" wx:key="index">
+          <!-- 文本内容 -->
+          <text decode='true' wx:if="{{item.type === 'text'}}" class="text-content {{item.indent ? 'indent' : ''}}">{{item.content}}</text>
+          
+          <!-- 包含链接的文本内容 -->
+          <view wx:elif="{{item.type === 'text_with_links'}}" class="text-with-links {{item.indent ? 'indent' : ''}}">
+            <rich-text nodes="{{item.content}}" class="rich-text-content" bindtap="onRichTextTap" data-links="{{item.links}}"></rich-text>
+          </view>
+          
+          <!-- 图片内容 -->
+          <view wx:elif="{{item.type === 'image'}}" class="image-item">
+            <image src="{{item.src}}" mode="widthFix" class="content-image" lazy-load></image>
+          </view>
+          
+          <!-- 视频内容 -->
+          <view wx:elif="{{item.type === 'video'}}" class="video-item">
+            <video src="{{item.src}}" poster="{{item.poster}}" class="content-video" controls></video>
+          </view>
+          
+          <!-- 音频内容 -->
+          <view wx:elif="{{item.type === 'audio'}}" class="audio-item">
+            <view class="audio-title">{{item.title}}</view>
+            <!-- 小程序中可以使用audio组件或者自定义音频播放器 -->
+            <view class="audio-placeholder">音频: {{item.title}}</view>
+          </view>
+        </block>
+      </view>
+    </view>
+
+    <!-- 展览特有按钮 -->
+    <view wx:if="{{detailData.webSite}}" class="exhibition-actions">
+      <view class="online-exhibition-btn" bindtap="goToOnlineExhibition">
+        <image src="/assets/exhibition/online-kz.png" class="btn-icon" mode="aspectFit"></image>
+        线上观展
+      </view>
+    </view>
+    
+    <!-- 活动预约按钮 -->
+    <view wx:if="{{detailData.personCount > 0 && fromtype == 'activity'}}" class="active-preview-btn">
+      <view class="preview-btn" bindtap="goToActivePreview">
+        活动预约
+      </view>
+    </view>
+  </view>
+
+  <!-- 错误状态 -->
+  <view wx:else class="error-state">
+    <view class="error-text">加载失败,请重试</view>
+    <button class="retry-button" bindtap="loadDetailData">重新加载</button>
+  </view>
+</view>

+ 271 - 0
pages/exhibition/activeDetails/index.wxss

@@ -0,0 +1,271 @@
+/* pages/exhibition/activeDetails/index.wxss */
+.detail-container {
+  position: relative;
+  min-height: 100vh;
+  padding: 20rpx 20rpx 80rpx 20rpx;
+  background: url('https://sit-kelamayi.4dage.com/mini/wxImg/bg.png') no-repeat;
+  background-size: cover;
+}
+
+.back-button {
+  position: absolute;
+  top: 20rpx;
+  left: 20rpx;
+  width: 80rpx;
+  height: 80rpx;
+  border-radius: 50%;
+  z-index: 10;
+}
+
+.back-button image {
+  width: 80rpx;
+  height: 80rpx;
+}
+
+.loading-container {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  height: 400rpx;
+}
+
+.loading-text {
+  font-size: 32rpx;
+  color: #666;
+}
+
+.detail-content {
+  margin-top: 80rpx;
+  padding: 16rpx;
+  border-radius: 20rpx;
+}
+
+.detail-content.notMargin {
+  margin-top: 20rpx;
+}
+
+.detail-title {
+  font-size: 48rpx;
+  font-weight: bold;
+  color: #584735;
+  margin-bottom: 20rpx;
+  line-height: 1.4;
+}
+
+.detail-time {
+  font-size: 28rpx;
+  color: #584735;
+  margin-bottom: 20rpx;
+}
+
+.line {
+  height: 4rpx;
+  background: linear-gradient(90deg, rgba(91, 71, 46, 0.5) 0%, rgba(91, 71, 46, 0) 100%);
+  margin-bottom: 20rpx;
+}
+
+.detail-text {
+  font-size: 32rpx;
+  line-height: 1.6;
+  color: #584735;
+  margin-top: 40rpx;
+}
+
+.error-state {
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+  height: 400rpx;
+}
+
+.error-text {
+  font-size: 32rpx;
+  color: #584735;
+  margin-bottom: 40rpx;
+}
+
+.retry-button {
+  padding: 20rpx 40rpx;
+  background: #007bff;
+  color: white;
+  border: none;
+  border-radius: 10rpx;
+  font-size: 28rpx;
+}
+
+/* 展览特有按钮样式 */
+.exhibition-actions {
+  margin-top: 60rpx;
+  text-align: center;
+}
+
+.online-exhibition-btn {
+  width: 560rpx;
+  display: inline-flex;
+  align-items: center;
+  justify-content: center;
+  padding: 24rpx 80rpx;
+  background: linear-gradient(135deg, #B8956A 0%, #A0845A 100%);
+  color: white;
+  border-radius: 50rpx;
+  font-size: 32rpx;
+  font-weight: 500;
+  box-shadow: 0 8rpx 24rpx rgba(184, 149, 106, 0.3);
+}
+
+.btn-icon {
+  width: 40rpx;
+  height: 40rpx;
+  margin-right: 16rpx;
+}
+
+.active-preview-btn {
+  height: 120rpx;
+  position: fixed;
+  bottom: 28rpx;
+  left: 0;
+  width: 100%;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  margin-top: 60rpx;
+}
+
+.preview-btn {
+  width: 560rpx;
+  height: 120rpx;
+  background: #B1967B;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  color: #fff;
+  border-radius: 100rpx;
+  font-size: 32rpx;
+}
+
+/* 处理后的HTML内容样式 */
+.processed-html-content {
+  margin-top: 20rpx;
+}
+
+.text-item {
+  margin-bottom: 20rpx;
+  line-height: 1.6;
+  color: #584735;
+}
+
+.text-item.indent {
+  text-indent: 4em;
+}
+
+.text-content {
+  display: block;
+  margin-bottom: 20rpx;
+  line-height: 1.6;
+  color: #584735;
+}
+
+.text-content.indent {
+  text-indent: 1em;
+}
+
+.text-with-links {
+  margin-bottom: 20rpx;
+  line-height: 1.6;
+  color: #584735;
+}
+
+.text-with-links.indent {
+  text-indent: 1em;
+}
+
+.link-text {
+  color: #007bff;
+  text-decoration: underline;
+  margin: 0 8rpx;
+}
+
+.link-text:active {
+  color: #0056b3;
+}
+
+.rich-text-content {
+  line-height: 1.6;
+  color: #584735;
+}
+
+/* rich-text内部链接样式 */
+.rich-text-content > span[data-url] {
+  color: #007bff !important;
+  text-decoration: underline !important;
+  cursor: pointer;
+}
+
+.rich-text-content > span[data-url]:active {
+  color: #0056b3 !important;
+}
+
+.image-item {
+  margin: 40rpx 0;
+  text-align: center;
+}
+
+.content-image {
+  max-width: 100%;
+  border-radius: 16rpx;
+}
+
+.video-item {
+  width: 100%;
+  margin: 40rpx 0;
+  text-align: center;
+}
+
+.content-video {
+  width: 100%;
+  height: 400rpx;
+}
+
+.audio-item {
+  margin: 30rpx 0;
+  padding: 30rpx;
+  text-align: center;
+  background: rgba(255, 255, 255, 0.1);
+  border-radius: 16rpx;
+}
+
+.audio-title {
+  font-size: 28rpx;
+  color: #584735;
+  margin-bottom: 20rpx;
+}
+
+.audio-placeholder {
+  font-size: 24rpx;
+  color: #888;
+  padding: 20rpx;
+  background: rgba(0, 0, 0, 0.05);
+  border-radius: 8rpx;
+}
+
+/* 响应式处理 */
+@media (max-width: 768rpx) {
+  .detail-title {
+    font-size: 44rpx;
+  }
+  
+  .detail-text {
+    font-size: 30rpx;
+  }
+  
+  .online-exhibition-btn {
+    width: 480rpx;
+    font-size: 30rpx;
+  }
+  
+  .preview-btn {
+    width: 480rpx;
+    font-size: 30rpx;
+  }
+}

+ 34 - 5
pages/exhibition/index.js

@@ -129,20 +129,49 @@ Page({
     await this.getExhibitionList(true);
   },
 
-  // 轮播图点击事件
-  onCarouselTap(e) {
+  // 展览项点击事件
+  onExhibitionTap(e) {
     const item = e.currentTarget.dataset.item;
     this.goToDetail(item.exhibitId);
   },
 
-  // 展览项点击事件
-  onExhibitionTap(e) {
+  // 线上观展点击事件
+  onOnlineExhibitionTap(e) {
+    console.log('线上观展点击事件触发', e.currentTarget.dataset.item);
+    // e.stopPropagation(); // 阻止事件冒泡
     const item = e.currentTarget.dataset.item;
-    this.goToDetail(item.exhibitId);
+    if (item.webSite) {
+      console.log('跳转到webSite:', item.webSite);
+      navigateToWebview(item.webSite,'open');
+    } else {
+      this.goToDetail(item.exhibitId);
+      console.log('webSite为空');
+    }
   },
 
   // 跳转到详情页面
   goToDetail(id) {
     navigateToWebview(`/allDetailsShow?isFrom=weixin&id=${id}&type=exhibition`);
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+    return {
+      title: '克拉玛依博物馆 - 展览',
+      path: '/pages/exhibition/index'
+    };
+  },
+
+  /**
+   * 用户点击右上角分享到朋友圈
+   */
+  onShareTimeline() {
+    return {
+      title: '克拉玛依博物馆 - 精彩展览等你来看',
+      query: '',
+      imageUrl: '' // 可以设置自定义分享图片
+    };
   }
 });

+ 10 - 8
pages/exhibition/index.wxml

@@ -3,11 +3,13 @@
   <!-- 轮播图 -->
   <view class="carousel-section">
     <swiper class="carousel" indicator-dots="{{true}}" autoplay="{{true}}" interval="3000" duration="500">
-      <swiper-item wx:for="{{carouselList}}" wx:key="exhibitId" bindtap="onCarouselTap" data-item="{{item}}">
+      <swiper-item wx:for="{{carouselList}}" wx:key="exhibitId" bindtap="onOnlineExhibitionTap" data-item="{{item}}">
         <image class="carousel-image" src="{{item.img}}" mode="aspectFill"></image>
-        <!-- <view class="carousel-overlay">
-          <text class="carousel-title">{{item.exhibitName}}</text>
-        </view> -->
+        <!-- 线上观展标识 -->
+        <view class="online-exhibition" wx:if="{{item.webSite}}" bindtap="onOnlineExhibitionTap" data-item="{{item}}">
+          <image class="online-icon" src="https://sit-kelamayi.4dage.com/mini/wxImg/exhibition/online-kz.png" mode="aspectFit"></image>
+          <text class="online-text">线上观展</text>
+        </view>
       </swiper-item>
     </swiper>
   </view>
@@ -15,12 +17,12 @@
   <!-- 分类选择 -->
   <view class="category-section">
     <view class="category-tabs">
-      <view class="category-tab {{selectedType === 1 ? 'active' : ''}}" bindtap="selectCategory" data-type="1">
-        <image class="category-icon" src="https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/imgs/exhibition/icon_in.png" mode="aspectFit"></image>
+      <view class="category-tab {{selectedType == 1 ? 'active' : ''}}" bindtap="selectCategory" data-type="1">
+        <image class="category-icon" src="https://sit-kelamayi.4dage.com/mini/wxImg/exhibition/icon_in.png" mode="aspectFit"></image>
         <text>室内展览</text>
       </view>
-      <view class="category-tab {{selectedType === 2 ? 'active' : ''}}" bindtap="selectCategory" data-type="2">
-        <image class="category-icon" src="https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/imgs/exhibition/icon_out.png" mode="aspectFit"></image>
+      <view class="category-tab {{selectedType == 2 ? 'active' : ''}}" bindtap="selectCategory" data-type="2">
+        <image class="category-icon" src="https://sit-kelamayi.4dage.com/mini/wxImg/exhibition/icon_out.png" mode="aspectFit"></image>
         <text>室外展览</text>
       </view>
     </view>

+ 30 - 1
pages/exhibition/index.wxss

@@ -1,6 +1,6 @@
 /* pages/exhibition/index.wxss */
 .exhibition-container {
-  background-image: url('https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/karamay/bg.png');
+  background-image: url('https://sit-kelamayi.4dage.com/mini/wxImg/bg.png');
   background-size: cover;
   background-repeat: no-repeat;
   min-height: 100vh;
@@ -22,6 +22,35 @@
   height: 100%;
 }
 
+/* 线上观展标识样式 */
+.online-exhibition {
+  position: absolute;
+  top: 50%;
+  left: 50%;
+  transform: translate(-50%, -50%);
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  background-color: rgba(0, 0, 0, 0.6);
+  padding: 20rpx 30rpx;
+  border-radius: 12rpx;
+  backdrop-filter: blur(4rpx);
+  z-index: 2;
+}
+
+.online-icon {
+  width: 60rpx;
+  height: 60rpx;
+  margin-bottom: 8rpx;
+}
+
+.online-text {
+  color: white;
+  font-size: 24rpx;
+  font-weight: 500;
+  text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.3);
+}
+
 .carousel-overlay {
   position: absolute;
   bottom: 0;

+ 3 - 3
pages/index/active-page/active-page.js

@@ -29,7 +29,7 @@ Page({
   onReady() {
     // 页面初次渲染完成后获取活动详情
     if (this.data.activityId) {
-      this.getActivityInfo(this.data.activityId);
+      this.getActivityDetail(this.data.activityId);
     }
   },
 
@@ -110,8 +110,8 @@ Page({
   },
 
   // 获取活动详情
-  getActivityInfo(activityId) {
-    museumApi.getActivityInfo(activityId)
+  getActivityDetail(activityId) {
+    museumApi.getActivityDetail(activityId)
       .then(response => {
         console.log('获取活动详情成功:', response);
         if (response) {

+ 1 - 1
pages/index/active-page/active-page.wxss

@@ -1,6 +1,6 @@
 .preview-contain {
   height: 100vh;
-  background: url('https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/karamay/bg.png') no-repeat center center;
+  background: url('https://sit-kelamayi.4dage.com/mini/wxImg/bg.png') no-repeat center center;
   background-size: cover;
   overflow: auto;
 }

+ 4 - 4
pages/index/active-people/active-people.js

@@ -361,10 +361,10 @@ Page({
       this.setData({
         showSuccessModal: false
       });
-      // 跳转回首页
-      wx.switchTab({
-        url: '/pages/index/index'
-      });
+      // 跳转到我的预约页面
+      wx.navigateTo({
+        url: '/pages/user/my-preview/index'
+      })
     },
 
   // 阻止事件冒泡

+ 2 - 2
pages/index/active-people/active-people.wxml

@@ -1,7 +1,7 @@
 <view class="visit-people-container">
   <!-- 预约日期信息 -->
   <view class="date-info" wx:if="{{!showExistingPage}}">
-    <image class="bg-img" src="https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/imgs/indexPage/img.png" mode="aspectFill"></image>
+    <image class="bg-img" src="https://sit-kelamayi.4dage.com/mini/wxImg/indexPage/img.png" mode="aspectFill"></image>
     <view class="date-content">
       <view class="date-label"><text class="title">预约日期:</text>{{selectedDate}}</view>
       <view class="time-label"><text class="title">活动标题:</text>{{title}}</view>
@@ -22,7 +22,7 @@
         <view class="visitor-header">
           <text class="visitor-title">参观人信息{{index + 1}}</text>
           <view class="delete-btn" bindtap="removeVisitor" data-index="{{index}}">
-            <image class="delete-img" src="https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/imgs/indexPage/icon_delete.png" />
+            <image class="delete-img" src="https://sit-kelamayi.4dage.com/mini/wxImg/indexPage/icon_delete.png" />
             删除
           </view>
         </view>

+ 1 - 1
pages/index/active-people/active-people.wxss

@@ -1,6 +1,6 @@
 .visit-people-container {
   height: 97vh;
-  background: url('https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/karamay/bg.png');
+  background: url('https://sit-kelamayi.4dage.com/mini/wxImg/bg.png');
   padding: 32rpx;
   padding-bottom: 0;
   overflow: hidden;

+ 1 - 1
pages/index/active-preview/active-preview.js

@@ -44,7 +44,7 @@ Page({
   // 跳转到用户列表
   goUserList() {
     wx.navigateTo({
-      url: '/pages/user/user-list/user-list'
+      url: '/pages/user/userList/index'
     });
   },
 

+ 1 - 1
pages/index/active-preview/active-preview.wxml

@@ -1,6 +1,6 @@
 <view class="active-preview-container">
   <!-- <view class="back-button" bindtap="goBack">
-    <image src="https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/imgs/indexPage/icon_back.png" mode="aspectFit"></image>
+    <image src="https://sit-kelamayi.4dage.com/mini/wxImg/indexPage/icon_back.png" mode="aspectFit"></image>
   </view> -->
 
   <view class="preview-content">

+ 6 - 2
pages/index/activity/activity.js

@@ -23,7 +23,8 @@ Page({
     try {
       const response = await museumApi.getSocialActivityList({
         pageNum: 1,
-        pageSize: 10
+        pageSize: 10,
+        status: 1
       });
       
       if (response && response.records) {
@@ -56,6 +57,9 @@ Page({
   viewActivity(e) {
     const item = e.currentTarget.dataset.item;
     console.log('查看活动详情:', item);
-    navigateToWebview(`/allDetailsShow?isFrom=weixin&id=${item.activityId}&type=activity`);
+    // navigateToWebview(`/allDetailsShow?isFrom=weixin&id=${item.activityId}&type=activity`);
+    wx.navigateTo({
+      url: `/pages/exhibition/activeDetails/index?isFrom=weixin&id=${item.activityId}&type=activity`
+    });
   }
 });

+ 5 - 5
pages/index/activity/activity.wxml

@@ -1,8 +1,8 @@
 <view class="activity-container">
   <!-- 返回按钮 -->
-  <view class="back-button" bindtap="goBack">
-    <image src="https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/imgs/indexPage/icon_back.png" mode="aspectFit"></image>
-  </view>
+  <!-- <view class="back-button" bindtap="goBack">
+    <image src="https://sit-kelamayi.4dage.com/mini/wxImg/indexPage/icon_back.png" mode="aspectFit"></image>
+  </view> -->
 
   <!-- 标题 -->
   <view class="section-title">社教活动</view>
@@ -15,14 +15,14 @@
     <view class="collection-list">
       <view class="collection-item" wx:for="{{activeList}}" wx:key="activityId" bindtap="viewActivity" data-item="{{item}}">
         <view class="item-image-container">
-          <image src="{{item.indexImg}}" class="item-image" mode="aspectFill" />
+          <image src="{{item.infoImg}}" class="item-image" mode="aspectFill" />
           <view class="view-button">
             <text>查看</text>
             <text class="arrow">></text>
           </view>
           <view class="item-info">
             <view class="item-title">{{ item.title || '暂无标题' }}</view>
-            <view class="item-description">{{ item.description || item.content || '暂无描述' }}</view>
+            <view class="item-description">{{ item.remark || '暂无描述' }}</view>
           </view>
         </view>
       </view>

+ 4 - 4
pages/index/activity/activity.wxss

@@ -1,9 +1,9 @@
 /* pages/index/activity/activity.wxss */
 .activity-container {
   position: relative;
-  min-height: 100vh;
-  padding: 20rpx;
-  background: url('https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/karamay/bg.png') no-repeat;
+  height: 100vh;
+  padding: 40rpx;
+  background: url('https://sit-kelamayi.4dage.com/mini/wxImg/bg.png') no-repeat;
   background-size: cover;
 }
 
@@ -26,7 +26,7 @@
   font-size: 40rpx;
   font-weight: bold;
   color: #584735;
-  margin: 108rpx 0 40rpx 0;
+  margin: 36rpx 0 40rpx 0;
   position: relative;
   padding-bottom: 20rpx;
 }

+ 41 - 9
pages/index/index.js

@@ -34,15 +34,16 @@ Page({
         showLoading: true,
         isFirstOpen: true
       });
-      
+      this.initAllData();
     } else {
-      // 非首次访问,直接显示内容并初始化数据
+      // 非首次访问,立即显示页面内容
       this.setData({
         showLoading: false,
         isFirstOpen: false
       });
       // 设置已访问标记
       wx.setStorageSync('hasVisited', true);
+      // 立即加载数据,但不显示loading状态
       this.initAllData();
     }
   },
@@ -61,9 +62,20 @@ Page({
     //   title: '克拉玛依博物馆'
     // });
     // 初始化数据
-    this.initAllData();
+    // this.initAllData();
   },
   
+  // 轮播图点击事件
+  onBannerClick(e) {
+    const url = e.currentTarget.dataset.url;
+    if (url) {
+      console.log('轮播图点击,跳转URL:', url);
+      navigateToWebview(url);
+    } else {
+      console.log('轮播图URL为空,无法跳转');
+    }
+  },
+
   // 查看更多
   viewMore(e) {
     const section = e.currentTarget.dataset.section;
@@ -93,17 +105,20 @@ Page({
    */
   async initAllData() {
     try {
-      this.setData({ loading: true });
+      // 只有首次访问时才显示loading状态
+      if (this.data.isFirstOpen) {
+        this.setData({ loading: true });
+      }
       
       // 并行请求所有数据
       const [bannerRes, newsRes, exhibitionRes, activeRes] = await Promise.all([
-        this.getBannerData({ pageNum: 1, pageSize: 10, status: 1 }),
+        this.getBannerData({ pageNum: 1, pageSize: 5, status: 1 }),
         this.getNewsList({ pageNum: 1, pageSize: 3, status: 1 }),
-        this.getExhibitionList({ pageNum: 1, pageSize: 5, status: 1 }),
+        this.getExhibitionList({ pageNum: 1, pageSize: 5, status: 1 , recommend: 1 }),
         this.getActiveList({ pageNum: 1, pageSize: 5, status: 1 })
       ]);
       
-      console.log('所有数据加载完成');
+      // console.log('所有数据加载完成');
     } catch (error) {
       console.error('数据加载失败:', error);
       wx.showToast({
@@ -111,7 +126,10 @@ Page({
         icon: 'none'
       });
     } finally {
-      this.setData({ loading: false });
+      // 只有首次访问时才需要关闭loading状态
+      if (this.data.isFirstOpen) {
+        this.setData({ loading: false });
+      }
     }
   },
 
@@ -245,7 +263,10 @@ Page({
    * 处理地图点击事件
    */
   async handleMapClick() {
-    this.navigateToWebview('/indexPage/map?isFrom=weixin');
+    // this.navigateToWebview('/indexPage/map?isFrom=weixin');
+    wx.navigateTo({
+      url: '/pages/user/map/index'
+    });
   },
 
   /**
@@ -307,5 +328,16 @@ Page({
       title: '克拉玛依博物馆',
       path: '/pages/index/index?isFrom=weixin'
     };
+  },
+
+  /**
+   * 用户点击右上角分享到朋友圈
+   */
+  onShareTimeline() {
+    return {
+      title: '克拉玛依博物馆 - 探索历史文化之美',
+      query: 'isFrom=weixin',
+      imageUrl: '' // 可以设置自定义分享图片
+    };
   }
 })

+ 54 - 34
pages/index/index.wxml

@@ -1,35 +1,40 @@
 <!--pages/index/index.wxml-->
 <!-- 小程序首页 -->
-<view wx:if="{{showLoading}}">
+<view hidden="{{!showLoading}}">
   <loading bind:startexplore="onStartExplore"></loading>
 </view>
 
-<view wx:else class="home-container {{!isFromParam ? 'home-tabar' : ''}} {{isFirstOpen ? 'home-not-overflow' : ''}}">
+<view hidden="{{showLoading}}" class="home-container {{!isFromParam ? 'home-tabar' : ''}} {{isFirstOpen ? 'home-not-overflow' : ''}}">
   <!-- 轮播图区域 -->
-  <view class="carousel-section">
-    <swiper class="carousel-swiper" indicator-dots="{{false}}" autoplay="{{true}}" interval="5000" duration="500">
-      <swiper-item wx:for="{{bannerData}}" wx:key="carouselId">
+  <view class="carousel-section" wx:if="{{bannerData.length}}">
+    <swiper class="carousel-swiper" indicator-dots="{{true}}" autoplay="{{true}}" interval="4000" duration="500">
+      <swiper-item wx:for="{{bannerData}}" wx:key="carouselId" bindtap="onBannerClick" data-url="{{item.url}}">
         <image src="{{item.img}}" alt="{{item.title || '轮播图'}}" class="carousel-img" mode="aspectFill"></image>
       </swiper-item>
     </swiper>
   </view>
+  <view class="carousel-section" wx:else>
+    <view class="nobanner-data">
+      轮播图暂无数据
+    </view>
+  </view>
 
   <!-- 功能区域 -->
   <view class="function-section">
     <view class="function-item" bindtap="handleFunctionClick" data-type="visit">
-      <image src="https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/imgs/indexPage/visit.png" alt="预约参观" class="function-icon"></image>
+      <image src="https://sit-kelamayi.4dage.com/mini/wxImg/indexPage/visit.png" alt="预约参观" class="function-icon"></image>
       <text class="function-text">预约参观</text>
     </view>
     <view class="function-item" bindtap="handleFunctionClick" data-type="activity">
-      <image src="https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/imgs/indexPage/activity.png" alt="活动预约" class="function-icon"></image>
+      <image src="https://sit-kelamayi.4dage.com/mini/wxImg/indexPage/activity.png" alt="活动预约" class="function-icon"></image>
       <text class="function-text">活动预约</text>
     </view>
     <view class="function-item" bindtap="handleFunctionClick" data-type="map">
-      <image src="https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/imgs/indexPage/map.png" alt="展馆地图" class="function-icon"></image>
+      <image src="https://sit-kelamayi.4dage.com/mini/wxImg/indexPage/map.png" alt="展馆地图" class="function-icon"></image>
       <text class="function-text">展馆地图</text>
     </view>
     <view class="function-item" bindtap="handleFunctionClick" data-type="introduce">
-      <image src="https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/imgs/indexPage/introduce.png" alt="展馆介绍" class="function-icon"></image>
+      <image src="https://sit-kelamayi.4dage.com/mini/wxImg/indexPage/introduce.png" alt="展馆介绍" class="function-icon"></image>
       <text class="function-text">展馆介绍</text>
     </view>
   </view>
@@ -37,16 +42,21 @@
   <!-- 展览资讯 -->
   <view class="section">
     <view class="section-header">
-      <text class="section-title">展资讯</text>
+      <text class="section-title">展资讯</text>
       <text class="view-more" bindtap="viewMore" data-section="recommended">查看更多 +</text>
     </view>
-    <view class="news-item" wx:for="{{newsList}}" wx:key="informationId" bindtap="viewNews" data-item="{{item}}">
-      <image src="{{item.infoImg}}" alt="展览资讯" class="news-img" mode="aspectFill"></image>
-      <view class="news-content">
-        <text class="news-title">{{item.title}}</text>
-        <text class="news-desc">⇀</text>
+    <view wx:if="{{newsList && newsList.length > 0}}">
+      <view class="news-item" wx:for="{{newsList}}" wx:key="informationId" bindtap="viewNews" data-item="{{item}}">
+        <image src="{{item.indexImg}}" alt="展览资讯" class="news-img" mode="aspectFill"></image>
+        <view class="news-content">
+          <text class="news-title">{{item.title}}</text>
+          <text class="news-desc">⇀</text>
+        </view>
       </view>
     </view>
+    <view wx:else class="empty-data">
+      <text class="empty-text">暂无数据</text>
+    </view>
   </view>
 
   <!-- 推荐展览 -->
@@ -55,16 +65,21 @@
       <text class="section-title">推荐展览</text>
       <text class="view-more" bindtap="viewMore" data-section="exhibition">查看更多 +</text>
     </view>
-    <scroll-view class="scroll-container" scroll-x="{{true}}">
-      <view class="scroll-wrapper">
-        <view class="exhibition-item" wx:for="{{exhibitionList}}" wx:key="exhibitId" bindtap="viewExhibition" data-item="{{item}}">
-          <image src="{{item.img}}" alt="展览" class="exhibition-img" mode="aspectFill"></image>
-          <view class="exhibition-info">
-            <text class="exhibition-title">{{item.title}}</text>
+    <view wx:if="{{exhibitionList && exhibitionList.length > 0}}">
+      <scroll-view class="scroll-container" scroll-x="{{true}}">
+        <view class="scroll-wrapper">
+          <view class="exhibition-item" wx:for="{{exhibitionList}}" wx:key="exhibitId" bindtap="viewExhibition" data-item="{{item}}">
+            <image src="{{item.img}}" alt="展览" class="exhibition-img" mode="aspectFill"></image>
+            <view class="exhibition-info">
+              <text class="exhibition-title">{{item.title}}</text>
+            </view>
           </view>
         </view>
-      </view>
-    </scroll-view>
+      </scroll-view>
+    </view>
+    <view wx:else class="empty-data">
+      <text class="empty-text">暂无数据</text>
+    </view>
   </view>
 
   <!-- 社教活动 -->
@@ -73,19 +88,24 @@
       <text class="section-title">社教活动</text>
       <text class="view-more" bindtap="viewMore" data-section="activity">查看更多 +</text>
     </view>
-    <scroll-view class="scroll-container" scroll-x="{{true}}">
-      <view class="scroll-wrapper">
-        <view class="activity-item" wx:for="{{activeList}}" wx:key="activityId" bindtap="viewActivity" data-item="{{item}}">
-          <view class="active-top">
-            <image src="{{item.indexImg}}" alt="活动" class="activity-img" mode="aspectFill"></image>
-            <text class="active-go">></text>
-          </view>
-          <view class="activity-info">
-            <text class="activity-title">{{item.title}}</text>
+    <view wx:if="{{activeList && activeList.length > 0}}">
+      <scroll-view class="scroll-container" scroll-x="{{true}}">
+        <view class="scroll-wrapper">
+          <view class="activity-item" wx:for="{{activeList}}" wx:key="activityId" bindtap="viewActivity" data-item="{{item}}">
+            <view class="active-top">
+              <image src="{{item.indexImg}}" alt="活动" class="activity-img" mode="aspectFill"></image>
+              <text class="active-go">></text>
+            </view>
+            <view class="activity-info">
+              <text class="activity-title">{{item.title}}</text>
+            </view>
           </view>
         </view>
-      </view>
-    </scroll-view>
+      </scroll-view>
+    </view>
+    <view wx:else class="empty-data">
+      <text class="empty-text">暂无数据</text>
+    </view>
   </view>
 </view>
 

+ 22 - 3
pages/index/index.wxss

@@ -2,7 +2,7 @@
 .home-container {
   height: 100vh;
   overflow-y: auto;
-  background: url('https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/karamay/bg.png') no-repeat center top;
+  background: url('https://sit-kelamayi.4dage.com/mini/wxImg/bg.png') no-repeat center top;
   background-size: 100% auto;
 }
 
@@ -15,7 +15,13 @@
   width: 100%;
   margin-bottom: 30rpx;
 }
-
+.nobanner-data{
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  height: 100rpx;
+  color: #999;
+}
 .carousel-swiper {
   height: 360rpx;
 }
@@ -78,6 +84,19 @@
   color: #79ACF9;
 }
 
+/* 空数据状态 */
+.empty-data {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  height: 200rpx;
+}
+
+.empty-text {
+  font-size: 32rpx;
+  color: #999;
+}
+
 /* 展览资讯 */
 .news-item {
   position: relative;
@@ -137,7 +156,7 @@
 .exhibition-item {
   position: relative;
   flex: 0 0 auto;
-  width: 690rpx;
+  width: 654rpx;
   height: 412rpx;
   margin-right: 20rpx;
   border-radius: 16rpx;

+ 4 - 4
pages/index/news/news.wxml

@@ -1,8 +1,8 @@
 <view class="news-container">
   <!-- 返回按钮 -->
-  <view class="back-button" bindtap="goBack">
-    <image src="https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/imgs/indexPage/icon_back.png" mode="aspectFit"></image>
-  </view>
+  <!-- <view class="back-button" bindtap="goBack">
+    <image src="https://sit-kelamayi.4dage.com/mini/wxImg/indexPage/icon_back.png" mode="aspectFit"></image>
+  </view> -->
 
   <!-- 标题 -->
   <view class="section-title">展馆资讯</view>
@@ -16,7 +16,7 @@
       <view class="all-item" wx:for="{{newsList}}" wx:key="informationId">
         <view class="exhibition-item" bindtap="viewNews" data-item="{{item}}">
           <image src="{{item.infoImg || item.indexImg}}" class="exhibition-img" mode="aspectFill"></image>
-          <image src="https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/imgs/indexPage/Frame.png" class="bg-img" mode="aspectFit"></image>
+          <image src="https://sit-kelamayi.4dage.com/mini/wxImg/indexPage/Frame.png" class="bg-img" mode="aspectFit"></image>
           <view class="exhibition-info">
             <view class="exhibition-title">{{ item.title || '暂无标题' }}</view>
           </view>

+ 4 - 4
pages/index/news/news.wxss

@@ -1,9 +1,9 @@
 /* pages/index/news/news.wxss */
 .news-container {
   position: relative;
-  min-height: 100vh;
-  padding: 20rpx;
-  background: url('https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/karamay/bg.png') no-repeat;
+  height: 100vh;
+  padding: 40rpx;
+  background: url('https://sit-kelamayi.4dage.com/mini/wxImg/bg.png') no-repeat;
   background-size: cover;
 }
 
@@ -26,7 +26,7 @@
   font-size: 40rpx;
   font-weight: bold;
   color: #584735;
-  margin: 108rpx 0 40rpx 0;
+  margin: 36rpx 0 40rpx 0;
   position: relative;
   padding-bottom: 20rpx;
 }

+ 1 - 1
pages/index/start-preview/start-preview.wxss

@@ -1,6 +1,6 @@
 .preview-contain {
   height: 100vh;
-  background: url('https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/karamay/bg.png') no-repeat center center;
+  background: url('https://sit-kelamayi.4dage.com/mini/wxImg/bg.png') no-repeat center center;
   background-size: cover;
   overflow: auto;
 }

+ 4 - 4
pages/index/visit-people/visit-people.js

@@ -352,10 +352,10 @@ Page({
       this.setData({
         showSuccessModal: false
       });
-      // 跳转回首页
-      wx.switchTab({
-        url: '/pages/index/index'
-      });
+      // 跳转到我的预约页面
+      wx.navigateTo({
+        url: '/pages/user/my-preview/index'
+      })
     },
 
   // 阻止事件冒泡

+ 2 - 2
pages/index/visit-people/visit-people.wxml

@@ -1,7 +1,7 @@
 <view class="visit-people-container">
   <!-- 预约日期信息 -->
   <view class="date-info" wx:if="{{!showExistingPage}}">
-    <image class="bg-img" src="https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/imgs/indexPage/img.png" mode="aspectFill"></image>
+    <image class="bg-img" src="https://sit-kelamayi.4dage.com/mini/wxImg/indexPage/img.png" mode="aspectFill"></image>
     <view class="date-content">
       <view class="date-label"><text class="title">预约日期:</text>{{selectedDate}}</view>
       <view class="time-label"><text class="title">入馆时间:</text>{{selectedTime}}</view>
@@ -22,7 +22,7 @@
         <view class="visitor-header">
           <text class="visitor-title">参观人信息{{index + 1}}</text>
           <view class="delete-btn" bindtap="removeVisitor" data-index="{{index}}">
-            <image class="delete-img" src="https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/imgs/indexPage/icon_delete.png" />
+            <image class="delete-img" src="https://sit-kelamayi.4dage.com/mini/wxImg/indexPage/icon_delete.png" />
             删除
           </view>
         </view>

+ 1 - 1
pages/index/visit-people/visit-people.wxss

@@ -1,6 +1,6 @@
 .visit-people-container {
   height: 97vh;
-  background: url('https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/karamay/bg.png');
+  background: url('https://sit-kelamayi.4dage.com/mini/wxImg/bg.png');
   padding: 32rpx;
   padding-bottom: 0;
   overflow: hidden;

+ 1 - 1
pages/index/visit-preview/visit-preview.js

@@ -29,7 +29,7 @@ Page({
   // 查看我的参观人
   viewMyVisitors() {
     wx.navigateTo({
-      url: '/pages/index/my-visitors/my-visitors'
+      url: '/pages/user/userList/index'
     });
   },
 

+ 2 - 2
pages/index/visit-preview/visit-preview.wxml

@@ -1,10 +1,10 @@
 <view class="visit-preview-container">
   <!-- <view class="back-button" bindtap="goBack">
-    <image src="https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/imgs/indexPage/icon_back.png" mode="aspectFit"></image>
+    <image src="https://sit-kelamayi.4dage.com/mini/wxImg/indexPage/icon_back.png" mode="aspectFit"></image>
   </view> -->
   
   <view class="header-image">
-    <image src="https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/imgs/indexPage/zhanweitu.png" class="main-image" mode="aspectFill" />
+    <image src="https://sit-kelamayi.4dage.com/mini/wxImg/indexPage/preview-index.png" class="main-image" mode="aspectFill" />
   </view>
   
   <view class="reservation-info">

+ 1 - 1
pages/index/visit-preview/visit-preview.wxss

@@ -139,7 +139,7 @@
 }
 
 .btn-reserve {
-  background: url('https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/karamay/preview-btn.png');
+  background: url('https://sit-kelamayi.4dage.com/mini/wxImg/preview-btn.png');
   width: 660rpx;
   height: 186rpx;
   border-radius: 10rpx;

+ 1 - 1
pages/user/feedback/index.wxss

@@ -1,6 +1,6 @@
 .feedback-container {
   min-height: 100vh;
-  background-image: url('https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/karamay/bg.png');
+  background-image: url('https://sit-kelamayi.4dage.com/mini/wxImg/bg.png');
   padding: 40rpx;
 }
 

+ 2 - 0
pages/user/index.js

@@ -33,6 +33,7 @@ Page({
     this.setData({
       "userInfo.avatarUrl": avatarUrl,
       hasUserInfo: nickName && avatarUrl && avatarUrl !== defaultAvatarUrl,
+      hasUserInfo: true
     })
     
     // 更新本地存储和全局数据
@@ -57,6 +58,7 @@ Page({
     this.setData({
       "userInfo.nickName": nickName,
       hasUserInfo: nickName && avatarUrl && avatarUrl !== defaultAvatarUrl,
+      hasUserInfo: true
     })
     
     // 更新本地存储和全局数据

+ 4 - 4
pages/user/index.wxml

@@ -2,7 +2,7 @@
 <scroll-view class="scrollarea" scroll-y type="list">
   <view class="user-container">
     <view class="userinfo">
-      <block wx:if="{{canIUseNicknameComp && !hasUserInfo}}">
+      <block wx:if="{{canIUseNicknameComp}}">
         <button class="avatar-wrapper" open-type="chooseAvatar" bind:chooseavatar="onChooseAvatar">
           <image class="avatar" src="{{userInfo.avatarUrl}}"></image>
         </button>
@@ -13,9 +13,9 @@
           请登录
         </view>
       </block>
-      <block wx:elif="{{!hasUserInfo}}">
+      <!-- <block wx:elif="{{!hasUserInfo}}">
         <button wx:if="{{canIUseGetUserProfile}}" bindtap="getUserProfile"> 获取头像昵称 </button>
-      </block>
+      </block> -->
       <block wx:else>
         <image bindtap="bindViewTap" class="userinfo-avatar" src="{{userInfo.avatarUrl}}" mode="cover"></image>
         <text class="userinfo-nickname">{{userInfo.nickName}}</text>
@@ -25,7 +25,7 @@
       我的预约
     </view>
     <view class="user-zhanwei">
-      <image class="zhanwei-img" src="https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/imgs/img_03.png"></image>
+      <image class="zhanwei-img" src="https://sit-kelamayi.4dage.com/mini/wxImg/img_03.png"></image>
     </view>
     <!-- 功能按钮区域 -->
     <view class="function-section">

+ 4 - 4
pages/user/index.wxss

@@ -3,7 +3,7 @@ page {
   height: 100vh;
   display: flex;
   flex-direction: column;
-  background-image: url('https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/karamay/bg.png');
+  background-image: url('https://sit-kelamayi.4dage.com/mini/wxImg/bg.png');
 }
 .user-container{
   height: 100%;
@@ -57,7 +57,7 @@ page {
 .nickname-wrapper {
   display: flex;
   width: 100%;
-  padding: 16px;
+  padding: 0 16px 16px 16px;
   box-sizing: border-box;
   color: black;
 }
@@ -106,7 +106,7 @@ page {
 }
 
 .btn-reserve {
-  background: url('https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/karamay/preview-btn.png');
+  background: url('https://sit-kelamayi.4dage.com/mini/wxImg/preview-btn.png');
   width: 100%;
   height: 130rpx;
   border-radius: 10rpx;
@@ -125,7 +125,7 @@ page {
   align-items: center;
   width: 100%;
   height: 130rpx;
-  background: url('https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/karamay/btn_02.png');
+  background: url('https://sit-kelamayi.4dage.com/mini/wxImg/btn_02.png');
   background-size: 100% auto;
   border-radius: 10rpx;
   border: 2rpx solid #94765A;

+ 225 - 0
pages/user/map/index.js

@@ -0,0 +1,225 @@
+// pages/user/map/index.js
+const { museumApi } = require('../../../utils/api.js');
+const { processHtmlContent } = require('../../../utils/htmlProcessor.js');
+
+Page({
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    loading: false,
+    detailData: null,
+    processedContent: '',
+    shouldShowBackButton: true
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    // 检查是否来自微信,如果是则隐藏返回按钮
+    if (options.isfrom === 'weixin') {
+      this.setData({
+        shouldShowBackButton: false
+      });
+    }
+    // 加载详情数据
+    this.loadDetailData();
+  },
+  /**
+   * 导航前往
+   */
+  openNavitor() {
+    wx.openLocation({
+      latitude: 45.605550,
+      longitude: 84.902629,
+      name: '克拉玛依博物馆',
+      address: '克拉玛依博物馆', 
+      scale: 18,
+      success: function(res) {
+        console.log('打开地图成功', res);
+      },
+      fail: function(err) {
+        console.error('打开地图失败', err);
+        wx.showToast({
+          title: '打开地图失败',
+          icon: 'none'
+        });
+      }
+    });
+  },
+
+  /**
+   * 返回上一页
+   */
+  goBack() {
+    wx.navigateBack({
+      delta: 1
+    });
+  },
+
+  /**
+   * 加载详情数据
+   */
+  loadDetailData() {
+    this.setData({
+      loading: true
+    });
+
+    museumApi.getMuseumDetail(2)
+      .then(response => {
+        if (response) {
+          const parsedContent = this.parseContent(response.content || response.context);
+          console.log('解析后的内容:', parsedContent);
+          this.setData({
+            detailData: response,
+            contentItems: parsedContent
+          });
+        }
+      })
+      .catch(error => {
+        console.error('获取地图详情数据失败:', error);
+        this.setData({
+          detailData: null
+        });
+        wx.showToast({
+          title: '加载失败',
+          icon: 'none'
+        });
+      })
+      .finally(() => {
+        this.setData({
+          loading: false
+        });
+      });
+  },
+
+  /**
+   * 解析HTML内容为不同类型的内容项
+   */
+  parseContent(content) {
+    if (!content) return [];
+    
+    const contentItems = [];
+    const matches = [];
+    
+    // 定义所有匹配规则
+    const patterns = [
+      {
+        regex: /<p[^>]*>(.*?)<\/p>/gi,
+        type: 'text',
+        handler: (match) => {
+          let text = match[1].replace(/<[^>]*>/g, '');
+          // 将HTML实体编码的空格转换为对应数量的&nbsp;
+          text = text.replace(/&nbsp;/g, '&nbsp;');
+          text = text.replace(/&ensp;/g, '&nbsp;&nbsp;');
+          text = text.replace(/&emsp;/g, '&nbsp;&nbsp;&nbsp;&nbsp;');
+          text = text.replace(/&#160;/g, '&nbsp;');
+          // 将普通空格也转换为&nbsp;
+          text = text.replace(/ /g, '&nbsp;');
+          return {
+            type: 'text',
+            content: text
+          };
+        }
+      },
+      {
+        regex: /<div[^>]*class="[^"]*media-wrap[^"]*image-wrap[^"]*"[^>]*>.*?<img[^>]*src="([^"]+)"[^>]*(?:alt="([^"]*)")?\/?>.*?<\/div>/gi,
+        type: 'image',
+        handler: (match) => ({
+          type: 'image',
+          src: match[1],
+          alt: match[2] || '图片'
+        })
+      },
+      {
+        regex: /<div[^>]*class="[^"]*media-wrap[^"]*video-wrap[^"]*"[^>]*>.*?<video[^>]*src="([^"]+)"[^>]*(?:poster="([^"]*)")?\/?>.*?<\/div>/gi,
+        type: 'video',
+        handler: (match) => ({
+          type: 'video',
+          src: match[1],
+          poster: match[2] || ''
+        })
+      },
+      {
+        regex: /<div[^>]*class="[^"]*media-wrap[^"]*audio-wrap[^"]*"[^>]*>.*?<audio[^>]*src="([^"]+)"[^>]*(?:title="([^"]*)")?\/?>.*?<\/div>/gi,
+        type: 'audio',
+        handler: (match) => ({
+          type: 'audio',
+          src: match[1],
+          title: match[2] || '音频'
+        })
+      }
+    ];
+    
+    // 收集所有匹配项及其位置
+    patterns.forEach(pattern => {
+      let match;
+      pattern.regex.lastIndex = 0; // 重置正则表达式的lastIndex
+      while ((match = pattern.regex.exec(content)) !== null) {
+         const item = pattern.handler(match);
+         if ((item.type === 'text' && item.content.trim()) || item.type !== 'text') {
+           matches.push({
+             index: match.index,
+             item: item
+           });
+         }
+       }
+    });
+    
+    // 按照在原HTML中的位置排序
+    matches.sort((a, b) => a.index - b.index);
+    
+    // 提取排序后的内容项
+    return matches.map(match => match.item);
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+});

+ 8 - 0
pages/user/map/index.json

@@ -0,0 +1,8 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "展馆地图",
+  "navigationBarBackgroundColor": "#ffffff",
+  "navigationBarTextStyle": "black",
+  "backgroundColor": "#f5f5f5",
+  "enablePullDownRefresh": false
+}

+ 59 - 0
pages/user/map/index.wxml

@@ -0,0 +1,59 @@
+<!--地图页面-->
+<view class="detail-container">
+  <!-- 加载状态 -->
+  <view wx:if="{{loading}}" class="loading-container">
+    <view class="loading-text">加载中...</view>
+  </view>
+
+  <!-- 详情内容 -->
+  <view wx:elif="{{detailData}}" class="detail-content">
+    <!-- 标题 -->
+    <view class="detail-title">{{detailData.title || '展馆地图'}}</view>
+
+    <view class="line"></view>
+
+    <!-- 内容项列表 -->
+    <view wx:if="{{contentItems && contentItems.length > 0}}" class="content-list">
+      <view wx:for="{{contentItems}}" wx:key="index" class="content-item">
+        <!-- 文本内容 -->
+        <text decode='true' wx:if="{{item.type === 'text'}}" class="text-content">{{item.content}}</text>
+        
+        <!-- 图片内容 -->
+        <view wx:elif="{{item.type === 'image'}}" class="image-content">
+          <image src="{{item.src}}" alt="{{item.alt}}" mode="widthFix" class="content-image"></image>
+        </view>
+        
+        <!-- 视频内容 -->
+        <view wx:elif="{{item.type === 'video'}}" class="video-content">
+          <video src="{{item.src}}" poster="{{item.poster}}" class="content-video" controls></video>
+        </view>
+        
+        <!-- 音频内容 -->
+        <view wx:elif="{{item.type === 'audio'}}" class="audio-content">
+          <view class="audio-title">{{item.title}}</view>
+          <audio src="{{item.src}}" class="content-audio" controls></audio>
+        </view>
+      </view>
+    </view>
+
+    <!-- 描述 -->
+    <view wx:elif="{{detailData.description}}" class="detail-description">
+      {{detailData.description}}
+    </view>
+  </view>
+
+  <!-- 错误状态 -->
+  <view wx:else class="error-state">
+    <view class="error-text">加载失败,请重试</view>
+    <button class="retry-button" bindtap="loadDetailData">重新加载</button>
+  </view>
+
+  <!-- 导航前往按钮 -->
+  <view class="map-button" bindtap="openNavitor">
+    <image class="btn-bg" src="https://sit-kelamayi.4dage.com/mini/wxImg/btn_05.png" mode="aspectFit"></image>
+    <view class="btn-title">
+      <image class="adress-img" src="https://sit-kelamayi.4dage.com/mini/wxImg/icon_address.png"></image>
+      <view>导航前往</view>
+    </view>
+  </view>
+</view>

+ 222 - 0
pages/user/map/index.wxss

@@ -0,0 +1,222 @@
+/* pages/user/map/index.wxss */
+.detail-container {
+  position: relative;
+  min-height: 100vh;
+  padding: 20rpx;
+  background: url('https://sit-kelamayi.4dage.com/mini/wxImg/bg.png') no-repeat;
+  background-size: cover;
+}
+
+.back-button {
+  position: absolute;
+  top: 20rpx;
+  left: 20rpx;
+  width: 80rpx;
+  height: 80rpx;
+  border-radius: 50%;
+  z-index: 10;
+}
+
+.back-button image {
+  width: 80rpx;
+  height: 80rpx;
+}
+
+.loading-container {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  height: 400rpx;
+}
+
+.loading-text {
+  font-size: 32rpx;
+  color: #666;
+}
+
+.detail-content {
+  padding: 40rpx;
+  border-radius: 20rpx;
+  padding-bottom: 240rpx; /* 为导航按钮留出空间 */
+}
+
+.detail-title {
+  font-size: 48rpx;
+  font-weight: bold;
+  color: #584735;
+  margin-bottom: 20rpx;
+  line-height: 1.4;
+}
+
+.line {
+  height: 4rpx;
+  background: linear-gradient(90deg, rgba(91, 71, 46, 0.5) 0%, rgba(91, 71, 46, 0) 100%);
+  margin-bottom: 40rpx;
+}
+
+.detail-text {
+  font-size: 32rpx;
+  line-height: 1.6;
+  color: #584735;
+  margin-top: 40rpx;
+}
+
+.detail-description {
+  font-size: 32rpx;
+  line-height: 1.6;
+  color: #584735;
+  margin-top: 40rpx;
+}
+
+.error-state {
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+  height: 400rpx;
+}
+
+.error-text {
+  font-size: 32rpx;
+  color: #584735;
+  margin-bottom: 40rpx;
+}
+
+.retry-button {
+  padding: 20rpx 40rpx;
+  background: #007bff;
+  color: white;
+  border: none;
+  border-radius: 10rpx;
+  font-size: 28rpx;
+}
+
+/* 内容列表样式 */
+.content-list {
+  margin-top: 20rpx;
+}
+
+.content-item {
+  margin-bottom: 30rpx;
+}
+
+/* 文本内容样式 */
+.text-content {
+  line-height: 1.6;
+  color: #333;
+  font-size: 28rpx;
+  margin: 20rpx 0;
+}
+
+/* 图片内容样式 */
+.image-content {
+  margin: 20rpx 0;
+}
+
+.content-image {
+  width: 100%;
+  border-radius: 8rpx;
+}
+
+/* 视频内容样式 */
+.video-content {
+  margin: 20rpx 0;
+}
+
+.content-video {
+  width: 100%;
+  height: 400rpx;
+  border-radius: 8rpx;
+}
+
+/* 音频内容样式 */
+.audio-content {
+  margin: 20rpx 0;
+  padding: 20rpx;
+  background-color: #f5f5f5;
+  border-radius: 8rpx;
+}
+
+.audio-title {
+  font-size: 28rpx;
+  color: #333;
+  margin-bottom: 15rpx;
+  font-weight: bold;
+}
+
+.content-audio {
+  width: 100%;
+}
+
+p {
+  margin-bottom: 20rpx;
+  line-height: 1.6;
+  color: #584735;
+}
+
+image {
+  max-width: 100%;
+  height: 100rpx;
+  margin: 20rpx 0;
+}
+
+.map-button {
+  position: fixed;
+  bottom: 40rpx;
+  left: 50%;
+  transform: translateX(-50%);
+  width: 690rpx;
+  height: 160rpx;
+  color: rgba(88, 71, 53, 1);
+  border-radius: 10rpx;
+  z-index: 100;
+}
+
+.btn-bg {
+  width: 100%;
+  height: 140rpx;
+  position: absolute;
+  top: 0rpx;
+  left: 0;
+}
+
+.btn-title {
+  position: absolute;
+  top: 50%;
+  left: 50%;
+  transform: translate(-50%, -50%);
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+.adress-img{
+  width: 50rpx;
+  height: 50rpx;
+  margin-right: 16rpx;
+}
+.btn-title view {
+  font-size: 28rpx;
+  font-weight: 500;
+  color: #584735;
+}
+
+.icon-position {
+  margin-right: 16rpx;
+  font-size: 32rpx;
+}
+
+/* 响应式处理 */
+@media (max-width: 750rpx) {
+  .processed-image {
+    margin: 0;
+    padding: 0;
+  }
+
+  .indent {
+    text-indent: 1.5em;
+  }
+
+  .indent-text {
+    margin-left: 1.5em;
+  }
+}

+ 4 - 4
pages/user/my-preview/index.wxml

@@ -2,7 +2,7 @@
   <!-- 预约卡片列表 -->
   <scroll-view class="reservation-list" scroll-y="true">
     <view wx:for="{{reservations}}" wx:key="id" class="reservation-card">
-      <image class="card-bg" src="https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/imgs/img_05.png" mode="aspectFill"></image>
+      <image class="card-bg" src="https://sit-kelamayi.4dage.com/mini/wxImg/img_05.png" mode="aspectFill"></image>
       
       <!-- 预约信息区域 -->
       <view class="reservation-info">
@@ -27,11 +27,11 @@
         </view>
         
         <!-- 印章图标 (活动预约或已过期的普通预约显示) -->
-        <view wx:if="{{item.isExpired}}" class="stamp-icon">
-          <image src="https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/imgs/icon_end.png" mode="aspectFit"></image>
+        <view wx:if="{{item.isExpired && item.status !== -1}}" class="stamp-icon">
+          <image src="https://sit-kelamayi.4dage.com/mini/wxImg/icon_end.png" mode="aspectFit"></image>
         </view>
         <view wx:if="{{item.status == -1}}" class="stamp-icon">
-          <image src="https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/imgs/icon_cancel.png" mode="aspectFit"></image>
+          <image src="https://sit-kelamayi.4dage.com/mini/wxImg/icon_cancel.png" mode="aspectFit"></image>
         </view>
       </view>
       

+ 1 - 1
pages/user/my-preview/index.wxss

@@ -2,7 +2,7 @@
 .preview-container {
   width: 100%;
   height: 100vh;
-  background-image: url('https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/karamay/bg.png');
+  background-image: url('https://sit-kelamayi.4dage.com/mini/wxImg/bg.png');
   overflow: auto;
 }
 

+ 1 - 1
pages/user/userList/index.wxml

@@ -14,7 +14,7 @@
             <text class="label">姓名</text>
             <text class="value">{{item.name}}</text>
             <view class="edit-btn" bindtap="editContact" data-index="{{index}}">
-              <image class="delete-img" src="https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/imgs/indexPage/icon_delete.png" />
+              <image class="delete-img" src="https://sit-kelamayi.4dage.com/mini/wxImg/indexPage/icon_delete.png" />
               删除
             </view>
           </view>

+ 1 - 1
pages/user/userList/index.wxss

@@ -1,7 +1,7 @@
 /* 主容器 */
 .user-list-container {
   height: 100vh;
-  background: url('https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/karamay/bg.png') no-repeat center center;
+  background: url('https://sit-kelamayi.4dage.com/mini/wxImg/bg.png') no-repeat center center;
   background-size: cover;
   overflow: hidden;
   padding: 0 32rpx;

+ 1 - 1
project.config.json

@@ -1,6 +1,6 @@
 {
   "compileType": "miniprogram",
-  "libVersion": "3.8.8",
+  "libVersion": "3.8.7",
   "packOptions": {
     "ignore": [],
     "include": []

+ 2 - 2
project.private.config.json

@@ -3,7 +3,7 @@
   "projectname": "karamay",
   "setting": {
     "compileHotReLoad": true,
-    "urlCheck": false,
+    "urlCheck": true,
     "coverView": true,
     "lazyloadPlaceholderEnable": false,
     "skylineRenderEnable": false,
@@ -19,6 +19,6 @@
     "checkInvalidKey": true,
     "ignoreDevUnusedFiles": true
   },
-  "libVersion": "3.8.7",
+  "libVersion": "3.7.12",
   "condition": {}
 }

+ 55 - 39
utils/api.js

@@ -1,4 +1,3 @@
-// 小程序API接口模块
 const { request } = require('./request.js');
 
 /**
@@ -115,81 +114,98 @@ const museumApi = {
       data: {
         pageNum: 1,
         pageSize: 5,
-        status: 1,
         ...params,
       },
     });
   },
 
-  // 获取博物馆详情
-  getMuseumDetail(id) {
+  // 获取展览详情
+  getExhibitionDetail(id) {
     return request({
-      url: `/museum/introContext/info/${id}`,
-      method: 'post',
+      url: `/museum/exhibition/${id}`,
+      method: 'GET',
     });
   },
 
-  // 获取展览详情
-  getExhibitionDetail(id) {
+  // 获取展览详情(新接口)
+  getExhibitDetail(id) {
     return request({
-      url: `/museum/exhibit/${id}`,
-      method: 'post',
+      url: `/museum/exhibit/info/${id}`,
+      method: 'POST',
+    });
+  },
+  // 获取文物列表
+  getArtifactList(params = {}) {
+    return request({
+      url: '/museum/artifact/page',
+      method: 'POST',
+      data: {
+        pageNum: 1,
+        pageSize: 10,
+        status: 1,
+        title: '',
+        type: 0,
+        ...params,
+      },
     });
   },
 
-  // 获取展览详情(用于展览页面)
-  getExhibitDetail(id) {
+  // 获取典藏详情
+  getCollectionDetail(id) {
     return request({
-      url: `/museum/exhibit/${id}`,
-      method: 'post',
+      url: `/museum/collection/${id}`,
+      method: 'GET',
     });
   },
 
-  // 获取活动详情
-  getActivityDetail(id) {
+  // 获取文物详情
+  getArtifactDetail(id) {
     return request({
-      url: `/museum/activity/info/${id}`,
-      method: 'post',
+      url: `/museum/artifact/info/${id}`,
+      method: 'POST',
     });
   },
 
-  // 获取活动详情(用于活动预约页面)
-  getActivityInfo(id) {
+  // 获取新闻详情
+  getNewsDetail(id) {
     return request({
-      url: `/museum/activity/info/${id}`,
-      method: 'post',
+      url: `/museum/news/${id}`,
+      method: 'GET',
     });
   },
 
   // 获取资讯详情
-  getNewsDetail(id) {
+  getInformationDetail(id) {
     return request({
       url: `/museum/information/info/${id}`,
-      method: 'post',
+      method: 'POST',
     });
   },
 
-  // 获取收藏列表
-  getCollectionList(params = {}) {
+  // 获取活动详情
+  getActivityDetail(id) {
     return request({
-      url: '/museum/artifact/page',
+      url: `/museum/activity/info/${id}`,
       method: 'POST',
-      data: {
-        pageNum: 1,
-        pageSize: 10,
-        status: 1,
-        ...params,
-      },
-      useToken: true // 收藏相关接口需要token
     });
   },
 
-  // 获取收藏详情
-  getCollectionDetail(id) {
+  // 获取展馆介绍详情
+  getMuseumDetail(type) {
     return request({
-      url: `/museum/artifact/${id}`,
-      method: 'post',
-      useToken: true // 收藏相关接口需要token
+      url: `/museum/introContext/info/${type}`,
+      method: 'POST',
+    });
+  },
+
+  // 获取微信JSSDK配置
+  getWxJssdkConfig(url) {
+    return request({
+      url: '/museum/wxMini/getWxJssdkConfig',
+      method: 'GET',
+      data: {
+        url: url
+      }
     });
   },
 

+ 82 - 20
utils/htmlProcessor.js

@@ -1,5 +1,5 @@
 /**
- * HTML内容处理工具 - 小程序版本
+ * HTML内容处理工具
  * 用于处理富文本内容中的格式问题
  */
 
@@ -8,7 +8,7 @@
  * @param {string} htmlContent - 原始HTML内容
  * @returns {string} 处理后的HTML内容
  */
-function processHtmlContent(htmlContent) {
+export function processHtmlContent(htmlContent) {
   if (!htmlContent) return ''
 
   let processedContent = htmlContent
@@ -25,7 +25,7 @@ function processHtmlContent(htmlContent) {
   // 3. 处理图片容器,添加统一的样式类
   processedContent = processedContent.replace(
     /<div class="media-wrap image-wrap"><img src="([^"]*)"/g,
-    '<div class="media-wrap image-wrap processed-image"><img src="$1" class="content-image"',
+    '<div class="media-wrap image-wrap processed-image"><img style="height: 80px;" src="$1" class="content-image"',
   )
 
   // 4. 处理音频容器(如果有的话)
@@ -53,22 +53,84 @@ function processHtmlContent(htmlContent) {
 }
 
 /**
- * 获取处理HTML内容的CSS样式类名映射
- * @returns {object} 样式类名映射对象
+ * 获取处理HTML内容的CSS样式
+ * @returns {string} CSS样式字符串
  */
-function getHtmlContentStyleClasses() {
-  return {
-    indent: 'html-indent',
-    indentText: 'html-indent-text',
-    processedImage: 'html-processed-image',
-    contentImage: 'html-content-image',
-    processedAudio: 'html-processed-audio',
-    processedVideo: 'html-processed-video',
-    mediaWrap: 'html-media-wrap'
-  }
+export function getHtmlContentStyles() {
+  return `
+    /* 缩进段落样式 */
+    .indent {
+      text-indent: 2em;
+      margin-bottom: 1em;
+      line-height: 1.6;
+    }
+    
+    /* 缩进文本样式 */
+    .indent-text {
+      margin-left: 2em;
+    }
+    
+    /* 处理后的图片容器样式 */
+    .processed-image {
+      margin: 20px 0;
+      text-align: center;
+      background: #f8f9fa;
+      border-radius: 8px;
+      padding: 15px;
+      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
+    }
+    
+    /* 内容图片样式 */
+    .content-image {
+      max-width: 100%;
+      height: auto;
+      border-radius: 6px;
+      box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
+      transition: transform 0.3s ease;
+    }
+    
+    .content-image:hover {
+      transform: scale(1.02);
+    }
+    
+    /* 处理后的音频容器样式 */
+    .processed-audio {
+      margin: 15px 0;
+      padding: 15px;
+      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
+      border-radius: 10px;
+      text-align: center;
+    }
+    
+    /* 处理后的视频容器样式 */
+    .processed-video {
+      margin: 20px 0;
+      padding: 10px;
+      background: #000;
+      border-radius: 8px;
+      text-align: center;
+    }
+    
+    /* 通用媒体容器样式 */
+    .media-wrap {
+      position: relative;
+      overflow: hidden;
+    }
+    
+    /* 响应式处理 */
+    @media (max-width: 768px) {
+      .processed-image {
+        margin: 15px 0;
+        padding: 10px;
+      }
+      
+      .indent {
+        text-indent: 1.5em;
+      }
+      
+      .indent-text {
+        margin-left: 1.5em;
+      }
+    }
+  `
 }
-
-module.exports = {
-  processHtmlContent,
-  getHtmlContentStyleClasses
-}

+ 28 - 22
utils/util.js

@@ -21,30 +21,36 @@ const formatNumber = n => {
  * 导航到webview页面
  * @param {string} path - 页面路径
  */
-const navigateToWebview = (path) => {
-  // 配置webview链接
-  const envConfig = {
-    // 开发环境和测试环境
-    development: 'https://sit-kelamayi.4dage.com/mini/#',
-    // 正式环境
-    production: 'https://kelamayi.4dage.com/mini/#'
-  };
-  
-  // 获取当前环境
-  const currentEnv = wx.getAccountInfoSync().miniProgram.envVersion || 'develop';
-  let baseUrl = envConfig.development;
-  
-  if (currentEnv === 'release') {
-    baseUrl = envConfig.production;
-  }
-  
-  // 检查path中是否已经包含isFrom参数,避免重复添加
+const navigateToWebview = (path, mode) => {
   let fullUrl;
-  if (path.includes('isFrom=weixin')) {
-    fullUrl = `${baseUrl}${path}`;
+  
+  // 如果mode为'open',直接使用原始链接
+  if (mode === 'open' || path.includes('https://')) {
+    fullUrl = path;
   } else {
-    const separator = path.includes('?') ? '&' : '?';
-    fullUrl = `${baseUrl}${path}${separator}isFrom=weixin`;
+    // 配置webview链接
+    const envConfig = {
+      // 开发环境和测试环境
+      development: 'https://sit-kelamayi.4dage.com/mini/#',
+      // 正式环境
+      production: 'https://kelamayi.4dage.com/mini/#'
+    };
+    
+    // 获取当前环境
+    const currentEnv = wx.getAccountInfoSync().miniProgram.envVersion || 'develop';
+    let baseUrl = envConfig.development;
+    
+    if (currentEnv === 'release') {
+      baseUrl = envConfig.production;
+    }
+    
+    // 检查path中是否已经包含isFrom参数,避免重复添加
+    if (path.includes('isFrom=weixin')) {
+      fullUrl = `${baseUrl}${path}`;
+    } else {
+      const separator = path.includes('?') ? '&' : '?';
+      fullUrl = `${baseUrl}${path}${separator}isFrom=weixin`;
+    }
   }
   
   wx.navigateTo({