张延森 5 jaren geleden
bovenliggende
commit
6a202f0c3f

+ 2
- 0
config/dev.js Bestand weergeven

@@ -13,6 +13,8 @@ module.exports = {
13 13
     // WSS_HOST: '"wss://lt.pawoma.cn"',
14 14
     // HOST: '"http://127.0.0.1:8080"',
15 15
     // WSS_HOST: '"ws://127.0.0.1:8080"',
16
+    OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
17
+    OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
16 18
     Version: 'V3.5.11'
17 19
   },
18 20
   weapp: {},

+ 2
- 0
config/prod.js Bestand weergeven

@@ -9,6 +9,8 @@ module.exports = {
9 9
     WSS_HOST: '"wss://dev.pawoma.cn"',
10 10
     // HOST: '"https://lt.pawoma.cn"',
11 11
     // WSS_HOST: '"wss://lt.pawoma.cn"',
12
+    OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
13
+    OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
12 14
     Version: 'V3.5.12'
13 15
   },
14 16
   weapp: {},

src/components/indexMenus/icons.js → src/components/indexMenus-deprecated/icons.js Bestand weergeven


src/components/indexMenus/index.js → src/components/indexMenus-deprecated/index.js Bestand weergeven


src/components/indexMenus/index.scss → src/components/indexMenus-deprecated/index.scss Bestand weergeven


+ 111
- 0
src/pages/project/NavIcons/icons.js Bestand weergeven

@@ -0,0 +1,111 @@
1
+import { ROLE_CODE } from '@/constants/user'
2
+
3
+export default [
4
+  {
5
+    iconCode: 'integralMall',
6
+    iconName: '赚积分',
7
+    iconUrl: 'https://njcj.oss-cn-shanghai.aliyuncs.com/miniapp/upload/images/1580811839725-mall-icon.png',
8
+    tab: '/pages/shop/index',
9
+    default: true,
10
+  },
11
+  {
12
+    iconCode: 'refercustomers',
13
+    iconName: '推荐客户',
14
+    page: ({ city, personType }) => {
15
+      if (personType !== ROLE_CODE['CONSULTANT']) return false;
16
+
17
+      return `/useless/pages/agent/recommend/index?type=index&cityId=${city}`
18
+    },
19
+    iconUrl: 'https://njcj.oss-cn-shanghai.aliyuncs.com/miniapp/upload/images/1580811691300-recommend-icon.png',
20
+    default: true,
21
+  },
22
+  {
23
+    iconCode: 'buyingEncyclopedia',
24
+    iconName: '购房须知',
25
+    iconUrl: 'https://njcj.oss-cn-shanghai.aliyuncs.com/miniapp/upload/images/1580811865979-encyclopedia-icon.png',
26
+    page: '/pages/policy/index?from=mine',
27
+    default: true,
28
+  },
29
+  {
30
+    iconCode: 'findRoom',
31
+    iconName: '选好房',
32
+    page: '/pages/project/map/index',
33
+    iconUrl: 'https://njcj.oss-cn-shanghai.aliyuncs.com/miniapp/upload/images/1580811880140-map-icon.png',
34
+    default: true,
35
+  },
36
+  {
37
+    iconCode: 'Highlyrecommented',
38
+    iconName: '重点推荐',
39
+    page: '/pages/project/highlyRecommented',
40
+  },
41
+  {
42
+    iconCode: 'MortgageCalculator',
43
+    iconName: '算房贷',
44
+    page: '/pages/toolKit/index',
45
+  },
46
+  {
47
+    iconCode: 'PropertyListing',
48
+    iconName: '楼盘列表',
49
+    page: '/pages/project/list/index',
50
+  },
51
+  {
52
+    iconCode: 'EventInformation',
53
+    iconName: '活动资讯',
54
+    tab: '/pages/activity/activity',
55
+  },
56
+  {
57
+    iconCode: 'Popularactivities',
58
+    iconName: '参加活动',
59
+    tab: '/pages/activity/activity',
60
+  },
61
+  {
62
+    iconCode: 'LatestInformation',
63
+    iconName: '最新资讯',
64
+    tab: '/pages/activity/activity',
65
+  },
66
+  {
67
+    iconCode: 'Myclient',
68
+    iconName: '我的客户',
69
+    page: '/useless/pages/agent/client/index',
70
+  },
71
+  {
72
+    iconCode: 'MyActivities',
73
+    iconName: '我的活动',
74
+    page: '/pages/activity/myActivity?from=mine',
75
+  },
76
+  {
77
+    iconCode: 'Myhelp',
78
+    iconName: '我的助力',
79
+    page: '/pages/activity/assistancePage',
80
+  },
81
+  {
82
+    iconCode: 'Mygroup',
83
+    iconName: '我的拼团',
84
+    page: '/pages/activity/assemblePage',
85
+  },
86
+  {
87
+    iconCode: 'MyFavorites',
88
+    iconName: '我的收藏',
89
+    page: '/pages/person/favorite/index',
90
+  },
91
+  {
92
+    iconCode: 'MyInformation',
93
+    iconName: '我的资料',
94
+    page: '/useless/pages/person/profile/index',
95
+  },
96
+  {
97
+    iconCode: 'Mymessage',
98
+    iconName: '我的消息',
99
+    page: '/pages/im/list/index',
100
+  },
101
+  {
102
+    iconCode: 'Exchangerecords',
103
+    iconName: '兑换记录',
104
+    page: '/useless/pages/shop/record/index',
105
+  },
106
+  {
107
+    iconCode: 'Feedback',
108
+    iconName: '意见反馈',
109
+    page: '/useless/pages/person/feedback/index',
110
+  },
111
+]

+ 56
- 0
src/pages/project/NavIcons/index.js Bestand weergeven

@@ -0,0 +1,56 @@
1
+import { isFunction, isEmpty } from '@/utils/tools'
2
+import allIcons from './icons'
3
+import './index.scss'
4
+
5
+const defaultIcons = allIcons.filter(x => x.default)
6
+
7
+export default function (props) {
8
+  const iconList = props.iconList && props.iconList.length ? props.iconList : defaultIcons
9
+  const showIcons = iconList.map((icon) => {
10
+    const defIcon = allIcons.filter(x => icon.iconCode === x.iconCode)[0]
11
+
12
+    if (!defIcon) return false;
13
+
14
+    const navIcon = {
15
+      ...defIcon,
16
+      ...icon,
17
+    }
18
+
19
+    if (isEmpty(navIcon.page) && isEmpty(navIcon.tab)) return false;
20
+
21
+    if (isFunction(navIcon.page)) {
22
+      const pg = navIcon.page(props)
23
+      if (!pg) return false;
24
+
25
+      return { ...navIcon, page: pg }
26
+    }
27
+
28
+    return navIcon
29
+  }).filter(Boolean)
30
+
31
+  const naviTo = (icon) => {
32
+    const { page, tab } = icon || {}
33
+
34
+    if (tab) {
35
+      Taro.switchTab({ url: tab })
36
+    } else {
37
+      Taro.navigateTo({ url: page })
38
+    }
39
+  }
40
+
41
+  return (
42
+    <View className="navicons" style={showIcons.length == 3 ? "padding:0 8%" : ""}>
43
+        {showIcons.map((item) => (
44
+            <View onClick={() => naviTo(item)} className="nav-item" key={item.iconCode}>
45
+                <Image className="icon" src={item.iconUrl} ></Image>
46
+                <View className="nav-text">
47
+                  <Text>{item.iconName}</Text>
48
+                  { item.iconCode== 'refercustomers' && 
49
+                    <Image style="width:30rpx;height:30rpx;margin-left:4rpx" src={require('@/assets/award.png')} ></Image>
50
+                  }
51
+                </View>
52
+            </View>
53
+        ))}
54
+    </View>
55
+  )
56
+}

+ 26
- 0
src/pages/project/NavIcons/index.scss Bestand weergeven

@@ -0,0 +1,26 @@
1
+.navicons {
2
+  width:690px;
3
+  height:188px;
4
+  background:#fff;
5
+  box-shadow:0px 4px 12px 0px rgba(0,0,0,0.12);
6
+  border-radius:12px;
7
+  display: flex;
8
+  align-items: center;
9
+  justify-content: space-between;
10
+  margin: -64px auto 0 auto;
11
+  position: relative;
12
+  .nav-item{
13
+    text-align: center;
14
+    width: 25%;
15
+    .icon{
16
+      width:84px;
17
+      height:84px;
18
+    }
19
+    .nav-text{
20
+      display: flex;
21
+      align-items: center;
22
+      justify-content: center;
23
+      
24
+    }
25
+  }
26
+}

+ 0
- 144
src/pages/project/icons.js Bestand weergeven

@@ -1,144 +0,0 @@
1
-import { ROLE_CODE } from '@/constants/user'
2
-
3
-const icons = {
4
-    shop: require('@/assets/index/mall-icon.png'),
5
-    encyclopedia: require('@/assets/index/encyclopedia-icon.png'),
6
-    recommend: require('@/assets/index/recommend-icon.png'),
7
-    map: require('@/assets/index/map-icon.png'),
8
-    calculator: require('@/assets/index/calculator-icon.png'),
9
-    Highlyrecommented: require('@/assets/index/recommend.png'),
10
-}
11
-
12
-const DRIFT = ROLE_CODE['DRIFT']
13
-const CUSTOMER = ROLE_CODE['CUSTOMER']
14
-const CONSULTANT = ROLE_CODE['CONSULTANT']
15
-// const ESTATE_AGENT = ROLE_CODE['ESTATE_AGENT']
16
-// const CHANNEL_AGENT = ROLE_CODE['CHANNEL_AGENT']
17
-
18
-const menus = [
19
-
20
-    {
21
-        name: '赚积分',
22
-        url: '/pages/shop/index',
23
-        icon: icons.shop,
24
-        switchTab: true,
25
-        iconCode: 'integralMall',
26
-    },
27
-    {
28
-        name: '购房须知',
29
-        url: '/pages/policy/index?from=mine',
30
-        icon: icons.encyclopedia,
31
-        iconCode: 'buyingEncyclopedia'
32
-    },
33
-    {
34
-        name: '推荐客户',
35
-        url: '/useless/pages/agent/recommend/index?type=index&cityId=',
36
-        icon: icons.recommend,
37
-        iconCode: 'refercustomers',
38
-        city: true,
39
-    },
40
-    {
41
-        name: '选好房',
42
-        url: '/pages/project/map/index',
43
-        icon: icons.map,
44
-        iconCode: 'findRoom'
45
-    },
46
-    {
47
-        name: '重点推荐',
48
-        url: '/pages/project/highlyRecommented',
49
-        icon: icons.Highlyrecommented,
50
-        iconCode: 'Highlyrecommented'
51
-    },
52
-    {
53
-        name: '算房贷',
54
-        url: '/pages/toolKit/index',
55
-        icon: icons.calculator,
56
-        iconCode: 'MortgageCalculator'
57
-    },
58
-
59
-    {
60
-        name: '楼盘列表',
61
-        url: '/pages/project/list/index',
62
-        icon: icons.buildingList,
63
-        iconCode: 'PropertyListing'
64
-    },
65
-    {
66
-        name: '活动资讯',
67
-        url: '/pages/activity/activity',
68
-        icon: icons.calculator,
69
-        iconCode: 'EventInformation',
70
-        switchTab: true,
71
-    },
72
-    {
73
-        name: '参加活动',
74
-        url: '/pages/activity/activity',
75
-        icon: icons.activity,
76
-        iconCode: 'Popularactivities',
77
-        switchTab: true,
78
-    },
79
-    {
80
-        name: '最新资讯',
81
-        url: '/pages/activity/activity',
82
-        icon: icons.news,
83
-        iconCode: 'LatestInformation',
84
-        switchTab: true,
85
-    },
86
-    {
87
-        name: '我的客户',
88
-        url: '/useless/pages/agent/client/index',
89
-        icon: icons.myGuest,
90
-        iconCode: 'Myclient',
91
-    },
92
-    {
93
-        name: '我的活动',
94
-        url: '/pages/activity/myActivity?from=mine',
95
-        icon: icons.activities,
96
-        iconCode: 'MyActivities'
97
-    },
98
-    {
99
-        name: '我的助力',
100
-        url: '/pages/activity/assistancePage',
101
-        icon: icons.help,
102
-        iconCode: 'Myhelp'
103
-    },
104
-    {
105
-        name: '我的拼团',
106
-        url: '/pages/activity/assemblePage',
107
-        icon: icons.group,
108
-        iconCode: 'Mygroup'
109
-    },
110
-    {
111
-        name: '我的收藏',
112
-        url: '/pages/person/favorite/index',
113
-        icon: icons.collection,
114
-        iconCode: 'MyFavorites'
115
-    },
116
-    {
117
-        name: '我的资料',
118
-        url: '/useless/pages/person/profile/index',
119
-        icon: icons.profile,
120
-        iconCode: 'MyInformation'
121
-    },
122
-    {
123
-        name: '我的消息',
124
-        url: '/pages/im/list/index',
125
-        icon: icons.chatList,
126
-        iconCode: 'Mymessage'
127
-    },
128
-    {
129
-        name: '兑换记录',
130
-        url: '/useless/pages/shop/record/index',
131
-        icon: icons.exchange,
132
-        iconCode: 'Exchangerecords'
133
-    },
134
-    {
135
-        name: '意见反馈',
136
-        url: '/useless/pages/person/feedback/index',
137
-        icon: icons.feedback,
138
-        iconCode: 'Feedback'
139
-    },
140
-
141
-
142
-]
143
-
144
-export { icons, menus }

+ 9
- 122
src/pages/project/index.js Bestand weergeven

@@ -5,29 +5,17 @@ import Banner from './banner'
5 5
 import Newsbanner from './newsbanner'
6 6
 import Activity from './activity'
7 7
 import BannerTwo from './swiper'
8
-// import ActivityItem from '../activity/item'
9 8
 import ready from '@/utils/ready'
10
-import { getLocationCity } from '@/services/map'
11
-import { queryBanners, savePoint, updatePoint, queryExtContents, queryIndexIcons } from '@/services/common'
9
+import { savePoint, updatePoint, queryExtContents, queryIndexIcons } from '@/services/common'
12 10
 import { queryHelpGroup } from '@/services/news'
13 11
 import { getIndexShare } from '@/services/user'
14
-// import { queryActivityList } from '@/services/activity'
15 12
 import { dispatchCitySelected } from '@/actions/city'
16
-import { ROLE_CODE, DECREASE_UNREADNUM } from '@/constants/user'
17 13
 import { SET_SCREEN_SHOWED } from '@/constants/project'
18 14
 import { getStore, connect } from '@tarojs/redux'
19 15
 import * as actions from '@/actions/project'
20 16
 import { transferImage } from '@/utils/tools'
21 17
 import Notice from '@/components/Notice'
22
-import { menus } from './icons'
23
-import Menus from '@/components/indexMenus'
24
-
25
-const bgImg = "https://njcj.oss-cn-shanghai.aliyuncs.com/miniapp/upload/images/1578724562550-background.png"
26
-// import { getIndexPreloadData } from '@/utils/preload'
27
-// import Authorize from '@/components/authorize'
28
-// import * as noticeType from '@/constants/common.js'
29
-
30
-// const { miniProgram: { appId } } = wx.getAccountInfoSync();
18
+import NavIcons from './NavIcons'
31 19
 
32 20
 @connect(
33 21
   state => ({ ...state.project, ...state.city, ...state.user, system: state.system }),
@@ -57,7 +45,7 @@ export default class Index extends Component {
57 45
     propagandaBanner: [],
58 46
     newsShow: false,
59 47
     city: null,
60
-    menusList: [],
48
+    iconList: [],
61 49
   }
62 50
 
63 51
   componentWillMount() {
@@ -87,58 +75,9 @@ export default class Index extends Component {
87 75
   }
88 76
 
89 77
   getIndexIcons() {
90
-
91 78
     queryIndexIcons().then(res => {
92
-      if (res.length) {
93
-        const Arr = [];
94
-
95
-        res.forEach(item => {
96
-          menus.forEach(menu => {
97
-            if (menu.iconCode == item.iconCode) {
98
-              Arr.push(menu);
99
-            }
100
-          })
101
-        })
102
-        const { userInfo: { person: { personType } } } = this.props
103
-        this.setState({
104
-          menusList: personType == ROLE_CODE['CONSULTANT'] ? Arr.filter(item => item.iconCode != 'refercustomers') : Arr
105
-        })
106
-      } else {
107
-        const iconList = [
108
-          {
109
-            iconCode: 'integralMall',
110
-            iconName: '赚积分',
111
-            iconUrl: 'https://njcj.oss-cn-shanghai.aliyuncs.com/miniapp/upload/images/1580811839725-mall-icon.png'
112
-          },
113
-          {
114
-            iconCode: 'refercustomers',
115
-            iconName: '推荐客户',
116
-            iconUrl: 'https://njcj.oss-cn-shanghai.aliyuncs.com/miniapp/upload/images/1580811691300-recommend-icon.png',
117
-          },
118
-          {
119
-            iconCode: 'buyingEncyclopedia',
120
-            iconName: '购房须知',
121
-            iconUrl: 'https://njcj.oss-cn-shanghai.aliyuncs.com/miniapp/upload/images/1580811865979-encyclopedia-icon.png'
122
-          },
123
-          {
124
-            iconCode: 'findRoom',
125
-            iconName: '选好房',
126
-            iconUrl: 'https://njcj.oss-cn-shanghai.aliyuncs.com/miniapp/upload/images/1580811880140-map-icon.png',
127
-
128
-          },
129
-        ]
130
-        const newArr = [];
131
-        iconList.forEach(item => {
132
-          menus.forEach(menu => {
133
-            if (menu.iconCode == item.iconCode) {
134
-              newArr.push(menu);
135
-            }
136
-          })
137
-        })
138
-        const { userInfo: { person: { personType } } } = this.props
139
-        this.setState({
140
-          menusList: personType == ROLE_CODE['CONSULTANT'] ? newArr.filter(item => item.iconCode != 'refercustomers') : newArr
141
-        })
79
+      if (res && res.length) {
80
+        this.setState({ iconList: res })
142 81
       }
143 82
     })
144 83
   }
@@ -179,57 +118,6 @@ export default class Index extends Component {
179 118
     recordId && updatePoint(recordId)
180 119
   }
181 120
 
182
-  // getLocation() {
183
-  //   Taro.getLocation().then(location => {
184
-  //     Taro.setStorageSync('lat', location.latitude)
185
-  //     Taro.setStorageSync('lon', location.longitude)
186
-
187
-  //     const payload = { location: `${location.longitude},${location.latitude}` }
188
-
189
-  //     getLocationCity(payload).then(res => {
190
-  //       if (!res || !res.id) {
191
-  //         Taro.showToast({
192
-  //           title: '未查询到当前城市信息, 请手动选择',
193
-  //           icon: 'none',
194
-  //           duration: 3000,
195
-  //         })
196
-  //       } else {
197
-  //         this.setState({ city: res })
198
-  //         this.loadData({ curCity: res })
199
-  //         this.updateCity(res)
200
-  //       }
201
-  //     }).catch(err => {
202
-  //       console.error(err)
203
-
204
-  //       Taro.showToast({
205
-  //         title: '服务错误, 请手动选择城市',
206
-  //         icon: 'none',
207
-  //         duration: 3000,
208
-  //       })
209
-  //     })
210
-  //   }).catch(err => {
211
-  //     if (err.errMsg === 'getLocation:fail auth deny') {
212
-  //       Taro.showModal({
213
-  //         content: '请同意授权您的定位功能',
214
-  //         showCancel: false,
215
-  //         duration: 3000,
216
-  //       })
217
-  //     } else {
218
-  //       Taro.showToast({
219
-  //         title: `定位失败, 请手动选择城市: ${err.errMsg}`,
220
-  //         icon: 'none',
221
-  //         duration: 3000,
222
-  //       })
223
-  //     }
224
-
225
-  //     console.error(err)
226
-  //   })
227
-  // }
228
-
229
-  // updateCity(payload) {
230
-  //   this.props.dispatchCitySelected(payload)
231
-  // }
232
-
233 121
   loadData(props = {}) {
234 122
     this.loadHelpGroupList(props)
235 123
     this.loadList(props)
@@ -606,10 +494,9 @@ export default class Index extends Component {
606 494
     })
607 495
   }
608 496
   render() {
609
-    const { curCity } = this.props
610
-    const { achieve, helpGroupList, propagandaBanner, newsShow, menusList } = this.state
611
-    const { userInfo: { person: { personType, phone } } } = this.props
612
-    const { unReadNum, userInfo: { person } } = this.props
497
+    const { achieve, helpGroupList, propagandaBanner, newsShow, iconList } = this.state
498
+    const { curCity, unReadNum, userInfo: { person } } = this.props
499
+
613 500
     return (
614 501
       <Block>
615 502
         {this.state.loaded && (
@@ -653,7 +540,7 @@ export default class Index extends Component {
653 540
                 </View>
654 541
               </View>
655 542
               {/* 菜单栏 */}
656
-              <Menus menusList={menusList}></Menus>
543
+              <NavIcons city={curCity} person={person} iconList={iconList} ></NavIcons>
657 544
               {/* <View style={propagandaBanner.length > 0 ? "border-bottom:20rpx solid #f5f5f5" : ''}> */}
658 545
               <View style={(newsShow || propagandaBanner.length > 0) ? "border-bottom:20rpx solid #f5f5f5" : ''}>
659 546
                 {/* 展示位轮播图 */}

+ 19
- 8
src/utils/tools.js Bestand weergeven

@@ -27,6 +27,14 @@ export function isEmpty(o) {
27 27
   return false
28 28
 }
29 29
 
30
+/**
31
+ * 是否函数
32
+ * @param {*} f 
33
+ */
34
+export function isFunction(f) {
35
+  return typeof f === 'function'
36
+}
37
+
30 38
 /**
31 39
  * 是否分享场景(含扫码)
32 40
  * @param {*} scene 
@@ -68,6 +76,9 @@ export function mergeNotNull(a, b) {
68 76
   return res
69 77
 }
70 78
 
79
+const ossPath = OSS_PATH
80
+const ossFastPath = OSS_FAST_PATH
81
+
71 82
 /**
72 83
  * 
73 84
  * @param {*} img 
@@ -76,8 +87,8 @@ export function mergeNotNull(a, b) {
76 87
 export function getThumbnail(img, quality) {
77 88
   if (!img) return img
78 89
 
79
-  if (img.indexOf('https://njcj.oss-cn-shanghai.aliyuncs.com') === 0) {
80
-    return `${img.replace('oss-cn-shanghai', 'oss-accelerate')}?x-oss-process=style/compress${quality || 30}`
90
+  if (img.indexOf(ossPath) === 0 || img.indexOf(ossFastPath) === 0) {
91
+    return `${img.replace(ossPath, ossFastPath)}?x-oss-process=style/compress${quality || 30}`
81 92
   }
82 93
 
83 94
   return img
@@ -87,8 +98,8 @@ export function getThumbnail(img, quality) {
87 98
 export function resizeImage(img, size) {
88 99
   if (!img) return img
89 100
 
90
-  if (img.indexOf('https://njcj.oss-cn-shanghai.aliyuncs.com') === 0) {
91
-    return `${img.replace('oss-cn-shanghai', 'oss-accelerate')}?x-oss-process=style/resize${size || 750}`
101
+  if (img.indexOf(ossPath) === 0 || img.indexOf(ossFastPath) === 0) {
102
+    return `${img.replace(ossPath, ossFastPath)}?x-oss-process=style/resize${size || 750}`
92 103
   }
93 104
 
94 105
   return img
@@ -101,13 +112,13 @@ export function resizeImage(img, size) {
101 112
 export function transferImage(img) {
102 113
   if (!img) return img
103 114
 
104
-  if (img.indexOf('https://njcj.oss-cn-shanghai.aliyuncs.com') === 0) {
115
+  if (img.indexOf(ossPath) === 0 || img.indexOf(ossFastPath) === 0) {
105 116
     if (store.getState().system.systemInfo.platform !== 'ios') {
106 117
       // ios 暂时不支持 webp
107
-      return `${img.replace('oss-cn-shanghai', 'oss-accelerate')}?x-oss-process=style/transwebp`
118
+      return `${img.replace(ossPath, ossFastPath)}?x-oss-process=style/transwebp`
108 119
     }
109 120
 
110
-    return `${img.replace('oss-cn-shanghai', 'oss-accelerate')}?x-oss-process=image/resize,m_lfit,w_750/quality,Q_80`
121
+    return `${img.replace(ossPath, ossFastPath)}?x-oss-process=image/resize,m_lfit,w_750/quality,Q_80`
111 122
   }
112 123
 
113 124
   return img
@@ -198,7 +209,7 @@ export function getDownloadURL(url, type) {
198 209
     case 'avatar':
199 210
       return url.replace('https://wx.qlogo.cn/', `${HOST}/qlogo/`);
200 211
     case 'alioss':
201
-      return url.replace('https://njcj.oss-cn-shanghai.aliyuncs.com/', `${HOST}/alioss/`).replace('https://estateagents.oss-accelerate.aliyuncs.com/', `${HOST}/alioss/`);
212
+      return url.replace(ossPath, `${HOST}/alioss/`).replace(ossFastPath, `${HOST}/alioss/`);
202 213
     default:
203 214
       return url;
204 215
   }