Преглед изворни кода

Merge branch 'dev' of http://git.ycjcjy.com/shigongli/miniapp-v2 into dev

李志伟 пре 3 година
родитељ
комит
623ee87b43

+ 1
- 1
config/prod.js Прегледај датотеку

@@ -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 Прегледај датотеку

@@ -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,

+ 1
- 1
src/components/BossCard/index.jsx Прегледај датотеку

@@ -33,7 +33,7 @@ export default (props) => {
33 33
       <CouponMedia onClick={goFood}>
34 34
         <CouponMedia.Header
35 35
           cashback={item.cashback}
36
-          image={compressImage(item.poster)}
36
+          image={compressImage(item.poster, 'thumb')}
37 37
           badge='food'
38 38
         />
39 39
         <CouponMedia.Body star={st}>

+ 1
- 1
src/components/CouponCard/Media/Header.jsx Прегледај датотеку

@@ -14,7 +14,7 @@ export default (props) => {
14 14
       {enableCashback && <Cashback money={cashback} style={{ marginTop: '-10px' }} />}
15 15
       <View className='coupun-media_thumb'>
16 16
         <BadgeTag type={badge} />
17
-        <Image src={image} />
17
+        <Image src={image} webp />
18 18
       </View>
19 19
     </View>
20 20
   )

+ 0
- 1
src/pages/MineUserAll/AllOrder/index.jsx Прегледај датотеку

@@ -10,7 +10,6 @@ const tabs = ['全部', '待支付', '待核销', '已使用', '已过期'].map(
10 10
 
11 11
 const TabBar = (props) => {
12 12
   const handleClick = (e) => {
13
-    console.log('-----------------handleTabChange----------------', e)
14 13
     const { index } = e.detail
15 14
     props.onClick(index)
16 15
   }

+ 4
- 2
src/utils/index.js Прегледај датотеку

@@ -61,15 +61,17 @@ export function random(prefix) {
61 61
  * @param {*} url 
62 62
  * @returns 
63 63
  */
64
-export function compressImage(url) {
64
+export function compressImage(url, typ) {
65 65
   if (!url) return url;
66 66
 
67 67
   // GIF 不压缩
68 68
   if (url.indexOf('.gif') > -1) return url;
69 69
 
70
+  const style = typ || 'cmp80'
71
+
70 72
   // eslint-disable-next-line no-undef
71 73
   if (url.indexOf(OSS) > -1) {
72
-    return `${url}?x-oss-process=style/cmp80`
74
+    return `${url}?x-oss-process=style/${style}`.replace('http://', 'https://')
73 75
   }
74 76
 
75 77
   return url;