Your Name 3 anos atrás
pai
commit
f930cd1d1f

+ 1
- 1
config/prod.js Ver arquivo

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

+ 1
- 1
project.config.json Ver arquivo

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

+ 2
- 2
src/app.less Ver arquivo

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

+ 5
- 26
src/components/CouponCard/Media/Header.jsx Ver arquivo

@@ -1,37 +1,17 @@
1
-import React, { useEffect, useState } from 'react'
1
+import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
2 2
 import Taro from '@tarojs/taro'
3
-import { View, Image } from '@tarojs/components'
3
+import { View, Image, Canvas } from '@tarojs/components'
4 4
 import BadgeTag from '@/components/BadgeTag'
5 5
 import Cashback from '../Cashback'
6 6
 import './style.less'
7
+import { random } from '@/utils'
7 8
 
8 9
 export default (props) => {
9 10
   const { cashback, badge, image } = props
10 11
 
11 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 15
     background: `url('${image}') no-repeat`,
36 16
     backgroundSize: '100%',
37 17
   }
@@ -41,8 +21,7 @@ export default (props) => {
41 21
       {enableCashback && <Cashback money={cashback} style={{ marginTop: '-10px' }} />}
42 22
       <View className='coupun-media_thumb'>
43 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 25
       </View>
47 26
     </View>
48 27
   )

+ 5
- 2
src/components/CouponCard/Media/style.less Ver arquivo

@@ -19,9 +19,12 @@
19 19
     overflow: hidden;
20 20
 
21 21
     & > .image {
22
-      width: 100%;
23
-      height: 100%;
22
+      width: 144px;
23
+      height: 144px;
24 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 Ver arquivo

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

+ 4
- 0
src/components/List/style.less Ver arquivo

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

+ 1
- 1
src/components/tip/index.less Ver arquivo

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

+ 20
- 17
src/hotel/pages/components/Extend/index.jsx Ver arquivo

@@ -4,6 +4,7 @@ import Popup from '@/components/Popup'
4 4
 import { View, Image, Textarea, Label, Button, Video } from '@tarojs/components';
5 5
 import { update, deleteExtend } from '@/services/landlord'
6 6
 import { compressImage } from '@/utils'
7
+import { uploadFile } from '@/utils/request';
7 8
 import SlideView from '@/components/SlideView';
8 9
 import './style.less'
9 10
 
@@ -14,12 +15,14 @@ export default (props) => {
14 15
     Taro.chooseImage({
15 16
       count: 1,
16 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,17 +62,17 @@ export default (props) => {
59 62
     return newstr;
60 63
   }
61 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 76
     const date = {
74 77
       content,
75 78
       contentType: 'text'
@@ -85,7 +88,7 @@ export default (props) => {
85 88
             <View className='rzline' /><Label className='srl mg'>修改文字</Label><View className='rzline' />
86 89
           </View>
87 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 92
           </View>
90 93
           <View>
91 94
             <Button className='cancel' onClick={onClose}>取消</Button>

+ 5
- 5
src/pages/index/tabs/Recommend.jsx Ver arquivo

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

+ 2
- 2
src/pages/index/tabs/less/Recommend.less Ver arquivo

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