Your Name 3 年之前
父節點
當前提交
f930cd1d1f

+ 1
- 1
config/prod.js 查看文件

3
     NODE_ENV: '"production"'
3
     NODE_ENV: '"production"'
4
   },
4
   },
5
   defineConstants: {
5
   defineConstants: {
6
-    HOST: '"https://sgl-v2-test.njyunzhi.com"',
6
+    HOST: '"https://sgl-v2.njyunzhi.com"',
7
     OSS: '"yz-shigongli.oss-accelerate.aliyuncs.com"',
7
     OSS: '"yz-shigongli.oss-accelerate.aliyuncs.com"',
8
   },
8
   },
9
   mini: {},
9
   mini: {},

+ 1
- 1
project.config.json 查看文件

2
   "miniprogramRoot": "./dist",
2
   "miniprogramRoot": "./dist",
3
   "projectname": "miniapp",
3
   "projectname": "miniapp",
4
   "description": "十公里",
4
   "description": "十公里",
5
-  "appid": "wx835627a9b9b3932a",
5
+  "appid": "wx06a7372d48d56843",
6
   "setting": {
6
   "setting": {
7
     "urlCheck": true,
7
     "urlCheck": true,
8
     "es6": false,
8
     "es6": false,

+ 2
- 2
src/app.less 查看文件

10
     flex: none;
10
     flex: none;
11
   }
11
   }
12
 
12
 
13
-  .index-tabber {
13
+  .index-tabbar {
14
     flex: none;
14
     flex: none;
15
   }
15
   }
16
 
16
 
17
   .index-container {
17
   .index-container {
18
-    flex: auto;
18
+    flex: 1;
19
     overflow: hidden;
19
     overflow: hidden;
20
     position: relative;
20
     position: relative;
21
   }
21
   }

+ 5
- 26
src/components/CouponCard/Media/Header.jsx 查看文件

1
-import React, { useEffect, useState } from 'react'
1
+import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
2
 import Taro from '@tarojs/taro'
2
 import Taro from '@tarojs/taro'
3
-import { View, Image } from '@tarojs/components'
3
+import { View, Image, Canvas } from '@tarojs/components'
4
 import BadgeTag from '@/components/BadgeTag'
4
 import BadgeTag from '@/components/BadgeTag'
5
 import Cashback from '../Cashback'
5
 import Cashback from '../Cashback'
6
 import './style.less'
6
 import './style.less'
7
+import { random } from '@/utils'
7
 
8
 
8
 export default (props) => {
9
 export default (props) => {
9
   const { cashback, badge, image } = props
10
   const { cashback, badge, image } = props
10
 
11
 
11
   const enableCashback = cashback !== undefined && cashback !== null
12
   const enableCashback = cashback !== undefined && cashback !== null
12
 
13
 
13
-  // // 为了解决苹果手机上图片不显示问题
14
-  // const [imgUrl, setImgUrl] = useState()
15
-  // useEffect(() => {
16
-  //   if (image) {
17
-  //     Taro.downloadFile({
18
-  //       url: image,
19
-  //       success: res => setImgUrl(res.tempFilePath),
20
-  //       fail: err => {
21
-  //         console.error(err)
22
-  //         setImgUrl(image)
23
-  //       }
24
-  //     })
25
-  //   } else {
26
-  //     setImgUrl()
27
-  //   }
28
-  // }, [image])
29
-  // const handleError = (e) => {
30
-  //   console.error('-------image----->', image)
31
-  //   console.error(e)
32
-  // }
33
-
34
-  const backImage = {
14
+  const backStyle = {
35
     background: `url('${image}') no-repeat`,
15
     background: `url('${image}') no-repeat`,
36
     backgroundSize: '100%',
16
     backgroundSize: '100%',
37
   }
17
   }
41
       {enableCashback && <Cashback money={cashback} style={{ marginTop: '-10px' }} />}
21
       {enableCashback && <Cashback money={cashback} style={{ marginTop: '-10px' }} />}
42
       <View className='coupun-media_thumb'>
22
       <View className='coupun-media_thumb'>
43
         <BadgeTag type={badge} />
23
         <BadgeTag type={badge} />
44
-        {/* <Image src={image} webp mode='widthFix'onError={handleError} /> */}
45
-        <View className='image' style={backImage}></View>
24
+        <View className='image' style={backStyle}></View>
46
       </View>
25
       </View>
47
     </View>
26
     </View>
48
   )
27
   )

+ 5
- 2
src/components/CouponCard/Media/style.less 查看文件

19
     overflow: hidden;
19
     overflow: hidden;
20
 
20
 
21
     & > .image {
21
     & > .image {
22
-      width: 100%;
23
-      height: 100%;
22
+      width: 144px;
23
+      height: 144px;
24
       display: block;
24
       display: block;
25
+      border-radius: 24px;
26
+      will-change: opacity;
27
+      opacity: 1;
25
     }
28
     }
26
   }
29
   }
27
 
30
 

+ 2
- 0
src/components/List/index.jsx 查看文件

4
 import Taro from '@tarojs/taro';
4
 import Taro from '@tarojs/taro';
5
 import { random } from '@/utils';
5
 import { random } from '@/utils';
6
 
6
 
7
+import './style.less'
8
+
7
 export default React.forwardRef((props, ref) => {
9
 export default React.forwardRef((props, ref) => {
8
   const {
10
   const {
9
     render,
11
     render,

+ 4
- 0
src/components/List/style.less 查看文件

1
+.list-view {
2
+  position: relative;
3
+  z-index: 20;
4
+}

+ 1
- 1
src/components/tip/index.less 查看文件

1
 .tip{
1
 .tip{
2
   padding:23px 0 22px 31px;
2
   padding:23px 0 22px 31px;
3
   height: 70px;
3
   height: 70px;
4
-  flex: none;
4
+  // flex: none;
5
   .tipicon{
5
   .tipicon{
6
     width: 17px;
6
     width: 17px;
7
     height: 19px;
7
     height: 19px;

+ 20
- 17
src/hotel/pages/components/Extend/index.jsx 查看文件

4
 import { View, Image, Textarea, Label, Button, Video } from '@tarojs/components';
4
 import { View, Image, Textarea, Label, Button, Video } from '@tarojs/components';
5
 import { update, deleteExtend } from '@/services/landlord'
5
 import { update, deleteExtend } from '@/services/landlord'
6
 import { compressImage } from '@/utils'
6
 import { compressImage } from '@/utils'
7
+import { uploadFile } from '@/utils/request';
7
 import SlideView from '@/components/SlideView';
8
 import SlideView from '@/components/SlideView';
8
 import './style.less'
9
 import './style.less'
9
 
10
 
14
     Taro.chooseImage({
15
     Taro.chooseImage({
15
       count: 1,
16
       count: 1,
16
       success: function (res) {
17
       success: function (res) {
17
-        seteImg(res.tempFilePaths[0])
18
-        const date = {
19
-          content: res.tempFilePaths[0],
20
-          contentType: 'image'
21
-        }
22
-        update(item.extId, { ...item, ...date })
18
+        uploadFile(res.tempFilePaths[0]).then((res2) => {
19
+          seteImg(res2)
20
+          const date = {
21
+            content: res2,
22
+            contentType: 'image'
23
+          }
24
+          update(item.extId, { ...item, ...date })
25
+        })
23
       }
26
       }
24
     })
27
     })
25
   }
28
   }
59
     return newstr;
62
     return newstr;
60
   }
63
   }
61
   const handelEdit = () => {
64
   const handelEdit = () => {
62
-    var content = document.getElementById('content').value
65
+    // var content = document.getElementById('content').value
63
 
66
 
64
-    content = content.replace(/\n/g, '');
65
-    if (javaTrim(content) == '') {
66
-      Taro.showToast({
67
-        title: '您还没有添加文字哦',
68
-        icon: 'none'
69
-      })
70
-      return;
71
-    }
72
-    setContent(content)
67
+    // content = content.replace(/\n/g, '');
68
+    // if (javaTrim(content) == '') {
69
+    //   Taro.showToast({
70
+    //     title: '您还没有添加文字哦',
71
+    //     icon: 'none'
72
+    //   })
73
+    //   return;
74
+    // }
75
+    // setContent(content)
73
     const date = {
76
     const date = {
74
       content,
77
       content,
75
       contentType: 'text'
78
       contentType: 'text'
85
             <View className='rzline' /><Label className='srl mg'>修改文字</Label><View className='rzline' />
88
             <View className='rzline' /><Label className='srl mg'>修改文字</Label><View className='rzline' />
86
           </View>
89
           </View>
87
           <View>
90
           <View>
88
-            <Textarea className='storezn' value={content} id='content' />
91
+            <Textarea className='storezn' value={content} id='content' onInput={e => setContent(e.detail.value)} />
89
           </View>
92
           </View>
90
           <View>
93
           <View>
91
             <Button className='cancel' onClick={onClose}>取消</Button>
94
             <Button className='cancel' onClick={onClose}>取消</Button>

+ 5
- 5
src/pages/index/tabs/Recommend.jsx 查看文件

11
 import './less/Recommend.less'
11
 import './less/Recommend.less'
12
 import { OfficialAccount } from '@tarojs/components'
12
 import { OfficialAccount } from '@tarojs/components'
13
 
13
 
14
-const listStyle = { height: '100%' }
14
+const listStyle = { height: 'calc(100% - 145px)' }
15
 
15
 
16
 export default (props) => {
16
 export default (props) => {
17
   const { router, person, location } = props
17
   const { router, person, location } = props
76
   // })
76
   // })
77
 
77
 
78
   return (
78
   return (
79
-    <view style={{ height: '100%', overflow: 'hidden', display: 'flex', flexDirection: 'column' }}>
79
+    <>
80
       <OfficialAccount>s21</OfficialAccount>
80
       <OfficialAccount>s21</OfficialAccount>
81
       <view className='search' onClick={onSearch} >
81
       <view className='search' onClick={onSearch} >
82
         <input className='searchInput' disabled />
82
         <input className='searchInput' disabled />
103
           </mp-tabs>
103
           </mp-tabs>
104
         </scroll-view>
104
         </scroll-view>
105
       </view>
105
       </view>
106
-      <view className={listClass} style={{ flex: 'auto', height: '100%', overflow: 'hidden' }}>
106
+      
107
         <List
107
         <List
108
           ref={listRef}
108
           ref={listRef}
109
           style={listStyle}
109
           style={listStyle}
120
             />
120
             />
121
           </view>
121
           </view>
122
         </List>
122
         </List>
123
-      </view>
124
-    </view>
123
+      
124
+    </>
125
   )
125
   )
126
 }
126
 }

+ 2
- 2
src/pages/index/tabs/less/Recommend.less 查看文件

1
 .search{
1
 .search{
2
     padding: 10px 30px 0 30px;
2
     padding: 10px 30px 0 30px;
3
     position: relative;
3
     position: relative;
4
-    flex: none;
4
+    // flex: none;
5
     .searchInput{    
5
     .searchInput{    
6
         height: 68px;
6
         height: 68px;
7
         background: #F8F8F8;
7
         background: #F8F8F8;
38
 .index-tabs {
38
 .index-tabs {
39
   padding-left: 95px;
39
   padding-left: 95px;
40
   position: relative;
40
   position: relative;
41
-  flex: none;
41
+  // flex: none;
42
   .position{
42
   .position{
43
     position: absolute;
43
     position: absolute;
44
     left: 36px;
44
     left: 36px;