CameraContent-3-1-3.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. <template>
  2. <div class="camera-content-1-1">
  3. <button
  4. class="return"
  5. @click="emit('close')"
  6. />
  7. <h1>{{ title }}</h1>
  8. <div class="content-wrap">
  9. <div
  10. class="design-wrap"
  11. >
  12. <div
  13. class="design-wrap-left"
  14. :style="$isAndroidFullScreen ? {
  15. paddingLeft: '50px'
  16. } : {}"
  17. >
  18. <p class="card-title left">
  19. {{ curContent.title }}
  20. </p>
  21. <div
  22. class="left-text text-indent"
  23. v-html="curContent.content"
  24. />
  25. </div>
  26. <div class="design-wrap-right">
  27. <img
  28. class="detail-img"
  29. :src="require(`@/assets/images/CameraContent-3-1-3-img-${currentSwitchIdx + 1}.png`)"
  30. alt=""
  31. >
  32. <div
  33. class="pre-btn"
  34. :style="{opacity: currentSwitchIdx == 0 ? '0.4':'1'}"
  35. @click="previous()"
  36. >
  37. <span>上一页</span>
  38. </div>
  39. <div
  40. class="next-btn"
  41. :style="{opacity: currentSwitchIdx == imgLists.length - 1 ? '0.4':'1'}"
  42. @click="next()"
  43. >
  44. <span>下一页</span>
  45. </div>
  46. </div>
  47. </div>
  48. </div>
  49. </div>
  50. </template>
  51. <script setup>
  52. import { ref, computed, inject } from "vue"
  53. const {
  54. windowSizeInCssForRef,
  55. windowSizeWhenDesignForRef,
  56. } = useSizeAdapt(1920, 968)
  57. const emit = defineEmits(['close'])
  58. const $isAndroidFullScreen = inject('$isAndroidFullScreen')
  59. const currentSwitchIdx = ref(0)
  60. const title = '百工精巧'
  61. const imgLists = [
  62. '@/assets/images/CameraContent-3-1-3-img-1.png',
  63. '@/assets/images/CameraContent-3-1-3-img-2.png',
  64. '@/assets/images/CameraContent-3-1-3-img-3.png',
  65. '@/assets/images/CameraContent-3-1-3-img-4.png',
  66. '@/assets/images/CameraContent-3-1-3-img-5.png',
  67. '@/assets/images/CameraContent-3-1-3-img-6.png'
  68. ]
  69. const curContent = computed(() => {
  70. switch (currentSwitchIdx.value) {
  71. case 0:
  72. return {
  73. title: '元代漆器',
  74. content: '<p>从文献记载和出土实物看,元代内府也使用漆器,这类漆器可能是在武昌、嘉兴、杭州等地的官府作坊中生产的。元代漆器的生产,主要集中在南方地区,尤以嘉兴最为知名,元初就曾在此设置漆作局,著名的元代漆工彭君宝、张成、杨茂也都是此地人。元代漆器品类不少,其中螺钿、雕漆都取得了很高成就,最常见的则属色髹器。</p>'
  75. }
  76. case 1:
  77. return {
  78. title: '元代服饰',
  79. content: '<p>元朝是中国纺织业发展的重要阶段。一方面,棉纺织业已经相当发达,普遍改变了传统以麻布为衣着原料的习惯;另一方面,适应蒙古贵族审美需要得以发展的织金等纺织技术,将元朝高级的纺织品装饰得别具特色、富丽堂皇。可以说在元代织物中,织金锦也就是“纳石失”这样一种以金线织花的丝绸最得青睐,也最具影响。</p>'
  80. }
  81. case 2:
  82. return {
  83. title: '元代玉器',
  84. content: '<p>元代玉石器以各种美玉和玛瑙为主要材质,大抵为观赏和典制所需。题材与风格均发生了明显的创新与转变,在继承宋辽文化传统的基础上,较多的融入了本民族生活与文化的典型特征,体现了中原传统文化和北方少数民族文化的交流、融合和相互渗透。艺术表现手法方面与宋代玉器纤细秀丽的风格迥然不同,比较讲究作品的气韵和粗放性,不求具体描绘,不讲究细部的刻画,颇具元人健壮豪迈的气魄。</p>'
  85. }
  86. case 3:
  87. return {
  88. title: '元代砚台',
  89. content: '<p>元代制砚基本上延续了宋代,但略显粗犷和朴拙。在砚材上,结束了长久以来石、陶并举的局面,石砚成为一支独秀。这一时期,砚逐渐摆脱了实用的束缚,开启了集实用和赏玩于一体的风尚。</p>'
  90. }
  91. case 4:
  92. return {
  93. title: '元代笔架',
  94. content: '<p>笔架又称笔格、笔搁,是一种传统的文房用具,用于书写或作画间隙暂时搁置湿笔。笔架形制多样,其中别名“笔山”的山形笔架更是别具一格,以其峰峦起伏的山势促成了实用性与观赏性的和谐统一。元大都北城垣桦皮厂东部,曾出土一件青白釉山形笔架,造型非常精美,质量上乘,极具文人气息。</p>'
  95. }
  96. default:
  97. return {
  98. title: '元代金银器',
  99. content: '<p>元代使用黄金的风气之盛,旷古未有。统治集团的帐幕、宫室、衣饰、器用无不用金,甚至以金做大酒瓮、以银为马槽。来到中国游历的马可·波罗惊叹于忽必烈金银酒具之众多与奢华,说“非亲见者未能信也”。以此为效,风气不胫而走,民间的金银器也极其风靡。</p>'
  100. }
  101. }
  102. })
  103. const previous = () => {
  104. console.log('上一页', currentSwitchIdx.value)
  105. if (currentSwitchIdx.value > 0 ) {
  106. console.log('上一页2')
  107. currentSwitchIdx.value -= 1
  108. } else {
  109. return
  110. }
  111. }
  112. const next = () => {
  113. console.log('下一页')
  114. if (currentSwitchIdx.value < imgLists.length - 1) {
  115. currentSwitchIdx.value += 1
  116. } else {
  117. return
  118. }
  119. }
  120. </script>
  121. <style lang="less" scoped>
  122. @page-height-design-px: 970;
  123. .camera-content-1-1 {
  124. position: absolute;
  125. left: 0;
  126. top: 0;
  127. width: 100%;
  128. height: 100%;
  129. background: rgba(0, 0, 0, 0.45);
  130. backdrop-filter: blur(60px);
  131. >button.return {
  132. position: absolute;
  133. width: 58px;
  134. height: 58px;
  135. left: 42px;
  136. top: 68px;
  137. background-image: url(@/assets/images/btn-return.png);
  138. background-size: contain;
  139. background-repeat: no-repeat;
  140. background-position: center center;
  141. z-index: 10;
  142. }
  143. >h1 {
  144. position: absolute;
  145. left: 0;
  146. top: calc(10 / @page-height-design-px * 100vh);
  147. width: 100%;
  148. height: calc(140 / @page-height-design-px * 100vh);
  149. background-image: url(@/assets/images/camera-content-3-1-3-title-bg.png);
  150. background-size: auto 100%;
  151. background-repeat: no-repeat;
  152. background-position: center center;
  153. font-size: 36px;
  154. font-family: "SourceHanSerifCN-SemiBold";
  155. color: #FFEEC0;
  156. display: flex;
  157. justify-content: center;
  158. align-items: center;
  159. z-index: 1;
  160. }
  161. >.content-wrap {
  162. position: absolute;
  163. top: 0;
  164. left: 0;
  165. right: 0;
  166. bottom: 0;
  167. >.switch-wrap {
  168. position: absolute;
  169. right: calc(65 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  170. bottom: calc(83 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  171. z-index: 10;
  172. >button {
  173. width: calc(118 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  174. height: calc(118 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  175. background-image: url(@/assets/images/camera-content-1-1-1-swtich-btn-bg.png);
  176. background-size: 60%;
  177. background-repeat: no-repeat;
  178. background-position: center center;
  179. font-size: calc(24 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  180. font-family: Source Han Sans SC, Source Han Sans SC;
  181. font-weight: 400;
  182. color: #FFFFFF;
  183. line-height: calc(28 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  184. letter-spacing: calc(4 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  185. }
  186. >button:last-of-type {
  187. margin-left: calc(60 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  188. }
  189. >button.active {
  190. background-image: url(@/assets/images/camera-content-1-1-1-swtich-btn-bg-active.png);
  191. background-size: 100%;
  192. }
  193. }
  194. >.design-wrap {
  195. position: absolute;
  196. left: 0;
  197. top: 0;
  198. width: 100%;
  199. height: 100%;
  200. padding: 0 30px;
  201. background-image: url(@/assets/images/mobile/bg_3-min.jpg);
  202. background-size: 100% 100%;
  203. background-repeat: no-repeat;
  204. background-position: center center;
  205. display: flex;
  206. justify-content: center;
  207. align-items: center;
  208. >.design-wrap-left {
  209. flex: 1;
  210. padding-left: constant(safe-area-inset-left);
  211. padding-left: env(safe-area-inset-left);
  212. .card-title {
  213. width: 80%;
  214. }
  215. >.left-text {
  216. font-family: 'SourceHanSansSC-Normal';
  217. margin-top: 25px;
  218. padding-right: 20px;
  219. height: calc(300 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  220. overflow: auto;
  221. font-family: 'SourceHanSansSC-Normal';
  222. // letter-spacing: 3px;
  223. line-height: 30px;
  224. font-size: 20px;
  225. >strong {
  226. color: #000000;
  227. font-family: 'SourceHanSansSC-Bold';
  228. margin-bottom: 10px;
  229. }
  230. }
  231. }
  232. >.design-wrap-right {
  233. flex-shrink: 0;
  234. width: calc(1000 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  235. padding-bottom: calc(70 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  236. position: relative;
  237. >.next-btn,
  238. >.pre-btn {
  239. right: calc(245 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  240. bottom: 0;
  241. }
  242. .pre-btn {
  243. left: 0;
  244. }
  245. .next-btn {
  246. right: 0;
  247. }
  248. >.detail-img {
  249. width: 100%;
  250. }
  251. }
  252. }
  253. }
  254. }
  255. @media screen and (max-height: 480px) {
  256. .camera-content-1-1 {
  257. > h1 {
  258. font-size: calc(36 / 970* 100vh);
  259. }
  260. .content-wrap > .design-wrap {
  261. .design-wrap-left {
  262. width: calc(820 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  263. .left-title {
  264. font-size: 26px;
  265. }
  266. .left-text {
  267. height: calc(400 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  268. }
  269. }
  270. .design-wrap-right {
  271. padding-bottom: calc(100 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  272. }
  273. }
  274. }
  275. }
  276. </style>