Browse Source

静态页面

1002884655 3 years ago
parent
commit
d0e53f12d0

+ 2
- 2
config/dev.js View File

@@ -3,8 +3,8 @@ module.exports = {
3 3
     NODE_ENV: '"development"'
4 4
   },
5 5
   defineConstants: {
6
-    // HOST: '"https://xlk.njyz.tech"',
7
-    HOST: '"http://127.0.0.1:8081"',
6
+    HOST: '"https://xlk.njyz.tech"',
7
+    // HOST: '"http://127.0.0.1:8081"',
8 8
     WSS_HOST: '"wss://xlk.njyz.tech"',
9 9
     OSS_PATH: '"https://xlk-assets.oss-accelerate.aliyuncs.com/"',
10 10
     OSS_FAST_PATH: '"https://xlk-assets.oss-accelerate.aliyuncs.com/"',

+ 8
- 6
src/components/Poster/index.jsx View File

@@ -91,14 +91,16 @@ export default (props) => {
91 91
   return (
92 92
     // <Modal title={title} visible={show} onClose={onClose}>
93 93
     // eslint-disable-next-line react/jsx-no-undef
94
-    <page-modal show={show} position='bottom' onClickOverlay={onClose} height="60vh">
94
+    <page-modal show={show} position='bottom' onClickOverlay={onClose} height='70vh'>
95 95
       <View className='modal-poster'>
96 96
         <View className='modal-poster-img-box'>
97
-        {/* {
98
-          !processing
99
-            ? <Image src={img} mode='scaleToFill' onClick={handleImage} />
100
-            : <Spin2 spinning={processing} size={32} />
101
-        } */}
97
+          <view>
98
+            {
99
+              !processing
100
+                ? <Image src={img} mode='scaleToFill' className='centerLabel' onClick={handleImage} />
101
+                : <Spin2 className='centerLabel' spinning={processing} size={32} />
102
+            }
103
+          </view>
102 104
         </View>
103 105
         <Button className='modal-poster-action' onClick={handleSave} disabled={!img} loading={loading}>
104 106
           {btnText}

+ 14
- 9
src/components/Poster/style.scss View File

@@ -7,19 +7,24 @@
7 7
   padding: 40rpx;
8 8
 
9 9
   &-img-box {
10
-    height: calc(100% - 92rpx - 40rpx);
11
-    margin: 0 auto;
12
-    background: #fff;
13
-    box-shadow: 0 14rpx 24rpx 0 rgba(0, 0, 0, 0.2);
10
+    width: 100%;
14 11
     position: relative;
12
+    >view {
13
+      width: 300px;
14
+      position: relative;
15
+      margin: 0 auto;
16
+      height: 648px;
17
+      background: #fff;
18
+      box-shadow: 0 14rpx 24rpx 0 rgba(0, 0, 0, 0.2);
15 19
 
16
-    .empty-poster {
17
-      width: auto;
18
-      height: 100%;
20
+      image {
21
+        width: 100%;
22
+        height: 100%;
23
+      }
19 24
     }
20 25
 
21
-    image {
22
-      width: 100%;
26
+    .empty-poster {
27
+      width: auto;
23 28
       height: 100%;
24 29
     }
25 30
   }

+ 15
- 27
src/pages/index/activityDetail/index.jsx View File

@@ -16,15 +16,16 @@ import { useSelector } from 'react-redux';
16 16
 import {
17 17
   signupActivity,
18 18
   queryActivityDetail,
19
-<<<<<<< HEAD
20
-} from '@/services/activity';
21
-import { getImgURL } from '@/utils/image';
22
-import getDateFormat from '@/utils/chatDate';
23
-import useParams from '@/utils/hooks/useParams';
24
-import useShare from '@/utils/hooks/useShare';
25
-import useFavor from '@/utils/hooks/useFavor';
26
-import { times } from '@/utils/tools';
27
-import './index.scss';
19
+} from "@/services/activity";
20
+import { getImgURL } from "@/utils/image";
21
+import getDateFormat from "@/utils/chatDate";
22
+import useParams from "@/utils/hooks/useParams";
23
+import useShare from "@/utils/hooks/useShare";
24
+import useFavor from "@/utils/hooks/useFavor";
25
+import { times } from "@/utils/tools";
26
+import useStatus from './useStatus'
27
+
28
+import "./index.scss";
28 29
 
29 30
 const activityStatusDict = {
30 31
   0: {
@@ -49,19 +50,6 @@ const activityStatusDict = {
49 50
   },
50 51
 };
51 52
 
52
-=======
53
-} from "@/services/activity";
54
-import { getImgURL } from "@/utils/image";
55
-import getDateFormat from "@/utils/chatDate";
56
-import useParams from "@/utils/hooks/useParams";
57
-import useShare from "@/utils/hooks/useShare";
58
-import useFavor from "@/utils/hooks/useFavor";
59
-import useStatus from './useStatus'
60
-
61
-import { getDownloadURL, times, transferImage } from "@/utils/tools";
62
-import "./index.scss";
63
-
64
->>>>>>> 9b71da79c5db94acce0d9ed188d5664b36c36c8c
65 53
 export default withLayout((props) => {
66 54
   const { router, shareContent, trackData, person, page } = props;
67 55
   const { id } = router.params;
@@ -135,7 +123,7 @@ export default withLayout((props) => {
135 123
   useEffect(() => {
136 124
     if(detail.title) {
137 125
       const CountsTime = new Date(detail.enlistEnd).getTime() - Date.now()
138
-      if(CountsTime) {
126
+      if(CountsTime > 0) {
139 127
         SetCountsDown(CountsTime)
140 128
       }
141 129
     }
@@ -430,10 +418,10 @@ export default withLayout((props) => {
430 418
           </view>
431 419
           {detail.type == "dymic" && (
432 420
             <view className='PageBottom flex-h'>
433
-              <button className='Share' open-type='share'>
421
+              <Button className='Share' open-type='share'>
434 422
                 <text className='iconfont icon-fenxiang'></text>
435 423
                 <text>分享</text>
436
-              </button>
424
+              </Button>
437 425
               <view className='Collect' onClick={handleFavor}>
438 426
                 <text
439 427
                   className='iconfont icon-shoucang'
@@ -443,9 +431,9 @@ export default withLayout((props) => {
443 431
               </view>
444 432
               <view className='flex-item'></view>
445 433
 
446
-              <button disabled={btnDisabled} className='Post' onClick={handleSignup}>
434
+              <Button disabled={btnDisabled} className='Post' onClick={handleSignup}>
447 435
                 {btnText}
448
-              </button>
436
+              </Button>
449 437
             </view>
450 438
           )}
451 439
         </view>