Browse Source

fix:限制最大尺寸为500px

aamin 1 year ago
parent
commit
6592e51b79

+ 1 - 0
index.html

@@ -20,6 +20,7 @@
 <body>
   <div id="app"></div>
   <script type="module" src="/src/main.ts"></script>
+  <script src="http://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
 </body>
 
 </html>

+ 2 - 0
src/App.vue

@@ -79,6 +79,8 @@ onBeforeMount(() => {
 #app {
   width: 100%;
   height: 100%;
+  max-width: 500px;
+  /* height: ; */
   background: #F7F3E8;
 }
 

+ 24 - 1
src/base.css

@@ -1,15 +1,38 @@
 #app {
   margin: 0;
-  width: 100vw;
+  width: 100%;
   height: 100vh;
+  max-width: 500px;
   /* overflow: hidden; */
 }
 body {
   margin: 0;
   padding: 0;
   display: block;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+  /* max-width: 500px; */
+}
+::-webkit-scrollbar {
+  width: 3px;
+  /* 横向滚动条的宽度 */
+  height: 10px;
+  /* 纵向滚动条的高度 */
+  background-color: #E4DCC5;
+  /* 轨道背景色 */
+}
+::-webkit-scrollbar-thumb {
+  background-color: #88866F;
+  /* 滑块背景色 */
+  border-radius: 5px;
+  /* 滚动条滑块圆角 */
+  box-shadow: inset 0 0 6px #F1E9D4;
+  /* 滚动条滑块阴影效果 */
 }
 * {
   margin: 0;
   padding: 0;
+  box-sizing: border-box;
 }

+ 2 - 1
src/views/EnterNingguo/summarize.vue

@@ -48,8 +48,9 @@ onBeforeMount(async () => {
 
 .home {
   width: 100%;
+  height: 100%;
   background: #F7F3E8;
-  min-height: 100%;
+
 
   .video-box {
     width: 100%;

+ 6 - 8
src/views/ExhibitionService/BookingTime.vue

@@ -107,7 +107,7 @@ const goInpitInfo = async () => {
       store.selectDate = selectDate.value
       store.selectTime = selectTime.value
 
-      router.push({ name: 'bookInputInfo'});
+      router.push({ name: 'bookInputInfo' });
 
       // router.push({
       //   name: 'bookInputInfo'
@@ -149,18 +149,14 @@ onBeforeMount(() => {
         <div>{{ item.pcs == 0 ? `预约已满` : `剩余${item.pcs}` }}</div>
       </div>
     </div>
+    <div class="online-box" v-if="selectDate != '' && selectTime != ''" @click="goInpitInfo()">发起预约</div>
   </div>
-  <div class="online-box" v-if="selectDate != '' && selectTime != ''" @click="goInpitInfo()">发起预约</div>
 </template>
 
 <style lang='less' scoped>
 .time-box {
   width: 100%;
   height: 100%;
-  position: absolute;
-  z-index: 2;
-  top: 0px;
-  left: 0px;
   display: flex;
   justify-content: start;
   align-items: center;
@@ -168,13 +164,15 @@ onBeforeMount(() => {
   margin: 0;
   box-sizing: border-box;
   font-family: 'SourceHanSansCN-Regular';
-
+  max-width: 500px;
+  position: relative;
 
   .date-select-box {
     width: 35%;
     height: 100%;
     overflow: auto;
 
+
     .date-select-item {
       width: 100%;
       height: 80px;
@@ -232,7 +230,7 @@ onBeforeMount(() => {
   background: url(@/assets/images/onlineBg.png);
   background-size: 100% 100%;
   color: #F1E9D4;
-  position: fixed;
+  position: absolute;
   left: 50%;
   transform: translateX(-50%);
   bottom: 3vh;

+ 38 - 34
src/views/ExhibitionService/bookInputInfo.vue

@@ -61,11 +61,12 @@ const submit = () => {
 
       </div>
     </div>
+    <div class="btns">
+      <div class="add" @click="addPerson()">添加参观人</div>
+      <div class="submit" @click="submit()">提交</div>
+    </div>
   </div>
-  <div class="btns">
-    <div class="add" @click="addPerson()">添加参观人</div>
-    <div class="submit" @click="submit()">提交</div>
-  </div>
+
 </template>
 
 <style lang='less' scoped>
@@ -78,6 +79,8 @@ const submit = () => {
   min-height: 100%;
   background: #F7F3E8;
   padding: 20px 10px;
+  position: relative;
+  max-width: 500px;
 
   .input-card {
     width: 100%;
@@ -133,40 +136,41 @@ const submit = () => {
 
   }
 
-}
-
-.btns {
-  width: 90%;
-  position: fixed;
-  bottom: 20px;
-  display: flex;
-  justify-content: space-between;
-  left: 50%;
-  transform: translateX(-50%);
 
-  div {
+  .btns {
+    width: 90%;
+    position: absolute;
+    bottom: 20px;
     display: flex;
-    justify-content: center;
-    align-items: center;
-  }
+    justify-content: space-between;
+    left: 50%;
+    transform: translateX(-50%);
 
-  .add {
-    width: 35%;
-    height: 5vh;
-    background: #FFFDF6;
-    border: 1px solid #9D4F0B;
-    border-radius: 50px;
-    color: #88866F;
-  }
+    div {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+    }
+
+    .add {
+      width: 35%;
+      height: 5vh;
+      background: #FFFDF6;
+      border: 1px solid #9D4F0B;
+      border-radius: 50px;
+      color: #88866F;
+    }
 
-  .submit {
-    width: 60%;
-    height: 5vh;
-    background: url(@/assets/images/onlineBg.png);
-    background-size: 100% 100%;
-    // border: 1px solid #9D4F0B;
-    border-radius: 50px;
-    color: #F7F3E8;
+    .submit {
+      width: 60%;
+      height: 5vh;
+      background: url(@/assets/images/onlineBg.png);
+      background-size: 100% 100%;
+      // border: 1px solid #9D4F0B;
+      border-radius: 50px;
+      color: #F7F3E8;
+    }
   }
+
 }
 </style>

+ 10 - 0
src/views/ExhibitionService/booked-detail.vue

@@ -0,0 +1,10 @@
+<script setup lang='ts'>
+</script>
+
+<template>
+<div class=''></div>
+</template>
+
+<style lang='less' scoped>
+
+</style>

+ 17 - 4
src/views/ExhibitionService/bookedList.vue

@@ -11,10 +11,15 @@ const store = useStore()
 // 立即预约-时段选择
 const goSelectTime = () => {
   router.push({
-    name:'selectTime'
+    name: 'selectTime'
   })
 }
 
+// 获取用户授权
+const userAuthorization = () => {
+  window.open('https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx2d3e0c33702e34a6&redirect_uri=https://houseoss.4dkankan.com/project/yuanDaDu/index.html&response_type=code&scope=snsapi_userinfo&connect_redirect=1#wechat_redirect')
+}
+
 onMounted(() => {
   // 清除之前的预约选择记录
   store.selectDate = ''
@@ -50,8 +55,12 @@ onMounted(() => {
       time: '9:00-1:00',
       updateTime: '2024-04-16 16:46:00'
     },
-    
+
   ]
+
+  // userAuthorization()
+
+
 })
 </script>
 
@@ -65,7 +74,8 @@ onMounted(() => {
     <div v-else>
       <div class="booking-card" v-for="(item, index) in bookedList" :key="index" @click="go">
         <div>参观日期:{{ `${item.bookDate} ${item.time}` }}</div>
-        <div>当前状态:<span :style="{color:item.status == 0 ?'' :'#E3C956'}" >{{ item.status == 0 ? '未验证' : '已验证' }}</span></div>
+        <div>当前状态:<span :style="{ color: item.status == 0 ? '' : '#E3C956' }">{{ item.status == 0 ? '未验证' : '已验证' }}</span>
+        </div>
         <div class="info-box">
           <div>参观人姓名:{{ item.name }}</div>
           <div>参观人电话:{{ bookedList[index].rtf[0].phone }}</div>
@@ -87,7 +97,10 @@ onMounted(() => {
   width: 100%;
   min-height: 100%;
   background: #F7F3E8;
+  max-width: 500px;
   padding: 40px 20px;
+  position: relative;
+
 
   .title {
     font-size: 1.4em;
@@ -162,7 +175,7 @@ onMounted(() => {
     background: url(@/assets/images/onlineBg.png);
     background-size: 100% 100%;
     color: #F1E9D4;
-    position: fixed;
+    position: absolute;
     left: 50%;
     transform: translateX(-50%);
     bottom: 3vh;

+ 5 - 1
src/views/SmartTour/exhibition-detail.vue

@@ -70,6 +70,10 @@ onBeforeMount(() => {
 
 <style lang='less' scoped>
 .detail-box {
+  width: 100%;
+  height: 100vh;
+  max-width: 500px;
+  position: relative;
   .thumb-box {
     width: 100%;
     margin-bottom: 10px;
@@ -134,7 +138,7 @@ onBeforeMount(() => {
     background: url(@/assets/images/onlineBg.png);
     background-size: 100% 100%;
     color: #F1E9D4;
-    position: fixed;
+    position: absolute;
     left: 50%;
     transform: translateX(-50%);
     bottom: 3vh;

+ 6 - 35
src/views/SmartTour/treasure-detail.vue

@@ -81,7 +81,7 @@ const audioChange = () => {
 }
 
 const initShowState = () => {
-  if (dynamicDetail.value.files.moduleUrl != '') {
+  if (dynamicDetail.value.files.moduleUrl) {
     initModule()
   } else if (dynamicDetail.value.files.images.length > 0) {
     initImages()
@@ -90,7 +90,6 @@ const initShowState = () => {
   }
   audioBgUrl.value = dynamicDetail.value.files.audio
 
-  console.log(dynamicDetail.value)
 }
 
 const getDetailById = async () => {
@@ -126,6 +125,8 @@ const getDetailById = async () => {
     })[0]
 
     initShowState()
+
+    console.log(dynamicDetail.value.files)
   } else {
     showToast(res.msg)
   }
@@ -134,36 +135,6 @@ const getDetailById = async () => {
 onBeforeMount(async () => {
   getDetailById()
 
-  // dynamicDetail.value = {
-  //   age: '唐朝',
-  //   createTime: '2024-04-19 09:03:01',
-  //   creatorId: 1,
-  //   creatorName: '',
-  //   description: '故明威将军大河卫指挥佥事许公墓志拓片故明威将军大河卫指挥佥事许公墓志拓片',
-  //   dirCode: '',
-  //   fileIds: '',
-  //   fileTypes: '',
-  //   id: 2,
-  //   name: '故明威将军大河卫指挥佥事许公墓志拓片',
-  //   publishDate: '2024-04-18',
-  //   size: '志盖边长 40.5 厘米、厚 8.5 厘米、志石边长 41 厘米、厚 9.5 厘米',
-  //   texture: '草',
-  //   thumb:
-  //     'https://k.sinaimg.cn/n/spider20230919/11/w499h312/20230919/77f0-2a03ee3faecf423cf77b2a2a119a714e.png/w700d1q75cms.jpg?by=cms_fixed_width',
-  //   type: '其他',
-  //   updateTime: '2024-04-19 09:03:01',
-  //   files: {
-  //     images: ['https://super.4dage.com/data/TEST/edit/20230407_114029890.jpg', 'https://super.4dage.com/data/TEST/edit/20230524_155459428.png'],
-  //     moduleUrl: 'https://4dscene.4dage.com/culturalrelics/demo2/Model.html?m=HG01',
-  //     audio: 'https://houseoss.4dkankan.com/project/bjfljtl/audio/bgMusic.mp3',
-  //     // 可能是单个可能是多个
-  //     videos: ['https://super.4dage.com/data/TEST/edit/20230228_161113155.mp4'],
-  //   }
-  // }
-
-  // 初始化显示状态
-  // initShowState()
-
 })
 </script>
 
@@ -179,8 +150,8 @@ onBeforeMount(async () => {
       <video v-if="curState === 'videos'" :src="curMediaList[curMediaIndex]" controls></video>
       <iframe v-if="curState === 'module'" :src="curMediaList[curMediaIndex]" frameborder="0"></iframe>
 
-      <div class="option-box">
-        <div v-if="dynamicDetail.files.moduleUrl != ''" @click="initModule()"
+      <div class="option-box" >
+        <div v-if="dynamicDetail.files.moduleUrl" @click="initModule()"
           :class="{ active: curState === 'module' }">模型</div>
         <div v-if="dynamicDetail.files.images.length != 0" @click="initImages()"
           :class="{ active: curState === 'images' }">图片<span v-show="curState === 'images'">{{
@@ -192,7 +163,7 @@ onBeforeMount(async () => {
           }}</span></div>
       </div>
     </div>
-    <div class="info-box">
+    <div class="info-box" :style="{marginTop:curState != null ? '' :'0px'}">
       <div class="title">{{ dynamicDetail.name }}</div>
       <!-- <div class="age">{{ dynamicDetail.age + '·' + dynamicDetail.texture }}</div> -->
       <div class="age">