shaogen1995 5 місяців тому
батько
коміт
c7a7c62c17
35 змінених файлів з 482 додано та 195 видалено
  1. 4 2
      小程序入口_嵌套展示端/app.json
  2. 161 0
      小程序入口_嵌套展示端/pages/download/index.js
  3. 3 0
      小程序入口_嵌套展示端/pages/download/index.json
  4. 5 0
      小程序入口_嵌套展示端/pages/download/index.wxml
  5. 18 0
      小程序入口_嵌套展示端/pages/download/index.wxss
  6. 19 48
      小程序入口_嵌套展示端/pages/index/index.js
  7. 1 1
      小程序入口_嵌套展示端/pages/index/index.wxml
  8. 0 18
      小程序入口_嵌套展示端/pages/logs/logs.js
  9. 0 4
      小程序入口_嵌套展示端/pages/logs/logs.json
  10. 0 6
      小程序入口_嵌套展示端/pages/logs/logs.wxml
  11. 0 16
      小程序入口_嵌套展示端/pages/logs/logs.wxss
  12. 13 0
      小程序入口_嵌套展示端/project.private.config.json
  13. 4 3
      展示端/package.json
  14. 2 2
      展示端/public/home.html
  15. 5 0
      展示端/public/index.html
  16. BIN
      展示端/src/assets/img/home/bg.png
  17. 4 0
      展示端/src/assets/styles/base.less
  18. 25 0
      展示端/src/components/AownUse/useWxXcx.tsx
  19. 7 0
      展示端/src/pages/A1home/index.module.scss
  20. 30 2
      展示端/src/pages/A1home/index.tsx
  21. 41 36
      展示端/src/pages/A4selectCourse/index.module.scss
  22. 25 23
      展示端/src/pages/A4selectCourse/index.tsx
  23. 19 8
      展示端/src/pages/A5order/index.tsx
  24. 8 0
      展示端/src/pages/A6my/index.module.scss
  25. 18 8
      展示端/src/pages/A6my/index.tsx
  26. 4 4
      展示端/src/pages/A8_1codeAuth/index.tsx
  27. 3 0
      展示端/src/pages/A8proof/index.module.scss
  28. 17 7
      展示端/src/pages/A8proof/index.tsx
  29. 10 1
      展示端/src/pages/B1exhibit/index.module.scss
  30. 11 1
      展示端/src/pages/B1exhibit/index.tsx
  31. 2 2
      展示端/src/pages/B4form/data.ts
  32. 2 2
      展示端/src/pages/B4form/index.tsx
  33. 1 1
      展示端/src/types/declaration.d.ts
  34. 15 0
      展示端/src/utils/history.ts
  35. 5 0
      展示端/yarn.lock

+ 4 - 2
小程序入口_嵌套展示端/app.json

@@ -1,7 +1,9 @@
 {
   "pages": [
     "pages/index/index",
-    "pages/logs/logs"
+    "pages/download/index"
+    
+    
   ],
   "window": {
     "navigationBarTextStyle": "black",
@@ -12,4 +14,4 @@
   "componentFramework": "glass-easel",
   "sitemapLocation": "sitemap.json",
   "lazyCodeLoading": "requiredComponents"
-}
+}

+ 161 - 0
小程序入口_嵌套展示端/pages/download/index.js

@@ -0,0 +1,161 @@
+// pages/download/index.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    text: '下载文件'
+  },
+
+  backUrl() {
+    console.log(123456);
+    wx.navigateBack({
+      delta: 1
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(o) {
+
+    if (o.url) {
+
+      wx.showLoading({
+        title: '下载中', //提示文字
+        mask: true, //是否显示透明蒙层,防止触摸穿透,默认:false  
+      })
+
+      let that = this;
+
+      console.log('--------url路径', decodeURI(o.url));
+      const url = decodeURI(o.url)
+      wx.downloadFile({
+        url,
+        success(res) {
+          wx.getFileSystemManager().saveFile({ //微信保存文件,这个存储有点复杂
+            // 临时存储路径,先有临时存储路径方可使用wx官方的存储本地路径( wx.env.USER_DATA_PATH )
+            tempFilePath: res.tempFilePath,
+            //定义本地的存储路径及名称
+            filePath: wx.env.USER_DATA_PATH + '/' + Date.now() + '.pdf',
+            success(res) {
+
+              console.log('pppppp', res);
+
+              const savedFilePath = res.savedFilePath;
+              
+              console.log('xxxx', savedFilePath);
+
+              that.setData({
+                text: '正在加载,预览成功后点击右上角即可保存(ios手机需要发送给文件助手后保存)'
+              });
+
+              setTimeout(() => {
+                wx.hideLoading()
+                wx.openDocument({ //微信打开文件
+
+                  filePath: savedFilePath,
+                  showMenu: true,
+                  success: function (res) {
+  
+                  
+  
+                    that.setData({
+                      text: '预览成功,点击返回继续',
+                    });
+                  },
+                  fail: function (err) {
+                    wx.showToast({
+                      title: '预览失败',
+                      icon: 'error',
+                      duration: 1500
+                    })
+                    that.setData({
+                      text: '预览失败'
+                    });
+                  }
+                });
+              }, 2000);
+
+          
+
+            },
+            fail(err) {
+              wx.showToast({
+                title: '预览失败',
+                icon: 'error',
+                duration: 1500
+              })
+              that.setData({
+                text: '预览失败'
+              });
+            }
+          })
+
+        },
+        fail(err) {
+          wx.hideLoading()
+          wx.showToast({
+            title: '下载失败',
+            icon: 'error',
+            duration: 1500
+          })
+          console.log(err)
+          that.setData({
+            text: '下载失败'
+          });
+        }
+      })
+    }
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 3 - 0
小程序入口_嵌套展示端/pages/download/index.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 5 - 0
小程序入口_嵌套展示端/pages/download/index.wxml

@@ -0,0 +1,5 @@
+<!--pages/download/index.wxml-->
+<view class="topp">{{text}}</view>
+<view class="backk">
+<text class="backk2" bindtap="backUrl">返回</text>
+</view>

+ 18 - 0
小程序入口_嵌套展示端/pages/download/index.wxss

@@ -0,0 +1,18 @@
+/* pages/download/index.wxss */
+.topp{
+  text-align: center;
+  margin-top: 50px;
+  padding: 20px;
+}
+
+.backk{
+  margin: 100px auto;
+  text-align: center;
+}
+
+.backk2{
+  padding: 10px 20px;
+  border-radius: 4px;
+  background-color: #7dbe2b;
+  color: #fff;
+}

+ 19 - 48
小程序入口_嵌套展示端/pages/index/index.js

@@ -1,49 +1,20 @@
-// index.js
-const defaultAvatarUrl = 'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0'
-
 Page({
-  data: {
-    motto: 'Hello World',
-    userInfo: {
-      avatarUrl: defaultAvatarUrl,
-      nickName: '',
-    },
-    hasUserInfo: false,
-    canIUseGetUserProfile: wx.canIUse('getUserProfile'),
-    canIUseNicknameComp: wx.canIUse('input.type.nickname'),
-  },
-  bindViewTap() {
-    wx.navigateTo({
-      url: '../logs/logs'
-    })
-  },
-  onChooseAvatar(e) {
-    const { avatarUrl } = e.detail
-    const { nickName } = this.data.userInfo
-    this.setData({
-      "userInfo.avatarUrl": avatarUrl,
-      hasUserInfo: nickName && avatarUrl && avatarUrl !== defaultAvatarUrl,
-    })
-  },
-  onInputChange(e) {
-    const nickName = e.detail.value
-    const { avatarUrl } = this.data.userInfo
-    this.setData({
-      "userInfo.nickName": nickName,
-      hasUserInfo: nickName && avatarUrl && avatarUrl !== defaultAvatarUrl,
-    })
-  },
-  getUserProfile(e) {
-    // 推荐使用wx.getUserProfile获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认,开发者妥善保管用户快速填写的头像昵称,避免重复弹窗
-    wx.getUserProfile({
-      desc: '展示用户信息', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
-      success: (res) => {
-        console.log(res)
-        this.setData({
-          userInfo: res.userInfo,
-          hasUserInfo: true
-        })
-      }
-    })
-  },
-})
+  onH5Message(e) {
+    console.log('---xxxxxxx', e); 
+    // if (e.detail.data0.type === 'download') {
+    //   wx.downloadFile({
+    //     url: e.detail.data0.url,
+    //     success: (res) => {
+    //       wx.saveFile({
+    //         tempFilePath: res.tempFilePath,
+    //         success: (savedRes) => {
+    //           wx.showToast({
+    //             title: '下载成功'
+    //           });
+    //         }
+    //       });
+    //     }
+    //   });
+    // }
+  }
+});

+ 1 - 1
小程序入口_嵌套展示端/pages/index/index.wxml

@@ -1 +1 @@
-<web-view src="https://sit-hqbooking.4dage.com/web/home.html"/>
+<web-view src="https://sit-hqbooking.4dage.com/web/home.html" bindmessage="onH5Message"/>

+ 0 - 18
小程序入口_嵌套展示端/pages/logs/logs.js

@@ -1,18 +0,0 @@
-// logs.js
-const util = require('../../utils/util.js')
-
-Page({
-  data: {
-    logs: []
-  },
-  onLoad() {
-    this.setData({
-      logs: (wx.getStorageSync('logs') || []).map(log => {
-        return {
-          date: util.formatTime(new Date(log)),
-          timeStamp: log
-        }
-      })
-    })
-  }
-})

+ 0 - 4
小程序入口_嵌套展示端/pages/logs/logs.json

@@ -1,4 +0,0 @@
-{
-  "usingComponents": {
-  }
-}

+ 0 - 6
小程序入口_嵌套展示端/pages/logs/logs.wxml

@@ -1,6 +0,0 @@
-<!--logs.wxml-->
-<scroll-view class="scrollarea" scroll-y type="list">
-  <block wx:for="{{logs}}" wx:key="timeStamp" wx:for-item="log">
-    <view class="log-item">{{index + 1}}. {{log.date}}</view>
-  </block>
-</scroll-view>

+ 0 - 16
小程序入口_嵌套展示端/pages/logs/logs.wxss

@@ -1,16 +0,0 @@
-page {
-  height: 100vh;
-  display: flex;
-  flex-direction: column;
-}
-.scrollarea {
-  flex: 1;
-  overflow-y: hidden;
-}
-.log-item {
-  margin-top: 20rpx;
-  text-align: center;
-}
-.log-item:last-child {
-  padding-bottom: env(safe-area-inset-bottom);
-}

+ 13 - 0
小程序入口_嵌套展示端/project.private.config.json

@@ -3,5 +3,18 @@
   "projectname": "%E6%A8%AA%E7%90%B4%E9%A2%84%E7%BA%A6",
   "setting": {
     "compileHotReLoad": true
+  },
+  "condition": {
+    "miniprogram": {
+      "list": [
+        {
+          "name": "",
+          "pathName": "pages/download/index",
+          "query": "url=https://sit-hqbooking.4dage.com/config/A2templatePDF/doc/20250228_12004476418.pdf",
+          "launchMode": "default",
+          "scene": null
+        }
+      ]
+    }
   }
 }

+ 4 - 3
展示端/package.json

@@ -16,6 +16,9 @@
     "antd-mobile": "^5.30.0",
     "axios": "^1.1.3",
     "classnames": "^2.3.2",
+    "dayjs": "^1.11.7",
+    "html2canvas": "^1.4.1",
+    "jspdf": "^2.5.1",
     "react": "^18.2.0",
     "react-dom": "^18.2.0",
     "react-redux": "^8.0.4",
@@ -29,9 +32,7 @@
     "swiper": "^9.1.0",
     "typescript": "^4.8.4",
     "web-vitals": "^2.1.4",
-    "dayjs": "^1.11.7",
-    "html2canvas": "^1.4.1",
-    "jspdf": "^2.5.1"
+    "weixin-js-sdk": "^1.6.5"
   },
   "scripts": {
     "dev": "react-app-rewired start",

+ 2 - 2
展示端/public/home.html

@@ -61,11 +61,11 @@
 
       <div class="txt" id="url1">
         <p>琴澳儿童健康生活</p>
-        <p>展馆预约(个人)</p>
+        <p>展厅预约</p>
       </div>
       <div class="txt txt2" id="url2">
         <p>琴澳儿童健康教育</p>
-        <p>课堂预约(团体)</p>
+        <p>课堂预约</p>
       </div>
       <br />
       <br />

+ 5 - 0
展示端/public/index.html

@@ -6,6 +6,11 @@
     <meta name="viewport" content="width=device-width, initial-scale=1" />
     <meta name="theme-color" content="#000000" />
     <meta name="description" content="Web site created using create-react-app" />
+    <meta
+      name="viewport"
+      content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"
+    />
+
     <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
 
     <script>

BIN
展示端/src/assets/img/home/bg.png


+ 4 - 0
展示端/src/assets/styles/base.less

@@ -10,6 +10,10 @@ html {
   user-select: none;
 }
 
+// input {
+//   font-size: 16px !important;
+// }
+
 body {
   font: 1em/1.4 'Microsoft Yahei', 'PingFang SC', 'Avenir', 'Segoe UI', 'Hiragino Sans GB',
     'STHeiti', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;

+ 25 - 0
展示端/src/components/AownUse/useWxXcx.tsx

@@ -0,0 +1,25 @@
+import { useEffect, useState } from 'react'
+import wx from 'weixin-js-sdk'
+
+export default function useWxXcx() {
+  // 判断是不是微信小程序
+
+  const [isWXxcx, setIsWXxcx] = useState(false)
+
+  useEffect(() => {
+    // 1. 先判断是否为微信环境
+    const ua = navigator.userAgent.toLowerCase()
+    const isWeChat = ua.includes('micromessenger')
+    if (isWeChat) {
+      // 2. 调用微信 JS-SDK 判断是否在小程序环境
+      wx.miniProgram.getEnv((res: any) => {
+        setIsWXxcx(res.miniprogram || false)
+      })
+      console.log(123)
+    }
+  }, [])
+
+  return {
+    isWXxcx
+  }
+}

+ 7 - 0
展示端/src/pages/A1home/index.module.scss

@@ -8,6 +8,13 @@
     .A1bg {
       width: 100%;
       height: auto;
+      position: relative;
+      .A1bgBack {
+        position: absolute;
+        pointer-events: auto;
+        top: 30px;
+        left: 34px;
+      }
     }
     .A1list {
       padding: 10%;

+ 30 - 2
展示端/src/pages/A1home/index.tsx

@@ -1,4 +1,4 @@
-import React from 'react'
+import React, { useCallback } from 'react'
 import styles from './index.module.scss'
 
 import bgImg from '@/assets/img/home/bg.png'
@@ -7,6 +7,9 @@ import icon2 from '@/assets/img/home/icon2.png'
 import icon3 from '@/assets/img/home/icon3.png'
 import history from '@/utils/history'
 
+import backImg from '@/assets/img/back.png'
+import { Form, Input } from 'antd'
+
 const list = [
   {
     name: '团体预约',
@@ -32,9 +35,34 @@ const list = [
 ]
 
 function A1home() {
+  const toHomeHtml = useCallback(() => {
+    window.location.href = '/web/home.html'
+  }, [])
+
   return (
     <div className={styles.A1home}>
-      <img className='A1bg' src={bgImg} alt='' />
+      <Form
+        name='basic'
+        // labelCol={{ span: 3 }}
+        autoComplete='off'
+        scrollToFirstError
+        initialValues={{ papers: '内地身份证' }}
+      >
+        <Form.Item
+          label='负责人姓名'
+          name='name'
+          rules={[{ required: true, message: '请输入负责人姓名!' }]}
+          getValueFromEvent={e => e.target.value.trim()}
+        >
+          <Input placeholder='请输入内容' maxLength={6} />
+        </Form.Item>
+      </Form>
+
+      <div className='A1bg'>
+        <img src={bgImg} alt='' />
+        <img className='A1bgBack' src={backImg} alt='' onClick={toHomeHtml} />
+      </div>
+
       <div className='A1list'>
         {list.map(item => (
           <div

+ 41 - 36
展示端/src/pages/A4selectCourse/index.module.scss

@@ -7,11 +7,11 @@
       background-image: url('../../assets/img/selectCourse/bg.jpg');
       background-size: 100% 100%;
       .A4row {
-        margin-top: 20px;
-        margin-bottom: 70px;
+        margin-top: 15px;
+        margin-bottom: 15px;
         .A4row1 {
-          height: 54px;
-          line-height: 54px;
+          height: 50px;
+          line-height: 50px;
           display: inline-block;
           padding: 0 24px 0 50px;
           border-radius: 0 30px 30px 0;
@@ -29,10 +29,10 @@
         }
         .A4row2 {
           width: 90%;
-          height: 550px;
+          height: 500px;
           background-image: url('../../assets/img/selectCourse/pop.png');
           background-size: 100% 100%;
-          margin: 25px auto;
+          margin: 15px auto;
           .A4row2_1 {
             padding-left: 25px;
             height: 60px;
@@ -46,42 +46,47 @@
             white-space: nowrap;
           }
           .A4row2_2 {
-            height: 380px;
-            padding: 30px 30px 0;
+            height: 330px;
+            padding: 30px 20px 0 30px;
 
-            & > div {
+            .A4row2_2Box {
               width: 100%;
               height: 100%;
               border-bottom: 2px dashed #bebebe;
               display: flex;
-              flex-direction: column;
-              justify-content: center;
-              padding-bottom: 30px;
-              .A4row2_2tit {
-                font-weight: 700;
-                font-size: 16px;
-                color: var(--themeColor);
-                margin-bottom: 5px;
-              }
-              & > p {
-                min-height: 66px;
-                text-align: justify;
-                font-size: 16px;
-                display: -webkit-box;
-                overflow: hidden;
-                white-space: normal !important;
-                text-overflow: ellipsis;
-                word-wrap: break-word;
-                line-clamp: 3;
-                -webkit-line-clamp: 3;
-                -webkit-box-orient: vertical;
-                margin-bottom: 12px;
-              }
-              .A4row2_2No {
+              align-items: center;
+              & > div {
                 width: 100%;
-                text-align: center;
-                font-size: 30px;
-                color: var(--themeColor);
+                max-height: 300px;
+                padding-bottom: 30px;
+                overflow-y: auto;
+                padding-right: 10px;
+                .A4row2_2tit {
+                  font-weight: 700;
+                  font-size: 16px;
+                  color: var(--themeColor);
+                  margin-bottom: 5px;
+                }
+                & > p {
+                  min-height: 66px;
+                  text-align: justify;
+                  font-size: 16px;
+                  // display: -webkit-box;
+                  // overflow: hidden;
+                  // white-space: normal !important;
+                  // text-overflow: ellipsis;
+                  // word-wrap: break-word;
+                  // line-clamp: 3;
+                  // -webkit-line-clamp: 3;
+                  // -webkit-box-orient: vertical;
+                  margin-bottom: 12px;
+                }
+                .A4row2_2No {
+                  width: 100%;
+                  text-align: center;
+                  font-size: 30px;
+                  color: var(--themeColor);
+                }
               }
             }
           }

+ 25 - 23
展示端/src/pages/A4selectCourse/index.tsx

@@ -104,29 +104,31 @@ function A4selectCourse() {
                 <div className='A4row2' key={item2.id}>
                   <div className='A4row2_1'>{item2.name}</div>
                   <div className='A4row2_2'>
-                    <div>
-                      {item2.intro ? (
-                        <>
-                          <div className='A4row2_2tit'>课程简介:</div>
-                          <p>{item2.intro}</p>
-                        </>
-                      ) : null}
-                      {item2.team ? (
-                        <>
-                          <div className='A4row2_2tit'>授课团队:</div>
-                          <p>{item2.team}</p>
-                        </>
-                      ) : null}
-                      {item2.info ? (
-                        <>
-                          <div className='A4row2_2tit'>预约须知:</div>
-                          <p>{item2.info}</p>
-                        </>
-                      ) : null}
-
-                      {!item2.intro && !item2.team && !item2.info ? (
-                        <div className='A4row2_2No'>暂无信息</div>
-                      ) : null}
+                    <div className='A4row2_2Box'>
+                      <div className='mySorrl'>
+                        {item2.intro ? (
+                          <>
+                            <div className='A4row2_2tit'>课程简介:</div>
+                            <p>{item2.intro}</p>
+                          </>
+                        ) : null}
+                        {item2.team ? (
+                          <>
+                            <div className='A4row2_2tit'>授课团队:</div>
+                            <p>{item2.team}</p>
+                          </>
+                        ) : null}
+                        {item2.info ? (
+                          <>
+                            <div className='A4row2_2tit'>预约须知:</div>
+                            <p>{item2.info}</p>
+                          </>
+                        ) : null}
+
+                        {!item2.intro && !item2.team && !item2.info ? (
+                          <div className='A4row2_2No'>暂无信息</div>
+                        ) : null}
+                      </div>
                     </div>
                   </div>
                   {/* 按钮 */}

+ 19 - 8
展示端/src/pages/A5order/index.tsx

@@ -12,8 +12,9 @@ import dayjs from 'dayjs'
 import htmlToPdf2 from '@/utils/htmlToPdf2'
 import { MessageFu } from '@/utils/message'
 import ZinfoPop from '@/components/ZinfoPop'
-import history from '@/utils/history'
+import history, { wxDownFu } from '@/utils/history'
 import { useParams } from 'react-router-dom'
+
 import {
   A5_APIgetInfo,
   A5_APIgetTemplateUrl,
@@ -25,6 +26,7 @@ import { FileType } from '@/types'
 import { baseURL } from '@/utils/http'
 import ZselectCity from '@/components/ZselectCity'
 import { papersSelArr } from '../B4form/data'
+import useWxXcx from '@/components/AownUse/useWxXcx'
 
 type FormType = {
   name: string
@@ -37,6 +39,9 @@ type FormType = {
 }
 
 function A5order() {
+  // 是否是微信小程序
+  const { isWXxcx } = useWxXcx()
+
   // 获取路由参数
   const [urlObj, setUrlObj] = useState({
     id: 0,
@@ -46,7 +51,7 @@ function A5order() {
   })
 
   // useEffect(() => {
-  //   console.log('获取参数', urlObj)
+  //   // console.log('获取参数', urlObj)
   // }, [urlObj])
 
   const urlObjTemp: any = useParams()
@@ -256,9 +261,9 @@ function A5order() {
                     label='负责人姓名'
                     name='name'
                     rules={[{ required: true, message: '请输入负责人姓名!' }]}
-                    getValueFromEvent={e => e.target.value.replace(/\s+/g, '')}
+                    getValueFromEvent={e => e.target.value.trim()}
                   >
-                    <Input placeholder='请输入内容,不超过6个字' maxLength={6} />
+                    <Input placeholder='请输入内容' maxLength={6} />
                   </Form.Item>
 
                   <Form.Item
@@ -343,7 +348,7 @@ function A5order() {
                         label='所属机构'
                         name='unit'
                         rules={[{ required: true, message: '请输入所属机构!' }]}
-                        getValueFromEvent={e => e.target.value.replace(/\s+/g, '')}
+                        getValueFromEvent={e => e.target.value.trim()}
                       >
                         <TextArea autoSize placeholder='请输入内容,不超过20个字' maxLength={20} />
                       </Form.Item>
@@ -384,9 +389,15 @@ function A5order() {
                   <div className='A5LA1'>
                     预约单模板
                     {templateUrl ? (
-                      <a className='A5LA1btn' href={baseURL + templateUrl} download='预约单模板'>
-                        下载
-                      </a>
+                      isWXxcx ? (
+                        <div className='A5LA1btn' onClick={() => wxDownFu(templateUrl)}>
+                          下载
+                        </div>
+                      ) : (
+                        <a className='A5LA1btn' href={baseURL + templateUrl} download='预约单模板'>
+                          下载
+                        </a>
+                      )
                     ) : (
                       <div className='A5LA1btn A5LA1btnNo'>暂无文件</div>
                     )}

+ 8 - 0
展示端/src/pages/A6my/index.module.scss

@@ -234,6 +234,9 @@
                 .A6_2filell {
                   font-size: 14px;
                   width: calc(100% - 70px);
+                  overflow: hidden;
+                  text-overflow: ellipsis;
+                  white-space: nowrap;
                 }
                 .A6_2filerr {
                   width: 60px;
@@ -280,5 +283,10 @@
         }
       }
     }
+    @media screen and (max-width: 370px) {
+      .A6row1 {
+        font-size: 12px !important;
+      }
+    }
   }
 }

+ 18 - 8
展示端/src/pages/A6my/index.tsx

@@ -12,10 +12,14 @@ import { A6tableType1, A6tableType2 } from './type'
 import { FileType } from '@/types'
 import { baseURL } from '@/utils/http'
 import { MessageFu } from '@/utils/message'
-import history from '@/utils/history'
+import history, { wxDownFu } from '@/utils/history'
 import { ImageViewer } from 'antd-mobile'
+import useWxXcx from '@/components/AownUse/useWxXcx'
 
 function A6my() {
+  // 是否是微信小程序
+  const { isWXxcx } = useWxXcx()
+
   const [topAc, setTopAc] = useState(
     window.location.hash.includes('?m=1') ? '认证申请' : '预约申请'
   )
@@ -232,13 +236,19 @@ function A6my() {
                           <div className='A6_2filell'>{item2.fileName}</div>
 
                           {item2.fileName.endsWith('.pdf') || item2.fileName.endsWith('.PDF') ? (
-                            <a
-                              href={baseURL + item2.filePath}
-                              className='A6_2filerr'
-                              download={item2.fileName}
-                            >
-                              下载
-                            </a>
+                            isWXxcx ? (
+                              <div className='A6_2filerr' onClick={() => wxDownFu(item2.filePath)}>
+                                下载
+                              </div>
+                            ) : (
+                              <a
+                                href={baseURL + item2.filePath}
+                                className='A6_2filerr'
+                                download={item2.fileName}
+                              >
+                                下载
+                              </a>
+                            )
                           ) : (
                             <div className='A6_2filerr' onClick={() => lookImgFu(item2.filePath)}>
                               查看

+ 4 - 4
展示端/src/pages/A8_1codeAuth/index.tsx

@@ -66,7 +66,7 @@ function A81codeAuth() {
                   placeholder='请输入6个字符邀请码'
                   maxLength={6}
                   value={code}
-                  onChange={e => setCode(e.target.value.replace(/\s+/g, ''))}
+                  onChange={e => setCode(e.target.value.trim())}
                 />
               </div>
             </div>
@@ -79,9 +79,9 @@ function A81codeAuth() {
                 label='负责人姓名'
                 name='name'
                 rules={[{ required: true, message: '请输入负责人姓名!' }]}
-                getValueFromEvent={e => e.target.value.replace(/\s+/g, '')}
+                getValueFromEvent={e => e.target.value.trim()}
               >
-                <Input placeholder='请输入内容,不超过6个字' maxLength={6} />
+                <Input placeholder='请输入内容' maxLength={6} />
               </Form.Item>
 
               <Form.Item
@@ -103,7 +103,7 @@ function A81codeAuth() {
                 label='单位名称'
                 name='unit'
                 rules={[{ required: true, message: '请输入单位名称!' }]}
-                // getValueFromEvent={e => e.target.value.replace(/\s+/g, '')}
+                // getValueFromEvent={e => e.target.value.trim()}
               >
                 <TextArea placeholder='请输入内容,不超过50个字' maxLength={50} />
               </Form.Item>

+ 3 - 0
展示端/src/pages/A8proof/index.module.scss

@@ -161,6 +161,9 @@
               justify-content: space-between;
               .A8Frowll {
                 width: calc(100% - 70px);
+                overflow: hidden;
+                text-overflow: ellipsis;
+                white-space: nowrap;
               }
               .A8Frowrr {
                 display: flex;

+ 17 - 7
展示端/src/pages/A8proof/index.tsx

@@ -4,7 +4,7 @@ import { useParams } from 'react-router-dom'
 import TopCom from '@/components/TopCom'
 import { Button, Form, FormInstance, Input } from 'antd'
 import ZinfoPop from '@/components/ZinfoPop'
-import history from '@/utils/history'
+import history, { wxDownFu } from '@/utils/history'
 import TextArea from 'antd/es/input/TextArea'
 import { CloudUploadOutlined, EyeOutlined, CloseOutlined } from '@ant-design/icons'
 import MyPopconfirm from '@/components/MyPopconfirm'
@@ -13,8 +13,12 @@ import { MessageFu } from '@/utils/message'
 import { A5_APIgetTemplateUrl, A8_APIsave, upFileFu } from '@/store/action/all'
 import { FileType } from '@/types'
 import { baseURL } from '@/utils/http'
+import useWxXcx from '@/components/AownUse/useWxXcx'
 
 function A8proof() {
+  // 是否是微信小程序
+  const { isWXxcx } = useWxXcx()
+
   const urlObj: any = useParams()
 
   const canRef = useRef('')
@@ -129,9 +133,9 @@ function A8proof() {
                 label='负责人姓名'
                 name='name'
                 rules={[{ required: true, message: '请输入负责人姓名!' }]}
-                getValueFromEvent={e => e.target.value.replace(/\s+/g, '')}
+                getValueFromEvent={e => e.target.value.trim()}
               >
-                <Input placeholder='请输入内容,不超过6个字' maxLength={6} />
+                <Input placeholder='请输入内容' maxLength={6} />
               </Form.Item>
 
               <Form.Item
@@ -153,7 +157,7 @@ function A8proof() {
                 label='单位名称'
                 name='unit'
                 rules={[{ required: true, message: '请输入单位名称!' }]}
-                // getValueFromEvent={e => e.target.value.replace(/\s+/g, '')}
+                // getValueFromEvent={e => e.target.value.trim()}
               >
                 <TextArea placeholder='请输入内容,不超过50个字' maxLength={50} />
               </Form.Item>
@@ -163,9 +167,15 @@ function A8proof() {
             {templateUrl ? (
               <div className='A8lKa A8lKaDown'>
                 <div className='A8lKaDown1'>认证模板文件</div>
-                <a className='A8lKaDown2' href={baseURL + templateUrl} download='认证模板'>
-                  下载
-                </a>
+                {isWXxcx ? (
+                  <div className='A8lKaDown2' onClick={() => wxDownFu(templateUrl)}>
+                    下载
+                  </div>
+                ) : (
+                  <a className='A8lKaDown2' href={baseURL + templateUrl} download='认证模板'>
+                    下载
+                  </a>
+                )}
               </div>
             ) : null}
 

+ 10 - 1
展示端/src/pages/B1exhibit/index.module.scss

@@ -5,7 +5,16 @@
     .B1top {
       width: 100%;
       height: auto;
-      object-fit: fill !important;
+      position: relative;
+      img {
+        object-fit: fill !important;
+      }
+      .B1topBack {
+        position: absolute;
+        pointer-events: auto;
+        top: 30px;
+        left: 34px;
+      }
     }
     .B1tit {
       font-size: 24px;

+ 11 - 1
展示端/src/pages/B1exhibit/index.tsx

@@ -6,6 +6,8 @@ import history from '@/utils/history'
 import { B1_APIgetInfoByDay } from '@/store/action/all'
 import dayjs from 'dayjs'
 
+import backImg from '@/assets/img/back.png'
+
 function B1exhibit() {
   const [txt, setTxt] = useState('')
 
@@ -22,9 +24,17 @@ function B1exhibit() {
     getTxtFu()
   }, [getTxtFu])
 
+  const toHomeHtml = useCallback(() => {
+    window.location.href = '/web/home.html'
+  }, [])
+
   return (
     <div className={styles.B1exhibit + ' myTextBox'}>
-      <img className='B1top' src={topImg} alt='' />
+      <div className='B1top'>
+        <img src={topImg} alt='' />
+        <img className='B1topBack' src={backImg} alt='' onClick={toHomeHtml} />
+      </div>
+
       <h1 className='B1tit'>预约须知</h1>
       <div className='B1txt' dangerouslySetInnerHTML={{ __html: txt }}></div>
       <div className='B1btn'>

+ 2 - 2
展示端/src/pages/B4form/data.ts

@@ -1,6 +1,6 @@
 export const papersSelArr = [
   { value: '内地身份证', label: '内地身份证' },
-  { value: '港澳台居民居住证', label: '港澳台居民居住证' },
-  { value: '港澳台居民往来内地通行证', label: '港澳台居民往来内地通行证' },
+  { value: '港澳居民来往内地通行证', label: '港澳居民来往内地通行证' },
+  { value: '台湾居民来往大陆通行证', label: '台湾居民来往大陆通行证' },
   { value: '护照', label: '护照' }
 ]

+ 2 - 2
展示端/src/pages/B4form/index.tsx

@@ -202,9 +202,9 @@ function B4form() {
                   label='姓名'
                   name={`name${item.id}`}
                   rules={[{ required: true, message: '请输入姓名!' }]}
-                  getValueFromEvent={e => e.target.value.replace(/\s+/g, '')}
+                  getValueFromEvent={e => e.target.value.trim()}
                 >
-                  <Input placeholder='请输入内容,不超过6个字' maxLength={6} />
+                  <Input placeholder='请输入内容' maxLength={6} />
                 </Form.Item>
 
                 <Form.Item

+ 1 - 1
展示端/src/types/declaration.d.ts

@@ -6,5 +6,5 @@ declare module '*.gif'
 declare module '*.svg'
 declare module 'js-export-excel'
 declare module 'braft-utils'
-
+declare module 'weixin-js-sdk'
 declare const weiXinLoginBackUrlTemp: string

+ 15 - 0
展示端/src/utils/history.ts

@@ -1,5 +1,9 @@
 import store from '@/store'
 import { createHashHistory } from 'history'
+
+import wx from 'weixin-js-sdk'
+import { baseUrlTemp } from './http'
+
 const history = createHashHistory()
 
 // 监听路由
@@ -37,3 +41,14 @@ export const isMobileFu = () => {
     return true
   } else return false
 }
+
+// 在微信小程序中点击下载
+export const wxDownFu = (url: string) => {
+  wx.miniProgram.navigateTo({
+    url: `/pages/download/index?url=${encodeURI(baseUrlTemp + url)}`
+  })
+
+  // wx.miniProgram.postMessage({
+  //   data: { type: 'download', url: baseUrlTemp + url }
+  // })
+}

+ 5 - 0
展示端/yarn.lock

@@ -10488,6 +10488,11 @@ websocket-extensions@>=0.1.1:
   resolved "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz#7f8473bc839dfd87608adb95d7eb075211578a42"
   integrity sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==
 
+weixin-js-sdk@^1.6.5:
+  version "1.6.5"
+  resolved "https://registry.npmmirror.com/weixin-js-sdk/-/weixin-js-sdk-1.6.5.tgz#01fe5220b91dbfe089fc0730d061be0e68271e6a"
+  integrity sha512-Gph1WAWB2YN/lMOFB/ymb+hbU/wYazzJgu6PMMktCy9cSCeW5wA6Zwt0dpahJbJ+RJEwtTv2x9iIu0U4enuVSQ==
+
 whatwg-encoding@^1.0.5:
   version "1.0.5"
   resolved "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0"